From 08ac41113f55d8af357e750b953757e010efec8a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Feb 2023 05:54:04 +0000 Subject: [PATCH 1/2] chore(deps): update dependency vite to v4 --- package.json | 2 +- pnpm-lock.yaml | 40 +++------------------------------------- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index 91d9316b3..36bc5bae8 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "start-server-and-test": "^1.14.0", "ts-node": "^10.9.1", "typescript": "^4.8.4", - "vite": "^3.2.3", + "vite": "^4.0.0", "vitest": "^0.28.4" }, "volta": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5fbd25bbe..d59edac9f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -161,8 +161,8 @@ importers: specifier: ^4.8.4 version: 4.8.4 vite: - specifier: ^3.2.3 - version: 3.2.3_@types+node@18.11.9 + specifier: ^4.0.0 + version: 4.0.1_@types+node@18.11.9 vitest: specifier: ^0.28.4 version: 0.28.4_vun5xzxu3tkrssf3erdbijyyki @@ -11866,41 +11866,7 @@ packages: optional: true dependencies: esbuild: 0.15.13 - postcss: 8.4.18 - resolve: 1.22.1 - rollup: 2.79.1 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /vite/3.2.3_@types+node@18.11.9: - resolution: {integrity: sha512-h8jl1TZ76eGs3o2dIBSsvXDLb1m/Ec1iej8ZMdz+PsaFUsftZeWe2CZOI3qogEsMNaywc17gu0q6cQDzh/weCQ==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 18.11.9 - esbuild: 0.15.13 - postcss: 8.4.18 + postcss: 8.4.20 resolve: 1.22.1 rollup: 2.79.1 optionalDependencies: From 004432fae9bc8592a5820560bde4d619d11c8e92 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 9 Feb 2023 11:28:27 +0530 Subject: [PATCH 2/2] Fix types --- .vite/build.ts | 15 ++++++++------- packages/mermaid/src/docs/vite.config.ts | 5 ++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.vite/build.ts b/.vite/build.ts index 019461c49..71f94bc69 100644 --- a/.vite/build.ts +++ b/.vite/build.ts @@ -20,13 +20,14 @@ const visualizerOptions = (packageName: string, core = false): PluginOption[] => if (packageName !== 'mermaid' || !visualize) { return []; } - return ['network', 'treemap', 'sunburst'].map((chartType) => - visualizer({ - filename: `./stats/${chartType}${core ? '.core' : ''}.html`, - template: chartType as TemplateType, - gzipSize: true, - brotliSize: true, - }) + return ['network', 'treemap', 'sunburst'].map( + (chartType) => + visualizer({ + filename: `./stats/${chartType}${core ? '.core' : ''}.html`, + template: chartType as TemplateType, + gzipSize: true, + brotliSize: true, + }) as PluginOption ); }; diff --git a/packages/mermaid/src/docs/vite.config.ts b/packages/mermaid/src/docs/vite.config.ts index 356e9398c..5a7682553 100644 --- a/packages/mermaid/src/docs/vite.config.ts +++ b/packages/mermaid/src/docs/vite.config.ts @@ -1,6 +1,5 @@ -import { defineConfig, searchForWorkspaceRoot } from 'vite'; +import { defineConfig, type PluginOption, searchForWorkspaceRoot } from 'vite'; import path from 'path'; -// @ts-ignore: still in alpha import { SearchPlugin } from 'vitepress-plugin-search'; const virtualModuleId = 'virtual:mermaid-config'; @@ -8,7 +7,7 @@ const resolvedVirtualModuleId = '\0' + virtualModuleId; export default defineConfig({ plugins: [ - SearchPlugin(), + SearchPlugin() as PluginOption, { // TODO: will be fixed in the next vitepress release. name: 'fix-virtual',