From 3c44379af9b3149bdcedb2757c6aa4d02989b0aa Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 13 Dec 2022 00:34:31 +0530 Subject: [PATCH] fix: add .js to external imports. --- packages/mermaid/package.json | 2 +- packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js | 2 +- packages/mermaid/src/dagre-wrapper/mermaid-graphlib.spec.js | 2 +- packages/mermaid/src/diagrams/class/classRenderer-v2.js | 2 +- packages/mermaid/src/diagrams/er/erRenderer.js | 2 +- packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js | 2 +- packages/mermaid/src/diagrams/flowchart/flowRenderer.js | 2 +- .../src/diagrams/flowchart/parser/flow-direction.spec.js | 1 - packages/mermaid/src/diagrams/flowchart/parser/subgraph.spec.js | 1 - packages/mermaid/src/diagrams/state/stateRenderer-v2.js | 2 +- packages/mermaid/src/utils.spec.js | 2 +- 11 files changed, 9 insertions(+), 11 deletions(-) diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index 19e2325c1a..e4ce9e93ac 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -1,6 +1,6 @@ { "name": "mermaid", - "version": "9.3.0-rc.3", + "version": "9.3.0-rc.4", "description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "main": "./dist/mermaid.min.js", "module": "./dist/mermaid.core.mjs", diff --git a/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js b/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js index 5722f7cc08..cb80e658f2 100644 --- a/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js +++ b/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js @@ -1,7 +1,7 @@ /** Decorates with functions required by mermaids dagre-wrapper. */ import { log } from '../logger'; import * as graphlibJson from 'dagre-d3-es/src/graphlib/json'; -import * as graphlib from 'dagre-d3-es/src/graphlib'; +import * as graphlib from 'dagre-d3-es/src/graphlib.js'; export let clusterDb = {}; let descendants = {}; diff --git a/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.spec.js b/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.spec.js index f594e34309..ffc3e78033 100644 --- a/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.spec.js +++ b/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.spec.js @@ -1,5 +1,5 @@ import * as graphlibJson from 'dagre-d3-es/src/graphlib/json'; -import * as graphlib from 'dagre-d3-es/src/graphlib'; +import * as graphlib from 'dagre-d3-es/src/graphlib.js'; import { validate, adjustClustersAndEdges, diff --git a/packages/mermaid/src/diagrams/class/classRenderer-v2.js b/packages/mermaid/src/diagrams/class/classRenderer-v2.js index 3fecfcb9f8..72bc3f0b1c 100644 --- a/packages/mermaid/src/diagrams/class/classRenderer-v2.js +++ b/packages/mermaid/src/diagrams/class/classRenderer-v2.js @@ -1,5 +1,5 @@ import { select } from 'd3'; -import * as graphlib from 'dagre-d3-es/src/graphlib'; +import * as graphlib from 'dagre-d3-es/src/graphlib.js'; import { log } from '../../logger'; import { getConfig } from '../../config'; import { render } from '../../dagre-wrapper/index.js'; diff --git a/packages/mermaid/src/diagrams/er/erRenderer.js b/packages/mermaid/src/diagrams/er/erRenderer.js index ebf338ae16..59097760ff 100644 --- a/packages/mermaid/src/diagrams/er/erRenderer.js +++ b/packages/mermaid/src/diagrams/er/erRenderer.js @@ -1,4 +1,4 @@ -import * as graphlib from 'dagre-d3-es/src/graphlib'; +import * as graphlib from 'dagre-d3-es/src/graphlib.js'; import { line, curveBasis, select } from 'd3'; import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js'; import { getConfig } from '../../config'; diff --git a/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js b/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js index 3e46aaaa5f..b09a3227d8 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js +++ b/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js @@ -1,4 +1,4 @@ -import * as graphlib from 'dagre-d3-es/src/graphlib'; +import * as graphlib from 'dagre-d3-es/src/graphlib.js'; import { select, curveLinear, selectAll } from 'd3'; import flowDb from './flowDb'; diff --git a/packages/mermaid/src/diagrams/flowchart/flowRenderer.js b/packages/mermaid/src/diagrams/flowchart/flowRenderer.js index 6cbc655328..32ab311597 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowRenderer.js +++ b/packages/mermaid/src/diagrams/flowchart/flowRenderer.js @@ -1,4 +1,4 @@ -import * as graphlib from 'dagre-d3-es/src/graphlib'; +import * as graphlib from 'dagre-d3-es/src/graphlib.js'; import { select, curveLinear, selectAll } from 'd3'; import { getConfig } from '../../config'; import { render as Render } from 'dagre-d3-es'; diff --git a/packages/mermaid/src/diagrams/flowchart/parser/flow-direction.spec.js b/packages/mermaid/src/diagrams/flowchart/parser/flow-direction.spec.js index 5c20947376..7726ce0f79 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/flow-direction.spec.js +++ b/packages/mermaid/src/diagrams/flowchart/parser/flow-direction.spec.js @@ -1,6 +1,5 @@ import flowDb from '../flowDb'; import flow from './flow'; -import filter from 'lodash-es/filter'; import { setConfig } from '../../../config'; setConfig({ diff --git a/packages/mermaid/src/diagrams/flowchart/parser/subgraph.spec.js b/packages/mermaid/src/diagrams/flowchart/parser/subgraph.spec.js index 5ba6a5361e..ae6f178b89 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/subgraph.spec.js +++ b/packages/mermaid/src/diagrams/flowchart/parser/subgraph.spec.js @@ -1,6 +1,5 @@ import flowDb from '../flowDb'; import flow from './flow'; -import filter from 'lodash-es/filter'; import { setConfig } from '../../../config'; setConfig({ diff --git a/packages/mermaid/src/diagrams/state/stateRenderer-v2.js b/packages/mermaid/src/diagrams/state/stateRenderer-v2.js index fa2470d6b9..625dddef40 100644 --- a/packages/mermaid/src/diagrams/state/stateRenderer-v2.js +++ b/packages/mermaid/src/diagrams/state/stateRenderer-v2.js @@ -1,4 +1,4 @@ -import * as graphlib from 'dagre-d3-es/src/graphlib'; +import * as graphlib from 'dagre-d3-es/src/graphlib.js'; import { select } from 'd3'; import { getConfig } from '../../config'; import { render } from '../../dagre-wrapper/index.js'; diff --git a/packages/mermaid/src/utils.spec.js b/packages/mermaid/src/utils.spec.js index e983d21c88..e9a9fc7dcd 100644 --- a/packages/mermaid/src/utils.spec.js +++ b/packages/mermaid/src/utils.spec.js @@ -3,7 +3,7 @@ import utils from './utils'; import assignWithDepth from './assignWithDepth'; import { detectType } from './diagram-api/detectType'; import { addDiagrams } from './diagram-api/diagram-orchestration'; -import memoize from 'lodash-es/memoize'; +import memoize from 'lodash-es/memoize.js'; import { MockedD3 } from './tests/MockedD3'; addDiagrams();