obsidian-mind-map icon indicating copy to clipboard operation
obsidian-mind-map copied to clipboard

Upgrade markmap to 0.14.x

Open jawspeak opened this issue 3 years ago • 3 comments

Upgrading to be able to take advantage of newer features in markmap. https://markmap.js.org/

This has no new functionality and no changes, it just upgrades the markmap dependency. A follow up PR may then have new functionality such as setting expanded levels in the mind map.

EDIT - the below is now fixed also in the 2nd commit.

Note before and after this PR I was seeing the following issue when running npm run dev (using nvm ``)

Errors/warnings on master:

bundles src/main.ts → dist...
(!) Circular dependencies
node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/src/selection/select.js -> node_modules/d3-selection/src/selection/index.js
node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/src/selection/selectAll.js -> node_modules/d3-selection/src/selection/index.js
node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/src/selection/filter.js -> node_modules/d3-selection/src/selection/index.js
...and 12 more
(!) Plugin typescript: @rollup/plugin-typescript TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type '"layout-ready"' is not assignable to parameter of type '"quit"'.
src/mindmap-view.ts: (71:31)

71             this.workspace.on('layout-ready', () => this.update()),
                                 ~~~~~~~~~~~~~~

  node_modules/obsidian/obsidian.d.ts:4153:5
    4153     on(name: 'quit', callback: (tasks: Tasks) => any, ctx?: any): EventRef;
             ~~
    The last overload is declared here.

created dist in 5.2s

jawspeak avatar Nov 23 '22 23:11 jawspeak

The second commit fixes the warning by using the recommended updated api. (layout-ready was removed, so I updated it with the new mechanism.)

jawspeak avatar Nov 24 '22 06:11 jawspeak

@lynchjames hopefully this is acceptable to merge, and can get out for everyone's benefit! Same as #103 too! Thanks,

jawspeak avatar Dec 08 '22 18:12 jawspeak

Bump? Checking for feedback here please @lynchjames

jawspeak avatar Dec 30 '22 19:12 jawspeak