mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-09 00:59:37 +02:00
Merge remote-tracking branch 'upstream/develop' into knsv/new-shapes
* upstream/develop: [autofix.ci] apply automated fixes test: fix gantt.spec.js type error test: await on `expect().resolves/rejects` build(types): disable preserveSymlinks in tsconfig
This commit is contained in:
@@ -127,7 +127,7 @@ Error.prepareStackTrace
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
node_modules/@types/node/globals.d.ts:28
|
node_modules/.pnpm/@types+node\@20.16.2/node_modules/@types/node/globals.d.ts:28
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ Error.stackTraceLimit
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
node_modules/@types/node/globals.d.ts:30
|
node_modules/.pnpm/@types+node\@20.16.2/node_modules/@types/node/globals.d.ts:30
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -168,4 +168,4 @@ Error.captureStackTrace
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
node_modules/@types/node/globals.d.ts:21
|
node_modules/.pnpm/@types+node\@20.16.2/node_modules/@types/node/globals.d.ts:21
|
||||||
|
@@ -389,7 +389,6 @@ const setupToolTips = function (element: Element) {
|
|||||||
// @ts-ignore - getBoundingClientRect is not part of the d3 type definition
|
// @ts-ignore - getBoundingClientRect is not part of the d3 type definition
|
||||||
const rect = this.getBoundingClientRect();
|
const rect = this.getBoundingClientRect();
|
||||||
|
|
||||||
// @ts-expect-error - Incorrect types
|
|
||||||
tooltipElem.transition().duration(200).style('opacity', '.9');
|
tooltipElem.transition().duration(200).style('opacity', '.9');
|
||||||
tooltipElem
|
tooltipElem
|
||||||
.text(el.attr('title'))
|
.text(el.attr('title'))
|
||||||
@@ -399,7 +398,6 @@ const setupToolTips = function (element: Element) {
|
|||||||
el.classed('hover', true);
|
el.classed('hover', true);
|
||||||
})
|
})
|
||||||
.on('mouseout', function () {
|
.on('mouseout', function () {
|
||||||
// @ts-expect-error - Incorrect types
|
|
||||||
tooltipElem.transition().duration(500).style('opacity', 0);
|
tooltipElem.transition().duration(500).style('opacity', 0);
|
||||||
const el = select(this);
|
const el = select(this);
|
||||||
el.classed('hover', false);
|
el.classed('hover', false);
|
||||||
|
@@ -479,7 +479,6 @@ const setupToolTips = function (element: Element) {
|
|||||||
}
|
}
|
||||||
const rect = (this as Element)?.getBoundingClientRect();
|
const rect = (this as Element)?.getBoundingClientRect();
|
||||||
|
|
||||||
// @ts-ignore TODO: fix this
|
|
||||||
tooltipElem.transition().duration(200).style('opacity', '.9');
|
tooltipElem.transition().duration(200).style('opacity', '.9');
|
||||||
tooltipElem
|
tooltipElem
|
||||||
.text(el.attr('title'))
|
.text(el.attr('title'))
|
||||||
@@ -489,7 +488,6 @@ const setupToolTips = function (element: Element) {
|
|||||||
el.classed('hover', true);
|
el.classed('hover', true);
|
||||||
})
|
})
|
||||||
.on('mouseout', function () {
|
.on('mouseout', function () {
|
||||||
// @ts-ignore TODO: fix this
|
|
||||||
tooltipElem.transition().duration(500).style('opacity', 0);
|
tooltipElem.transition().duration(500).style('opacity', 0);
|
||||||
const el = select(this);
|
const el = select(this);
|
||||||
el.classed('hover', false);
|
el.classed('hover', false);
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import { parser } from './gantt.jison';
|
import { parser } from './gantt.jison';
|
||||||
import ganttDb from '../ganttDb.js';
|
import ganttDb from '../ganttDb.js';
|
||||||
import { convert } from '../../../tests/util.js';
|
import { vi, it } from 'vitest';
|
||||||
import { vi } from 'vitest';
|
|
||||||
const spyOn = vi.spyOn;
|
const spyOn = vi.spyOn;
|
||||||
const parserFnConstructor = (str) => {
|
const parserFnConstructor = (str) => {
|
||||||
return () => {
|
return () => {
|
||||||
@@ -150,14 +149,14 @@ describe('when parsing a gantt diagram it', function () {
|
|||||||
expect(tasks[3].id).toEqual('d');
|
expect(tasks[3].id).toEqual('d');
|
||||||
expect(tasks[3].task).toEqual('task D');
|
expect(tasks[3].task).toEqual('task D');
|
||||||
});
|
});
|
||||||
it.each(convert`
|
it.each`
|
||||||
tags | milestone | done | crit | active
|
tags | milestone | done | crit | active
|
||||||
${'milestone'} | ${true} | ${false} | ${false} | ${false}
|
${'milestone'} | ${true} | ${false} | ${false} | ${false}
|
||||||
${'done'} | ${false} | ${true} | ${false} | ${false}
|
${'done'} | ${false} | ${true} | ${false} | ${false}
|
||||||
${'crit'} | ${false} | ${false} | ${true} | ${false}
|
${'crit'} | ${false} | ${false} | ${true} | ${false}
|
||||||
${'active'} | ${false} | ${false} | ${false} | ${true}
|
${'active'} | ${false} | ${false} | ${false} | ${true}
|
||||||
${'crit,milestone,done'} | ${true} | ${true} | ${true} | ${false}
|
${'crit,milestone,done'} | ${true} | ${true} | ${true} | ${false}
|
||||||
`)('should handle a task with tags $tags', ({ tags, milestone, done, crit, active }) => {
|
`('should handle a task with tags $tags', ({ tags, milestone, done, crit, active }) => {
|
||||||
const str =
|
const str =
|
||||||
'gantt\n' +
|
'gantt\n' +
|
||||||
'dateFormat YYYY-MM-DD\n' +
|
'dateFormat YYYY-MM-DD\n' +
|
||||||
|
@@ -130,8 +130,8 @@ describe('pie', () => {
|
|||||||
expect(sections.get('bat')).toBe(40);
|
expect(sections.get('bat')).toBe(40);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle simple pie with negative decimal', () => {
|
it('should handle simple pie with negative decimal', async () => {
|
||||||
expect(async () => {
|
await expect(async () => {
|
||||||
await parser.parse(`pie
|
await parser.parse(`pie
|
||||||
"ash" : -60.67
|
"ash" : -60.67
|
||||||
"bat" : 40.12
|
"bat" : 40.12
|
||||||
|
@@ -2063,8 +2063,8 @@ participant Alice`;
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it.each(['__proto__', 'constructor'])('should allow %s as an actor name', function (prop) {
|
it.each(['__proto__', 'constructor'])('should allow %s as an actor name', async function (prop) {
|
||||||
expect(
|
await expect(
|
||||||
mermaidAPI.parse(`
|
mermaidAPI.parse(`
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
${prop}-->>A: Hello, how are you?`)
|
${prop}-->>A: Hello, how are you?`)
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"allowJs": false,
|
"allowJs": false,
|
||||||
"preserveSymlinks": false,
|
|
||||||
"strictPropertyInitialization": false
|
"strictPropertyInitialization": false
|
||||||
},
|
},
|
||||||
"include": ["./src/**/*.ts", "./tests/**/*.ts"],
|
"include": ["./src/**/*.ts", "./tests/**/*.ts"],
|
||||||
|
@@ -75,7 +75,7 @@
|
|||||||
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
||||||
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
||||||
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
||||||
"preserveSymlinks": true /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */,
|
// "preserveSymlinks": true /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */,
|
||||||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
||||||
|
|
||||||
/* Type Checking */
|
/* Type Checking */
|
||||||
|
Reference in New Issue
Block a user