tbo47 / dagre-es

The dagrejs library exported as ES modules.
Other
32 stars 14 forks source link

fix Circular Imports #17

Closed sidharthv96 closed 1 year ago

sidharthv96 commented 1 year ago

Build warning were coming in mermaid recently.

Export "layout" of module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/layout.js" was reexported through module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre-js/render.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
Export "layout" of module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/layout.js" was reexported through module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "packages/mermaid/src/dagre-wrapper/index.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
Export "layout" of module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/layout.js" was reexported through module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "packages/mermaid/src/diagrams/er/erRenderer.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
Export "layout" of module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/layout.js" was reexported through module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "packages/mermaid/src/diagrams/requirement/requirementRenderer.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
Export "layout" of module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/layout.js" was reexported through module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "packages/mermaid/src/diagrams/class/classRenderer.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
Export "layout" of module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/layout.js" was reexported through module "node_modules/.pnpm/dagre-d3-es@7.0.8/node_modules/dagre-d3-es/src/dagre/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "packages/mermaid/src/diagrams/state/stateRenderer.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
tbo47 commented 1 year ago

Would you like a new release?

sidharthv96 commented 1 year ago

That would be wonderful, thank you!

tbo47 commented 1 year ago

https://www.npmjs.com/package/dagre-d3-es?activeTab=versions