@voidzero-dev/vite-plus-core 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -29
- package/dist/rolldown/cli.mjs +6 -6
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +9 -4
- package/dist/rolldown/experimental-index.mjs +10 -9
- package/dist/rolldown/experimental-runtime-types.d.ts +19 -0
- package/dist/rolldown/experimental-runtime.d.ts +19 -0
- package/dist/rolldown/experimental-runtime.mjs +42 -0
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +2 -2
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +1 -1
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-DZuNHVw4.d.mts → binding-BTa6BPQe.d.mts} +23 -36
- package/dist/rolldown/shared/{binding-DmImI4pj.mjs → binding-BbrDfv1x.mjs} +53 -28
- package/dist/rolldown/shared/{bindingify-input-options-BYClWKnj.mjs → bindingify-input-options-CbBAjvu6.mjs} +9 -8
- package/dist/rolldown/shared/{constructors-BM20b11r.d.mts → constructors-CmDKpWIU.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-mRbcbLyX.mjs → constructors-D9jwEbE4.mjs} +1 -1
- package/dist/rolldown/shared/{create-bundler-option-CHTBktos.mjs → create-bundler-option-wxuQPB7F.mjs} +120 -160
- package/dist/rolldown/shared/{define-config-DNX0WekP.d.mts → define-config-BFdLpVut.d.mts} +10 -1
- package/dist/rolldown/shared/{error-BP8lJHle.mjs → error-CGhV1ebk.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-Cx5fx_8Q.mjs → load-config-DOMKIWz0.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-Dm69lpQ-.mjs → normalize-string-or-regex-zc1bUto6.mjs} +1 -1
- package/dist/rolldown/shared/{parse-8sr82jSR.mjs → parse-B-7jgDap.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-BlNGaH3Y.mjs → resolve-tsconfig-Bf6oL9fm.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-CaX_Wmqc.mjs → rolldown-DZGaRc5R.mjs} +4 -4
- package/dist/rolldown/shared/{transform-CVse9_mH.d.mts → transform-DK_nCt9j.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-YKfJgIxz.mjs → watch-CUKYWzxY.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +5 -5
- package/dist/tsdown/{build-JVmLFaZt-kqQJ2U7s.js → build-JVmLFaZt-BN9yuB6k.js} +13 -426
- package/dist/tsdown/{debug-CpC4hV25-tvH_Dsg5.js → debug-CpC4hV25-BeCITV83.js} +4 -90
- package/dist/tsdown/{detect-Bg-d8iUV-KfbO7neP.js → detect-Bg-d8iUV-Cr_BRLVW.js} +1 -1
- package/dist/tsdown/{dist-Cuw3Ngo4.js → dist-ByW_jJfv.js} +5 -5
- package/dist/tsdown/index-types.d.ts +52 -52
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/internal-DTYQdXId.js +3 -0
- package/dist/tsdown/{main-CyNcZUzu.js → main-bgV9NlwM.js} +88 -3
- package/dist/tsdown/{resolver-DE0_sy8o-ZQqHQjRu.js → resolver-DE0_sy8o-UMsN-SXx.js} +2 -2
- package/dist/tsdown/run.js +4 -4
- package/dist/tsdown/{src-BWidcM5N.js → src-D5xv98Iu.js} +4 -4
- package/dist/tsdown/target-DgdLrXba-DaJJ11xX.js +586 -0
- package/dist/tsdown/{tsc-ChjRhsoQ.js → tsc-BFDF_Im9.js} +3 -3
- package/dist/tsdown/tsdown-css.js +5 -3
- package/dist/tsdown/tsdown-exe.js +4 -15
- package/dist/vite/client/bundledDevClient.mjs +105 -40
- package/dist/vite/client/client.mjs +288 -260
- package/dist/vite/node/chunks/build.js +19 -19
- package/dist/vite/node/chunks/node.js +32770 -32305
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +12 -8
- package/dist/vite/node/index.d.ts +1568 -1577
- package/dist/vite/node/index.js +1 -1
- package/dist/vite/node/module-runner.d.ts +1 -1
- package/dist/vite/node/module-runner.js +199 -200
- package/dist/vite/types/customEvent.d.ts +2 -0
- package/dist/vite/types/hmrPayload.d.ts +2 -0
- package/dist/vite/types/internal/cssPreprocessorOptions.d.ts +2 -2
- package/dist/vite/types/internal/devtoolsOptions.d.ts +9 -0
- package/package.json +23 -26
- package/dist/tsdown/internal-D-JfB5uT.js +0 -29
- package/dist/tsdown/internal-lhH-5yya.js +0 -62
- package/dist/tsdown/version-CQ98ZBpL-Obdnv4J7.js +0 -141
package/LICENSE
CHANGED
|
@@ -399,35 +399,6 @@ Repository: https://github.com/vercel/vercel
|
|
|
399
399
|
|
|
400
400
|
---------------------------------------
|
|
401
401
|
|
|
402
|
-
## @vitejs/devtools
|
|
403
|
-
License: MIT
|
|
404
|
-
By: VoidZero Inc.
|
|
405
|
-
Repository: https://github.com/vitejs/devtools
|
|
406
|
-
|
|
407
|
-
> MIT License
|
|
408
|
-
>
|
|
409
|
-
> Copyright (c) 2025-present, VoidZero Inc. and contributors
|
|
410
|
-
>
|
|
411
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
412
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
413
|
-
> in the Software without restriction, including without limitation the rights
|
|
414
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
415
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
416
|
-
> furnished to do so, subject to the following conditions:
|
|
417
|
-
>
|
|
418
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
419
|
-
> copies or substantial portions of the Software.
|
|
420
|
-
>
|
|
421
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
422
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
423
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
424
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
425
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
426
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
427
|
-
> SOFTWARE.
|
|
428
|
-
|
|
429
|
-
---------------------------------------
|
|
430
|
-
|
|
431
402
|
## @vitest/utils
|
|
432
403
|
License: MIT
|
|
433
404
|
Repository: https://github.com/vitest-dev/vitest
|
package/dist/rolldown/cli.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import { D as version, E as description } from "./shared/bindingify-input-options-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-CUKYWzxY.mjs";
|
|
2
|
+
import { D as version, E as description } from "./shared/bindingify-input-options-CbBAjvu6.mjs";
|
|
3
3
|
import { t as arraify } from "./shared/misc-DOSKtd97.mjs";
|
|
4
|
-
import { a as getOutputCliKeys, c as styleText, i as getInputCliKeys, n as logger, o as validateCliOptions, r as getCliSchemaInfo } from "./shared/create-bundler-option-
|
|
5
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
6
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
4
|
+
import { a as getOutputCliKeys, c as styleText, i as getInputCliKeys, n as logger, o as validateCliOptions, r as getCliSchemaInfo } from "./shared/create-bundler-option-wxuQPB7F.mjs";
|
|
5
|
+
import { t as rolldown } from "./shared/rolldown-DZGaRc5R.mjs";
|
|
6
|
+
import { t as loadConfig } from "./shared/load-config-DOMKIWz0.mjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import g$1 from "node:process";
|
|
9
9
|
import { performance } from "node:perf_hooks";
|
|
@@ -866,7 +866,7 @@ function getClearScreenFunction(options) {
|
|
|
866
866
|
};
|
|
867
867
|
}
|
|
868
868
|
//#endregion
|
|
869
|
-
//#region \0@oxc-project+runtime@0.
|
|
869
|
+
//#region \0@oxc-project+runtime@0.150.0/helpers/esm/usingCtx.js
|
|
870
870
|
function _usingCtx() {
|
|
871
871
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
872
872
|
var n = Error();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as VERSION, r as defineConfig, t as ConfigExport } from "./shared/define-config-
|
|
1
|
+
import { R as VERSION, r as defineConfig, t as ConfigExport } from "./shared/define-config-BFdLpVut.mjs";
|
|
2
2
|
//#region src/utils/load-config.d.ts
|
|
3
3
|
type ConfigLoader = "bundle" | "native";
|
|
4
4
|
interface LoadConfigOptions {
|
package/dist/rolldown/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as VERSION } from "./shared/bindingify-input-options-
|
|
1
|
+
import { T as VERSION } from "./shared/bindingify-input-options-CbBAjvu6.mjs";
|
|
2
2
|
import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
|
|
3
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
3
|
+
import { t as loadConfig } from "./shared/load-config-DOMKIWz0.mjs";
|
|
4
4
|
export { VERSION, defineConfig, loadConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as resetNativeMemoryStats, B as NapiResolveOptions, E as BindingViteManifestPluginConfig, F as IsolatedDeclarationsResult, G as ResolverFactory, P as IsolatedDeclarationsOptions, Q as moduleRunnerTransform, W as ResolveResult, X as isolatedDeclaration, Y as getNativeMemoryStats, Z as isolatedDeclarationSync, b as BindingTsconfigRawOptions, f as BindingModuleInfo, h as BindingRebuildStrategy, i as BindingClientHmrUpdate, j as BindingViteTransformPluginConfig, n as BindingBundleAnalyzerPluginConfig, p as BindingNativeMemoryStats, r as BindingBundleState, u as BindingLazyChunkOutput, y as BindingTsconfigCompilerOptions } from "./shared/binding-
|
|
2
|
-
import { $ as defineParallelPlugin, $t as freeExternalMemory, Ht as OutputOptions, I as BuiltinPlugin, Kt as StringOrRegExp, Zt as RolldownOutput, l as InputOptions, ut as NormalizedOutputOptions } from "./shared/define-config-
|
|
3
|
-
import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-
|
|
4
|
-
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-
|
|
1
|
+
import { $ as resetNativeMemoryStats, B as NapiResolveOptions, E as BindingViteManifestPluginConfig, F as IsolatedDeclarationsResult, G as ResolverFactory, P as IsolatedDeclarationsOptions, Q as moduleRunnerTransform, W as ResolveResult, X as isolatedDeclaration, Y as getNativeMemoryStats, Z as isolatedDeclarationSync, b as BindingTsconfigRawOptions, f as BindingModuleInfo, h as BindingRebuildStrategy, i as BindingClientHmrUpdate, j as BindingViteTransformPluginConfig, n as BindingBundleAnalyzerPluginConfig, p as BindingNativeMemoryStats, r as BindingBundleState, u as BindingLazyChunkOutput, y as BindingTsconfigCompilerOptions } from "./shared/binding-BTa6BPQe.mjs";
|
|
2
|
+
import { $ as defineParallelPlugin, $t as freeExternalMemory, Ht as OutputOptions, I as BuiltinPlugin, Kt as StringOrRegExp, Zt as RolldownOutput, l as InputOptions, ut as NormalizedOutputOptions } from "./shared/define-config-BFdLpVut.mjs";
|
|
3
|
+
import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-DK_nCt9j.mjs";
|
|
4
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-CmDKpWIU.mjs";
|
|
5
5
|
//#region src/api/dev/dev-options.d.ts
|
|
6
6
|
type DevOnHmrUpdates = (result: Error | {
|
|
7
7
|
updates: BindingClientHmrUpdate[];
|
|
@@ -93,6 +93,11 @@ interface DevOptions {
|
|
|
93
93
|
*/
|
|
94
94
|
rebuildStrategy?: "always" | "never";
|
|
95
95
|
watch?: DevWatchOptions;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the `hotUpdate` plugin hook is called. Off until Vite supports it.
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
100
|
+
hotUpdate?: boolean;
|
|
96
101
|
}
|
|
97
102
|
//#endregion
|
|
98
103
|
//#region src/api/dev/dev-engine.d.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./shared/binding-
|
|
2
|
-
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-
|
|
3
|
-
import { u as transformToRollupOutput } from "./shared/bindingify-input-options-
|
|
4
|
-
import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./shared/create-bundler-option-
|
|
5
|
-
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-
|
|
6
|
-
import { n as parseSync$1, t as parse$1 } from "./shared/parse-
|
|
7
|
-
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-
|
|
8
|
-
import { a as minify$1, i as transformSync$1, n as resolveTsconfig, o as minifySync$1, r as transform$1, t as TsconfigCache$1 } from "./shared/resolve-tsconfig-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-BbrDfv1x.mjs";
|
|
2
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-zc1bUto6.mjs";
|
|
3
|
+
import { u as transformToRollupOutput } from "./shared/bindingify-input-options-CbBAjvu6.mjs";
|
|
4
|
+
import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./shared/create-bundler-option-wxuQPB7F.mjs";
|
|
5
|
+
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-CGhV1ebk.mjs";
|
|
6
|
+
import { n as parseSync$1, t as parse$1 } from "./shared/parse-B-7jgDap.mjs";
|
|
7
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-D9jwEbE4.mjs";
|
|
8
|
+
import { a as minify$1, i as transformSync$1, n as resolveTsconfig, o as minifySync$1, r as transform$1, t as TsconfigCache$1 } from "./shared/resolve-tsconfig-Bf6oL9fm.mjs";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
|
10
10
|
//#region src/api/dev/dev-engine.ts
|
|
11
11
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
@@ -81,7 +81,8 @@ var DevEngine = class DevEngine {
|
|
|
81
81
|
debounceTickRate: devOptions.watch.debounceTickRate,
|
|
82
82
|
include: normalizedStringOrRegex(devOptions.watch.include),
|
|
83
83
|
exclude: normalizedStringOrRegex(devOptions.watch.exclude)
|
|
84
|
-
}
|
|
84
|
+
},
|
|
85
|
+
hotUpdate: devOptions.hotUpdate
|
|
85
86
|
};
|
|
86
87
|
const inner = new import_binding.BindingDevEngine(options.bundlerOptions, bindingDevOptions);
|
|
87
88
|
(0, import_binding.startAsyncRuntime)();
|
|
@@ -118,6 +118,25 @@ export class DevRuntime {
|
|
|
118
118
|
* @param {string} id
|
|
119
119
|
*/
|
|
120
120
|
loadExports(id: string): any;
|
|
121
|
+
/** @type {Map<string, Promise<any>>} */
|
|
122
|
+
lazyRequests: Map<string, Promise<any>>;
|
|
123
|
+
/**
|
|
124
|
+
* The entry point for a lazy `import()`. `id` is the module the boundary stands for; the
|
|
125
|
+
* boundary's own id appears only inside `fetchChunk`'s URL.
|
|
126
|
+
*
|
|
127
|
+
* Nothing is registered under the boundary id, deliberately. A cache entry with no factory
|
|
128
|
+
* behind it reads as "executed" to the HMR boundary walk, and `applyUpdate` turns an
|
|
129
|
+
* updated-but-factory-less module into a full page reload.
|
|
130
|
+
*
|
|
131
|
+
* A rejection is memoized like any other outcome, matching `import()` of a module that
|
|
132
|
+
* threw. Retrying could not work anyway: a factory registers its module before running its
|
|
133
|
+
* body, so re-running `initModule` would return half-initialized exports as success.
|
|
134
|
+
*
|
|
135
|
+
* @param {string} id
|
|
136
|
+
* @param {() => Promise<unknown>} fetchChunk
|
|
137
|
+
* @returns {Promise<any>}
|
|
138
|
+
*/
|
|
139
|
+
requestLazy(id: string, fetchChunk: () => Promise<unknown>): Promise<any>;
|
|
121
140
|
/**
|
|
122
141
|
* @param {string} moduleId
|
|
123
142
|
*/
|
|
@@ -118,6 +118,25 @@ export class DevRuntime {
|
|
|
118
118
|
* @param {string} id
|
|
119
119
|
*/
|
|
120
120
|
loadExports(id: string): any;
|
|
121
|
+
/** @type {Map<string, Promise<any>>} */
|
|
122
|
+
lazyRequests: Map<string, Promise<any>>;
|
|
123
|
+
/**
|
|
124
|
+
* The entry point for a lazy `import()`. `id` is the module the boundary stands for; the
|
|
125
|
+
* boundary's own id appears only inside `fetchChunk`'s URL.
|
|
126
|
+
*
|
|
127
|
+
* Nothing is registered under the boundary id, deliberately. A cache entry with no factory
|
|
128
|
+
* behind it reads as "executed" to the HMR boundary walk, and `applyUpdate` turns an
|
|
129
|
+
* updated-but-factory-less module into a full page reload.
|
|
130
|
+
*
|
|
131
|
+
* A rejection is memoized like any other outcome, matching `import()` of a module that
|
|
132
|
+
* threw. Retrying could not work anyway: a factory registers its module before running its
|
|
133
|
+
* body, so re-running `initModule` would return half-initialized exports as success.
|
|
134
|
+
*
|
|
135
|
+
* @param {string} id
|
|
136
|
+
* @param {() => Promise<unknown>} fetchChunk
|
|
137
|
+
* @returns {Promise<any>}
|
|
138
|
+
*/
|
|
139
|
+
requestLazy(id: string, fetchChunk: () => Promise<unknown>): Promise<any>;
|
|
121
140
|
/**
|
|
122
141
|
* @param {string} moduleId
|
|
123
142
|
*/
|
|
@@ -192,6 +192,9 @@ export class DevRuntime {
|
|
|
192
192
|
*/
|
|
193
193
|
removeModuleCache(id) {
|
|
194
194
|
this.moduleCache.delete(id);
|
|
195
|
+
// `registerModule` installs a fresh namespace on every run, so a kept memo would hand a
|
|
196
|
+
// later `import()` the pre-edit exports forever.
|
|
197
|
+
this.lazyRequests.delete(id);
|
|
195
198
|
this.hooks?.onModuleCacheRemoval(id);
|
|
196
199
|
}
|
|
197
200
|
|
|
@@ -225,6 +228,45 @@ export class DevRuntime {
|
|
|
225
228
|
}
|
|
226
229
|
}
|
|
227
230
|
|
|
231
|
+
/** @type {Map<string, Promise<any>>} */
|
|
232
|
+
lazyRequests = new Map();
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* The entry point for a lazy `import()`. `id` is the module the boundary stands for; the
|
|
236
|
+
* boundary's own id appears only inside `fetchChunk`'s URL.
|
|
237
|
+
*
|
|
238
|
+
* Nothing is registered under the boundary id, deliberately. A cache entry with no factory
|
|
239
|
+
* behind it reads as "executed" to the HMR boundary walk, and `applyUpdate` turns an
|
|
240
|
+
* updated-but-factory-less module into a full page reload.
|
|
241
|
+
*
|
|
242
|
+
* A rejection is memoized like any other outcome, matching `import()` of a module that
|
|
243
|
+
* threw. Retrying could not work anyway: a factory registers its module before running its
|
|
244
|
+
* body, so re-running `initModule` would return half-initialized exports as success.
|
|
245
|
+
*
|
|
246
|
+
* @param {string} id
|
|
247
|
+
* @param {() => Promise<unknown>} fetchChunk
|
|
248
|
+
* @returns {Promise<any>}
|
|
249
|
+
*/
|
|
250
|
+
requestLazy(id, fetchChunk) {
|
|
251
|
+
const pending = this.lazyRequests.get(id);
|
|
252
|
+
if (pending) {
|
|
253
|
+
return pending;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Factories outlive `removeModuleCache`, so an evicted module can be re-run without the
|
|
257
|
+
// server — and must be, since the memo went with the cache entry. `Promise.resolve` keeps
|
|
258
|
+
// a synchronous `initModule` throw from escaping the call site.
|
|
259
|
+
const runnableHere = this.moduleCache.has(id) || this.factories.has(id);
|
|
260
|
+
const promise = runnableHere
|
|
261
|
+
? Promise.resolve().then(() => this.initModule(id))
|
|
262
|
+
: Promise.resolve()
|
|
263
|
+
.then(fetchChunk)
|
|
264
|
+
.then(() => this.initModule(id));
|
|
265
|
+
|
|
266
|
+
this.lazyRequests.set(id, promise);
|
|
267
|
+
return promise;
|
|
268
|
+
}
|
|
269
|
+
|
|
228
270
|
/**
|
|
229
271
|
* @param {string} moduleId
|
|
230
272
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as withFilter } from "./shared/define-config-
|
|
1
|
+
import { F as withFilter } from "./shared/define-config-BFdLpVut.mjs";
|
|
2
2
|
//#region ../../../node_modules/.pnpm/@rolldown+pluginutils@1.0.1/node_modules/@rolldown/pluginutils/dist/filter/index.d.mts
|
|
3
3
|
//#region src/filter/composable-filters.d.ts
|
|
4
4
|
type StringOrRegExp = string | RegExp;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-xuHO4mAy.mjs";
|
|
2
|
-
import { U as PreRenderedChunk } from "./shared/binding-
|
|
3
|
-
import { A as ResolvedId, At as ChunkFileNamesFunction, B as ExistingRawSourceMap, Bt as MinifyOptions, C as ParallelPluginHooks, Ct as RolldownBuild, D as ResolveFileUrlArgs, Dt as AdvancedChunksGroup, E as PluginMeta, Et as AddonFunction, Ft as CommentsOptions, G as EmittedAsset, Gt as PartialNull, H as OutputBundle, Ht as OutputOptions, It as GeneratedCodeOptions, J as EmittedPrebuiltChunk, Jt as OutputChunk, K as EmittedChunk, L as RUNTIME_MODULE_ID, Lt as GeneratedCodePreset, M as RolldownPluginOption, Mt as CodeSplittingGroup, N as SourceDescription, Nt as CodeSplittingNameFunction, O as ResolveIdExtraOptions, Ot as AdvancedChunksOptions, P as TransformResult, Pt as CodeSplittingOptions, Q as DefineParallelPluginResult, Qt as SourceMap, R as VERSION, Rt as GlobalsFunction, S as ObjectHook, St as rolldown, T as Plugin, Tt as build, U as TreeshakingOptions, Ut as PreRenderedAsset, V as SourceMapInput, Vt as ModuleFormat, W as TransformPluginContext, X as PluginContext, Xt as RenderedModule, Y as GetModuleInfo, Yt as RenderedChunk, Z as PluginContextResolveOptions, Zt as RolldownOutput, _ as HookFilterExtension, _t as watch, a as ChunkOptimizationOptions, at as BufferEncoding, b as ModuleOptions, bt as RolldownWatcherWatcherEventMap, c as InputOption, ct as RolldownFsModule, d as OptimizationOptions, dt as NormalizedInputOptions, en as ModuleInfo, et as MinimalPluginContext, f as WatcherFileWatcherOptions, ft as TransformOptions, g as FunctionPluginHooks, gt as RolldownMagicString, h as CustomPluginOptions, ht as WarningHandlerWithDefault, i as RolldownOptions, it as ModuleTypeFilter, j as RolldownPlugin, jt as ChunkingContext, k as ResolveIdResult, kt as BuiltinModuleTag, l as InputOptions, lt as InternalModuleFormat, m as AsyncPluginHooks, mt as LoggingFunction, n as RolldownOptionsFunction, nt as GeneralHookFilter, o as ExternalOption, ot as RolldownDirectoryEntry, p as WatcherOptions, pt as ChecksOptions, q as EmittedFile, qt as OutputAsset, r as defineConfig, rt as HookFilter, s as ExternalOptionFunction, st as RolldownFileStats, t as ConfigExport, tn as SourcemapIgnoreListOption, tt as PluginContextMeta, u as ModuleTypes, ut as NormalizedOutputOptions, v as ImportKind, vt as RolldownWatcher, w as PartialResolvedId, wt as BuildOptions, x as ModuleType, xt as WatchOptions, y as LoadResult, yt as RolldownWatcherEvent, z as BundleError, zt as ManglePropertiesOptions } from "./shared/define-config-
|
|
2
|
+
import { U as PreRenderedChunk } from "./shared/binding-BTa6BPQe.mjs";
|
|
3
|
+
import { A as ResolvedId, At as ChunkFileNamesFunction, B as ExistingRawSourceMap, Bt as MinifyOptions, C as ParallelPluginHooks, Ct as RolldownBuild, D as ResolveFileUrlArgs, Dt as AdvancedChunksGroup, E as PluginMeta, Et as AddonFunction, Ft as CommentsOptions, G as EmittedAsset, Gt as PartialNull, H as OutputBundle, Ht as OutputOptions, It as GeneratedCodeOptions, J as EmittedPrebuiltChunk, Jt as OutputChunk, K as EmittedChunk, L as RUNTIME_MODULE_ID, Lt as GeneratedCodePreset, M as RolldownPluginOption, Mt as CodeSplittingGroup, N as SourceDescription, Nt as CodeSplittingNameFunction, O as ResolveIdExtraOptions, Ot as AdvancedChunksOptions, P as TransformResult, Pt as CodeSplittingOptions, Q as DefineParallelPluginResult, Qt as SourceMap, R as VERSION, Rt as GlobalsFunction, S as ObjectHook, St as rolldown, T as Plugin, Tt as build, U as TreeshakingOptions, Ut as PreRenderedAsset, V as SourceMapInput, Vt as ModuleFormat, W as TransformPluginContext, X as PluginContext, Xt as RenderedModule, Y as GetModuleInfo, Yt as RenderedChunk, Z as PluginContextResolveOptions, Zt as RolldownOutput, _ as HookFilterExtension, _t as watch, a as ChunkOptimizationOptions, at as BufferEncoding, b as ModuleOptions, bt as RolldownWatcherWatcherEventMap, c as InputOption, ct as RolldownFsModule, d as OptimizationOptions, dt as NormalizedInputOptions, en as ModuleInfo, et as MinimalPluginContext, f as WatcherFileWatcherOptions, ft as TransformOptions, g as FunctionPluginHooks, gt as RolldownMagicString, h as CustomPluginOptions, ht as WarningHandlerWithDefault, i as RolldownOptions, it as ModuleTypeFilter, j as RolldownPlugin, jt as ChunkingContext, k as ResolveIdResult, kt as BuiltinModuleTag, l as InputOptions, lt as InternalModuleFormat, m as AsyncPluginHooks, mt as LoggingFunction, n as RolldownOptionsFunction, nt as GeneralHookFilter, o as ExternalOption, ot as RolldownDirectoryEntry, p as WatcherOptions, pt as ChecksOptions, q as EmittedFile, qt as OutputAsset, r as defineConfig, rt as HookFilter, s as ExternalOptionFunction, st as RolldownFileStats, t as ConfigExport, tn as SourcemapIgnoreListOption, tt as PluginContextMeta, u as ModuleTypes, ut as NormalizedOutputOptions, v as ImportKind, vt as RolldownWatcher, w as PartialResolvedId, wt as BuildOptions, x as ModuleType, xt as WatchOptions, y as LoadResult, yt as RolldownWatcherEvent, z as BundleError, zt as ManglePropertiesOptions } from "./shared/define-config-BFdLpVut.mjs";
|
|
4
4
|
export { type AddonFunction, type AdvancedChunksGroup, type AdvancedChunksOptions, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, type BuiltinModuleTag, type BundleError, type ChecksOptions, type ChunkFileNamesFunction, type ChunkOptimizationOptions, type ChunkingContext, type CodeSplittingGroup, type CodeSplittingNameFunction, type CodeSplittingOptions, type CommentsOptions, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedChunk, type EmittedFile, type EmittedPrebuiltChunk, type ExistingRawSourceMap, type ExternalOption, type ExternalOptionFunction, type FunctionPluginHooks, type GeneralHookFilter, type GeneratedCodeOptions, type GeneratedCodePreset, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, type ManglePropertiesOptions, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PluginContextResolveOptions, type PluginMeta, type PreRenderedAsset, type PreRenderedChunk, RUNTIME_MODULE_ID, type RenderedChunk, type RenderedModule, type ResolveFileUrlArgs, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownError, type RolldownError as RollupError, type RolldownFileStats, type RolldownFsModule, type RolldownLog, type RolldownLog as RollupLog, type RolldownLogWithString, type RolldownLogWithString as RollupLogWithString, RolldownMagicString, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RolldownWatcherWatcherEventMap, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, type TransformOptions, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherFileWatcherOptions, type WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/rolldown/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./shared/binding-
|
|
2
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
3
|
-
import { T as VERSION, s as RolldownMagicString } from "./shared/bindingify-input-options-
|
|
4
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-BbrDfv1x.mjs";
|
|
2
|
+
import { n as onExit, t as watch } from "./shared/watch-CUKYWzxY.mjs";
|
|
3
|
+
import { T as VERSION, s as RolldownMagicString } from "./shared/bindingify-input-options-CbBAjvu6.mjs";
|
|
4
|
+
import { t as rolldown } from "./shared/rolldown-DZGaRc5R.mjs";
|
|
5
5
|
import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
|
|
6
6
|
import { isMainThread } from "node:worker_threads";
|
|
7
7
|
//#region src/setup.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./shared/binding-
|
|
2
|
-
import { c as PluginContextData, n as bindingifyPlugin } from "./shared/bindingify-input-options-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-BbrDfv1x.mjs";
|
|
2
|
+
import { c as PluginContextData, n as bindingifyPlugin } from "./shared/bindingify-input-options-CbBAjvu6.mjs";
|
|
3
3
|
import { parentPort, workerData } from "node:worker_threads";
|
|
4
4
|
//#region src/parallel-plugin-worker.ts
|
|
5
5
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Plugin, Wt as MaybePromise } from "./shared/define-config-
|
|
1
|
+
import { T as Plugin, Wt as MaybePromise } from "./shared/define-config-BFdLpVut.mjs";
|
|
2
2
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
3
3
|
type ParallelPluginImplementation = Plugin;
|
|
4
4
|
type Context = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as ParserOptions$1, V as ParseResult$1 } from "./shared/binding-
|
|
1
|
+
import { H as ParserOptions$1, V as ParseResult$1 } from "./shared/binding-BTa6BPQe.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
//#region src/parse-ast-index.d.ts
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as logParseError, d as getCodeFrame, n as error, t as augmentCodeLocation, u as locate } from "./shared/logs-DmYCAKcW.mjs";
|
|
2
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
2
|
+
import { n as parseSync, t as parse } from "./shared/parse-B-7jgDap.mjs";
|
|
3
3
|
//#region src/parse-ast-index.ts
|
|
4
4
|
function wrap(result, filename, sourceText) {
|
|
5
5
|
if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as BindingReplacePluginConfig } from "./shared/binding-
|
|
2
|
-
import { I as BuiltinPlugin } from "./shared/define-config-
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { _ as BindingReplacePluginConfig } from "./shared/binding-BTa6BPQe.mjs";
|
|
2
|
+
import { I as BuiltinPlugin } from "./shared/define-config-BFdLpVut.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-CmDKpWIU.mjs";
|
|
4
4
|
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Replaces targeted strings in files while bundling.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-zc1bUto6.mjs";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-D9jwEbE4.mjs";
|
|
3
3
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
4
4
|
/**
|
|
5
5
|
* Replaces targeted strings in files while bundling.
|
|
@@ -9,6 +9,24 @@ interface CodegenOptions {
|
|
|
9
9
|
* @default true
|
|
10
10
|
*/
|
|
11
11
|
removeWhitespace?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Escape non-ASCII characters in string literals, untagged template literals, regular
|
|
14
|
+
* expression literals and identifier names.
|
|
15
|
+
*
|
|
16
|
+
* Uses `\uXXXX` for characters up to U+FFFF and `\u{...}` for higher code points.
|
|
17
|
+
* Regular expressions use escaped UTF-16 surrogate pairs for higher code points instead;
|
|
18
|
+
* escaping changes the observable `RegExp.prototype.source` value.
|
|
19
|
+
*
|
|
20
|
+
* Code point escapes (`\u{...}`) require ES2015 or later; this option does not provide
|
|
21
|
+
* ES5-compatible output.
|
|
22
|
+
*
|
|
23
|
+
* Non-ASCII characters are left unescaped in tagged template quasis (whose raw text is
|
|
24
|
+
* observable), JSX names and text, JSX attribute strings, hashbangs and preserved comments.
|
|
25
|
+
* JavaScript expressions inside tagged templates and JSX are escaped normally.
|
|
26
|
+
*
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
asciiOnly?: boolean;
|
|
12
30
|
/**
|
|
13
31
|
* How to handle legal comments (comments containing `@license`, `@preserve`, or starting with `//!`/`/*!`).
|
|
14
32
|
*
|
|
@@ -312,49 +330,28 @@ interface ExportExportName {
|
|
|
312
330
|
start: number | null;
|
|
313
331
|
end: number | null;
|
|
314
332
|
}
|
|
315
|
-
type ExportExportNameKind = 'Name' |
|
|
316
|
-
/** `export default expression` */
|
|
317
|
-
'Default' |
|
|
318
|
-
/** `export * from "mod" */
|
|
319
|
-
'None';
|
|
333
|
+
type ExportExportNameKind = 'Name' | 'Default' | 'None';
|
|
320
334
|
interface ExportImportName {
|
|
321
335
|
kind: ExportImportNameKind;
|
|
322
336
|
name: string | null;
|
|
323
337
|
start: number | null;
|
|
324
338
|
end: number | null;
|
|
325
339
|
}
|
|
326
|
-
type ExportImportNameKind = 'Name' |
|
|
327
|
-
/** `export * as ns from "mod"` */
|
|
328
|
-
'All' |
|
|
329
|
-
/** `export * from "mod"` */
|
|
330
|
-
'AllButDefault' |
|
|
331
|
-
/** Does not have a specifier. */
|
|
332
|
-
'None';
|
|
340
|
+
type ExportImportNameKind = 'Name' | 'All' | 'AllButDefault' | 'None';
|
|
333
341
|
interface ExportLocalName {
|
|
334
342
|
kind: ExportLocalNameKind;
|
|
335
343
|
name: string | null;
|
|
336
344
|
start: number | null;
|
|
337
345
|
end: number | null;
|
|
338
346
|
}
|
|
339
|
-
type ExportLocalNameKind = 'Name' |
|
|
340
|
-
/** `export default expression` */
|
|
341
|
-
'Default' |
|
|
342
|
-
/**
|
|
343
|
-
* If the exported value is not locally accessible from within the module.
|
|
344
|
-
* `export default function () {}`
|
|
345
|
-
*/
|
|
346
|
-
'None';
|
|
347
|
+
type ExportLocalNameKind = 'Name' | 'Default' | 'None';
|
|
347
348
|
interface ImportName {
|
|
348
349
|
kind: ImportNameKind;
|
|
349
350
|
name: string | null;
|
|
350
351
|
start: number | null;
|
|
351
352
|
end: number | null;
|
|
352
353
|
}
|
|
353
|
-
type ImportNameKind = 'Name' |
|
|
354
|
-
/** `import * as ns from "mod"` */
|
|
355
|
-
'NamespaceObject' |
|
|
356
|
-
/** `import defaultExport from "mod"` */
|
|
357
|
-
'Default';
|
|
354
|
+
type ImportNameKind = 'Name' | 'NamespaceObject' | 'Default';
|
|
358
355
|
interface ParserOptions {
|
|
359
356
|
/** Treat the source text as `js`, `jsx`, `ts`, `tsx` or `dts`. */
|
|
360
357
|
lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts';
|
|
@@ -874,17 +871,7 @@ interface DecoratorOptions {
|
|
|
874
871
|
*/
|
|
875
872
|
strictNullChecks?: boolean;
|
|
876
873
|
}
|
|
877
|
-
type HelperMode = 'Runtime' |
|
|
878
|
-
/**
|
|
879
|
-
* External mode: Helper functions are accessed from a global `babelHelpers` object.
|
|
880
|
-
*
|
|
881
|
-
* Example:
|
|
882
|
-
*
|
|
883
|
-
* ```js
|
|
884
|
-
* babelHelpers.helperName(...arguments);
|
|
885
|
-
* ```
|
|
886
|
-
*/
|
|
887
|
-
'External';
|
|
874
|
+
type HelperMode = 'Runtime' | 'External';
|
|
888
875
|
interface Helpers {
|
|
889
876
|
mode?: HelperMode;
|
|
890
877
|
}
|