Merge branch 'release/9.4.2' into pr/AielloChan/4101

* release/9.4.2:
  RC version
  Revert #4034
  Revert #4034
  fix: Vite, D3, Vitest Types
This commit is contained in:
Sidharth Vinod
2023-02-19 00:05:53 +05:30
13 changed files with 347 additions and 385 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "mermaid",
"version": "9.4.0",
"version": "9.4.2-rc.1",
"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",
@@ -56,13 +56,13 @@
"cytoscape": "^3.23.0",
"cytoscape-cose-bilkent": "^4.1.0",
"cytoscape-fcose": "^2.1.0",
"d3": "^7.0.0",
"d3": "^7.4.0",
"dagre-d3-es": "7.0.8",
"dompurify": "2.4.3",
"elkjs": "^0.8.2",
"khroma": "^2.0.0",
"lodash-es": "^4.17.21",
"moment": "^2.29.4",
"moment-mini": "^2.29.4",
"non-layered-tidy-tree-layout": "^2.0.2",
"stylis": "^4.1.2",
"ts-dedent": "^2.2.0",

View File

@@ -1,4 +1,5 @@
/** Created by knut on 14-12-11. */
// @ts-ignore TODO: Investigate D3 issue
import { select } from 'd3';
import { log } from '../../logger';
import { getErrorMessage } from '../../utils';

View File

@@ -1,4 +1,4 @@
import moment from 'moment';
import moment from 'moment-mini';
import { sanitizeUrl } from '@braintree/sanitize-url';
import { log } from '../../logger';
import * as configApi from '../../config';

View File

@@ -1,5 +1,5 @@
// @ts-nocheck TODO: Fix TS
import moment from 'moment';
import moment from 'moment-mini';
import ganttDb from './ganttDb';
import { convert } from '../../tests/util';

View File

@@ -1,4 +1,4 @@
import moment from 'moment';
import moment from 'moment-mini';
import { log } from '../../logger';
import {
select,

View File

@@ -12,12 +12,12 @@ export default defineConfig({
// TODO: will be fixed in the next vitepress release.
name: 'fix-virtual',
async resolveId(id) {
async resolveId(id: string) {
if (id === virtualModuleId) {
return resolvedVirtualModuleId;
}
},
async load(this, id) {
async load(this, id: string) {
if (id === resolvedVirtualModuleId) {
return `export default ${JSON.stringify({
securityLevel: 'loose',
@@ -25,20 +25,15 @@ export default defineConfig({
})};`;
}
},
},
} as PluginOption,
],
resolve: {
alias: {
mermaid: path.join(__dirname, '../../dist/mermaid.esm.min.mjs'), // Use this one to build
'@mermaid-js/mermaid-example-diagram': path.join(
__dirname,
'../../../mermaid-example-diagram/dist/mermaid-example-diagram.esm.min.mjs'
), // Use this one to build
// '@mermaid-js/mermaid-timeline': path.join(
// __dirname,
// '../../../mermaid-timeline/dist/mermaid-timeline.esm.min.mjs'
// ),
},
},
server: {

View File

@@ -2,7 +2,7 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable no-console */
import moment from 'moment';
import moment from 'moment-mini';
export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';

View File

@@ -10,6 +10,7 @@
*
* In addition to the render function, a number of behavioral configuration options are available.
*/
// @ts-ignore TODO: Investigate D3 issue
import { select } from 'd3';
import { compile, serialize, stringify } from 'stylis';
// @ts-ignore: TODO Fix ts errors

View File

@@ -1,4 +1,4 @@
import type {} from '@vitest/spy';
import type {} from '@vitest/spy/dist/index';
/**
* This is a mocked/stubbed version of the d3 Selection type. Each of the main functions are all