@rolldown/browser 1.0.0-beta.7-commit.b80d472 → 1.0.0-beta.7-commit.c2596d3
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/dist/browser.mjs +27 -1
- package/dist/cli.cjs +47 -5
- package/dist/cli.mjs +2 -2
- package/dist/experimental-index.cjs +31 -2
- package/dist/experimental-index.d.cts +30 -1
- package/dist/experimental-index.d.mts +30 -1
- package/dist/experimental-index.mjs +31 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.cts +1 -1
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{input-options.d-Dhy0onEz.d.mts → input-options.d-CJIzCDlR.d.mts} +26 -0
- package/dist/shared/{input-options.d-DuEVbue0.d.cts → input-options.d-sjdx_aVw.d.cts} +26 -0
- package/dist/shared/{parse-ast-index-lAAkaDQi.cjs → parse-ast-index-B_-Eqolm.cjs} +10 -0
- package/dist/shared/{parse-ast-index-B5HMwEw9.mjs → parse-ast-index-jK_Miocm.mjs} +10 -0
- package/dist/shared/{src-C47ObUwZ.cjs → src-CVxH1SUi.cjs} +18 -2
- package/dist/shared/{src-BL95s43J.mjs → src-xSl6JPco.mjs} +2 -2
- package/package.json +1 -1
package/dist/browser.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import "@valibot/to-json-schema";
|
|
|
5
5
|
import * as v from "valibot";
|
|
6
6
|
|
|
7
7
|
//#region package.json
|
|
8
|
-
var version = "1.0.0-beta.7-commit.
|
|
8
|
+
var version = "1.0.0-beta.7-commit.c2596d3";
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/builtin-plugin/utils.ts
|
|
@@ -112,6 +112,10 @@ function getCodeFrame(source, line, column) {
|
|
|
112
112
|
function rangeContains(range, index) {
|
|
113
113
|
return range.start <= index && index < range.end;
|
|
114
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* @param {string} source
|
|
117
|
+
* @param {import('./types').Options} [options]
|
|
118
|
+
*/
|
|
115
119
|
function getLocator(source, options = {}) {
|
|
116
120
|
const { offsetLine = 0, offsetColumn = 0 } = options;
|
|
117
121
|
let start = 0;
|
|
@@ -149,6 +153,12 @@ function getLocator(source, options = {}) {
|
|
|
149
153
|
}
|
|
150
154
|
return locator;
|
|
151
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* @param {string} source
|
|
158
|
+
* @param {string | number} search
|
|
159
|
+
* @param {import('./types').Options} [options]
|
|
160
|
+
* @returns {Location | undefined}
|
|
161
|
+
*/
|
|
152
162
|
function locate(source, search, options) {
|
|
153
163
|
return getLocator(source, options)(search, options && options.startIndex);
|
|
154
164
|
}
|
|
@@ -379,6 +389,16 @@ const ENUMERATED_PLUGIN_HOOK_NAMES = [
|
|
|
379
389
|
"intro",
|
|
380
390
|
"outro"
|
|
381
391
|
];
|
|
392
|
+
/**
|
|
393
|
+
* Names of all defined hooks. It's like
|
|
394
|
+
* ```js
|
|
395
|
+
* const DEFINED_HOOK_NAMES ={
|
|
396
|
+
* options: 'options',
|
|
397
|
+
* buildStart: 'buildStart',
|
|
398
|
+
* ...
|
|
399
|
+
* }
|
|
400
|
+
* ```
|
|
401
|
+
*/
|
|
382
402
|
const DEFINED_HOOK_NAMES = {
|
|
383
403
|
[ENUMERATED_PLUGIN_HOOK_NAMES[0]]: ENUMERATED_PLUGIN_HOOK_NAMES[0],
|
|
384
404
|
[ENUMERATED_PLUGIN_HOOK_NAMES[1]]: ENUMERATED_PLUGIN_HOOK_NAMES[1],
|
|
@@ -893,6 +913,12 @@ function validateOption(key, options) {
|
|
|
893
913
|
|
|
894
914
|
//#endregion
|
|
895
915
|
//#region src/constants/plugin-context.ts
|
|
916
|
+
/**
|
|
917
|
+
* If Composed plugins call `this.resolve` with `skipSelf: true`, the composed plugins will be skipped as a whole.
|
|
918
|
+
* To prevent that, we use this symbol to store the actual caller of `this.resolve` with `skipSelf: true`. And we
|
|
919
|
+
* will modify the skipSelf option to `false` and use this symbol to skip the caller itself in the composed plugins
|
|
920
|
+
* internally.
|
|
921
|
+
*/
|
|
896
922
|
const SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF = Symbol("plugin-context-resolve-caller");
|
|
897
923
|
|
|
898
924
|
//#endregion
|
package/dist/cli.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-CVxH1SUi.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-B_-Eqolm.cjs');
|
|
4
4
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
5
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
6
6
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
@@ -957,9 +957,22 @@ function createConsola(options$1 = {}) {
|
|
|
957
957
|
defaults: { level },
|
|
958
958
|
stdout: process.stdout,
|
|
959
959
|
stderr: process.stderr,
|
|
960
|
-
prompt: (...args) => Promise.resolve().then(
|
|
961
|
-
|
|
962
|
-
|
|
960
|
+
prompt: (...args) => Promise.resolve().then(
|
|
961
|
+
// Zero-width space, non-joiner, joiner, left-to-right mark, right-to-left mark
|
|
962
|
+
// Zero-width no-break space
|
|
963
|
+
// Combining diacritical marks
|
|
964
|
+
// Combining diacritical marks extended
|
|
965
|
+
// Combining diacritical marks supplement
|
|
966
|
+
// Combining diacritical marks for symbols
|
|
967
|
+
// Combining half marks
|
|
968
|
+
// Linux console (kernel)
|
|
969
|
+
// Windows Terminal
|
|
970
|
+
// Terminus (<0.2.27)
|
|
971
|
+
// ConEmu and cmder
|
|
972
|
+
function() {
|
|
973
|
+
return require("./shared/prompt-_yrURmmm.cjs");
|
|
974
|
+
}
|
|
975
|
+
).then((m) => m.prompt(...args)),
|
|
963
976
|
reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
964
977
|
...options$1
|
|
965
978
|
});
|
|
@@ -974,6 +987,9 @@ const consola = createConsola();
|
|
|
974
987
|
|
|
975
988
|
//#endregion
|
|
976
989
|
//#region src/cli/logger.ts
|
|
990
|
+
/**
|
|
991
|
+
* Console logger
|
|
992
|
+
*/
|
|
977
993
|
const logger = process.env.ROLLDOWN_TEST ? createTestingLogger() : createConsola({ formatOptions: { date: false } });
|
|
978
994
|
function createTestingLogger() {
|
|
979
995
|
const types = [
|
|
@@ -1218,6 +1234,32 @@ function parseCliArguments() {
|
|
|
1218
1234
|
|
|
1219
1235
|
//#endregion
|
|
1220
1236
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
1237
|
+
/**
|
|
1238
|
+
* This is not the set of all possible signals.
|
|
1239
|
+
*
|
|
1240
|
+
* It IS, however, the set of all signals that trigger
|
|
1241
|
+
* an exit on either Linux or BSD systems. Linux is a
|
|
1242
|
+
* superset of the signal names supported on BSD, and
|
|
1243
|
+
* the unknown signals just fail to register, so we can
|
|
1244
|
+
* catch that easily enough.
|
|
1245
|
+
*
|
|
1246
|
+
* Windows signals are a different set, since there are
|
|
1247
|
+
* signals that terminate Windows processes, but don't
|
|
1248
|
+
* terminate (or don't even exist) on Posix systems.
|
|
1249
|
+
*
|
|
1250
|
+
* Don't bother with SIGKILL. It's uncatchable, which
|
|
1251
|
+
* means that we can't fire any callbacks anyway.
|
|
1252
|
+
*
|
|
1253
|
+
* If a user does happen to register a handler on a non-
|
|
1254
|
+
* fatal signal like SIGWINCH or something, and then
|
|
1255
|
+
* exit, it'll end up firing `process.emit('exit')`, so
|
|
1256
|
+
* the handler will be fired anyway.
|
|
1257
|
+
*
|
|
1258
|
+
* SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
|
|
1259
|
+
* artificially, inherently leave the process in a
|
|
1260
|
+
* state from which it is not safe to try and enter JS
|
|
1261
|
+
* listeners.
|
|
1262
|
+
*/
|
|
1221
1263
|
const signals = [];
|
|
1222
1264
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
1223
1265
|
if (process.platform !== "win32") signals.push(
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __commonJS, __esm, __toESM } from "./shared/chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
2
|
+
import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-xSl6JPco.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-jK_Miocm.mjs";
|
|
4
4
|
import path, { sep } from "node:path";
|
|
5
5
|
import colors from "ansis";
|
|
6
6
|
import process$1, { cwd } from "node:process";
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('./shared/src-
|
|
4
|
-
require('./shared/parse-ast-index-
|
|
3
|
+
const require_src = require('./shared/src-CVxH1SUi.cjs');
|
|
4
|
+
require('./shared/parse-ast-index-B_-Eqolm.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
7
7
|
|
|
8
8
|
//#region src/api/experimental.ts
|
|
9
|
+
/**
|
|
10
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
11
|
+
*
|
|
12
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
13
|
+
*/
|
|
9
14
|
const experimental_scan = async (input) => {
|
|
10
15
|
const { bundler, stopWorkers } = await require_src.createBundler(input, {});
|
|
11
16
|
const output = await bundler.scan();
|
|
@@ -32,6 +37,30 @@ function aliasPlugin(config) {
|
|
|
32
37
|
|
|
33
38
|
//#endregion
|
|
34
39
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
40
|
+
/**
|
|
41
|
+
* Replaces targeted strings in files while bundling.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Basic usage
|
|
45
|
+
* ```js
|
|
46
|
+
* replacePlugin({
|
|
47
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
48
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
49
|
+
* __buildVersion: 15
|
|
50
|
+
* })
|
|
51
|
+
* ```
|
|
52
|
+
* @example
|
|
53
|
+
* // With options
|
|
54
|
+
* ```js
|
|
55
|
+
* replacePlugin({
|
|
56
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
57
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
58
|
+
* __buildVersion: 15
|
|
59
|
+
* }, {
|
|
60
|
+
* preventAssignment: false,
|
|
61
|
+
* })
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
35
64
|
function replacePlugin(values = {}, options = {}) {
|
|
36
65
|
return new require_src.BuiltinPlugin("builtin:replace", {
|
|
37
66
|
...options,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-
|
|
1
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-sjdx_aVw.cjs";
|
|
2
2
|
import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
@@ -7,6 +7,11 @@ import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOpti
|
|
|
7
7
|
*
|
|
8
8
|
* Calling this API will only execute the scan stage of rolldown.
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
12
|
+
*
|
|
13
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
14
|
+
*/
|
|
10
15
|
declare const experimental_scan: (input: InputOptions) => Promise<void>;
|
|
11
16
|
|
|
12
17
|
//#endregion
|
|
@@ -50,6 +55,30 @@ declare function aliasPlugin(config: AliasPluginConfig): BuiltinPlugin;
|
|
|
50
55
|
* })
|
|
51
56
|
* ```
|
|
52
57
|
*/
|
|
58
|
+
/**
|
|
59
|
+
* Replaces targeted strings in files while bundling.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* // Basic usage
|
|
63
|
+
* ```js
|
|
64
|
+
* replacePlugin({
|
|
65
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
66
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
67
|
+
* __buildVersion: 15
|
|
68
|
+
* })
|
|
69
|
+
* ```
|
|
70
|
+
* @example
|
|
71
|
+
* // With options
|
|
72
|
+
* ```js
|
|
73
|
+
* replacePlugin({
|
|
74
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
75
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
76
|
+
* __buildVersion: 15
|
|
77
|
+
* }, {
|
|
78
|
+
* preventAssignment: false,
|
|
79
|
+
* })
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
53
82
|
declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
|
|
54
83
|
|
|
55
84
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reportPlugin$1 as reportPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin } from "./shared/input-options.d-
|
|
1
|
+
import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reportPlugin$1 as reportPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin } from "./shared/input-options.d-CJIzCDlR.mjs";
|
|
2
2
|
import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
@@ -7,6 +7,11 @@ import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOpti
|
|
|
7
7
|
*
|
|
8
8
|
* Calling this API will only execute the scan stage of rolldown.
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
12
|
+
*
|
|
13
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
14
|
+
*/
|
|
10
15
|
declare const experimental_scan: (input: InputOptions) => Promise<void>;
|
|
11
16
|
|
|
12
17
|
//#endregion
|
|
@@ -50,6 +55,30 @@ declare function aliasPlugin(config: AliasPluginConfig): BuiltinPlugin;
|
|
|
50
55
|
* })
|
|
51
56
|
* ```
|
|
52
57
|
*/
|
|
58
|
+
/**
|
|
59
|
+
* Replaces targeted strings in files while bundling.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* // Basic usage
|
|
63
|
+
* ```js
|
|
64
|
+
* replacePlugin({
|
|
65
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
66
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
67
|
+
* __buildVersion: 15
|
|
68
|
+
* })
|
|
69
|
+
* ```
|
|
70
|
+
* @example
|
|
71
|
+
* // With options
|
|
72
|
+
* ```js
|
|
73
|
+
* replacePlugin({
|
|
74
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
75
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
76
|
+
* __buildVersion: 15
|
|
77
|
+
* }, {
|
|
78
|
+
* preventAssignment: false,
|
|
79
|
+
* })
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
53
82
|
declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
|
|
54
83
|
|
|
55
84
|
//#endregion
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-xSl6JPco.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-jK_Miocm.mjs";
|
|
3
3
|
import { moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
|
|
6
6
|
//#region src/api/experimental.ts
|
|
7
7
|
init_create_bundler();
|
|
8
8
|
init_transform_to_rollup_output();
|
|
9
|
+
/**
|
|
10
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
11
|
+
*
|
|
12
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
13
|
+
*/
|
|
9
14
|
const experimental_scan = async (input) => {
|
|
10
15
|
const { bundler, stopWorkers } = await createBundler(input, {});
|
|
11
16
|
const output = await bundler.scan();
|
|
@@ -34,6 +39,30 @@ function aliasPlugin(config) {
|
|
|
34
39
|
//#endregion
|
|
35
40
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
36
41
|
init_constructors();
|
|
42
|
+
/**
|
|
43
|
+
* Replaces targeted strings in files while bundling.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // Basic usage
|
|
47
|
+
* ```js
|
|
48
|
+
* replacePlugin({
|
|
49
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
50
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
51
|
+
* __buildVersion: 15
|
|
52
|
+
* })
|
|
53
|
+
* ```
|
|
54
|
+
* @example
|
|
55
|
+
* // With options
|
|
56
|
+
* ```js
|
|
57
|
+
* replacePlugin({
|
|
58
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
59
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
60
|
+
* __buildVersion: 15
|
|
61
|
+
* }, {
|
|
62
|
+
* preventAssignment: false,
|
|
63
|
+
* })
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
37
66
|
function replacePlugin(values = {}, options = {}) {
|
|
38
67
|
return new BuiltinPlugin("builtin:replace", {
|
|
39
68
|
...options,
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-CVxH1SUi.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-B_-Eqolm.cjs');
|
|
3
3
|
|
|
4
4
|
exports.VERSION = require_src.VERSION
|
|
5
5
|
exports.build = require_src.build
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter } from "./shared/input-options.d-
|
|
1
|
+
import { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter } from "./shared/input-options.d-sjdx_aVw.cjs";
|
|
2
2
|
|
|
3
3
|
export { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch, withFilter$1 as withFilter } from "./shared/input-options.d-
|
|
1
|
+
import { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch, withFilter$1 as withFilter } from "./shared/input-options.d-CJIzCDlR.mjs";
|
|
2
2
|
|
|
3
3
|
export { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-xSl6JPco.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-jK_Miocm.mjs";
|
|
3
3
|
|
|
4
4
|
init_src();
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch, withFilter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-CVxH1SUi.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-B_-Eqolm.cjs');
|
|
4
4
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
5
5
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __commonJS } from "./shared/chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-xSl6JPco.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-jK_Miocm.mjs";
|
|
4
4
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
6
|
|
package/dist/parse-ast-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
1
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-B_-Eqolm.cjs');
|
|
2
2
|
|
|
3
3
|
exports.parseAst = require_parse_ast_index.parseAst
|
|
4
4
|
exports.parseAstAsync = require_parse_ast_index.parseAstAsync
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-
|
|
1
|
+
import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-jK_Miocm.mjs";
|
|
2
2
|
|
|
3
3
|
init_parse_ast_index();
|
|
4
4
|
export { parseAst, parseAstAsync };
|
|
Binary file
|
|
@@ -572,6 +572,9 @@ interface RolldownOptions extends InputOptions {
|
|
|
572
572
|
/**
|
|
573
573
|
* Type for `default export` of `rolldown.config.js` file.
|
|
574
574
|
*/
|
|
575
|
+
/**
|
|
576
|
+
* Type for `default export` of `rolldown.config.js` file.
|
|
577
|
+
*/
|
|
575
578
|
type ConfigExport = RolldownOptions | RolldownOptions[];
|
|
576
579
|
|
|
577
580
|
//#endregion
|
|
@@ -638,6 +641,9 @@ type EnumeratedPluginHookNames = typeof ENUMERATED_PLUGIN_HOOK_NAMES;
|
|
|
638
641
|
/**
|
|
639
642
|
* Names of all hooks in a `Plugin` object. Does not include `name` and `api`, since they are not hooks.
|
|
640
643
|
*/
|
|
644
|
+
/**
|
|
645
|
+
* Names of all hooks in a `Plugin` object. Does not include `name` and `api`, since they are not hooks.
|
|
646
|
+
*/
|
|
641
647
|
type PluginHookNames = EnumeratedPluginHookNames[number];
|
|
642
648
|
/**
|
|
643
649
|
* Names of all defined hooks. It's like
|
|
@@ -649,6 +655,16 @@ type PluginHookNames = EnumeratedPluginHookNames[number];
|
|
|
649
655
|
* }
|
|
650
656
|
* ```
|
|
651
657
|
*/
|
|
658
|
+
/**
|
|
659
|
+
* Names of all defined hooks. It's like
|
|
660
|
+
* ```ts
|
|
661
|
+
* type DefinedHookNames = {
|
|
662
|
+
* options: 'options',
|
|
663
|
+
* buildStart: 'buildStart',
|
|
664
|
+
* ...
|
|
665
|
+
* }
|
|
666
|
+
* ```
|
|
667
|
+
*/
|
|
652
668
|
type DefinedHookNames = { readonly [K in PluginHookNames] : K };
|
|
653
669
|
/**
|
|
654
670
|
* Names of all defined hooks. It's like
|
|
@@ -660,6 +676,16 @@ type DefinedHookNames = { readonly [K in PluginHookNames] : K };
|
|
|
660
676
|
* }
|
|
661
677
|
* ```
|
|
662
678
|
*/
|
|
679
|
+
/**
|
|
680
|
+
* Names of all defined hooks. It's like
|
|
681
|
+
* ```js
|
|
682
|
+
* const DEFINED_HOOK_NAMES ={
|
|
683
|
+
* options: 'options',
|
|
684
|
+
* buildStart: 'buildStart',
|
|
685
|
+
* ...
|
|
686
|
+
* }
|
|
687
|
+
* ```
|
|
688
|
+
*/
|
|
663
689
|
declare const DEFINED_HOOK_NAMES: DefinedHookNames;
|
|
664
690
|
|
|
665
691
|
//#endregion
|
|
@@ -572,6 +572,9 @@ interface RolldownOptions extends InputOptions {
|
|
|
572
572
|
/**
|
|
573
573
|
* Type for `default export` of `rolldown.config.js` file.
|
|
574
574
|
*/
|
|
575
|
+
/**
|
|
576
|
+
* Type for `default export` of `rolldown.config.js` file.
|
|
577
|
+
*/
|
|
575
578
|
type ConfigExport = RolldownOptions | RolldownOptions[];
|
|
576
579
|
|
|
577
580
|
//#endregion
|
|
@@ -638,6 +641,9 @@ type EnumeratedPluginHookNames = typeof ENUMERATED_PLUGIN_HOOK_NAMES;
|
|
|
638
641
|
/**
|
|
639
642
|
* Names of all hooks in a `Plugin` object. Does not include `name` and `api`, since they are not hooks.
|
|
640
643
|
*/
|
|
644
|
+
/**
|
|
645
|
+
* Names of all hooks in a `Plugin` object. Does not include `name` and `api`, since they are not hooks.
|
|
646
|
+
*/
|
|
641
647
|
type PluginHookNames = EnumeratedPluginHookNames[number];
|
|
642
648
|
/**
|
|
643
649
|
* Names of all defined hooks. It's like
|
|
@@ -649,6 +655,16 @@ type PluginHookNames = EnumeratedPluginHookNames[number];
|
|
|
649
655
|
* }
|
|
650
656
|
* ```
|
|
651
657
|
*/
|
|
658
|
+
/**
|
|
659
|
+
* Names of all defined hooks. It's like
|
|
660
|
+
* ```ts
|
|
661
|
+
* type DefinedHookNames = {
|
|
662
|
+
* options: 'options',
|
|
663
|
+
* buildStart: 'buildStart',
|
|
664
|
+
* ...
|
|
665
|
+
* }
|
|
666
|
+
* ```
|
|
667
|
+
*/
|
|
652
668
|
type DefinedHookNames = { readonly [K in PluginHookNames] : K };
|
|
653
669
|
/**
|
|
654
670
|
* Names of all defined hooks. It's like
|
|
@@ -660,6 +676,16 @@ type DefinedHookNames = { readonly [K in PluginHookNames] : K };
|
|
|
660
676
|
* }
|
|
661
677
|
* ```
|
|
662
678
|
*/
|
|
679
|
+
/**
|
|
680
|
+
* Names of all defined hooks. It's like
|
|
681
|
+
* ```js
|
|
682
|
+
* const DEFINED_HOOK_NAMES ={
|
|
683
|
+
* options: 'options',
|
|
684
|
+
* buildStart: 'buildStart',
|
|
685
|
+
* ...
|
|
686
|
+
* }
|
|
687
|
+
* ```
|
|
688
|
+
*/
|
|
663
689
|
declare const DEFINED_HOOK_NAMES: DefinedHookNames;
|
|
664
690
|
|
|
665
691
|
//#endregion
|
|
@@ -51,6 +51,10 @@ function getCodeFrame(source, line, column) {
|
|
|
51
51
|
function rangeContains(range, index) {
|
|
52
52
|
return range.start <= index && index < range.end;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} source
|
|
56
|
+
* @param {import('./types').Options} [options]
|
|
57
|
+
*/
|
|
54
58
|
function getLocator(source, options = {}) {
|
|
55
59
|
const { offsetLine = 0, offsetColumn = 0 } = options;
|
|
56
60
|
let start = 0;
|
|
@@ -88,6 +92,12 @@ function getLocator(source, options = {}) {
|
|
|
88
92
|
}
|
|
89
93
|
return locator;
|
|
90
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* @param {string} source
|
|
97
|
+
* @param {string | number} search
|
|
98
|
+
* @param {import('./types').Options} [options]
|
|
99
|
+
* @returns {Location | undefined}
|
|
100
|
+
*/
|
|
91
101
|
function locate(source, search, options) {
|
|
92
102
|
return getLocator(source, options)(search, options && options.startIndex);
|
|
93
103
|
}
|
|
@@ -53,6 +53,10 @@ var init_code_frame = __esm({ "src/utils/code-frame.ts"() {
|
|
|
53
53
|
function rangeContains(range, index) {
|
|
54
54
|
return range.start <= index && index < range.end;
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* @param {string} source
|
|
58
|
+
* @param {import('./types').Options} [options]
|
|
59
|
+
*/
|
|
56
60
|
function getLocator(source, options = {}) {
|
|
57
61
|
const { offsetLine = 0, offsetColumn = 0 } = options;
|
|
58
62
|
let start = 0;
|
|
@@ -90,6 +94,12 @@ function getLocator(source, options = {}) {
|
|
|
90
94
|
}
|
|
91
95
|
return locator;
|
|
92
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* @param {string} source
|
|
99
|
+
* @param {string | number} search
|
|
100
|
+
* @param {import('./types').Options} [options]
|
|
101
|
+
* @returns {Location | undefined}
|
|
102
|
+
*/
|
|
93
103
|
function locate(source, search, options) {
|
|
94
104
|
return getLocator(source, options)(search, options && options.startIndex);
|
|
95
105
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_parse_ast_index = require('./parse-ast-index-
|
|
3
|
+
const require_parse_ast_index = require('./parse-ast-index-B_-Eqolm.cjs');
|
|
4
4
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
|
|
5
5
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
6
6
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
@@ -10,7 +10,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
10
10
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
11
11
|
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version = "1.0.0-beta.7-commit.
|
|
13
|
+
var version = "1.0.0-beta.7-commit.c2596d3";
|
|
14
14
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
@@ -281,6 +281,16 @@ const ENUMERATED_PLUGIN_HOOK_NAMES = [
|
|
|
281
281
|
"intro",
|
|
282
282
|
"outro"
|
|
283
283
|
];
|
|
284
|
+
/**
|
|
285
|
+
* Names of all defined hooks. It's like
|
|
286
|
+
* ```js
|
|
287
|
+
* const DEFINED_HOOK_NAMES ={
|
|
288
|
+
* options: 'options',
|
|
289
|
+
* buildStart: 'buildStart',
|
|
290
|
+
* ...
|
|
291
|
+
* }
|
|
292
|
+
* ```
|
|
293
|
+
*/
|
|
284
294
|
const DEFINED_HOOK_NAMES = {
|
|
285
295
|
[ENUMERATED_PLUGIN_HOOK_NAMES[0]]: ENUMERATED_PLUGIN_HOOK_NAMES[0],
|
|
286
296
|
[ENUMERATED_PLUGIN_HOOK_NAMES[1]]: ENUMERATED_PLUGIN_HOOK_NAMES[1],
|
|
@@ -811,6 +821,12 @@ function getJsonSchema() {
|
|
|
811
821
|
|
|
812
822
|
//#endregion
|
|
813
823
|
//#region src/constants/plugin-context.ts
|
|
824
|
+
/**
|
|
825
|
+
* If Composed plugins call `this.resolve` with `skipSelf: true`, the composed plugins will be skipped as a whole.
|
|
826
|
+
* To prevent that, we use this symbol to store the actual caller of `this.resolve` with `skipSelf: true`. And we
|
|
827
|
+
* will modify the skipSelf option to `false` and use this symbol to skip the caller itself in the composed plugins
|
|
828
|
+
* internally.
|
|
829
|
+
*/
|
|
814
830
|
const SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF = Symbol("plugin-context-resolve-caller");
|
|
815
831
|
|
|
816
832
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esm } from "./chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-
|
|
2
|
+
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-jK_Miocm.mjs";
|
|
3
3
|
import { BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import colors from "ansis";
|
|
@@ -9,7 +9,7 @@ import { availableParallelism } from "node:os";
|
|
|
9
9
|
import { Worker } from "node:worker_threads";
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.7-commit.
|
|
12
|
+
var version = "1.0.0-beta.7-commit.c2596d3";
|
|
13
13
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolldown/browser",
|
|
3
|
-
"version": "1.0.0-beta.7-commit.
|
|
3
|
+
"version": "1.0.0-beta.7-commit.c2596d3",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"homepage": "https://rolldown.rs/",
|
|
6
6
|
"type": "module",
|