mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
000b432bb2
* develop: (70 commits) build(deps-dev): bump vite from 4.4.9 to 4.4.12 Changes to .prettierignore 1. Added 'demos/dev/**' to be ignored by Prettier. 2. Added '!/demos/dev/example.html' so that Prettier ensures no one changes the example.html in a way that doesn't obey the Prettier code formatting rules. build: use `tsx` instead of `ts-node-esm` chore: Downgrade node to 18.18.2 fix: #5100 Add viewbox to sankey chore(deps): update all minor dependencies chore: Rename test test: Add unit test for generic classname and namespace fix: Check if parentCommit is provided Split type from generic class name Condition of Parent Id Without Merge Commit Added Referenced the PmWiki's Cookbook recipe enabling MermaidJs schematics in wiki pages test(e2e): fix pie chart E2E tests for PR #4288 Add dummy commit to trigger GH checks chore: Revert unnecessary export refactor: Remove unnecessary calculations chore: Fix computeWidth function chore: Cleanup setupGraphViewbox Update docs update mermaidAPI to cleanup the text before passing to getDiagramFromText ...
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import jison from './.vite/jisonPlugin.js';
|
|
import jsonSchemaPlugin from './.vite/jsonSchemaPlugin.js';
|
|
import typescript from '@rollup/plugin-typescript';
|
|
import { defaultExclude, defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
extensions: ['.js'],
|
|
},
|
|
plugins: [
|
|
jison(),
|
|
jsonSchemaPlugin(), // handles .schema.yaml JSON Schema files
|
|
// @ts-expect-error According to the type definitions, rollup plugins are incompatible with vite
|
|
typescript({ compilerOptions: { declaration: false } }),
|
|
],
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
// TODO: should we move this to a mermaid-core package?
|
|
setupFiles: ['packages/mermaid/src/tests/setup.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html', 'lcov'],
|
|
reportsDirectory: './coverage/vitest',
|
|
exclude: [...defaultExclude, './tests/**', '**/__mocks__/**', '**/generated/'],
|
|
},
|
|
includeSource: ['packages/*/src/**/*.{js,ts}'],
|
|
},
|
|
build: {
|
|
/** If you set esmExternals to true, this plugins assumes that
|
|
all external dependencies are ES modules */
|
|
|
|
commonjsOptions: {
|
|
esmExternals: true,
|
|
},
|
|
},
|
|
define: {
|
|
'import.meta.vitest': 'undefined',
|
|
},
|
|
});
|