rolldown 1.2.0 → 1.2.2
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/THIRD-PARTY-LICENSE +33 -0
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +9 -10
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -2
- package/dist/experimental-default-runtime.mjs +116 -0
- package/dist/experimental-index.d.mts +10 -4
- package/dist/experimental-index.mjs +32 -16
- package/dist/experimental-runtime-base.mjs +95 -0
- package/dist/experimental-runtime.d.ts +177 -0
- package/dist/experimental-runtime.mjs +257 -0
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +1 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +4 -4
- package/dist/parallel-plugin-worker.d.mts +1 -1
- package/dist/parallel-plugin-worker.mjs +3 -3
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -2
- package/dist/shared/{binding-Dbbi0RbO.d.mts → binding-CVtkJvyl.d.mts} +11 -0
- package/dist/shared/{binding-Dby9rwGk.mjs → binding-DwUQWZOo.mjs} +124 -50
- package/dist/shared/{bindingify-input-options-_ppP73I9.mjs → bindingify-input-options-BHixd47T.mjs} +448 -268
- package/dist/shared/{constructors-CSWbNgBZ.d.mts → constructors-ALilxAii.d.mts} +2 -2
- package/dist/shared/{constructors-CuGa75s-.mjs → constructors-COwFYQna.mjs} +10 -6
- package/dist/shared/{rolldown-build-CdF8HAHX.mjs → create-bundler-option-LuUKlAT7.mjs} +72 -179
- package/dist/shared/{define-config-B-IDOhDz.d.mts → define-config-DSMNXceb.d.mts} +85 -22
- package/dist/shared/{error-DFGNOCle.mjs → error-nLggAzpQ.mjs} +1 -1
- package/dist/shared/{load-config-C6UyiS41.mjs → load-config-cRWJAHTc.mjs} +2 -2
- package/dist/shared/{logs-ZGEh6uhb.mjs → logs-DmYCAKcW.mjs} +8 -1
- package/dist/shared/{misc-CoQm4NHO.mjs → misc-DOSKtd97.mjs} +9 -1
- package/dist/shared/{normalize-string-or-regex-SiXbePVH.mjs → normalize-string-or-regex-Cj-DgIV1.mjs} +2 -2
- package/dist/shared/{parse-BFj5G_7i.mjs → parse-C17W7W5g.mjs} +2 -2
- package/dist/shared/{prompt--dNycKSZ.mjs → prompt-CH6TK0bC.mjs} +2 -6
- package/dist/shared/{resolve-tsconfig-2TXRF_zr.mjs → resolve-tsconfig-CE3HNSOK.mjs} +2 -2
- package/dist/shared/rolldown-D23fYgSS.mjs +178 -0
- package/dist/shared/{transform-Cs2bUDRH.d.mts → transform-WmU_cI8e.d.mts} +1 -1
- package/dist/shared/{watch-WnrlHRS0.mjs → watch-DcgK_L55.mjs} +16 -13
- package/dist/utils-index.d.mts +3 -3
- package/dist/utils-index.mjs +6 -8
- package/package.json +32 -25
- package/dist/shared/rolldown-951h_1lf.mjs +0 -40
package/dist/utils-index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
2
|
-
import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-
|
|
3
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
1
|
+
import { n as parseSync, t as parse } from "./shared/parse-C17W7W5g.mjs";
|
|
2
|
+
import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-CE3HNSOK.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.142.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
|
|
4
4
|
function walkNode(node, visitors) {
|
|
5
5
|
if (node == null) return;
|
|
6
6
|
if (Array.isArray(node)) {
|
|
@@ -499,9 +499,7 @@ function walkNode(node, visitors) {
|
|
|
499
499
|
case "TSTypeReference":
|
|
500
500
|
walkTSTypeReference(node, visitors);
|
|
501
501
|
break;
|
|
502
|
-
case "TSUnionType":
|
|
503
|
-
walkTSUnionType(node, visitors);
|
|
504
|
-
break;
|
|
502
|
+
case "TSUnionType": walkTSUnionType(node, visitors);
|
|
505
503
|
}
|
|
506
504
|
}
|
|
507
505
|
function walkDebuggerStatement(node, visitors) {
|
|
@@ -2010,7 +2008,7 @@ function walkTSUnionType(node, visitors) {
|
|
|
2010
2008
|
exit !== null && exit(node);
|
|
2011
2009
|
}
|
|
2012
2010
|
//#endregion
|
|
2013
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2011
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.142.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
|
|
2014
2012
|
/** Mapping from node type name to node type ID */
|
|
2015
2013
|
const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
|
|
2016
2014
|
["DebuggerStatement", 0],
|
|
@@ -2180,7 +2178,7 @@ const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
|
|
|
2180
2178
|
["TSUnionType", 164]
|
|
2181
2179
|
]);
|
|
2182
2180
|
//#endregion
|
|
2183
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2181
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.142.0/node_modules/oxc-parser/src-js/visit/visitor.js
|
|
2184
2182
|
let compiledVisitor;
|
|
2185
2183
|
function createCompiledVisitor() {
|
|
2186
2184
|
compiledVisitor = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bundler",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"bin",
|
|
25
25
|
"cli",
|
|
26
26
|
"dist",
|
|
27
|
+
"LICENSE",
|
|
28
|
+
"THIRD-PARTY-LICENSE",
|
|
27
29
|
"!dist/*.node"
|
|
28
30
|
],
|
|
29
31
|
"type": "module",
|
|
@@ -31,6 +33,8 @@
|
|
|
31
33
|
"module": "./dist/index.mjs",
|
|
32
34
|
"types": "./dist/index.d.mts",
|
|
33
35
|
"imports": {
|
|
36
|
+
"#default-runtime": "./dist/experimental-default-runtime.mjs",
|
|
37
|
+
"#runtime": "./dist/experimental-runtime.mjs",
|
|
34
38
|
"#parallel-plugin-worker": "./dist/parallel-plugin-worker.mjs"
|
|
35
39
|
},
|
|
36
40
|
"exports": {
|
|
@@ -40,6 +44,10 @@
|
|
|
40
44
|
"./experimental/runtime-types": {
|
|
41
45
|
"types": "./dist/experimental-runtime-types.d.ts"
|
|
42
46
|
},
|
|
47
|
+
"./experimental/runtime": {
|
|
48
|
+
"types": "./dist/experimental-runtime.d.ts",
|
|
49
|
+
"default": "./dist/experimental-runtime.mjs"
|
|
50
|
+
},
|
|
43
51
|
"./filter": "./dist/filter-index.mjs",
|
|
44
52
|
"./getLogFilter": "./dist/get-log-filter.mjs",
|
|
45
53
|
"./parallelPlugin": "./dist/parallel-plugin.mjs",
|
|
@@ -53,30 +61,30 @@
|
|
|
53
61
|
"registry": "https://registry.npmjs.org/"
|
|
54
62
|
},
|
|
55
63
|
"dependencies": {
|
|
56
|
-
"@oxc-project/types": "=0.
|
|
64
|
+
"@oxc-project/types": "=0.142.0",
|
|
57
65
|
"@rolldown/pluginutils": "^1.0.0"
|
|
58
66
|
},
|
|
59
67
|
"devDependencies": {
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
68
|
+
"@emnapi/core": "2.0.0-alpha.3",
|
|
69
|
+
"@emnapi/runtime": "2.0.0-alpha.3",
|
|
70
|
+
"@napi-rs/cli": "^3.8.2",
|
|
71
|
+
"@napi-rs/wasm-runtime": "^1.2.2",
|
|
62
72
|
"@oxc-node/cli": "^0.1.0",
|
|
63
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
64
|
-
"buble": "^0.20.0",
|
|
65
73
|
"cac": "^7.0.0",
|
|
66
74
|
"consola": "^3.4.2",
|
|
67
75
|
"execa": "^9.2.0",
|
|
68
76
|
"fresh-import": "^0.2.1",
|
|
69
77
|
"glob": "^13.0.0",
|
|
70
|
-
"oxc-parser": "=0.
|
|
78
|
+
"oxc-parser": "=0.142.0",
|
|
71
79
|
"pathe": "^2.0.3",
|
|
72
80
|
"remeda": "^2.34.1",
|
|
73
|
-
"rolldown-plugin-dts": "^0.
|
|
81
|
+
"rolldown-plugin-dts": "^0.28.0",
|
|
74
82
|
"rollup": "^4.60.4",
|
|
75
83
|
"signal-exit": "4.1.0",
|
|
76
|
-
"source-map": "0.
|
|
84
|
+
"source-map": "0.8.0",
|
|
77
85
|
"typescript": "^6.0.0",
|
|
78
86
|
"valibot": "1.4.2",
|
|
79
|
-
"rolldown": "1.2.
|
|
87
|
+
"rolldown": "1.2.2"
|
|
80
88
|
},
|
|
81
89
|
"napi": {
|
|
82
90
|
"binaryName": "rolldown-binding",
|
|
@@ -112,21 +120,20 @@
|
|
|
112
120
|
"node": "^20.19.0 || >=22.12.0"
|
|
113
121
|
},
|
|
114
122
|
"optionalDependencies": {
|
|
115
|
-
"@rolldown/binding-darwin-x64": "1.2.
|
|
116
|
-
"@rolldown/binding-win32-x64-msvc": "1.2.
|
|
117
|
-
"@rolldown/binding-linux-x64-gnu": "1.2.
|
|
118
|
-
"@rolldown/binding-linux-x64-musl": "1.2.
|
|
119
|
-
"@rolldown/binding-freebsd-x64": "1.2.
|
|
120
|
-
"@rolldown/binding-linux-arm-gnueabihf": "1.2.
|
|
121
|
-
"@rolldown/binding-linux-arm64-gnu": "1.2.
|
|
122
|
-
"@rolldown/binding-darwin-arm64": "1.2.
|
|
123
|
-
"@rolldown/binding-linux-arm64-musl": "1.2.
|
|
124
|
-
"@rolldown/binding-openharmony-arm64": "1.2.
|
|
125
|
-
"@rolldown/binding-win32-arm64-msvc": "1.2.
|
|
126
|
-
"@rolldown/binding-android-arm64": "1.2.
|
|
127
|
-
"@rolldown/binding-
|
|
128
|
-
"@rolldown/binding-linux-
|
|
129
|
-
"@rolldown/binding-linux-ppc64-gnu": "1.2.0"
|
|
123
|
+
"@rolldown/binding-darwin-x64": "1.2.2",
|
|
124
|
+
"@rolldown/binding-win32-x64-msvc": "1.2.2",
|
|
125
|
+
"@rolldown/binding-linux-x64-gnu": "1.2.2",
|
|
126
|
+
"@rolldown/binding-linux-x64-musl": "1.2.2",
|
|
127
|
+
"@rolldown/binding-freebsd-x64": "1.2.2",
|
|
128
|
+
"@rolldown/binding-linux-arm-gnueabihf": "1.2.2",
|
|
129
|
+
"@rolldown/binding-linux-arm64-gnu": "1.2.2",
|
|
130
|
+
"@rolldown/binding-darwin-arm64": "1.2.2",
|
|
131
|
+
"@rolldown/binding-linux-arm64-musl": "1.2.2",
|
|
132
|
+
"@rolldown/binding-openharmony-arm64": "1.2.2",
|
|
133
|
+
"@rolldown/binding-win32-arm64-msvc": "1.2.2",
|
|
134
|
+
"@rolldown/binding-android-arm64": "1.2.2",
|
|
135
|
+
"@rolldown/binding-linux-s390x-gnu": "1.2.2",
|
|
136
|
+
"@rolldown/binding-linux-ppc64-gnu": "1.2.2"
|
|
130
137
|
},
|
|
131
138
|
"scripts": {
|
|
132
139
|
"# Scrips for binding #": "_",
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-CdF8HAHX.mjs";
|
|
2
|
-
//#region src/api/rolldown/index.ts
|
|
3
|
-
/**
|
|
4
|
-
* The API compatible with Rollup's `rollup` function.
|
|
5
|
-
*
|
|
6
|
-
* Unlike Rollup, the module graph is not built until the methods of the bundle object are called.
|
|
7
|
-
*
|
|
8
|
-
* @param input The input options object.
|
|
9
|
-
* @returns A Promise that resolves to a bundle object.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```js
|
|
13
|
-
* import { rolldown } from 'rolldown';
|
|
14
|
-
*
|
|
15
|
-
* let bundle, failed = false;
|
|
16
|
-
* try {
|
|
17
|
-
* bundle = await rolldown({
|
|
18
|
-
* input: 'src/main.js',
|
|
19
|
-
* });
|
|
20
|
-
* await bundle.write({
|
|
21
|
-
* format: 'esm',
|
|
22
|
-
* });
|
|
23
|
-
* } catch (e) {
|
|
24
|
-
* console.error(e);
|
|
25
|
-
* failed = true;
|
|
26
|
-
* }
|
|
27
|
-
* if (bundle) {
|
|
28
|
-
* await bundle.close();
|
|
29
|
-
* }
|
|
30
|
-
* process.exitCode = failed ? 1 : 0;
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* @category Programmatic APIs
|
|
34
|
-
*/
|
|
35
|
-
const rolldown = async (input) => {
|
|
36
|
-
validateOption("input", input);
|
|
37
|
-
return new RolldownBuild(await PluginDriver.callOptionsHook(input));
|
|
38
|
-
};
|
|
39
|
-
//#endregion
|
|
40
|
-
export { rolldown as t };
|