diff --git a/package.json b/package.json index d51dd4b6aa..8d23241f7e 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,8 @@ "@vue/runtime-core": "3.5.25", "@vue/runtime-dom": "3.5.25", "@vue/server-renderer": "3.5.25", - "@vue/shared": "3.5.25" + "@vue/shared": "3.5.25", + "vite": "npm:rolldown-vite@7.3.1" } } } diff --git a/packages/ai/vitest.config.mjs b/packages/ai/vitest.config.mjs index d91479e8c7..b64ece8a1e 100644 --- a/packages/ai/vitest.config.mjs +++ b/packages/ai/vitest.config.mjs @@ -16,10 +16,12 @@ export default defineConfig({ // step to build superdoc before running packages/ai tests. { find: '@stores', replacement: path.resolve(__dirname, '../superdoc/src/stores') }, - { - find: /^@superdoc\/(?!common|contracts|geometry-utils|pm-adapter|layout-engine|layout-bridge|painter-dom|style-engine|measuring-dom|word-layout|url-validation|preset-geometry|super-editor|locale-utils|font-utils)(.*)/, - replacement: path.resolve(__dirname, '../superdoc/src/$1'), - }, + // Rolldown doesn't support regex capture groups ($1) in alias replacements. + // Keep in sync with packages/superdoc/vite.config.js superdocSrcAliases. + ...['components', 'composables', 'core', 'helpers', 'stores', 'dev', 'icons.js'].map(name => ({ + find: `@superdoc/${name}`, + replacement: path.resolve(__dirname, `../superdoc/src/${name}`), + })), ], }, plugins: [vue()], diff --git a/packages/superdoc/vite.config.js b/packages/superdoc/vite.config.js index 19a77ad7f0..2cc7662af7 100644 --- a/packages/superdoc/vite.config.js +++ b/packages/superdoc/vite.config.js @@ -3,6 +3,7 @@ import copy from 'rollup-plugin-copy' import dts from 'vite-plugin-dts' import { defineConfig } from 'vite' import { configDefaults } from 'vitest/config' +import { createRequire } from 'node:module'; import { fileURLToPath, URL } from 'node:url'; import { nodePolyfills } from 'vite-plugin-node-polyfills'; import { visualizer } from 'rollup-plugin-visualizer'; @@ -11,6 +12,17 @@ import vue from '@vitejs/plugin-vue' import { version } from './package.json'; import sourceResolve from '../../vite.sourceResolve'; +// WORKAROUND: rolldown doesn't support trailing-slash imports (e.g. 'punycode/') +// which Node.js treats as "resolve the package entry point". node-stdlib-browser's +// url polyfill uses `import from 'punycode/'` and rolldown tries to open the +// directory as a file. We resolve the actual entry point here and redirect via a +// small plugin in optimizeDeps.rollupOptions below. +// Track: https://github.com/nicolo-ribaudo/tc39-proposal-import-deferral/issues/3 +// TODO: Remove once rolldown supports trailing-slash imports or node-stdlib-browser drops them. +const require = createRequire(import.meta.url); +const stdlibRequire = createRequire(require.resolve('node-stdlib-browser/package.json')); +const punycodeEntry = stdlibRequire.resolve('punycode/punycode.js'); + const visualizerConfig = { filename: './dist/bundle-analysis.html', template: 'treemap', @@ -19,22 +31,14 @@ const visualizerConfig = { open: true } +// Internal @superdoc/ paths that map to ./src/ (not workspace packages). +// Rolldown doesn't support regex capture groups ($1) in alias replacements, +// so we list these explicitly instead of using /^@superdoc\/(.*)$/. +// Update this list when adding new src/ subdirectories imported via @superdoc/. +const superdocSrcAliases = ['components', 'composables', 'core', 'helpers', 'stores', 'dev', 'icons.js', 'index.js']; + export const getAliases = (_isDev) => { const aliases = [ - // NOTE: There are a number of packages named "@superdoc/PACKAGE", but we also alias - // "@superdoc" to the src directory of the superdoc package. This is error-prone and - // should be changed, e.g. by renaming the src alias to "@superdoc/superdoc". - // - // Until then, the alias for "./src" is a regexp that matches any imports starting - // with "@superdoc/" that don't also match one of the known packages. - // - // Also note: this regexp is duplicated in packages/ai/vitest.config.mjs - - { - find: /^@superdoc\/(?!common|contracts|geometry-utils|pm-adapter|layout-engine|layout-bridge|painter-dom|style-engine|measuring-dom|word-layout|url-validation|preset-geometry|super-editor|locale-utils|font-utils)(.*)/, - replacement: path.resolve(__dirname, './src/$1'), - }, - // Workspace packages (source paths for dev) { find: '@stores', replacement: fileURLToPath(new URL('./src/stores', import.meta.url)) }, @@ -51,6 +55,12 @@ export const getAliases = (_isDev) => { { find: '@superdoc/super-editor/presentation-editor', replacement: path.resolve(__dirname, '../super-editor/src/index.js') }, { find: '@superdoc/super-editor', replacement: path.resolve(__dirname, '../super-editor/src/index.js') }, + // Map @superdoc/ to ./src/ for internal paths + ...superdocSrcAliases.map(name => ({ + find: `@superdoc/${name}`, + replacement: path.resolve(__dirname, `./src/${name}`), + })), + // Super Editor aliases { find: '@', replacement: '@superdoc/super-editor' }, ...sourceResolve.alias, @@ -61,7 +71,7 @@ export const getAliases = (_isDev) => { // https://vitejs.dev/config/ -export default defineConfig(({ mode, command}) => { +export default defineConfig(({ mode, command }) => { const skipDts = process.env.SUPERDOC_SKIP_DTS === '1'; const plugins = [ vue(), @@ -71,7 +81,7 @@ export default defineConfig(({ mode, command}) => { }), copy({ targets: [ - { + { src: 'node_modules/pdfjs-dist/web/images/*', dest: 'dist/images', }, @@ -137,35 +147,47 @@ export default defineConfig(({ mode, command}) => { format: 'es', entryFileNames: '[name].es.js', chunkFileNames: 'chunks/[name]-[hash].es.js', - manualChunks: { - 'vue': ['vue'], - 'blank-docx': ['@superdoc/common/data/blank.docx?url'], - 'jszip': ['jszip'], - 'eventemitter3': ['eventemitter3'], - 'uuid': ['uuid'], - 'xml-js': ['xml-js'], + manualChunks(id) { + if (id.includes('/node_modules/vue/')) return 'vue'; + if (id.includes('/node_modules/jszip/')) return 'jszip'; + if (id.includes('/node_modules/eventemitter3/')) return 'eventemitter3'; + if (id.includes('/node_modules/uuid/')) return 'uuid'; + if (id.includes('/node_modules/xml-js/')) return 'xml-js'; + if (id.includes('blank.docx')) return 'blank-docx'; } }, { format: 'cjs', entryFileNames: '[name].cjs', chunkFileNames: 'chunks/[name]-[hash].cjs', - manualChunks: { - 'vue': ['vue'], - 'blank-docx': ['@superdoc/common/data/blank.docx?url'], - 'jszip': ['jszip'], - 'eventemitter3': ['eventemitter3'], - 'uuid': ['uuid'], - 'xml-js': ['xml-js'], + manualChunks(id) { + if (id.includes('/node_modules/vue/')) return 'vue'; + if (id.includes('/node_modules/jszip/')) return 'jszip'; + if (id.includes('/node_modules/eventemitter3/')) return 'eventemitter3'; + if (id.includes('/node_modules/uuid/')) return 'uuid'; + if (id.includes('/node_modules/xml-js/')) return 'xml-js'; + if (id.includes('blank.docx')) return 'blank-docx'; } } - ], + ], } }, optimizeDeps: { include: ['yjs', '@hocuspocus/provider'], - esbuildOptions: { - target: 'es2020', + // Rolldown treats trailing-slash imports as directory paths. + // node-stdlib-browser's url polyfill imports 'punycode/' — resolve it to the + // actual file since punycode is also a Node.js builtin and pnpm isolates it. + rollupOptions: { + plugins: [ + { + name: 'fix-punycode-trailing-slash', + resolveId(source) { + if (source === 'punycode/' || source === 'punycode') { + return { id: punycodeEntry }; + } + }, + }, + ], }, }, resolve: { diff --git a/patches/readable-stream@3.6.2.patch b/patches/readable-stream@3.6.2.patch new file mode 100644 index 0000000000..30e89108ea --- /dev/null +++ b/patches/readable-stream@3.6.2.patch @@ -0,0 +1,22 @@ +diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js +index df1f608d532606ba1df4eeaf3b6f577791dcd9ad..0e53b087f3471225523783bf68ccf356951f6818 100644 +--- a/lib/_stream_readable.js ++++ b/lib/_stream_readable.js +@@ -155,7 +155,7 @@ function ReadableState(options, stream, isDuplex) { + this.decoder = null; + this.encoding = null; + if (options.encoding) { +- if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; ++ if (!StringDecoder) StringDecoder = require('string_decoder').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +@@ -298,7 +298,7 @@ Readable.prototype.isPaused = function () { + + // backwards compatibility. + Readable.prototype.setEncoding = function (enc) { +- if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; ++ if (!StringDecoder) StringDecoder = require('string_decoder').StringDecoder; + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; + // If setEncoding(null), decoder.encoding equals utf8 diff --git a/patches/vite-plugin-node-polyfills.patch b/patches/vite-plugin-node-polyfills.patch deleted file mode 100644 index 3d920fbeb5..0000000000 --- a/patches/vite-plugin-node-polyfills.patch +++ /dev/null @@ -1,222 +0,0 @@ -diff --git a/dist/index.cjs b/dist/index.cjs -index 797a573d7d9aba06d921fc8d62fb58a7cec67361..18682611967bcec490f0ec9b8348615488014074 100644 ---- a/dist/index.cjs -+++ b/dist/index.cjs -@@ -1,3 +1,3 @@ --"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("node:module"),x=require("@rollup/plugin-inject"),O=require("node-stdlib-browser"),P=require("node-stdlib-browser/helpers/rollup/plugin"),R=require("node-stdlib-browser/helpers/esbuild/plugin");var h=typeof document<"u"?document.currentScript:null;const g=l=>l&&l.__esModule?l:{default:l},S=g(x),q=g(O),w=g(R),_=(l,e)=>b(l)===b(e),s=(l,e)=>l?l===!0?!0:l===e:!1,$=l=>l.startsWith("node:"),I=l=>{const e=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${e}$`)},b=l=>l.replace(/^node:/,""),a={buffer:["import __buffer_polyfill from 'vite-plugin-node-polyfills/shims/buffer'","globalThis.Buffer = globalThis.Buffer || __buffer_polyfill"],global:["import __global_polyfill from 'vite-plugin-node-polyfills/shims/global'","globalThis.global = globalThis.global || __global_polyfill"],process:["import __process_polyfill from 'vite-plugin-node-polyfills/shims/process'","globalThis.process = globalThis.process || __process_polyfill"]},D=(l={})=>{const e={include:[],exclude:[],overrides:{},protocolImports:!0,...l,globals:{Buffer:!0,global:!0,process:!0,...l.globals}},y=o=>e.include.length>0?!e.include.some(r=>_(o,r)):e.exclude.some(r=>_(o,r)),B=o=>{if(s(e.globals.Buffer,"dev")&&/^buffer$/.test(o))return"vite-plugin-node-polyfills/shims/buffer";if(s(e.globals.global,"dev")&&/^global$/.test(o))return"vite-plugin-node-polyfills/shims/global";if(s(e.globals.process,"dev")&&/^process$/.test(o))return"vite-plugin-node-polyfills/shims/process";if(o in e.overrides)return e.overrides[o]},u=Object.entries(q.default).reduce((o,[r,i])=>(!e.protocolImports&&$(r)||y(r)||(o[r]=B(b(r))||i),o),{}),f=T.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:h&&h.src||new URL("index.cjs",document.baseURI).href),p=[...s(e.globals.Buffer,"dev")?[f.resolve("vite-plugin-node-polyfills/shims/buffer")]:[],...s(e.globals.global,"dev")?[f.resolve("vite-plugin-node-polyfills/shims/global")]:[],...s(e.globals.process,"dev")?[f.resolve("vite-plugin-node-polyfills/shims/process")]:[]],d=[...s(e.globals.Buffer,"dev")?a.buffer:[],...s(e.globals.global,"dev")?a.global:[],...s(e.globals.process,"dev")?a.process:[],""].join(` --`);return{name:"vite-plugin-node-polyfills",config(o,r){const i=r.command==="serve",v=!!this?.meta?.rolldownVersion,m={...i&&s(e.globals.Buffer,"dev")?{Buffer:"Buffer"}:{},...i&&s(e.globals.global,"dev")?{global:"global"}:{},...i&&s(e.globals.process,"dev")?{process:"process"}:{}},c={...s(e.globals.Buffer,"build")?{Buffer:"vite-plugin-node-polyfills/shims/buffer"}:{},...s(e.globals.global,"build")?{global:"vite-plugin-node-polyfills/shims/global"}:{},...s(e.globals.process,"build")?{process:"vite-plugin-node-polyfills/shims/process"}:{}};return{build:{rollupOptions:{onwarn:(t,n)=>{P.handleCircularDependancyWarning(t,()=>{if(o.build?.rollupOptions?.onwarn)return o.build.rollupOptions.onwarn(t,n);n(t)})},...Object.keys(c).length>0?v?{inject:c}:{plugins:[S.default(c)]}:{}}},esbuild:{banner:i?d:void 0},optimizeDeps:{exclude:[...p],...v?{rollupOptions:{define:m,resolve:{alias:{...u}},plugins:[{name:"vite-plugin-node-polyfills:optimizer",banner:i?d:void 0}]}}:{esbuildOptions:{banner:i?{js:d}:void 0,define:m,inject:[...p],plugins:[w.default(u),{name:"vite-plugin-node-polyfills-shims-resolver",setup(t){for(const n of p){const j=I(n);t.onResolve({filter:j},()=>({external:!1,path:n}))}}}]}}},resolve:{alias:{...u}}}}}};exports.nodePolyfills=D; -+"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("node:module"),T=require("@rollup/plugin-inject"),w=require("node-stdlib-browser"),O=require("node-stdlib-browser/helpers/rollup/plugin"),S=require("node-stdlib-browser/helpers/esbuild/plugin");var _=typeof document<"u"?document.currentScript:null;const v=e=>e&&e.__esModule?e:{default:e},q=v(T),$=v(w),I=v(S),B=(e,l)=>b(e)===b(l),o=(e,l)=>e?e===!0?!0:e===l:!1,M=e=>e.startsWith("node:"),D=e=>{const l=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${l}$`)},b=e=>e.replace(/^node:/,""),g={buffer:["import __buffer_polyfill from 'vite-plugin-node-polyfills/shims/buffer'","globalThis.Buffer = globalThis.Buffer || __buffer_polyfill"],global:["import __global_polyfill from 'vite-plugin-node-polyfills/shims/global'","globalThis.global = globalThis.global || __global_polyfill"],process:["import __process_polyfill from 'vite-plugin-node-polyfills/shims/process'","globalThis.process = globalThis.process || __process_polyfill"]},E=(e={})=>{const l={include:[],exclude:[],overrides:{},protocolImports:!0,...e,globals:{Buffer:!0,global:!0,process:!0,...e.globals}},j=s=>l.include.length>0?!l.include.some(i=>B(s,i)):l.exclude.some(i=>B(s,i)),x=s=>{if(o(l.globals.Buffer,"dev")&&/^buffer$/.test(s))return"vite-plugin-node-polyfills/shims/buffer";if(o(l.globals.global,"dev")&&/^global$/.test(s))return"vite-plugin-node-polyfills/shims/global";if(o(l.globals.process,"dev")&&/^process$/.test(s))return"vite-plugin-node-polyfills/shims/process";if(s in l.overrides)return l.overrides[s]},p=Object.entries($.default).reduce((s,[i,r])=>(!l.protocolImports&&M(i)||j(i)||(s[i]=x(b(i))||r),s),{}),t=R.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:_&&_.src||new URL("index.cjs",document.baseURI).href),d=[...o(l.globals.Buffer,"dev")?[t.resolve("vite-plugin-node-polyfills/shims/buffer")]:[],...o(l.globals.global,"dev")?[t.resolve("vite-plugin-node-polyfills/shims/global")]:[],...o(l.globals.process,"dev")?[t.resolve("vite-plugin-node-polyfills/shims/process")]:[]],a=[...o(l.globals.Buffer,"dev")?g.buffer:[],...o(l.globals.global,"dev")?g.global:[],...o(l.globals.process,"dev")?g.process:[],""].join(` -+`);return{name:"vite-plugin-node-polyfills",config(s,i){const r=i.command==="serve",m=!!this?.meta?.rolldownVersion,h={...r&&o(l.globals.Buffer,"dev")?{Buffer:"Buffer"}:{},...r&&o(l.globals.global,"dev")?{global:"global"}:{},...r&&o(l.globals.process,"dev")?{process:"process"}:{}},c={...o(l.globals.Buffer,"build")?{Buffer:"vite-plugin-node-polyfills/shims/buffer"}:{},...o(l.globals.global,"build")?{global:"vite-plugin-node-polyfills/shims/global"}:{},...o(l.globals.process,"build")?{process:"vite-plugin-node-polyfills/shims/process"}:{}},u=new Map;o(l.globals.Buffer,"build")&&u.set("vite-plugin-node-polyfills/shims/buffer",t.resolve("vite-plugin-node-polyfills/shims/buffer")),o(l.globals.global,"build")&&u.set("vite-plugin-node-polyfills/shims/global",t.resolve("vite-plugin-node-polyfills/shims/global")),o(l.globals.process,"build")&&u.set("vite-plugin-node-polyfills/shims/process",t.resolve("vite-plugin-node-polyfills/shims/process"));const y=u.size>0?{name:"vite-plugin-node-polyfills:shims-resolver",resolveId(n){return u.has(n)?{id:u.get(n),external:!1}:null}}:null;return{build:{rollupOptions:{onwarn:(n,f)=>{O.handleCircularDependancyWarning(n,()=>{if(s.build?.rollupOptions?.onwarn)return s.build.rollupOptions.onwarn(n,f);f(n)})},...Object.keys(c).length>0?m?{inject:c}:{plugins:[q.default(c),...y?[y]:[]]}:{}}},esbuild:{banner:r?a:void 0},optimizeDeps:{exclude:[...d],...m?{rollupOptions:{define:h,resolve:{alias:{...p}},plugins:[{name:"vite-plugin-node-polyfills:optimizer",banner:r?a:void 0}]}}:{esbuildOptions:{banner:r?{js:a}:void 0,define:h,inject:[...d],plugins:[I.default(p),{name:"vite-plugin-node-polyfills-shims-resolver",setup(n){for(const f of d){const P=D(f);n.onResolve({filter:P},()=>({external:!1,path:f}))}}}]}}},resolve:{alias:{...p}}}}}};exports.nodePolyfills=E; - //# sourceMappingURL=index.cjs.map -diff --git a/dist/index.cjs.map b/dist/index.cjs.map -index 20e4b7c02620c532ec5da96e80cd72da45691819..5468b8d3ccec38f7f6fb6dd075f0551c3c369417 100644 ---- a/dist/index.cjs.map -+++ b/dist/index.cjs.map -@@ -1 +1 @@ --{"version":3,"file":"index.cjs","sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":["import type { BooleanOrBuildTarget, ModuleName, ModuleNameWithoutNodePrefix } from './index'\n\nexport const compareModuleNames = (moduleA: ModuleName, moduleB: ModuleName) => {\n return withoutNodeProtocol(moduleA) === withoutNodeProtocol(moduleB)\n}\n\nexport const isEnabled = (value: BooleanOrBuildTarget, mode: 'build' | 'dev') => {\n if (!value) return false\n if (value === true) return true\n\n return value === mode\n}\n\nexport const isNodeProtocolImport = (name: string) => {\n return name.startsWith('node:')\n}\n\nexport const toRegExp = (text: string) => {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const escapedText = text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\n return new RegExp(`^${escapedText}$`)\n}\n\nexport const withoutNodeProtocol = (name: ModuleName): ModuleNameWithoutNodePrefix => {\n return name.replace(/^node:/, '') as ModuleNameWithoutNodePrefix\n}\n","import { createRequire } from 'node:module'\nimport inject from '@rollup/plugin-inject'\nimport stdLibBrowser from 'node-stdlib-browser'\nimport { handleCircularDependancyWarning } from 'node-stdlib-browser/helpers/rollup/plugin'\nimport esbuildPlugin from 'node-stdlib-browser/helpers/esbuild/plugin'\nimport type { Plugin } from 'vite'\nimport { compareModuleNames, isEnabled, isNodeProtocolImport, toRegExp, withoutNodeProtocol } from './utils'\n\nexport type BuildTarget = 'build' | 'dev'\nexport type BooleanOrBuildTarget = boolean | BuildTarget\nexport type ModuleName = keyof typeof stdLibBrowser\nexport type ModuleNameWithoutNodePrefix = T extends `node:${infer P}` ? P : never\n\nexport type PolyfillOptions = {\n /**\n * Includes specific modules. If empty, includes all modules\n * @example\n *\n * ```ts\n * nodePolyfills({\n * include: ['fs', 'path'],\n * })\n * ```\n */\n include?: ModuleNameWithoutNodePrefix[],\n /**\n * @example\n *\n * ```ts\n * nodePolyfills({\n * exclude: ['fs', 'path'],\n * })\n * ```\n */\n exclude?: ModuleNameWithoutNodePrefix[],\n /**\n * Specify whether specific globals should be polyfilled.\n *\n * @example\n *\n * ```ts\n * nodePolyfills({\n * globals: {\n * Buffer: false,\n * global: true,\n * process: 'build',\n * },\n * })\n * ```\n */\n globals?: {\n Buffer?: BooleanOrBuildTarget,\n global?: BooleanOrBuildTarget,\n process?: BooleanOrBuildTarget,\n },\n /**\n * Specify alternative modules to use in place of the default polyfills.\n *\n * @example\n *\n * ```ts\n * nodePolyfills({\n * overrides: {\n * fs: 'memfs',\n * },\n * })\n * ```\n */\n overrides?: { [Key in ModuleNameWithoutNodePrefix]?: string },\n /**\n * Specify whether the Node protocol version of an import (e.g. `node:buffer`) should be polyfilled too.\n *\n * @default true\n */\n protocolImports?: boolean,\n}\n\nexport type PolyfillOptionsResolved = {\n include: ModuleNameWithoutNodePrefix[],\n exclude: ModuleNameWithoutNodePrefix[],\n globals: {\n Buffer: BooleanOrBuildTarget,\n global: BooleanOrBuildTarget,\n process: BooleanOrBuildTarget,\n },\n overrides: { [Key in ModuleNameWithoutNodePrefix]?: string },\n protocolImports: boolean,\n}\n\nconst globalShimBanners = {\n buffer: [\n `import __buffer_polyfill from 'vite-plugin-node-polyfills/shims/buffer'`,\n `globalThis.Buffer = globalThis.Buffer || __buffer_polyfill`,\n ],\n global: [\n `import __global_polyfill from 'vite-plugin-node-polyfills/shims/global'`,\n `globalThis.global = globalThis.global || __global_polyfill`,\n ],\n process: [\n `import __process_polyfill from 'vite-plugin-node-polyfills/shims/process'`,\n `globalThis.process = globalThis.process || __process_polyfill`,\n ],\n}\n\n/**\n * Returns a Vite plugin to polyfill Node's Core Modules for browser environments. Supports `node:` protocol imports.\n *\n * @example\n *\n * ```ts\n * // vite.config.ts\n * import { defineConfig } from 'vite'\n * import { nodePolyfills } from 'vite-plugin-node-polyfills'\n *\n * export default defineConfig({\n * plugins: [\n * nodePolyfills({\n * // Specific modules that should not be polyfilled.\n * exclude: [],\n * // Whether to polyfill specific globals.\n * globals: {\n * Buffer: true, // can also be 'build', 'dev', or false\n * global: true,\n * process: true,\n * },\n * // Whether to polyfill `node:` protocol imports.\n * protocolImports: true,\n * }),\n * ],\n * })\n * ```\n */\nexport const nodePolyfills = (options: PolyfillOptions = {}): Plugin => {\n const optionsResolved: PolyfillOptionsResolved = {\n include: [],\n exclude: [],\n overrides: {},\n protocolImports: true,\n ...options,\n globals: {\n Buffer: true,\n global: true,\n process: true,\n ...options.globals,\n },\n }\n\n const isExcluded = (moduleName: ModuleName) => {\n if (optionsResolved.include.length > 0) {\n return !optionsResolved.include.some((includedName) => compareModuleNames(moduleName, includedName))\n }\n\n return optionsResolved.exclude.some((excludedName) => compareModuleNames(moduleName, excludedName))\n }\n\n const toOverride = (name: ModuleNameWithoutNodePrefix): string | void => {\n if (isEnabled(optionsResolved.globals.Buffer, 'dev') && /^buffer$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/buffer'\n }\n\n if (isEnabled(optionsResolved.globals.global, 'dev') && /^global$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/global'\n }\n\n if (isEnabled(optionsResolved.globals.process, 'dev') && /^process$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/process'\n }\n\n if (name in optionsResolved.overrides) {\n return optionsResolved.overrides[name]\n }\n }\n\n const polyfills = (Object.entries(stdLibBrowser) as Array<[ModuleName, string]>).reduce>((included, [name, value]) => {\n if (!optionsResolved.protocolImports) {\n if (isNodeProtocolImport(name)) {\n return included\n }\n }\n\n if (!isExcluded(name)) {\n included[name] = toOverride(withoutNodeProtocol(name)) || value\n }\n\n return included\n }, {} as Record)\n\n const require = createRequire(import.meta.url)\n const globalShimPaths = [\n ...((isEnabled(optionsResolved.globals.Buffer, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/buffer')] : []),\n ...((isEnabled(optionsResolved.globals.global, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/global')] : []),\n ...((isEnabled(optionsResolved.globals.process, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/process')] : []),\n ]\n\n const globalShimsBanner = [\n ...((isEnabled(optionsResolved.globals.Buffer, 'dev')) ? globalShimBanners.buffer : []),\n ...((isEnabled(optionsResolved.globals.global, 'dev')) ? globalShimBanners.global : []),\n ...((isEnabled(optionsResolved.globals.process, 'dev')) ? globalShimBanners.process : []),\n ``,\n ].join('\\n')\n\n return {\n name: 'vite-plugin-node-polyfills',\n config(config, env) {\n const isDev = env.command === 'serve'\n // @ts-expect-error - this.meta.rolldownVersion only exists with rolldown-vite 7+\n const isRolldownVite = !!this?.meta?.rolldownVersion\n\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L203-L209\n const defines = {\n ...((isDev && isEnabled(optionsResolved.globals.Buffer, 'dev')) ? { Buffer: 'Buffer' } : {}),\n ...((isDev && isEnabled(optionsResolved.globals.global, 'dev')) ? { global: 'global' } : {}),\n ...((isDev && isEnabled(optionsResolved.globals.process, 'dev')) ? { process: 'process' } : {}),\n }\n\n const shimsToInject = {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md#vite\n ...(isEnabled(optionsResolved.globals.Buffer, 'build') ? { Buffer: 'vite-plugin-node-polyfills/shims/buffer' } : {}),\n ...(isEnabled(optionsResolved.globals.global, 'build') ? { global: 'vite-plugin-node-polyfills/shims/global' } : {}),\n ...(isEnabled(optionsResolved.globals.process, 'build') ? { process: 'vite-plugin-node-polyfills/shims/process' } : {}),\n }\n\n return {\n build: {\n rollupOptions: {\n onwarn: (warning, rollupWarn) => {\n handleCircularDependancyWarning(warning, () => {\n if (config.build?.rollupOptions?.onwarn) {\n return config.build.rollupOptions.onwarn(warning, rollupWarn)\n }\n\n rollupWarn(warning)\n })\n },\n ...Object.keys(shimsToInject).length > 0\n ? isRolldownVite\n ? { inject: shimsToInject }\n : { plugins: [inject(shimsToInject)] }\n : {},\n },\n },\n esbuild: {\n // In dev, the global polyfills need to be injected as a banner in order for isolated scripts (such as Vue SFCs) to have access to them.\n banner: isDev ? globalShimsBanner : undefined,\n },\n optimizeDeps: {\n exclude: [\n ...globalShimPaths,\n ],\n ...isRolldownVite\n ? {\n rollupOptions: {\n define: defines,\n resolve: {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150\n alias: {\n ...polyfills,\n },\n },\n plugins: [\n {\n name: 'vite-plugin-node-polyfills:optimizer',\n banner: isDev ? globalShimsBanner : undefined,\n },\n ],\n },\n }\n : {\n esbuildOptions: {\n banner: isDev ? { js: globalShimsBanner } : undefined,\n define: defines,\n inject: [\n ...globalShimPaths,\n ],\n plugins: [\n esbuildPlugin(polyfills),\n // Supress the 'injected path \"...\" cannot be marked as external' error in Vite 4 (emitted by esbuild).\n // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1469\n {\n name: 'vite-plugin-node-polyfills-shims-resolver',\n setup(build) {\n for (const globalShimPath of globalShimPaths) {\n const globalShimsFilter = toRegExp(globalShimPath)\n\n // https://esbuild.github.io/plugins/#on-resolve\n build.onResolve({ filter: globalShimsFilter }, () => {\n return {\n // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1468\n external: false,\n path: globalShimPath,\n }\n })\n }\n },\n },\n ],\n },\n },\n },\n resolve: {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150\n alias: {\n ...polyfills,\n },\n },\n }\n },\n }\n}\n"],"names":["compareModuleNames","moduleA","moduleB","withoutNodeProtocol","isEnabled","value","mode","isNodeProtocolImport","name","toRegExp","text","escapedText","globalShimBanners","nodePolyfills","options","optionsResolved","isExcluded","moduleName","includedName","excludedName","toOverride","polyfills","stdLibBrowser","included","require","createRequire","_documentCurrentScript","globalShimPaths","globalShimsBanner","config","env","isDev","isRolldownVite","defines","shimsToInject","warning","rollupWarn","handleCircularDependancyWarning","inject","esbuildPlugin","build","globalShimPath","globalShimsFilter"],"mappings":"sZAEaA,EAAqB,CAACC,EAAqBC,IAC/CC,EAAoBF,CAAO,IAAME,EAAoBD,CAAO,EAGxDE,EAAY,CAACC,EAA6BC,IAChDD,EACDA,IAAU,GAAa,GAEpBA,IAAUC,EAHE,GAMRC,EAAwBC,GAC5BA,EAAK,WAAW,OAAO,EAGnBC,EAAYC,GAAiB,CAExC,MAAMC,EAAcD,EAAK,QAAQ,sBAAuB,MAAM,EAE9D,OAAO,IAAI,OAAO,IAAIC,CAAW,GAAG,CACtC,EAEaR,EAAuBK,GAC3BA,EAAK,QAAQ,SAAU,EAAE,ECgE5BI,EAAoB,CACxB,OAAQ,CACN,0EACA,4DACF,EACA,OAAQ,CACN,0EACA,4DACF,EACA,QAAS,CACP,4EACA,+DACF,CACF,EA8BaC,EAAgB,CAACC,EAA2B,KAAe,CACtE,MAAMC,EAA2C,CAC/C,QAAS,CAAC,EACV,QAAS,CAAC,EACV,UAAW,CAAC,EACZ,gBAAiB,GACjB,GAAGD,EACH,QAAS,CACP,OAAQ,GACR,OAAQ,GACR,QAAS,GACT,GAAGA,EAAQ,OACb,CAAA,EAGIE,EAAcC,GACdF,EAAgB,QAAQ,OAAS,EAC5B,CAACA,EAAgB,QAAQ,KAAMG,GAAiBlB,EAAmBiB,EAAYC,CAAY,CAAC,EAG9FH,EAAgB,QAAQ,KAAMI,GAAiBnB,EAAmBiB,EAAYE,CAAY,CAAC,EAG9FC,EAAcZ,GAAqD,CACnE,GAAAJ,EAAUW,EAAgB,QAAQ,OAAQ,KAAK,GAAK,WAAW,KA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P,MAAO,CACL,GAAGZ,CACL,CACF,EACA,QAAS,CACP,CACE,KAAM,uCACN,OAAQU,EAAQH,EAAoB,MACtC,CACF,CACF,CAAA,EAEF,CACE,eAAgB,CACd,OAAQG,EAAQ,CAAE,GAAIH,GAAsB,OAC5C,OAAQK,EACR,OAAQ,CACN,GAAGN,CACL,EACA,QAAS,CACPY,EAAAA,QAAclB,CAAS,EAGvB,CACE,KAAM,4CACN,MAAMmB,EAAO,CACX,UAAWC,KAAkBd,EAAiB,CACtC,MAAAe,EAAoBjC,EAASgC,CAAc,EAGjDD,EAAM,UAAU,CAAE,OAAQE,GAAqB,KACtC,CAEL,SAAU,GACV,KAAMD,CAAA,EAET,CACH,CACF,CACF,CACF,CACF,CACF,CACN,EACA,QAAS,CAEP,MAAO,CACL,GAAGpB,CACL,CACF,CAAA,CAEJ,CAAA,CAEJ"} -\ No newline at end of file -+{"version":3,"file":"index.cjs","sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":["import type { BooleanOrBuildTarget, ModuleName, ModuleNameWithoutNodePrefix } from './index'\n\nexport const compareModuleNames = (moduleA: ModuleName, moduleB: ModuleName) => {\n return withoutNodeProtocol(moduleA) === withoutNodeProtocol(moduleB)\n}\n\nexport const isEnabled = (value: BooleanOrBuildTarget, mode: 'build' | 'dev') => {\n if (!value) return false\n if (value === true) return true\n\n return value === mode\n}\n\nexport const isNodeProtocolImport = (name: string) => {\n return name.startsWith('node:')\n}\n\nexport const toRegExp = (text: string) => {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const escapedText = text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\n return new RegExp(`^${escapedText}$`)\n}\n\nexport const withoutNodeProtocol = (name: ModuleName): ModuleNameWithoutNodePrefix => {\n return name.replace(/^node:/, '') as ModuleNameWithoutNodePrefix\n}\n","import { createRequire } from 'node:module'\nimport inject from '@rollup/plugin-inject'\nimport stdLibBrowser from 'node-stdlib-browser'\nimport { handleCircularDependancyWarning } from 'node-stdlib-browser/helpers/rollup/plugin'\nimport esbuildPlugin from 'node-stdlib-browser/helpers/esbuild/plugin'\nimport type { Plugin } from 'vite'\nimport { compareModuleNames, isEnabled, isNodeProtocolImport, toRegExp, withoutNodeProtocol } from './utils'\n\nexport type BuildTarget = 'build' | 'dev'\nexport type BooleanOrBuildTarget = boolean | BuildTarget\nexport type ModuleName = keyof typeof stdLibBrowser\nexport type ModuleNameWithoutNodePrefix = T extends `node:${infer P}` ? P : never\n\nexport type PolyfillOptions = {\n /**\n * Includes specific modules. If empty, includes all modules\n * @example\n *\n * ```ts\n * nodePolyfills({\n * include: ['fs', 'path'],\n * })\n * ```\n */\n include?: ModuleNameWithoutNodePrefix[],\n /**\n * @example\n *\n * ```ts\n * nodePolyfills({\n * exclude: ['fs', 'path'],\n * })\n * ```\n */\n exclude?: ModuleNameWithoutNodePrefix[],\n /**\n * Specify whether specific globals should be polyfilled.\n *\n * @example\n *\n * ```ts\n * nodePolyfills({\n * globals: {\n * Buffer: false,\n * global: true,\n * process: 'build',\n * },\n * })\n * ```\n */\n globals?: {\n Buffer?: BooleanOrBuildTarget,\n global?: BooleanOrBuildTarget,\n process?: BooleanOrBuildTarget,\n },\n /**\n * Specify alternative modules to use in place of the default polyfills.\n *\n * @example\n *\n * ```ts\n * nodePolyfills({\n * overrides: {\n * fs: 'memfs',\n * },\n * })\n * ```\n */\n overrides?: { [Key in ModuleNameWithoutNodePrefix]?: string },\n /**\n * Specify whether the Node protocol version of an import (e.g. `node:buffer`) should be polyfilled too.\n *\n * @default true\n */\n protocolImports?: boolean,\n}\n\nexport type PolyfillOptionsResolved = {\n include: ModuleNameWithoutNodePrefix[],\n exclude: ModuleNameWithoutNodePrefix[],\n globals: {\n Buffer: BooleanOrBuildTarget,\n global: BooleanOrBuildTarget,\n process: BooleanOrBuildTarget,\n },\n overrides: { [Key in ModuleNameWithoutNodePrefix]?: string },\n protocolImports: boolean,\n}\n\nconst globalShimBanners = {\n buffer: [\n `import __buffer_polyfill from 'vite-plugin-node-polyfills/shims/buffer'`,\n `globalThis.Buffer = globalThis.Buffer || __buffer_polyfill`,\n ],\n global: [\n `import __global_polyfill from 'vite-plugin-node-polyfills/shims/global'`,\n `globalThis.global = globalThis.global || __global_polyfill`,\n ],\n process: [\n `import __process_polyfill from 'vite-plugin-node-polyfills/shims/process'`,\n `globalThis.process = globalThis.process || __process_polyfill`,\n ],\n}\n\n/**\n * Returns a Vite plugin to polyfill Node's Core Modules for browser environments. Supports `node:` protocol imports.\n *\n * @example\n *\n * ```ts\n * // vite.config.ts\n * import { defineConfig } from 'vite'\n * import { nodePolyfills } from 'vite-plugin-node-polyfills'\n *\n * export default defineConfig({\n * plugins: [\n * nodePolyfills({\n * // Specific modules that should not be polyfilled.\n * exclude: [],\n * // Whether to polyfill specific globals.\n * globals: {\n * Buffer: true, // can also be 'build', 'dev', or false\n * global: true,\n * process: true,\n * },\n * // Whether to polyfill `node:` protocol imports.\n * protocolImports: true,\n * }),\n * ],\n * })\n * ```\n */\nexport const nodePolyfills = (options: PolyfillOptions = {}): Plugin => {\n const optionsResolved: PolyfillOptionsResolved = {\n include: [],\n exclude: [],\n overrides: {},\n protocolImports: true,\n ...options,\n globals: {\n Buffer: true,\n global: true,\n process: true,\n ...options.globals,\n },\n }\n\n const isExcluded = (moduleName: ModuleName) => {\n if (optionsResolved.include.length > 0) {\n return !optionsResolved.include.some((includedName) => compareModuleNames(moduleName, includedName))\n }\n\n return optionsResolved.exclude.some((excludedName) => compareModuleNames(moduleName, excludedName))\n }\n\n const toOverride = (name: ModuleNameWithoutNodePrefix): string | void => {\n if (isEnabled(optionsResolved.globals.Buffer, 'dev') && /^buffer$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/buffer'\n }\n\n if (isEnabled(optionsResolved.globals.global, 'dev') && /^global$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/global'\n }\n\n if (isEnabled(optionsResolved.globals.process, 'dev') && /^process$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/process'\n }\n\n if (name in optionsResolved.overrides) {\n return optionsResolved.overrides[name]\n }\n }\n\n const polyfills = (Object.entries(stdLibBrowser) as Array<[ModuleName, string]>).reduce>((included, [name, value]) => {\n if (!optionsResolved.protocolImports) {\n if (isNodeProtocolImport(name)) {\n return included\n }\n }\n\n if (!isExcluded(name)) {\n included[name] = toOverride(withoutNodeProtocol(name)) || value\n }\n\n return included\n }, {} as Record)\n\n const require = createRequire(import.meta.url)\n const globalShimPaths = [\n ...((isEnabled(optionsResolved.globals.Buffer, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/buffer')] : []),\n ...((isEnabled(optionsResolved.globals.global, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/global')] : []),\n ...((isEnabled(optionsResolved.globals.process, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/process')] : []),\n ]\n\n const globalShimsBanner = [\n ...((isEnabled(optionsResolved.globals.Buffer, 'dev')) ? globalShimBanners.buffer : []),\n ...((isEnabled(optionsResolved.globals.global, 'dev')) ? globalShimBanners.global : []),\n ...((isEnabled(optionsResolved.globals.process, 'dev')) ? globalShimBanners.process : []),\n ``,\n ].join('\\n')\n\n return {\n name: 'vite-plugin-node-polyfills',\n config(config, env) {\n const isDev = env.command === 'serve'\n // @ts-expect-error - this.meta.rolldownVersion only exists with rolldown-vite 7+\n const isRolldownVite = !!this?.meta?.rolldownVersion\n\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L203-L209\n const defines = {\n ...((isDev && isEnabled(optionsResolved.globals.Buffer, 'dev')) ? { Buffer: 'Buffer' } : {}),\n ...((isDev && isEnabled(optionsResolved.globals.global, 'dev')) ? { global: 'global' } : {}),\n ...((isDev && isEnabled(optionsResolved.globals.process, 'dev')) ? { process: 'process' } : {}),\n }\n\n const shimsToInject = {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md#vite\n ...(isEnabled(optionsResolved.globals.Buffer, 'build') ? { Buffer: 'vite-plugin-node-polyfills/shims/buffer' } : {}),\n ...(isEnabled(optionsResolved.globals.global, 'build') ? { global: 'vite-plugin-node-polyfills/shims/global' } : {}),\n ...(isEnabled(optionsResolved.globals.process, 'build') ? { process: 'vite-plugin-node-polyfills/shims/process' } : {}),\n }\n\n // Create a map of shim import paths to their resolved absolute paths\n const shimImportMap = new Map()\n if (isEnabled(optionsResolved.globals.Buffer, 'build')) {\n shimImportMap.set('vite-plugin-node-polyfills/shims/buffer', require.resolve('vite-plugin-node-polyfills/shims/buffer'))\n }\n if (isEnabled(optionsResolved.globals.global, 'build')) {\n shimImportMap.set('vite-plugin-node-polyfills/shims/global', require.resolve('vite-plugin-node-polyfills/shims/global'))\n }\n if (isEnabled(optionsResolved.globals.process, 'build')) {\n shimImportMap.set('vite-plugin-node-polyfills/shims/process', require.resolve('vite-plugin-node-polyfills/shims/process'))\n }\n\n // Plugin to resolve shim imports during build\n const shimsResolverPlugin = shimImportMap.size > 0 ? {\n name: 'vite-plugin-node-polyfills:shims-resolver',\n resolveId(source: string) {\n if (shimImportMap.has(source)) {\n return { id: shimImportMap.get(source)!, external: false }\n }\n return null\n },\n } : null\n\n return {\n build: {\n rollupOptions: {\n onwarn: (warning, rollupWarn) => {\n handleCircularDependancyWarning(warning, () => {\n if (config.build?.rollupOptions?.onwarn) {\n return config.build.rollupOptions.onwarn(warning, rollupWarn)\n }\n\n rollupWarn(warning)\n })\n },\n ...Object.keys(shimsToInject).length > 0\n ? isRolldownVite\n ? { inject: shimsToInject }\n : { plugins: [inject(shimsToInject), ...(shimsResolverPlugin ? [shimsResolverPlugin] : [])] }\n : {},\n },\n },\n esbuild: {\n // In dev, the global polyfills need to be injected as a banner in order for isolated scripts (such as Vue SFCs) to have access to them.\n banner: isDev ? globalShimsBanner : undefined,\n },\n optimizeDeps: {\n exclude: [\n ...globalShimPaths,\n ],\n ...isRolldownVite\n ? {\n rollupOptions: {\n define: defines,\n resolve: {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150\n alias: {\n ...polyfills,\n },\n },\n plugins: [\n {\n name: 'vite-plugin-node-polyfills:optimizer',\n banner: isDev ? globalShimsBanner : undefined,\n },\n ],\n },\n }\n : {\n esbuildOptions: {\n banner: isDev ? { js: globalShimsBanner } : undefined,\n define: defines,\n inject: [\n ...globalShimPaths,\n ],\n plugins: [\n esbuildPlugin(polyfills),\n // Supress the 'injected path \"...\" cannot be marked as external' error in Vite 4 (emitted by esbuild).\n // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1469\n {\n name: 'vite-plugin-node-polyfills-shims-resolver',\n setup(build) {\n for (const globalShimPath of globalShimPaths) {\n const globalShimsFilter = toRegExp(globalShimPath)\n\n // https://esbuild.github.io/plugins/#on-resolve\n build.onResolve({ filter: globalShimsFilter }, () => {\n return {\n // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1468\n external: false,\n path: globalShimPath,\n }\n })\n }\n },\n },\n ],\n },\n },\n },\n resolve: {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150\n alias: {\n ...polyfills,\n },\n },\n }\n },\n }\n}\n"],"names":["compareModuleNames","moduleA","moduleB","withoutNodeProtocol","isEnabled","value","mode","isNodeProtocolImport","name","toRegExp","text","escapedText","globalShimBanners","nodePolyfills","options","optionsResolved","isExcluded","moduleName","includedName","excludedName","toOverride","polyfills","stdLibBrowser","included","require","createRequire","_documentCurrentScript","globalShimPaths","globalShimsBanner","config","env","isDev","isRolldownVite","defines","shimsToInject","shimImportMap","shimsResolverPlugin","source","warning","rollupWarn","handleCircularDependancyWarning","inject","esbuildPlug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,EAAE,OAAS,EACnCF,EACE,CAAE,OAAQE,CACV,EAAA,CAAE,QAAS,CAACO,EAAAA,QAAOP,CAAa,EAAG,GAAIE,EAAsB,CAACA,CAAmB,EAAI,EAAG,CAAE,EAC5F,CAAC,CACP,CACF,EACA,QAAS,CAEP,OAAQL,EAAQH,EAAoB,MACtC,EACA,aAAc,CACZ,QAAS,CACP,GAAGD,CACL,EACA,GAAGK,EACC,CACE,cAAe,CACb,OAAQC,EACR,QAAS,CAEP,MAAO,CACL,GAAGZ,CACL,CACF,EACA,QAAS,CACP,CACE,KAAM,uCACN,OAAQU,EAAQH,EAAoB,MACtC,CACF,CACF,CAAA,EAEF,CACE,eAAgB,CACd,OAAQG,EAAQ,CAAE,GAAIH,GAAsB,OAC5C,OAAQK,EACR,OAAQ,CACN,GAAGN,CACL,EACA,QAAS,CACPe,EAAAA,QAAcrB,CAAS,EAGvB,CACE,KAAM,4CACN,MAAMsB,EAAO,CACX,UAAWC,KAAkBjB,EAAiB,CACtC,MAAAkB,EAAoBpC,EAASmC,CAAc,EAGjDD,EAAM,UAAU,CAAE,OAAQE,GAAqB,KACtC,CAEL,SAAU,GACV,KAAMD,CAAA,EAET,CACH,CACF,CACF,CACF,CACF,CACF,CACN,EACA,QAAS,CAEP,MAAO,CACL,GAAGvB,CACL,CACF,CAAA,CAEJ,CAAA,CAEJ"} -\ No newline at end of file -diff --git a/dist/index.js b/dist/index.js -index 5795ac8a8c2da559d7a5ea83a0c7f116d32d47ad..4c3453dc5cac75745ac90959dfc69b8eb3c6302e 100644 ---- a/dist/index.js -+++ b/dist/index.js -@@ -1,12 +1,12 @@ --import { createRequire as B } from "node:module"; --import x from "@rollup/plugin-inject"; --import j from "node-stdlib-browser"; --import { handleCircularDependancyWarning as O } from "node-stdlib-browser/helpers/rollup/plugin"; --import T from "node-stdlib-browser/helpers/esbuild/plugin"; --const v = (s, l) => c(s) === c(l), o = (s, l) => s ? s === !0 ? !0 : s === l : !1, $ = (s) => s.startsWith("node:"), w = (s) => { -+import { createRequire as j } from "node:module"; -+import O from "@rollup/plugin-inject"; -+import T from "node-stdlib-browser"; -+import { handleCircularDependancyWarning as w } from "node-stdlib-browser/helpers/rollup/plugin"; -+import P from "node-stdlib-browser/helpers/esbuild/plugin"; -+const y = (s, l) => c(s) === c(l), e = (s, l) => s ? s === !0 ? !0 : s === l : !1, R = (s) => s.startsWith("node:"), $ = (s) => { - const l = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); - return new RegExp(`^${l}$`); --}, c = (s) => s.replace(/^node:/, ""), g = { -+}, c = (s) => s.replace(/^node:/, ""), d = { - buffer: [ - "import __buffer_polyfill from 'vite-plugin-node-polyfills/shims/buffer'", - "globalThis.Buffer = globalThis.Buffer || __buffer_polyfill" -@@ -19,7 +19,7 @@ const v = (s, l) => c(s) === c(l), o = (s, l) => s ? s === !0 ? !0 : s === l : ! - "import __process_polyfill from 'vite-plugin-node-polyfills/shims/process'", - "globalThis.process = globalThis.process || __process_polyfill" - ] --}, D = (s = {}) => { -+}, M = (s = {}) => { - const l = { - include: [], - exclude: [], -@@ -32,96 +32,103 @@ const v = (s, l) => c(s) === c(l), o = (s, l) => s ? s === !0 ? !0 : s === l : ! - process: !0, - ...s.globals - } -- }, h = (e) => l.include.length > 0 ? !l.include.some((r) => v(e, r)) : l.exclude.some((r) => v(e, r)), y = (e) => { -- if (o(l.globals.Buffer, "dev") && /^buffer$/.test(e)) -+ }, _ = (o) => l.include.length > 0 ? !l.include.some((i) => y(o, i)) : l.exclude.some((i) => y(o, i)), B = (o) => { -+ if (e(l.globals.Buffer, "dev") && /^buffer$/.test(o)) - return "vite-plugin-node-polyfills/shims/buffer"; -- if (o(l.globals.global, "dev") && /^global$/.test(e)) -+ if (e(l.globals.global, "dev") && /^global$/.test(o)) - return "vite-plugin-node-polyfills/shims/global"; -- if (o(l.globals.process, "dev") && /^process$/.test(e)) -+ if (e(l.globals.process, "dev") && /^process$/.test(o)) - return "vite-plugin-node-polyfills/shims/process"; -- if (e in l.overrides) -- return l.overrides[e]; -- }, p = Object.entries(j).reduce((e, [r, i]) => (!l.protocolImports && $(r) || h(r) || (e[r] = y(c(r)) || i), e), {}), f = B(import.meta.url), u = [ -- ...o(l.globals.Buffer, "dev") ? [f.resolve("vite-plugin-node-polyfills/shims/buffer")] : [], -- ...o(l.globals.global, "dev") ? [f.resolve("vite-plugin-node-polyfills/shims/global")] : [], -- ...o(l.globals.process, "dev") ? [f.resolve("vite-plugin-node-polyfills/shims/process")] : [] -+ if (o in l.overrides) -+ return l.overrides[o]; -+ }, u = Object.entries(T).reduce((o, [i, r]) => (!l.protocolImports && R(i) || _(i) || (o[i] = B(c(i)) || r), o), {}), t = j(import.meta.url), g = [ -+ ...e(l.globals.Buffer, "dev") ? [t.resolve("vite-plugin-node-polyfills/shims/buffer")] : [], -+ ...e(l.globals.global, "dev") ? [t.resolve("vite-plugin-node-polyfills/shims/global")] : [], -+ ...e(l.globals.process, "dev") ? [t.resolve("vite-plugin-node-polyfills/shims/process")] : [] - ], b = [ -- ...o(l.globals.Buffer, "dev") ? g.buffer : [], -- ...o(l.globals.global, "dev") ? g.global : [], -- ...o(l.globals.process, "dev") ? g.process : [], -+ ...e(l.globals.Buffer, "dev") ? d.buffer : [], -+ ...e(l.globals.global, "dev") ? d.global : [], -+ ...e(l.globals.process, "dev") ? d.process : [], - "" - ].join(` - `); - return { - name: "vite-plugin-node-polyfills", -- config(e, r) { -- const i = r.command === "serve", d = !!this?.meta?.rolldownVersion, m = { -- ...i && o(l.globals.Buffer, "dev") ? { Buffer: "Buffer" } : {}, -- ...i && o(l.globals.global, "dev") ? { global: "global" } : {}, -- ...i && o(l.globals.process, "dev") ? { process: "process" } : {} -+ config(o, i) { -+ const r = i.command === "serve", v = !!this?.meta?.rolldownVersion, m = { -+ ...r && e(l.globals.Buffer, "dev") ? { Buffer: "Buffer" } : {}, -+ ...r && e(l.globals.global, "dev") ? { global: "global" } : {}, -+ ...r && e(l.globals.process, "dev") ? { process: "process" } : {} - }, a = { - // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md#vite -- ...o(l.globals.Buffer, "build") ? { Buffer: "vite-plugin-node-polyfills/shims/buffer" } : {}, -- ...o(l.globals.global, "build") ? { global: "vite-plugin-node-polyfills/shims/global" } : {}, -- ...o(l.globals.process, "build") ? { process: "vite-plugin-node-polyfills/shims/process" } : {} -- }; -+ ...e(l.globals.Buffer, "build") ? { Buffer: "vite-plugin-node-polyfills/shims/buffer" } : {}, -+ ...e(l.globals.global, "build") ? { global: "vite-plugin-node-polyfills/shims/global" } : {}, -+ ...e(l.globals.process, "build") ? { process: "vite-plugin-node-polyfills/shims/process" } : {} -+ }, p = /* @__PURE__ */ new Map(); -+ e(l.globals.Buffer, "build") && p.set("vite-plugin-node-polyfills/shims/buffer", t.resolve("vite-plugin-node-polyfills/shims/buffer")), e(l.globals.global, "build") && p.set("vite-plugin-node-polyfills/shims/global", t.resolve("vite-plugin-node-polyfills/shims/global")), e(l.globals.process, "build") && p.set("vite-plugin-node-polyfills/shims/process", t.resolve("vite-plugin-node-polyfills/shims/process")); -+ const h = p.size > 0 ? { -+ name: "vite-plugin-node-polyfills:shims-resolver", -+ resolveId(n) { -+ return p.has(n) ? { id: p.get(n), external: !1 } : null; -+ } -+ } : null; - return { - build: { - rollupOptions: { -- onwarn: (t, n) => { -- O(t, () => { -- if (e.build?.rollupOptions?.onwarn) -- return e.build.rollupOptions.onwarn(t, n); -- n(t); -+ onwarn: (n, f) => { -+ w(n, () => { -+ if (o.build?.rollupOptions?.onwarn) -+ return o.build.rollupOptions.onwarn(n, f); -+ f(n); - }); - }, -- ...Object.keys(a).length > 0 ? d ? { inject: a } : { plugins: [x(a)] } : {} -+ ...Object.keys(a).length > 0 ? v ? { inject: a } : { plugins: [O(a), ...h ? [h] : []] } : {} - } - }, - esbuild: { - // In dev, the global polyfills need to be injected as a banner in order for isolated scripts (such as Vue SFCs) to have access to them. -- banner: i ? b : void 0 -+ banner: r ? b : void 0 - }, - optimizeDeps: { - exclude: [ -- ...u -+ ...g - ], -- ...d ? { -+ ...v ? { - rollupOptions: { - define: m, - resolve: { - // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150 - alias: { -- ...p -+ ...u - } - }, - plugins: [ - { - name: "vite-plugin-node-polyfills:optimizer", -- banner: i ? b : void 0 -+ banner: r ? b : void 0 - } - ] - } - } : { - esbuildOptions: { -- banner: i ? { js: b } : void 0, -+ banner: r ? { js: b } : void 0, - define: m, - inject: [ -- ...u -+ ...g - ], - plugins: [ -- T(p), -+ P(u), - // Supress the 'injected path "..." cannot be marked as external' error in Vite 4 (emitted by esbuild). - // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1469 - { - name: "vite-plugin-node-polyfills-shims-resolver", -- setup(t) { -- for (const n of u) { -- const _ = w(n); -- t.onResolve({ filter: _ }, () => ({ -+ setup(n) { -+ for (const f of g) { -+ const x = $(f); -+ n.onResolve({ filter: x }, () => ({ - // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1468 - external: !1, -- path: n -+ path: f - })); - } - } -@@ -133,7 +140,7 @@ const v = (s, l) => c(s) === c(l), o = (s, l) => s ? s === !0 ? !0 : s === l : ! - resolve: { - // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150 - alias: { -- ...p -+ ...u - } - } - }; -@@ -141,6 +148,6 @@ const v = (s, l) => c(s) === c(l), o = (s, l) => s ? s === !0 ? !0 : s === l : ! - }; - }; - export { -- D as nodePolyfills -+ M as nodePolyfills - }; - //# sourceMappingURL=index.js.map -diff --git a/dist/index.js.map b/dist/index.js.map -index 82e2c4ffccccf44b8eba82d171ec600bd48ace86..bed5c99baa6b93838c2ae7da015d3bba62559b10 100644 ---- a/dist/index.js.map -+++ b/dist/index.js.map -@@ -1 +1 @@ --{"version":3,"file":"index.js","sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":["import type { BooleanOrBuildTarget, ModuleName, ModuleNameWithoutNodePrefix } from './index'\n\nexport const compareModuleNames = (moduleA: ModuleName, moduleB: ModuleName) => {\n return withoutNodeProtocol(moduleA) === withoutNodeProtocol(moduleB)\n}\n\nexport const isEnabled = (value: BooleanOrBuildTarget, mode: 'build' | 'dev') => {\n if (!value) return false\n if (value === true) return true\n\n return value === mode\n}\n\nexport const isNodeProtocolImport = (name: string) => {\n return name.startsWith('node:')\n}\n\nexport const toRegExp = (text: string) => {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const escapedText = text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\n return new RegExp(`^${escapedText}$`)\n}\n\nexport const withoutNodeProtocol = (name: ModuleName): ModuleNameWithoutNodePrefix => {\n return name.replace(/^node:/, '') as ModuleNameWithoutNodePrefix\n}\n","import { createRequire } from 'node:module'\nimport inject from '@rollup/plugin-inject'\nimport stdLibBrowser from 'node-stdlib-browser'\nimport { handleCircularDependancyWarning } from 'node-stdlib-browser/helpers/rollup/plugin'\nimport esbuildPlugin from 'node-stdlib-browser/helpers/esbuild/plugin'\nimport type { Plugin } from 'vite'\nimport { compareModuleNames, isEnabled, isNodeProtocolImport, toRegExp, withoutNodeProtocol } from './utils'\n\nexport type BuildTarget = 'build' | 'dev'\nexport type BooleanOrBuildTarget = boolean | BuildTarget\nexport type ModuleName = keyof typeof stdLibBrowser\nexport type ModuleNameWithoutNodePrefix = T extends `node:${infer P}` ? P : never\n\nexport type PolyfillOptions = {\n /**\n * Includes specific modules. If empty, includes all modules\n * @example\n *\n * ```ts\n * nodePolyfills({\n * include: ['fs', 'path'],\n * })\n * ```\n */\n include?: ModuleNameWithoutNodePrefix[],\n /**\n * @example\n *\n * ```ts\n * nodePolyfills({\n * exclude: ['fs', 'path'],\n * })\n * ```\n */\n exclude?: ModuleNameWithoutNodePrefix[],\n /**\n * Specify whether specific globals should be polyfilled.\n *\n * @example\n *\n * ```ts\n * nodePolyfills({\n * globals: {\n * Buffer: false,\n * global: true,\n * process: 'build',\n * },\n * })\n * ```\n */\n globals?: {\n Buffer?: BooleanOrBuildTarget,\n global?: BooleanOrBuildTarget,\n process?: BooleanOrBuildTarget,\n },\n /**\n * Specify alternative modules to use in place of the default polyfills.\n *\n * @example\n *\n * ```ts\n * nodePolyfills({\n * overrides: {\n * fs: 'memfs',\n * },\n * })\n * ```\n */\n overrides?: { [Key in ModuleNameWithoutNodePrefix]?: string },\n /**\n * Specify whether the Node protocol version of an import (e.g. `node:buffer`) should be polyfilled too.\n *\n * @default true\n */\n protocolImports?: boolean,\n}\n\nexport type PolyfillOptionsResolved = {\n include: ModuleNameWithoutNodePrefix[],\n exclude: ModuleNameWithoutNodePrefix[],\n globals: {\n Buffer: BooleanOrBuildTarget,\n global: BooleanOrBuildTarget,\n process: BooleanOrBuildTarget,\n },\n overrides: { [Key in ModuleNameWithoutNodePrefix]?: string },\n protocolImports: boolean,\n}\n\nconst globalShimBanners = {\n buffer: [\n `import __buffer_polyfill from 'vite-plugin-node-polyfills/shims/buffer'`,\n `globalThis.Buffer = globalThis.Buffer || __buffer_polyfill`,\n ],\n global: [\n `import __global_polyfill from 'vite-plugin-node-polyfills/shims/global'`,\n `globalThis.global = globalThis.global || __global_polyfill`,\n ],\n process: [\n `import __process_polyfill from 'vite-plugin-node-polyfills/shims/process'`,\n `globalThis.process = globalThis.process || __process_polyfill`,\n ],\n}\n\n/**\n * Returns a Vite plugin to polyfill Node's Core Modules for browser environments. Supports `node:` protocol imports.\n *\n * @example\n *\n * ```ts\n * // vite.config.ts\n * import { defineConfig } from 'vite'\n * import { nodePolyfills } from 'vite-plugin-node-polyfills'\n *\n * export default defineConfig({\n * plugins: [\n * nodePolyfills({\n * // Specific modules that should not be polyfilled.\n * exclude: [],\n * // Whether to polyfill specific globals.\n * globals: {\n * Buffer: true, // can also be 'build', 'dev', or false\n * global: true,\n * process: true,\n * },\n * // Whether to polyfill `node:` protocol imports.\n * protocolImports: true,\n * }),\n * ],\n * })\n * ```\n */\nexport const nodePolyfills = (options: PolyfillOptions = {}): Plugin => {\n const optionsResolved: PolyfillOptionsResolved = {\n include: [],\n exclude: [],\n overrides: {},\n protocolImports: true,\n ...options,\n globals: {\n Buffer: true,\n global: true,\n process: true,\n ...options.globals,\n },\n }\n\n const isExcluded = (moduleName: ModuleName) => {\n if (optionsResolved.include.length > 0) {\n return !optionsResolved.include.some((includedName) => compareModuleNames(moduleName, includedName))\n }\n\n return optionsResolved.exclude.some((excludedName) => compareModuleNames(moduleName, excludedName))\n }\n\n const toOverride = (name: ModuleNameWithoutNodePrefix): string | void => {\n if (isEnabled(optionsResolved.globals.Buffer, 'dev') && /^buffer$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/buffer'\n }\n\n if (isEnabled(optionsResolved.globals.global, 'dev') && /^global$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/global'\n }\n\n if (isEnabled(optionsResolved.globals.process, 'dev') && /^process$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/process'\n }\n\n if (name in optionsResolved.overrides) {\n return optionsResolved.overrides[name]\n }\n }\n\n const polyfills = (Object.entries(stdLibBrowser) as Array<[ModuleName, string]>).reduce>((included, [name, value]) => {\n if (!optionsResolved.protocolImports) {\n if (isNodeProtocolImport(name)) {\n return included\n }\n }\n\n if (!isExcluded(name)) {\n included[name] = toOverride(withoutNodeProtocol(name)) || value\n }\n\n return included\n }, {} as Record)\n\n const require = createRequire(import.meta.url)\n const globalShimPaths = [\n ...((isEnabled(optionsResolved.globals.Buffer, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/buffer')] : []),\n ...((isEnabled(optionsResolved.globals.global, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/global')] : []),\n ...((isEnabled(optionsResolved.globals.process, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/process')] : []),\n ]\n\n const globalShimsBanner = [\n ...((isEnabled(optionsResolved.globals.Buffer, 'dev')) ? globalShimBanners.buffer : []),\n ...((isEnabled(optionsResolved.globals.global, 'dev')) ? globalShimBanners.global : []),\n ...((isEnabled(optionsResolved.globals.process, 'dev')) ? globalShimBanners.process : []),\n ``,\n ].join('\\n')\n\n return {\n name: 'vite-plugin-node-polyfills',\n config(config, env) {\n const isDev = env.command === 'serve'\n // @ts-expect-error - this.meta.rolldownVersion only exists with rolldown-vite 7+\n const isRolldownVite = !!this?.meta?.rolldownVersion\n\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L203-L209\n const defines = {\n ...((isDev && isEnabled(optionsResolved.globals.Buffer, 'dev')) ? { Buffer: 'Buffer' } : {}),\n ...((isDev && isEnabled(optionsResolved.globals.global, 'dev')) ? { global: 'global' } : {}),\n ...((isDev && isEnabled(optionsResolved.globals.process, 'dev')) ? { process: 'process' } : {}),\n }\n\n const shimsToInject = {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md#vite\n ...(isEnabled(optionsResolved.globals.Buffer, 'build') ? { Buffer: 'vite-plugin-node-polyfills/shims/buffer' } : {}),\n ...(isEnabled(optionsResolved.globals.global, 'build') ? { global: 'vite-plugin-node-polyfills/shims/global' } : {}),\n ...(isEnabled(optionsResolved.globals.process, 'build') ? { process: 'vite-plugin-node-polyfills/shims/process' } : {}),\n }\n\n return {\n build: {\n rollupOptions: {\n onwarn: (warning, rollupWarn) => {\n handleCircularDependancyWarning(warning, () => {\n if (config.build?.rollupOptions?.onwarn) {\n return config.build.rollupOptions.onwarn(warning, rollupWarn)\n }\n\n rollupWarn(warning)\n })\n },\n ...Object.keys(shimsToInject).length > 0\n ? isRolldownVite\n ? { inject: shimsToInject }\n : { plugins: [inject(shimsToInject)] }\n : {},\n },\n },\n esbuild: {\n // In dev, the global polyfills need to be injected as a banner in order for isolated scripts (such as Vue SFCs) to have access to them.\n banner: isDev ? globalShimsBanner : undefined,\n },\n optimizeDeps: {\n exclude: [\n ...globalShimPaths,\n ],\n ...isRolldownVite\n ? {\n rollupOptions: {\n define: defines,\n resolve: {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150\n alias: {\n ...polyfills,\n },\n },\n plugins: [\n {\n name: 'vite-plugin-node-polyfills:optimizer',\n banner: isDev ? globalShimsBanner : undefined,\n },\n ],\n },\n }\n : {\n esbuildOptions: {\n banner: isDev ? { js: globalShimsBanner } : undefined,\n define: defines,\n inject: [\n ...globalShimPaths,\n ],\n plugins: [\n esbuildPlugin(polyfills),\n // Supress the 'injected path \"...\" cannot be marked as external' error in Vite 4 (emitted by esbuild).\n // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1469\n {\n name: 'vite-plugin-node-polyfills-shims-resolver',\n setup(build) {\n for (const globalShimPath of globalShimPaths) {\n const globalShimsFilter = toRegExp(globalShimPath)\n\n // https://esbuild.github.io/plugins/#on-resolve\n build.onResolve({ filter: globalShimsFilter }, () => {\n return {\n // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1468\n external: false,\n path: globalShimPath,\n }\n })\n }\n },\n },\n ],\n },\n },\n },\n resolve: {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150\n alias: {\n ...polyfills,\n },\n },\n }\n },\n }\n}\n"],"names":["compareModuleNames","moduleA","moduleB","withoutNodeProtocol","isEnabled","value","mode","isNodeProtocolImport","name","toRegExp","text","escapedText","globalShimBanners","nodePolyfills","options","optionsResolved","isExcluded","moduleName","includedName","excludedName","toOverride","polyfills","stdLibBrowser","included","require","createRequire","globalShimPaths","globalShimsBanner","config","env","isDev","isRolldownVite","defines","shimsToInject","warning","rollupWarn","handleCircularDependancyWarning","inject","esbuildPlugin","build","globalShimPath","globalShimsFilter"],"mappings":";;;;;AAEa,MAAAA,IAAqB,CAACC,GAAqBC,MAC/CC,EAAoBF,CAAO,MAAME,EAAoBD,CAAO,GAGxDE,IAAY,CAACC,GAA6BC,MAChDD,IACDA,MAAU,KAAa,KAEpBA,MAAUC,IAHE,IAMRC,IAAuB,CAACC,MAC5BA,EAAK,WAAW,OAAO,GAGnBC,IAAW,CAACC,MAAiB;AAExC,QAAMC,IAAcD,EAAK,QAAQ,uBAAuB,MAAM;AAE9D,SAAO,IAAI,OAAO,IAAIC,CAAW,GAAG;AACtC,GAEaR,IAAsB,CAACK,MAC3BA,EAAK,QAAQ,UAAU,EAAE,GCgE5BI,IAAoB;AAAA,EACxB,QAAQ;AAAA,IACN;AAAA,IACA;AAAA,EACF;AAAA,EACA,QAAQ;AAAA,IACN;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAS;AAAA,IACP;AAAA,IACA;AAAA,EACF;AACF,GA8BaC,IAAgB,CAACC,IAA2B,OAAe;AACtE,QAAMC,IAA2C;AAAA,IAC/C,SAAS,CAAC;AAAA,IACV,SAAS,CAAC;AAAA,IACV,WAAW,CAAC;AAAA,IACZ,iBAAiB;AAAA,IACjB,GAAGD;AAAA,IACH,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,GAAGA,EAAQ;AAAA,IACb;AAAA,EAAA,GAGIE,IAAa,CAACC,MACdF,EAAgB,QAAQ,SAAS,IAC5B,CAACA,EAAgB,QAAQ,KAAK,CAACG,MAAiBlB,EAAmBiB,GAAYC,CAAY,CAAC,IAG9FH,EAAgB,QAAQ,KAAK,CAACI,MAAiBnB,EAAmBiB,GAAYE,CAAY,CAAC,GAG9FC,IAAa,CAACZ,M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SAAS;AAAA;AAAA,UAEP,QAAQH,IAAQH,IAAoB;AAAA,QACtC;AAAA,QACA,cAAc;AAAA,UACZ,SAAS;AAAA,YACP,GAAGD;AAAA,UACL;AAAA,UACA,GAAGK,IACC;AAAA,YACE,eAAe;AAAA,cACb,QAAQC;AAAA,cACR,SAAS;AAAA;AAAA,gBAEP,OAAO;AAAA,kBACL,GAAGX;AAAA,gBACL;AAAA,cACF;AAAA,cACA,SAAS;AAAA,gBACP;AAAA,kBACE,MAAM;AAAA,kBACN,QAAQS,IAAQH,IAAoB;AAAA,gBACtC;AAAA,cACF;AAAA,YACF;AAAA,UAAA,IAEF;AAAA,YACE,gBAAgB;AAAA,cACd,QAAQG,IAAQ,EAAE,IAAIH,MAAsB;AAAA,cAC5C,QAAQK;AAAA,cACR,QAAQ;AAAA,gBACN,GAAGN;AAAA,cACL;AAAA,cACA,SAAS;AAAA,gBACPY,EAAcjB,CAAS;AAAA;AAAA;AAAA,gBAGvB;AAAA,kBACE,MAAM;AAAA,kBACN,MAAMkB,GAAO;AACX,+BAAWC,KAAkBd,GAAiB;AACtC,4BAAAe,IAAoBhC,EAAS+B,CAAc;AAGjD,sBAAAD,EAAM,UAAU,EAAE,QAAQE,KAAqB,OACtC;AAAA;AAAA,wBAEL,UAAU;AAAA,wBACV,MAAMD;AAAA,sBAAA,EAET;AAAA,oBACH;AAAA,kBACF;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACN;AAAA,QACA,SAAS;AAAA;AAAA,UAEP,OAAO;AAAA,YACL,GAAGnB;AAAA,UACL;AAAA,QACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAEJ;"} -\ No newline at end of file -+{"version":3,"file":"index.js","sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":["import type { BooleanOrBuildTarget, ModuleName, ModuleNameWithoutNodePrefix } from './index'\n\nexport const compareModuleNames = (moduleA: ModuleName, moduleB: ModuleName) => {\n return withoutNodeProtocol(moduleA) === withoutNodeProtocol(moduleB)\n}\n\nexport const isEnabled = (value: BooleanOrBuildTarget, mode: 'build' | 'dev') => {\n if (!value) return false\n if (value === true) return true\n\n return value === mode\n}\n\nexport const isNodeProtocolImport = (name: string) => {\n return name.startsWith('node:')\n}\n\nexport const toRegExp = (text: string) => {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const escapedText = text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\n return new RegExp(`^${escapedText}$`)\n}\n\nexport const withoutNodeProtocol = (name: ModuleName): ModuleNameWithoutNodePrefix => {\n return name.replace(/^node:/, '') as ModuleNameWithoutNodePrefix\n}\n","import { createRequire } from 'node:module'\nimport inject from '@rollup/plugin-inject'\nimport stdLibBrowser from 'node-stdlib-browser'\nimport { handleCircularDependancyWarning } from 'node-stdlib-browser/helpers/rollup/plugin'\nimport esbuildPlugin from 'node-stdlib-browser/helpers/esbuild/plugin'\nimport type { Plugin } from 'vite'\nimport { compareModuleNames, isEnabled, isNodeProtocolImport, toRegExp, withoutNodeProtocol } from './utils'\n\nexport type BuildTarget = 'build' | 'dev'\nexport type BooleanOrBuildTarget = boolean | BuildTarget\nexport type ModuleName = keyof typeof stdLibBrowser\nexport type ModuleNameWithoutNodePrefix = T extends `node:${infer P}` ? P : never\n\nexport type PolyfillOptions = {\n /**\n * Includes specific modules. If empty, includes all modules\n * @example\n *\n * ```ts\n * nodePolyfills({\n * include: ['fs', 'path'],\n * })\n * ```\n */\n include?: ModuleNameWithoutNodePrefix[],\n /**\n * @example\n *\n * ```ts\n * nodePolyfills({\n * exclude: ['fs', 'path'],\n * })\n * ```\n */\n exclude?: ModuleNameWithoutNodePrefix[],\n /**\n * Specify whether specific globals should be polyfilled.\n *\n * @example\n *\n * ```ts\n * nodePolyfills({\n * globals: {\n * Buffer: false,\n * global: true,\n * process: 'build',\n * },\n * })\n * ```\n */\n globals?: {\n Buffer?: BooleanOrBuildTarget,\n global?: BooleanOrBuildTarget,\n process?: BooleanOrBuildTarget,\n },\n /**\n * Specify alternative modules to use in place of the default polyfills.\n *\n * @example\n *\n * ```ts\n * nodePolyfills({\n * overrides: {\n * fs: 'memfs',\n * },\n * })\n * ```\n */\n overrides?: { [Key in ModuleNameWithoutNodePrefix]?: string },\n /**\n * Specify whether the Node protocol version of an import (e.g. `node:buffer`) should be polyfilled too.\n *\n * @default true\n */\n protocolImports?: boolean,\n}\n\nexport type PolyfillOptionsResolved = {\n include: ModuleNameWithoutNodePrefix[],\n exclude: ModuleNameWithoutNodePrefix[],\n globals: {\n Buffer: BooleanOrBuildTarget,\n global: BooleanOrBuildTarget,\n process: BooleanOrBuildTarget,\n },\n overrides: { [Key in ModuleNameWithoutNodePrefix]?: string },\n protocolImports: boolean,\n}\n\nconst globalShimBanners = {\n buffer: [\n `import __buffer_polyfill from 'vite-plugin-node-polyfills/shims/buffer'`,\n `globalThis.Buffer = globalThis.Buffer || __buffer_polyfill`,\n ],\n global: [\n `import __global_polyfill from 'vite-plugin-node-polyfills/shims/global'`,\n `globalThis.global = globalThis.global || __global_polyfill`,\n ],\n process: [\n `import __process_polyfill from 'vite-plugin-node-polyfills/shims/process'`,\n `globalThis.process = globalThis.process || __process_polyfill`,\n ],\n}\n\n/**\n * Returns a Vite plugin to polyfill Node's Core Modules for browser environments. Supports `node:` protocol imports.\n *\n * @example\n *\n * ```ts\n * // vite.config.ts\n * import { defineConfig } from 'vite'\n * import { nodePolyfills } from 'vite-plugin-node-polyfills'\n *\n * export default defineConfig({\n * plugins: [\n * nodePolyfills({\n * // Specific modules that should not be polyfilled.\n * exclude: [],\n * // Whether to polyfill specific globals.\n * globals: {\n * Buffer: true, // can also be 'build', 'dev', or false\n * global: true,\n * process: true,\n * },\n * // Whether to polyfill `node:` protocol imports.\n * protocolImports: true,\n * }),\n * ],\n * })\n * ```\n */\nexport const nodePolyfills = (options: PolyfillOptions = {}): Plugin => {\n const optionsResolved: PolyfillOptionsResolved = {\n include: [],\n exclude: [],\n overrides: {},\n protocolImports: true,\n ...options,\n globals: {\n Buffer: true,\n global: true,\n process: true,\n ...options.globals,\n },\n }\n\n const isExcluded = (moduleName: ModuleName) => {\n if (optionsResolved.include.length > 0) {\n return !optionsResolved.include.some((includedName) => compareModuleNames(moduleName, includedName))\n }\n\n return optionsResolved.exclude.some((excludedName) => compareModuleNames(moduleName, excludedName))\n }\n\n const toOverride = (name: ModuleNameWithoutNodePrefix): string | void => {\n if (isEnabled(optionsResolved.globals.Buffer, 'dev') && /^buffer$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/buffer'\n }\n\n if (isEnabled(optionsResolved.globals.global, 'dev') && /^global$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/global'\n }\n\n if (isEnabled(optionsResolved.globals.process, 'dev') && /^process$/.test(name)) {\n return 'vite-plugin-node-polyfills/shims/process'\n }\n\n if (name in optionsResolved.overrides) {\n return optionsResolved.overrides[name]\n }\n }\n\n const polyfills = (Object.entries(stdLibBrowser) as Array<[ModuleName, string]>).reduce>((included, [name, value]) => {\n if (!optionsResolved.protocolImports) {\n if (isNodeProtocolImport(name)) {\n return included\n }\n }\n\n if (!isExcluded(name)) {\n included[name] = toOverride(withoutNodeProtocol(name)) || value\n }\n\n return included\n }, {} as Record)\n\n const require = createRequire(import.meta.url)\n const globalShimPaths = [\n ...((isEnabled(optionsResolved.globals.Buffer, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/buffer')] : []),\n ...((isEnabled(optionsResolved.globals.global, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/global')] : []),\n ...((isEnabled(optionsResolved.globals.process, 'dev')) ? [require.resolve('vite-plugin-node-polyfills/shims/process')] : []),\n ]\n\n const globalShimsBanner = [\n ...((isEnabled(optionsResolved.globals.Buffer, 'dev')) ? globalShimBanners.buffer : []),\n ...((isEnabled(optionsResolved.globals.global, 'dev')) ? globalShimBanners.global : []),\n ...((isEnabled(optionsResolved.globals.process, 'dev')) ? globalShimBanners.process : []),\n ``,\n ].join('\\n')\n\n return {\n name: 'vite-plugin-node-polyfills',\n config(config, env) {\n const isDev = env.command === 'serve'\n // @ts-expect-error - this.meta.rolldownVersion only exists with rolldown-vite 7+\n const isRolldownVite = !!this?.meta?.rolldownVersion\n\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L203-L209\n const defines = {\n ...((isDev && isEnabled(optionsResolved.globals.Buffer, 'dev')) ? { Buffer: 'Buffer' } : {}),\n ...((isDev && isEnabled(optionsResolved.globals.global, 'dev')) ? { global: 'global' } : {}),\n ...((isDev && isEnabled(optionsResolved.globals.process, 'dev')) ? { process: 'process' } : {}),\n }\n\n const shimsToInject = {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md#vite\n ...(isEnabled(optionsResolved.globals.Buffer, 'build') ? { Buffer: 'vite-plugin-node-polyfills/shims/buffer' } : {}),\n ...(isEnabled(optionsResolved.globals.global, 'build') ? { global: 'vite-plugin-node-polyfills/shims/global' } : {}),\n ...(isEnabled(optionsResolved.globals.process, 'build') ? { process: 'vite-plugin-node-polyfills/shims/process' } : {}),\n }\n\n // Create a map of shim import paths to their resolved absolute paths\n const shimImportMap = new Map()\n if (isEnabled(optionsResolved.globals.Buffer, 'build')) {\n shimImportMap.set('vite-plugin-node-polyfills/shims/buffer', require.resolve('vite-plugin-node-polyfills/shims/buffer'))\n }\n if (isEnabled(optionsResolved.globals.global, 'build')) {\n shimImportMap.set('vite-plugin-node-polyfills/shims/global', require.resolve('vite-plugin-node-polyfills/shims/global'))\n }\n if (isEnabled(optionsResolved.globals.process, 'build')) {\n shimImportMap.set('vite-plugin-node-polyfills/shims/process', require.resolve('vite-plugin-node-polyfills/shims/process'))\n }\n\n // Plugin to resolve shim imports during build\n const shimsResolverPlugin = shimImportMap.size > 0 ? {\n name: 'vite-plugin-node-polyfills:shims-resolver',\n resolveId(source: string) {\n if (shimImportMap.has(source)) {\n return { id: shimImportMap.get(source)!, external: false }\n }\n return null\n },\n } : null\n\n return {\n build: {\n rollupOptions: {\n onwarn: (warning, rollupWarn) => {\n handleCircularDependancyWarning(warning, () => {\n if (config.build?.rollupOptions?.onwarn) {\n return config.build.rollupOptions.onwarn(warning, rollupWarn)\n }\n\n rollupWarn(warning)\n })\n },\n ...Object.keys(shimsToInject).length > 0\n ? isRolldownVite\n ? { inject: shimsToInject }\n : { plugins: [inject(shimsToInject), ...(shimsResolverPlugin ? [shimsResolverPlugin] : [])] }\n : {},\n },\n },\n esbuild: {\n // In dev, the global polyfills need to be injected as a banner in order for isolated scripts (such as Vue SFCs) to have access to them.\n banner: isDev ? globalShimsBanner : undefined,\n },\n optimizeDeps: {\n exclude: [\n ...globalShimPaths,\n ],\n ...isRolldownVite\n ? {\n rollupOptions: {\n define: defines,\n resolve: {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150\n alias: {\n ...polyfills,\n },\n },\n plugins: [\n {\n name: 'vite-plugin-node-polyfills:optimizer',\n banner: isDev ? globalShimsBanner : undefined,\n },\n ],\n },\n }\n : {\n esbuildOptions: {\n banner: isDev ? { js: globalShimsBanner } : undefined,\n define: defines,\n inject: [\n ...globalShimPaths,\n ],\n plugins: [\n esbuildPlugin(polyfills),\n // Supress the 'injected path \"...\" cannot be marked as external' error in Vite 4 (emitted by esbuild).\n // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1469\n {\n name: 'vite-plugin-node-polyfills-shims-resolver',\n setup(build) {\n for (const globalShimPath of globalShimPaths) {\n const globalShimsFilter = toRegExp(globalShimPath)\n\n // https://esbuild.github.io/plugins/#on-resolve\n build.onResolve({ filter: globalShimsFilter }, () => {\n return {\n // https://github.com/evanw/esbuild/blob/edede3c49ad6adddc6ea5b3c78c6ea7507e03020/internal/bundler/bundler.go#L1468\n external: false,\n path: globalShimPath,\n }\n })\n }\n },\n },\n ],\n },\n },\n },\n resolve: {\n // https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md?plain=1#L150\n alias: {\n ...polyfills,\n },\n },\n }\n },\n }\n}\n"],"names":["compareModuleNames","moduleA","moduleB","withoutNodeProtocol","isEnabled","value","mode","isNodeProtocolImport","name","toRegExp","text","escapedText","globalShimBanners","nodePolyfills","options","optionsResolved","isExcluded","moduleName","includedName","excludedName","toOverride","polyfills","stdLibBrowser","included","require","createRequire","globalShimPaths","globalShimsBanner","config","env","isDev","isRolldownVite","defines","shimsToInject","shimImportMap","shimsResolverPlugin","source","warning","rollupWarn","handleCircularDependancyWarning","inject","esbuildPlugin","build","globalShimPath","globalShimsFilter"],"mappings":";;;;;AAEa,MAAAA,IAAqB,CAACC,GAAqBC,MAC/CC,EAAoBF,CAAO,MAAME,EAAoBD,CAAO,GAGxDE,IAAY,CAACC,GAA6BC,MAChDD,IACDA,MAAU,KAAa,KAEpBA,MAAUC,IAHE,IAMRC,IAAuB,CAACC,MAC5BA,EAAK,WAAW,OAAO,GAGnBC,IAAW,CAACC,MAAiB;AAExC,QAAMC,IAAcD,EAAK,QAAQ,uBAAuB,MAAM;AAE9D,SAAO,IAAI,OAAO,IAAIC,CAAW,GAAG;AACtC,GAEaR,IAAsB,CAACK,MAC3BA,EAAK,QAAQ,UAAU,EAAE,GCgE5BI,IAAoB;AAAA,EACxB,QAAQ;AAAA,IACN;AAAA,IACA;AAAA,EACF;AAAA,EACA,QAAQ;AAAA,IACN;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAS;AAAA,IACP;AAAA,IACA;AAAA,EACF;AACF,GA8BaC,IAAgB,CAACC,IAA2B,OAAe;AACtE,QAAMC,IAA2C;AAAA,IAC/C,SAAS,CAAC;AAAA,IACV,SAAS,CAAC;AAAA,IACV,WAAW,CAAC;AAAA,IACZ,iBAAiB;AAAA,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E,MAAM;AAAA,kBACN,QAAQS,IAAQH,IAAoB;AAAA,gBACtC;AAAA,cACF;AAAA,YACF;AAAA,UAAA,IAEF;AAAA,YACE,gBAAgB;AAAA,cACd,QAAQG,IAAQ,EAAE,IAAIH,MAAsB;AAAA,cAC5C,QAAQK;AAAA,cACR,QAAQ;AAAA,gBACN,GAAGN;AAAA,cACL;AAAA,cACA,SAAS;AAAA,gBACPe,EAAcpB,CAAS;AAAA;AAAA;AAAA,gBAGvB;AAAA,kBACE,MAAM;AAAA,kBACN,MAAMqB,GAAO;AACX,+BAAWC,KAAkBjB,GAAiB;AACtC,4BAAAkB,IAAoBnC,EAASkC,CAAc;AAGjD,sBAAAD,EAAM,UAAU,EAAE,QAAQE,KAAqB,OACtC;AAAA;AAAA,wBAEL,UAAU;AAAA,wBACV,MAAMD;AAAA,sBAAA,EAET;AAAA,oBACH;AAAA,kBACF;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACN;AAAA,QACA,SAAS;AAAA;AAAA,UAEP,OAAO;AAAA,YACL,GAAGtB;AAAA,UACL;AAAA,QACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAEJ;"} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e3b0c3fd7..ae8d8f8c26 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -264,15 +264,12 @@ catalogs: verdaccio: specifier: ^6.1.6 version: 6.2.5 - vite: - specifier: ^7.2.7 - version: 7.3.1 vite-plugin-dts: specifier: ~4.5.4 version: 4.5.4 vite-plugin-node-polyfills: - specifier: ^0.24.0 - version: 0.24.0 + specifier: ^0.25.0 + version: 0.25.0 vitest: specifier: ^3.2.4 version: 3.2.4 @@ -304,11 +301,12 @@ overrides: '@vue/runtime-dom': 3.5.25 '@vue/server-renderer': 3.5.25 '@vue/shared': 3.5.25 + vite: npm:rolldown-vite@7.3.1 patchedDependencies: - vite-plugin-node-polyfills: - hash: b69b54a87bfd9531260555cfb2fda7c94e6f75c124e3a3fae26d64272bbe86ff - path: patches/vite-plugin-node-polyfills.patch + readable-stream@3.6.2: + hash: e4aadcbd3e7fffdf34e27d9a810232cda21beee31c3b1f1fda75b4877dfe5e61 + path: patches/readable-stream@3.6.2.patch importers: @@ -340,7 +338,7 @@ importers: version: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) '@vitest/coverage-v8': specifier: 'catalog:' - version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2)) + version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2)) eslint: specifier: 'catalog:' version: 9.39.2(jiti@2.6.1) @@ -394,10 +392,10 @@ importers: version: 6.2.5(typanion@3.14.0) vite-plugin-node-polyfills: specifier: 'catalog:' - version: 0.24.0(patch_hash=b69b54a87bfd9531260555cfb2fda7c94e6f75c124e3a3fae26d64272bbe86ff)(rollup@4.57.1)(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 0.25.0(rollup@4.57.1)(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)(yaml@2.8.2)) vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) optionalDependencies: canvas: specifier: 3.2.0 @@ -428,7 +426,7 @@ importers: version: 14.0.3 mintlify: specifier: ^4.2.331 - version: 4.2.331(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/node@22.19.2)(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(typescript@5.9.3) + version: 4.2.331(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/node@22.19.8)(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(typescript@5.9.3) remark-mdx: specifier: ^3.1.1 version: 3.1.1 @@ -496,7 +494,7 @@ importers: version: 22.19.2 '@vitejs/plugin-vue': specifier: 'catalog:' - version: 6.0.2(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) + version: 6.0.2(rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) jimp: specifier: 'catalog:' version: 1.6.0 @@ -507,8 +505,8 @@ importers: specifier: 'catalog:' version: 7.1.0 vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) e2e-tests/templates/vue: dependencies: @@ -524,10 +522,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: 'catalog:' - version: 6.0.2(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) + version: 6.0.2(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) examples/__tests__: devDependencies: @@ -551,7 +549,7 @@ importers: version: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) '@vitejs/plugin-vue': specifier: 'catalog:' - version: 6.0.2(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) + version: 6.0.2(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) eslint: specifier: 'catalog:' version: 9.39.2(jiti@2.6.1) @@ -575,7 +573,7 @@ importers: version: 5.9.3 vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) vue: specifier: 3.5.25 version: 3.5.25(typescript@5.9.3) @@ -600,7 +598,7 @@ importers: version: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) '@vitest/coverage-v8': specifier: 'catalog:' - version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2)) + version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2)) concurrently: specifier: 'catalog:' version: 9.2.1 @@ -624,7 +622,7 @@ importers: version: 5.9.3 vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) packages/esign: devDependencies: @@ -645,7 +643,7 @@ importers: version: 19.2.3(@types/react@19.2.11) '@vitejs/plugin-react': specifier: 'catalog:' - version: 5.1.3(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 5.1.3(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) eslint-plugin-react: specifier: 'catalog:' version: 7.37.5(eslint@9.39.2(jiti@2.6.1)) @@ -668,14 +666,14 @@ importers: specifier: 'catalog:' version: 5.9.3 vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) vite-plugin-dts: specifier: 'catalog:' - version: 4.5.4(@types/node@22.19.8)(rollup@4.57.1)(typescript@5.9.3)(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 4.5.4(@types/node@22.19.8)(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(rollup@4.57.1)(typescript@5.9.3) vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) packages/esign/demo: dependencies: @@ -703,13 +701,13 @@ importers: version: 19.2.3(@types/react@19.2.11) '@vitejs/plugin-react': specifier: 'catalog:' - version: 5.1.3(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 5.1.3(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) typescript: specifier: 'catalog:' version: 5.9.3 vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) packages/esign/demo/server: dependencies: @@ -734,7 +732,7 @@ importers: version: 5.9.3 vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) packages/layout-engine/layout-bridge: dependencies: @@ -771,7 +769,7 @@ importers: version: 5.9.3 vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) packages/layout-engine/layout-engine: dependencies: @@ -823,7 +821,7 @@ importers: devDependencies: vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) packages/layout-engine/pm-adapter: dependencies: @@ -863,7 +861,7 @@ importers: version: link:../painters/dom vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) packages/layout-engine/style-engine: dependencies: @@ -879,7 +877,7 @@ importers: version: 5.9.3 vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) packages/layout-engine/tests: dependencies: @@ -937,7 +935,7 @@ importers: version: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) '@vitejs/plugin-react': specifier: 'catalog:' - version: 5.1.3(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 5.1.3(rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) eslint: specifier: 'catalog:' version: 9.39.2(jiti@2.6.1) @@ -954,14 +952,14 @@ importers: specifier: 'catalog:' version: 5.9.3 vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) vite-plugin-dts: specifier: 'catalog:' - version: 4.5.4(@types/node@22.19.2)(rollup@4.57.1)(typescript@5.9.3)(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 4.5.4(@types/node@22.19.2)(rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(rollup@4.57.1)(typescript@5.9.3) vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) packages/super-editor: dependencies: @@ -1094,7 +1092,7 @@ importers: version: link:../word-layout '@vitejs/plugin-vue': specifier: 'catalog:' - version: 6.0.2(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) + version: 6.0.2(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) '@vue/test-utils': specifier: 'catalog:' version: 2.4.6 @@ -1120,14 +1118,14 @@ importers: specifier: 'catalog:' version: 5.9.3 vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) vite-plugin-node-polyfills: specifier: 'catalog:' - version: 0.24.0(patch_hash=b69b54a87bfd9531260555cfb2fda7c94e6f75c124e3a3fae26d64272bbe86ff)(rollup@4.57.1)(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 0.25.0(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(rollup@4.57.1) vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) y-protocols: specifier: 'catalog:' version: 1.0.7(yjs@13.6.19) @@ -1185,7 +1183,7 @@ importers: version: link:../super-editor '@vitejs/plugin-vue': specifier: 'catalog:' - version: 6.0.2(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) + version: 6.0.2(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) '@vue/test-utils': specifier: 'catalog:' version: 2.4.6 @@ -1220,17 +1218,17 @@ importers: specifier: 'catalog:' version: 5.9.3 vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) vite-plugin-dts: specifier: 'catalog:' - version: 4.5.4(@types/node@22.19.8)(rollup@4.57.1)(typescript@5.9.3)(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 4.5.4(@types/node@22.19.8)(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(rollup@4.57.1)(typescript@5.9.3) vite-plugin-node-polyfills: specifier: 'catalog:' - version: 0.24.0(patch_hash=b69b54a87bfd9531260555cfb2fda7c94e6f75c124e3a3fae26d64272bbe86ff)(rollup@4.57.1)(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 0.25.0(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(rollup@4.57.1) vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) xml-js: specifier: 'catalog:' version: 1.6.11 @@ -1254,7 +1252,7 @@ importers: version: 19.2.3(@types/react@19.2.11) '@vitejs/plugin-react': specifier: 'catalog:' - version: 5.1.3(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 5.1.3(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) eslint-plugin-react: specifier: 'catalog:' version: 7.37.5(eslint@9.39.2(jiti@2.6.1)) @@ -1277,14 +1275,14 @@ importers: specifier: 'catalog:' version: 5.9.3 vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) vite-plugin-dts: specifier: 'catalog:' - version: 4.5.4(@types/node@22.19.8)(rollup@4.57.1)(typescript@5.9.3)(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 4.5.4(@types/node@22.19.8)(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(rollup@4.57.1)(typescript@5.9.3) vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) packages/template-builder/demo: dependencies: @@ -1309,19 +1307,19 @@ importers: version: 19.2.3(@types/react@19.2.11) '@vitejs/plugin-react': specifier: 'catalog:' - version: 5.1.3(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 5.1.3(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) typescript: specifier: 'catalog:' version: 5.9.3 vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) packages/word-layout: devDependencies: vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) shared/common: devDependencies: @@ -1330,13 +1328,13 @@ importers: version: 22.19.2 '@vitejs/plugin-vue': specifier: 'catalog:' - version: 6.0.2(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) + version: 6.0.2(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) typescript: specifier: 'catalog:' version: 5.9.3 vitest: specifier: 'catalog:' - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) vue: specifier: 3.5.25 version: 3.5.25(typescript@5.9.3) @@ -1369,8 +1367,8 @@ importers: specifier: 'catalog:' version: 4.21.0 vite: - specifier: 'catalog:' - version: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: npm:rolldown-vite@7.3.1 + version: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) packages: @@ -2882,6 +2880,9 @@ packages: '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} + '@napi-rs/wasm-runtime@1.1.1': + resolution: {integrity: sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2954,6 +2955,13 @@ packages: '@openapi-contrib/openapi-schema-to-json-schema@3.2.0': resolution: {integrity: sha512-Gj6C0JwCr8arj0sYuslWXUBSP/KnUlEGnPW4qxlXvAl543oaNQgMgIgkQUA6vs5BCCvwTEiL8m/wdWzfl4UvSw==} + '@oxc-project/runtime@0.101.0': + resolution: {integrity: sha512-t3qpfVZIqSiLQ5Kqt/MC4Ge/WCOGrrcagAdzTcDaggupjiGxUx4nJF2v6wUCXWSzWHn5Ns7XLv13fCJEwCOERQ==} + engines: {node: ^20.19.0 || >=22.12.0} + + '@oxc-project/types@0.101.0': + resolution: {integrity: sha512-nuFhqlUzJX+gVIPPfuE6xurd4lST3mdcWOhyK/rZO0B9XWMKm79SuszIQEnSMmmDhq1DC8WWVYGVd+6F93o1gQ==} + '@pinojs/redact@0.4.0': resolution: {integrity: sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==} @@ -3204,9 +3212,89 @@ packages: '@radix-ui/rect@1.1.1': resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==} + '@rolldown/binding-android-arm64@1.0.0-beta.53': + resolution: {integrity: sha512-Ok9V8o7o6YfSdTTYA/uHH30r3YtOxLD6G3wih/U9DO0ucBBFq8WPt/DslU53OgfteLRHITZny9N/qCUxMf9kjQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.0.0-beta.53': + resolution: {integrity: sha512-yIsKqMz0CtRnVa6x3Pa+mzTihr4Ty+Z6HfPbZ7RVbk1Uxnco4+CUn7Qbm/5SBol1JD/7nvY8rphAgyAi7Lj6Vg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.0-beta.53': + resolution: {integrity: sha512-GTXe+mxsCGUnJOFMhfGWmefP7Q9TpYUseHvhAhr21nCTgdS8jPsvirb0tJwM3lN0/u/cg7bpFNa16fQrjKrCjQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.0-beta.53': + resolution: {integrity: sha512-9Tmp7bBvKqyDkMcL4e089pH3RsjD3SUungjmqWtyhNOxoQMh0fSmINTyYV8KXtE+JkxYMPWvnEt+/mfpVCkk8w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.53': + resolution: {integrity: sha512-a1y5fiB0iovuzdbjUxa7+Zcvgv+mTmlGGC4XydVIsyl48eoxgaYkA3l9079hyTyhECsPq+mbr0gVQsFU11OJAQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.53': + resolution: {integrity: sha512-bpIGX+ov9PhJYV+wHNXl9rzq4F0QvILiURn0y0oepbQx+7stmQsKA0DhPGwmhfvF856wq+gbM8L92SAa/CBcLg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.53': + resolution: {integrity: sha512-bGe5EBB8FVjHBR1mOLOPEFg1Lp3//7geqWkU5NIhxe+yH0W8FVrQ6WRYOap4SUTKdklD/dC4qPLREkMMQ855FA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.53': + resolution: {integrity: sha512-qL+63WKVQs1CMvFedlPt0U9PiEKJOAL/bsHMKUDS6Vp2Q+YAv/QLPu8rcvkfIMvQ0FPU2WL0aX4eWwF6e/GAnA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@rolldown/binding-linux-x64-musl@1.0.0-beta.53': + resolution: {integrity: sha512-VGl9JIGjoJh3H8Mb+7xnVqODajBmrdOOb9lxWXdcmxyI+zjB2sux69br0hZJDTyLJfvBoYm439zPACYbCjGRmw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@rolldown/binding-openharmony-arm64@1.0.0-beta.53': + resolution: {integrity: sha512-B4iIserJXuSnNzA5xBLFUIjTfhNy7d9sq4FUMQY3GhQWGVhS2RWWzzDnkSU6MUt7/aHUrep0CdQfXUJI9D3W7A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.53': + resolution: {integrity: sha512-BUjAEgpABEJXilGq/BPh7jeU3WAJ5o15c1ZEgHaDWSz3LB881LQZnbNJHmUiM4d1JQWMYYyR1Y490IBHi2FPJg==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.53': + resolution: {integrity: sha512-s27uU7tpCWSjHBnxyVXHt3rMrQdJq5MHNv3BzsewCIroIw3DJFjMH1dzCPPMUFxnh1r52Nf9IJ/eWp6LDoyGcw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.53': + resolution: {integrity: sha512-cjWL/USPJ1g0en2htb4ssMjIycc36RvdQAx1WlXnS6DpULswiUTVXPDesTifSKYSyvx24E0YqQkEm0K/M2Z/AA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@rolldown/pluginutils@1.0.0-beta.50': resolution: {integrity: sha512-5e76wQiQVeL1ICOZVUg4LSOVYg9jyhGCin+icYozhsUzM+fHE7kddi1bdiE0jwVqTfkjba3jUFbEkoC9WkdvyA==} + '@rolldown/pluginutils@1.0.0-beta.53': + resolution: {integrity: sha512-vENRlFU4YbrwVqNDZ7fLvy+JR1CRkyr01jhSiDpE1u6py3OMzQfztQU2jxykW3ALNxO4kSlqIDeYyD0Y9RcQeQ==} + '@rolldown/pluginutils@1.0.0-rc.2': resolution: {integrity: sha512-izyXV/v+cHiRfozX62W9htOAvwMo4/bXKDrQ+vom1L1qRuexPock/7VZDAhnpHCLNejd3NJ6hiab+tO0D44Rgw==} @@ -7401,6 +7489,76 @@ packages: lie@3.3.0: resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} + lightningcss-android-arm64@1.31.1: + resolution: {integrity: sha512-HXJF3x8w9nQ4jbXRiNppBCqeZPIAfUo8zE/kOEGbW5NZvGc/K7nMxbhIr+YlFlHW5mpbg/YFPdbnCh1wAXCKFg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.31.1: + resolution: {integrity: sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.31.1: + resolution: {integrity: sha512-1ObhyoCY+tGxtsz1lSx5NXCj3nirk0Y0kB/g8B8DT+sSx4G9djitg9ejFnjb3gJNWo7qXH4DIy2SUHvpoFwfTA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.31.1: + resolution: {integrity: sha512-1RINmQKAItO6ISxYgPwszQE1BrsVU5aB45ho6O42mu96UiZBxEXsuQ7cJW4zs4CEodPUioj/QrXW1r9pLUM74A==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.31.1: + resolution: {integrity: sha512-OOCm2//MZJ87CdDK62rZIu+aw9gBv4azMJuA8/KB74wmfS3lnC4yoPHm0uXZ/dvNNHmnZnB8XLAZzObeG0nS1g==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.31.1: + resolution: {integrity: sha512-WKyLWztD71rTnou4xAD5kQT+982wvca7E6QoLpoawZ1gP9JM0GJj4Tp5jMUh9B3AitHbRZ2/H3W5xQmdEOUlLg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.31.1: + resolution: {integrity: sha512-mVZ7Pg2zIbe3XlNbZJdjs86YViQFoJSpc41CbVmKBPiGmC4YrfeOyz65ms2qpAobVd7WQsbW4PdsSJEMymyIMg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.31.1: + resolution: {integrity: sha512-xGlFWRMl+0KvUhgySdIaReQdB4FNudfUTARn7q0hh/V67PVGCs3ADFjw+6++kG1RNd0zdGRlEKa+T13/tQjPMA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.31.1: + resolution: {integrity: sha512-eowF8PrKHw9LpoZii5tdZwnBcYDxRw2rRCyvAXLi34iyeYfqCQNA9rmUM0ce62NlPhCvof1+9ivRaTY6pSKDaA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.31.1: + resolution: {integrity: sha512-aJReEbSEQzx1uBlQizAOBSjcmr9dCdL3XuC/6HLXAxmtErsj2ICo5yYggg1qOODQMtnjNQv2UHb9NpOuFtYe4w==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.31.1: + resolution: {integrity: sha512-I9aiFrbd7oYHwlnQDqr1Roz+fTz61oDDJX7n9tYF9FJymH1cIN1DtKw3iYt6b8WZgEjoNwVSncwF4wx/ZedMhw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.31.1: + resolution: {integrity: sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ==} + engines: {node: '>= 12.0.0'} + lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} @@ -9470,6 +9628,51 @@ packages: resolution: {integrity: sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==} engines: {node: '>= 0.8'} + rolldown-vite@7.3.1: + resolution: {integrity: sha512-LYzdNAjRHhF2yA4JUQm/QyARyi216N2rpJ0lJZb8E9FU2y5v6Vk+xq/U4XBOxMefpWixT5H3TslmAHm1rqIq2w==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + esbuild: ^0.27.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + rolldown@1.0.0-beta.53: + resolution: {integrity: sha512-Qd9c2p0XKZdgT5AYd+KgAMggJ8ZmCs3JnS9PTMWkyUfteKlfmKtxJbWTHkVakxwXs1Ub7jrRYVeFeF7N0sQxyw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + rollup-plugin-copy@3.5.0: resolution: {integrity: sha512-wI8D5dvYovRMx/YYKtUNt3Yxaw4ORC9xo6Gt9t22kveWz1enG9QrhVlagzwrxSC455xD1dHMKhIJkbsQ7d48BA==} engines: {node: '>=8.3'} @@ -10653,8 +10856,8 @@ packages: vite: optional: true - vite-plugin-node-polyfills@0.24.0: - resolution: {integrity: sha512-GA9QKLH+vIM8NPaGA+o2t8PDfFUl32J8rUp1zQfMKVJQiNkOX4unE51tR6ppl6iKw5yOrDAdSH7r/UIFLCVhLw==} + vite-plugin-node-polyfills@0.25.0: + resolution: {integrity: sha512-rHZ324W3LhfGPxWwQb2N048TThB6nVvnipsqBUJEzh3R9xeK9KI3si+GMQxCuAcpPJBVf0LpDtJ+beYzB3/chg==} peerDependencies: vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 @@ -12457,128 +12660,128 @@ snapshots: '@inquirer/ansi@1.0.2': {} - '@inquirer/checkbox@4.3.2(@types/node@22.19.2)': + '@inquirer/checkbox@4.3.2(@types/node@22.19.8)': dependencies: '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/type': 3.0.10(@types/node@22.19.8) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/confirm@5.1.21(@types/node@22.19.2)': + '@inquirer/confirm@5.1.21(@types/node@22.19.8)': dependencies: - '@inquirer/core': 10.3.2(@types/node@22.19.2) - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) + '@inquirer/type': 3.0.10(@types/node@22.19.8) optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/core@10.3.2(@types/node@22.19.2)': + '@inquirer/core@10.3.2(@types/node@22.19.8)': dependencies: '@inquirer/ansi': 1.0.2 '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/type': 3.0.10(@types/node@22.19.8) cli-width: 4.1.0 mute-stream: 2.0.0 signal-exit: 4.1.0 wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/editor@4.2.23(@types/node@22.19.2)': + '@inquirer/editor@4.2.23(@types/node@22.19.8)': dependencies: - '@inquirer/core': 10.3.2(@types/node@22.19.2) - '@inquirer/external-editor': 1.0.3(@types/node@22.19.2) - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) + '@inquirer/external-editor': 1.0.3(@types/node@22.19.8) + '@inquirer/type': 3.0.10(@types/node@22.19.8) optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/expand@4.0.23(@types/node@22.19.2)': + '@inquirer/expand@4.0.23(@types/node@22.19.8)': dependencies: - '@inquirer/core': 10.3.2(@types/node@22.19.2) - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) + '@inquirer/type': 3.0.10(@types/node@22.19.8) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/external-editor@1.0.3(@types/node@22.19.2)': + '@inquirer/external-editor@1.0.3(@types/node@22.19.8)': dependencies: chardet: 2.1.1 iconv-lite: 0.7.2 optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 '@inquirer/figures@1.0.15': {} - '@inquirer/input@4.3.1(@types/node@22.19.2)': + '@inquirer/input@4.3.1(@types/node@22.19.8)': dependencies: - '@inquirer/core': 10.3.2(@types/node@22.19.2) - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) + '@inquirer/type': 3.0.10(@types/node@22.19.8) optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/number@3.0.23(@types/node@22.19.2)': + '@inquirer/number@3.0.23(@types/node@22.19.8)': dependencies: - '@inquirer/core': 10.3.2(@types/node@22.19.2) - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) + '@inquirer/type': 3.0.10(@types/node@22.19.8) optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/password@4.0.23(@types/node@22.19.2)': + '@inquirer/password@4.0.23(@types/node@22.19.8)': dependencies: '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@22.19.2) - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) + '@inquirer/type': 3.0.10(@types/node@22.19.8) optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/prompts@7.9.0(@types/node@22.19.2)': - dependencies: - '@inquirer/checkbox': 4.3.2(@types/node@22.19.2) - '@inquirer/confirm': 5.1.21(@types/node@22.19.2) - '@inquirer/editor': 4.2.23(@types/node@22.19.2) - '@inquirer/expand': 4.0.23(@types/node@22.19.2) - '@inquirer/input': 4.3.1(@types/node@22.19.2) - '@inquirer/number': 3.0.23(@types/node@22.19.2) - '@inquirer/password': 4.0.23(@types/node@22.19.2) - '@inquirer/rawlist': 4.1.11(@types/node@22.19.2) - '@inquirer/search': 3.2.2(@types/node@22.19.2) - '@inquirer/select': 4.4.2(@types/node@22.19.2) + '@inquirer/prompts@7.9.0(@types/node@22.19.8)': + dependencies: + '@inquirer/checkbox': 4.3.2(@types/node@22.19.8) + '@inquirer/confirm': 5.1.21(@types/node@22.19.8) + '@inquirer/editor': 4.2.23(@types/node@22.19.8) + '@inquirer/expand': 4.0.23(@types/node@22.19.8) + '@inquirer/input': 4.3.1(@types/node@22.19.8) + '@inquirer/number': 3.0.23(@types/node@22.19.8) + '@inquirer/password': 4.0.23(@types/node@22.19.8) + '@inquirer/rawlist': 4.1.11(@types/node@22.19.8) + '@inquirer/search': 3.2.2(@types/node@22.19.8) + '@inquirer/select': 4.4.2(@types/node@22.19.8) optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/rawlist@4.1.11(@types/node@22.19.2)': + '@inquirer/rawlist@4.1.11(@types/node@22.19.8)': dependencies: - '@inquirer/core': 10.3.2(@types/node@22.19.2) - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) + '@inquirer/type': 3.0.10(@types/node@22.19.8) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/search@3.2.2(@types/node@22.19.2)': + '@inquirer/search@3.2.2(@types/node@22.19.8)': dependencies: - '@inquirer/core': 10.3.2(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/type': 3.0.10(@types/node@22.19.8) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/select@4.4.2(@types/node@22.19.2)': + '@inquirer/select@4.4.2(@types/node@22.19.8)': dependencies: '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@22.19.2) + '@inquirer/core': 10.3.2(@types/node@22.19.8) '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@22.19.2) + '@inquirer/type': 3.0.10(@types/node@22.19.8) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 - '@inquirer/type@3.0.10(@types/node@22.19.2)': + '@inquirer/type@3.0.10(@types/node@22.19.8)': optionalDependencies: - '@types/node': 22.19.2 + '@types/node': 22.19.8 '@isaacs/balanced-match@4.0.1': {} @@ -12930,9 +13133,9 @@ snapshots: '@microsoft/tsdoc@0.16.0': {} - '@mintlify/cli@4.0.935(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/node@22.19.2)(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(typescript@5.9.3)': + '@mintlify/cli@4.0.935(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/node@22.19.8)(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(typescript@5.9.3)': dependencies: - '@inquirer/prompts': 7.9.0(@types/node@22.19.2) + '@inquirer/prompts': 7.9.0(@types/node@22.19.8) '@mintlify/common': 1.0.713(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3) '@mintlify/link-rot': 3.0.872(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3)(typescript@5.9.3) '@mintlify/models': 0.0.268 @@ -12946,7 +13149,7 @@ snapshots: front-matter: 4.0.2 fs-extra: 11.2.0 ink: 6.3.0(@types/react@19.2.11)(react@19.2.3) - inquirer: 12.3.0(@types/node@22.19.2) + inquirer: 12.3.0(@types/node@22.19.8) js-yaml: 4.1.0 mdast-util-mdx-jsx: 3.2.0 react: 19.2.3 @@ -13357,6 +13560,13 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true + '@napi-rs/wasm-runtime@1.1.1': + dependencies: + '@emnapi/core': 1.8.1 + '@emnapi/runtime': 1.8.1 + '@tybys/wasm-util': 0.10.1 + optional: true + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -13440,6 +13650,10 @@ snapshots: dependencies: fast-deep-equal: 3.1.3 + '@oxc-project/runtime@0.101.0': {} + + '@oxc-project/types@0.101.0': {} + '@pinojs/redact@0.4.0': {} '@pkgjs/parseargs@0.11.0': @@ -13666,8 +13880,51 @@ snapshots: '@radix-ui/rect@1.1.1': {} + '@rolldown/binding-android-arm64@1.0.0-beta.53': + optional: true + + '@rolldown/binding-darwin-arm64@1.0.0-beta.53': + optional: true + + '@rolldown/binding-darwin-x64@1.0.0-beta.53': + optional: true + + '@rolldown/binding-freebsd-x64@1.0.0-beta.53': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.53': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.53': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.53': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.53': + optional: true + + '@rolldown/binding-linux-x64-musl@1.0.0-beta.53': + optional: true + + '@rolldown/binding-openharmony-arm64@1.0.0-beta.53': + optional: true + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.53': + dependencies: + '@napi-rs/wasm-runtime': 1.1.1 + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.53': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.53': + optional: true + '@rolldown/pluginutils@1.0.0-beta.50': {} + '@rolldown/pluginutils@1.0.0-beta.53': {} + '@rolldown/pluginutils@1.0.0-rc.2': {} '@rollup/plugin-inject@5.0.5(rollup@4.57.1)': @@ -15025,7 +15282,7 @@ snapshots: lodash: 4.17.21 minimatch: 7.4.6 - '@vitejs/plugin-react@5.1.3(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitejs/plugin-react@5.1.3(rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: '@babel/core': 7.29.0 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.29.0) @@ -15033,11 +15290,11 @@ snapshots: '@rolldown/pluginutils': 1.0.0-rc.2 '@types/babel__core': 7.20.5 react-refresh: 0.18.0 - vite: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@5.1.3(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitejs/plugin-react@5.1.3(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: '@babel/core': 7.29.0 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.29.0) @@ -15045,23 +15302,29 @@ snapshots: '@rolldown/pluginutils': 1.0.0-rc.2 '@types/babel__core': 7.20.5 react-refresh: 0.18.0 - vite: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@6.0.2(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3))': + '@vitejs/plugin-vue@6.0.2(rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3))': + dependencies: + '@rolldown/pluginutils': 1.0.0-beta.50 + vite: rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vue: 3.5.25(typescript@5.9.3) + + '@vitejs/plugin-vue@6.0.2(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3))': dependencies: '@rolldown/pluginutils': 1.0.0-beta.50 - vite: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) vue: 3.5.25(typescript@5.9.3) - '@vitejs/plugin-vue@6.0.2(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3))': + '@vitejs/plugin-vue@6.0.2(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3))': dependencies: '@rolldown/pluginutils': 1.0.0-beta.50 - vite: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)(yaml@2.8.2) vue: 3.5.25(typescript@5.9.3) - '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2))': + '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 @@ -15076,7 +15339,7 @@ snapshots: std-env: 3.10.0 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - supports-color @@ -15088,13 +15351,21 @@ snapshots: chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitest/mocker@3.2.4(rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + + '@vitest/mocker@3.2.4(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + dependencies: + '@vitest/spy': 3.2.4 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) '@vitest/pretty-format@3.2.4': dependencies: @@ -15698,7 +15969,7 @@ snapshots: dependencies: buffer: 5.7.1 inherits: 2.0.4 - readable-stream: 3.6.2 + readable-stream: 3.6.2(patch_hash=e4aadcbd3e7fffdf34e27d9a810232cda21beee31c3b1f1fda75b4877dfe5e61) bmp-ts@1.0.9: {} @@ -18354,12 +18625,12 @@ snapshots: inline-style-parser@0.2.7: {} - inquirer@12.3.0(@types/node@22.19.2): + inquirer@12.3.0(@types/node@22.19.8): dependencies: - '@inquirer/core': 10.3.2(@types/node@22.19.2) - '@inquirer/prompts': 7.9.0(@types/node@22.19.2) - '@inquirer/type': 3.0.10(@types/node@22.19.2) - '@types/node': 22.19.2 + '@inquirer/core': 10.3.2(@types/node@22.19.8) + '@inquirer/prompts': 7.9.0(@types/node@22.19.8) + '@inquirer/type': 3.0.10(@types/node@22.19.8) + '@types/node': 22.19.8 ansi-escapes: 4.3.2 mute-stream: 2.0.0 run-async: 3.0.0 @@ -18978,6 +19249,55 @@ snapshots: dependencies: immediate: 3.0.6 + lightningcss-android-arm64@1.31.1: + optional: true + + lightningcss-darwin-arm64@1.31.1: + optional: true + + lightningcss-darwin-x64@1.31.1: + optional: true + + lightningcss-freebsd-x64@1.31.1: + optional: true + + lightningcss-linux-arm-gnueabihf@1.31.1: + optional: true + + lightningcss-linux-arm64-gnu@1.31.1: + optional: true + + lightningcss-linux-arm64-musl@1.31.1: + optional: true + + lightningcss-linux-x64-gnu@1.31.1: + optional: true + + lightningcss-linux-x64-musl@1.31.1: + optional: true + + lightningcss-win32-arm64-msvc@1.31.1: + optional: true + + lightningcss-win32-x64-msvc@1.31.1: + optional: true + + lightningcss@1.31.1: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.31.1 + lightningcss-darwin-arm64: 1.31.1 + lightningcss-darwin-x64: 1.31.1 + lightningcss-freebsd-x64: 1.31.1 + lightningcss-linux-arm-gnueabihf: 1.31.1 + lightningcss-linux-arm64-gnu: 1.31.1 + lightningcss-linux-arm64-musl: 1.31.1 + lightningcss-linux-x64-gnu: 1.31.1 + lightningcss-linux-x64-musl: 1.31.1 + lightningcss-win32-arm64-msvc: 1.31.1 + lightningcss-win32-x64-msvc: 1.31.1 + lilconfig@2.1.0: {} lilconfig@3.1.3: {} @@ -20075,9 +20395,9 @@ snapshots: minipass: 3.3.6 yallist: 4.0.0 - mintlify@4.2.331(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/node@22.19.2)(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(typescript@5.9.3): + mintlify@4.2.331(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/node@22.19.8)(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(typescript@5.9.3): dependencies: - '@mintlify/cli': 4.0.935(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/node@22.19.2)(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(typescript@5.9.3) + '@mintlify/cli': 4.0.935(@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.11))(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(react@19.2.3))(@types/node@22.19.8)(@types/react@19.2.11)(react-dom@19.2.4(react@19.2.3))(typescript@5.9.3) transitivePeerDependencies: - '@radix-ui/react-popover' - '@types/node' @@ -20253,7 +20573,7 @@ snapshots: process: 0.11.10 punycode: 1.4.1 querystring-es3: 0.2.1 - readable-stream: 3.6.2 + readable-stream: 3.6.2(patch_hash=e4aadcbd3e7fffdf34e27d9a810232cda21beee31c3b1f1fda75b4877dfe5e61) stream-browserify: 3.0.0 stream-http: 3.2.0 string_decoder: 1.3.0 @@ -21260,7 +21580,7 @@ snapshots: string_decoder: 1.1.1 util-deprecate: 1.0.2 - readable-stream@3.6.2: + readable-stream@3.6.2(patch_hash=e4aadcbd3e7fffdf34e27d9a810232cda21beee31c3b1f1fda75b4877dfe5e61): dependencies: inherits: 2.0.4 string_decoder: 1.3.0 @@ -21644,6 +21964,59 @@ snapshots: hash-base: 3.1.2 inherits: 2.0.4 + rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + dependencies: + '@oxc-project/runtime': 0.101.0 + fdir: 6.5.0(picomatch@4.0.3) + lightningcss: 1.31.1 + picomatch: 4.0.3 + postcss: 8.5.6 + rolldown: 1.0.0-beta.53 + tinyglobby: 0.2.15 + optionalDependencies: + '@types/node': 22.19.2 + esbuild: 0.27.2 + fsevents: 2.3.3 + jiti: 2.6.1 + tsx: 4.21.0 + yaml: 2.8.2 + + rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + dependencies: + '@oxc-project/runtime': 0.101.0 + fdir: 6.5.0(picomatch@4.0.3) + lightningcss: 1.31.1 + picomatch: 4.0.3 + postcss: 8.5.6 + rolldown: 1.0.0-beta.53 + tinyglobby: 0.2.15 + optionalDependencies: + '@types/node': 22.19.8 + esbuild: 0.27.2 + fsevents: 2.3.3 + jiti: 2.6.1 + tsx: 4.21.0 + yaml: 2.8.2 + + rolldown@1.0.0-beta.53: + dependencies: + '@oxc-project/types': 0.101.0 + '@rolldown/pluginutils': 1.0.0-beta.53 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.0-beta.53 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.53 + '@rolldown/binding-darwin-x64': 1.0.0-beta.53 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.53 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.53 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.53 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.53 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.53 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.53 + '@rolldown/binding-openharmony-arm64': 1.0.0-beta.53 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.53 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.53 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.53 + rollup-plugin-copy@3.5.0: dependencies: '@types/fs-extra': 8.1.5 @@ -22239,7 +22612,7 @@ snapshots: stream-browserify@3.0.0: dependencies: inherits: 2.0.4 - readable-stream: 3.6.2 + readable-stream: 3.6.2(patch_hash=e4aadcbd3e7fffdf34e27d9a810232cda21beee31c3b1f1fda75b4877dfe5e61) stream-combiner2@1.1.1: dependencies: @@ -22250,7 +22623,7 @@ snapshots: dependencies: builtin-status-codes: 3.0.0 inherits: 2.0.4 - readable-stream: 3.6.2 + readable-stream: 3.6.2(patch_hash=e4aadcbd3e7fffdf34e27d9a810232cda21beee31c3b1f1fda75b4877dfe5e61) xtend: 4.0.2 stream-shift@1.0.3: {} @@ -22500,7 +22873,7 @@ snapshots: end-of-stream: 1.4.5 fs-constants: 1.0.0 inherits: 2.0.4 - readable-stream: 3.6.2 + readable-stream: 3.6.2(patch_hash=e4aadcbd3e7fffdf34e27d9a810232cda21beee31c3b1f1fda75b4877dfe5e61) tar-stream@3.1.7: dependencies: @@ -23220,18 +23593,18 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite-node@3.2.4(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vite-node@3.2.4(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: cac: 6.7.14 debug: 4.4.3(supports-color@5.5.0) es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - '@types/node' + - esbuild - jiti - less - - lightningcss - sass - sass-embedded - stylus @@ -23241,18 +23614,18 @@ snapshots: - tsx - yaml - vite-node@3.2.4(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vite-node@3.2.4(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: cac: 6.7.14 debug: 4.4.3(supports-color@5.5.0) es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - '@types/node' + - esbuild - jiti - less - - lightningcss - sass - sass-embedded - stylus @@ -23262,7 +23635,7 @@ snapshots: - tsx - yaml - vite-plugin-dts@4.5.4(@types/node@22.19.2)(rollup@4.57.1)(typescript@5.9.3)(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)): + vite-plugin-dts@4.5.4(@types/node@22.19.2)(rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(rollup@4.57.1)(typescript@5.9.3): dependencies: '@microsoft/api-extractor': 7.56.1(@types/node@22.19.2) '@rollup/pluginutils': 5.3.0(rollup@4.57.1) @@ -23275,13 +23648,13 @@ snapshots: magic-string: 0.30.21 typescript: 5.9.3 optionalDependencies: - vite: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-dts@4.5.4(@types/node@22.19.8)(rollup@4.57.1)(typescript@5.9.3)(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)): + vite-plugin-dts@4.5.4(@types/node@22.19.8)(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(rollup@4.57.1)(typescript@5.9.3): dependencies: '@microsoft/api-extractor': 7.56.1(@types/node@22.19.8) '@rollup/pluginutils': 5.3.0(rollup@4.57.1) @@ -23294,29 +23667,29 @@ snapshots: magic-string: 0.30.21 typescript: 5.9.3 optionalDependencies: - vite: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-node-polyfills@0.24.0(patch_hash=b69b54a87bfd9531260555cfb2fda7c94e6f75c124e3a3fae26d64272bbe86ff)(rollup@4.57.1)(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)): + vite-plugin-node-polyfills@0.25.0(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))(rollup@4.57.1): dependencies: '@rollup/plugin-inject': 5.0.5(rollup@4.57.1) node-stdlib-browser: 1.3.1 - vite: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - rollup - vite-plugin-node-polyfills@0.24.0(patch_hash=b69b54a87bfd9531260555cfb2fda7c94e6f75c124e3a3fae26d64272bbe86ff)(rollup@4.57.1)(vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)): + vite-plugin-node-polyfills@0.25.0(rollup@4.57.1)(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)(yaml@2.8.2)): dependencies: '@rollup/plugin-inject': 5.0.5(rollup@4.57.1) node-stdlib-browser: 1.3.1 - vite: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - rollup - vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) @@ -23328,29 +23701,15 @@ snapshots: '@types/node': 22.19.2 fsevents: 2.3.3 jiti: 2.6.1 + lightningcss: 1.31.1 tsx: 4.21.0 yaml: 2.8.2 - vite@7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): - dependencies: - esbuild: 0.27.2 - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - postcss: 8.5.6 - rollup: 4.57.1 - tinyglobby: 0.2.15 - optionalDependencies: - '@types/node': 22.19.8 - fsevents: 2.3.3 - jiti: 2.6.1 - tsx: 4.21.0 - yaml: 2.8.2 - - vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2): + vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.2)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2): dependencies: '@types/chai': 5.2.3 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/mocker': 3.2.4(rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -23368,8 +23727,8 @@ snapshots: tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - vite-node: 3.2.4(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite-node: 3.2.4(@types/node@22.19.2)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 @@ -23377,9 +23736,9 @@ snapshots: happy-dom: 20.4.0 jsdom: 27.3.0(canvas@3.2.0) transitivePeerDependencies: + - esbuild - jiti - less - - lightningcss - msw - sass - sass-embedded @@ -23390,11 +23749,11 @@ snapshots: - tsx - yaml - vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2): + vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.8)(esbuild@0.27.2)(happy-dom@20.4.0)(jiti@2.6.1)(jsdom@27.3.0(canvas@3.2.0))(tsx@4.21.0)(yaml@2.8.2): dependencies: '@types/chai': 5.2.3 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.3.1(@types/node@22.19.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/mocker': 3.2.4(rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -23412,8 +23771,8 @@ snapshots: tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.3.1(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - vite-node: 3.2.4(@types/node@22.19.8)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: rolldown-vite@7.3.1(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite-node: 3.2.4(@types/node@22.19.8)(esbuild@0.27.2)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 @@ -23421,9 +23780,9 @@ snapshots: happy-dom: 20.4.0 jsdom: 27.3.0(canvas@3.2.0) transitivePeerDependencies: + - esbuild - jiti - less - - lightningcss - msw - sass - sass-embedded diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 018619d2af..10a73087e8 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -99,7 +99,7 @@ catalog: verdaccio: ^6.1.6 vite: ^7.2.7 vite-plugin-dts: ~4.5.4 - vite-plugin-node-polyfills: ^0.24.0 + vite-plugin-node-polyfills: ^0.25.0 vitest: ^3.2.4 vue: 3.5.25 xml-js: 1.6.11 @@ -120,4 +120,5 @@ onlyBuiltDependencies: - vue-demi patchedDependencies: - vite-plugin-node-polyfills: patches/vite-plugin-node-polyfills.patch + # readable-stream requires 'string_decoder/' with trailing slash; Rolldown treats it as a directory path + readable-stream@3.6.2: patches/readable-stream@3.6.2.patch diff --git a/tests/visual/scripts/r2.ts b/tests/visual/scripts/r2.ts index 8f679b1e02..935b19311e 100644 --- a/tests/visual/scripts/r2.ts +++ b/tests/visual/scripts/r2.ts @@ -25,7 +25,8 @@ export interface R2Client { // --- S3 backend (CI / explicit credentials) --- async function createS3Client(): Promise { - const { S3Client, ListObjectsV2Command, GetObjectCommand, PutObjectCommand, CopyObjectCommand, DeleteObjectCommand } = await import('@aws-sdk/client-s3'); + const { S3Client, ListObjectsV2Command, GetObjectCommand, PutObjectCommand, CopyObjectCommand, DeleteObjectCommand } = + await import('@aws-sdk/client-s3'); const accessKeyId = process.env.SD_VISUAL_TESTING_R2_ACCESS_KEY_ID!; const secretAccessKey = process.env.SD_VISUAL_TESTING_R2_SECRET_ACCESS_KEY!; diff --git a/tests/visual/scripts/upload-test-doc.ts b/tests/visual/scripts/upload-test-doc.ts index a7aedeb4dd..64a22051db 100644 --- a/tests/visual/scripts/upload-test-doc.ts +++ b/tests/visual/scripts/upload-test-doc.ts @@ -74,9 +74,7 @@ async function main() { const fileName = `${parts.join('-')}.docx`; const key = `${DOCUMENTS_PREFIX}/rendering/${fileName}`; - const confirmed = exitIfCancelled( - await confirm({ message: `Upload as ${key}?` }), - ); + const confirmed = exitIfCancelled(await confirm({ message: `Upload as ${key}?` })); if (!confirmed) { cancel('Upload cancelled.'); diff --git a/tests/visual/tests/rendering/rendering.spec.ts b/tests/visual/tests/rendering/rendering.spec.ts index ddd65c5024..27d2eaf55d 100644 --- a/tests/visual/tests/rendering/rendering.spec.ts +++ b/tests/visual/tests/rendering/rendering.spec.ts @@ -14,7 +14,10 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)); const DOCS_DIR = path.resolve(__dirname, '../../test-data/rendering'); const docs = fs.existsSync(DOCS_DIR) - ? fs.readdirSync(DOCS_DIR).filter((f) => f.endsWith('.docx')).sort() + ? fs + .readdirSync(DOCS_DIR) + .filter((f) => f.endsWith('.docx')) + .sort() : []; for (const doc of docs) {