rolldown 1.0.0-beta.2-commit.2666b23 → 1.0.0-beta.20

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.
Files changed (236) hide show
  1. package/bin/cli.mjs +2 -0
  2. package/dist/{cjs/cli.cjs → cli.cjs} +630 -603
  3. package/dist/cli.d.cts +1 -0
  4. package/dist/cli.d.mts +1 -0
  5. package/dist/{esm/cli.mjs → cli.mjs} +605 -575
  6. package/dist/config.cjs +12 -0
  7. package/dist/config.d.cts +10 -0
  8. package/dist/config.d.mts +10 -0
  9. package/dist/config.mjs +10 -0
  10. package/dist/experimental-index.cjs +107 -0
  11. package/dist/experimental-index.d.cts +63 -0
  12. package/dist/experimental-index.d.mts +63 -0
  13. package/dist/experimental-index.mjs +82 -0
  14. package/dist/experimental-runtime-types.d.ts +52 -0
  15. package/dist/filter-index.cjs +105 -0
  16. package/dist/filter-index.d.cts +4 -0
  17. package/dist/filter-index.d.mts +4 -0
  18. package/dist/filter-index.mjs +44 -0
  19. package/dist/index.cjs +9 -0
  20. package/dist/index.d.cts +3 -0
  21. package/dist/index.d.mts +3 -0
  22. package/dist/index.mjs +5 -0
  23. package/dist/{cjs/parallel-plugin-worker.cjs → parallel-plugin-worker.cjs} +6 -14
  24. package/dist/parallel-plugin-worker.d.cts +1 -0
  25. package/dist/parallel-plugin-worker.d.mts +1 -0
  26. package/dist/{esm/parallel-plugin-worker.mjs → parallel-plugin-worker.mjs} +5 -12
  27. package/dist/{cjs/parallel-plugin.cjs → parallel-plugin.cjs} +1 -2
  28. package/dist/parallel-plugin.d.cts +14 -0
  29. package/dist/parallel-plugin.d.mts +14 -0
  30. package/dist/{esm/parallel-plugin.mjs → parallel-plugin.mjs} +0 -1
  31. package/dist/parse-ast-index.cjs +4 -0
  32. package/dist/parse-ast-index.d.cts +9 -0
  33. package/dist/parse-ast-index.d.mts +9 -0
  34. package/dist/parse-ast-index.mjs +3 -0
  35. package/dist/shared/binding-5O9lFYtz.d.mts +1215 -0
  36. package/dist/shared/binding-BvKFOCZr.d.cts +1215 -0
  37. package/dist/shared/{chunk-qZFfknuJ.cjs → chunk-DDkG_k5U.cjs} +0 -1
  38. package/dist/shared/define-config-BOD4oRSZ.d.cts +1204 -0
  39. package/dist/shared/define-config-DdVYel_V.d.mts +1204 -0
  40. package/dist/shared/load-config-B_hPIyxu.mjs +119 -0
  41. package/dist/shared/load-config-BdY850xq.cjs +125 -0
  42. package/dist/shared/misc-BKp5iIef.cjs +67 -0
  43. package/dist/shared/misc-BN0nse6C.mjs +25 -0
  44. package/dist/shared/parse-ast-index-CVVmsBjK.cjs +738 -0
  45. package/dist/shared/parse-ast-index-DW8kbzjr.mjs +616 -0
  46. package/dist/shared/{prompt-Nfm4Xz36.mjs → prompt-C5jz26Zn.mjs} +247 -246
  47. package/dist/shared/{prompt-B7tq3GL9.cjs → prompt-QNI93ne7.cjs} +250 -250
  48. package/dist/shared/src-CZ0tgOug.cjs +4851 -0
  49. package/dist/shared/src-DHXNdTPA.mjs +4647 -0
  50. package/package.json +63 -67
  51. package/bin/cli.js +0 -2
  52. package/dist/cjs/experimental-index.cjs +0 -79
  53. package/dist/cjs/index.cjs +0 -8
  54. package/dist/cjs/parse-ast-index.cjs +0 -57
  55. package/dist/esm/experimental-index.mjs +0 -56
  56. package/dist/esm/index.mjs +0 -4
  57. package/dist/esm/parse-ast-index.mjs +0 -55
  58. package/dist/shared/binding-l7VLSKnB.mjs +0 -610
  59. package/dist/shared/binding-orkvONpS.cjs +0 -661
  60. package/dist/shared/src-BC6S-BmL.cjs +0 -2828
  61. package/dist/shared/src-mupmacNC.mjs +0 -2647
  62. package/dist/types/api/build.d.ts +0 -18
  63. package/dist/types/api/build.js +0 -22
  64. package/dist/types/api/experimental.d.ts +0 -7
  65. package/dist/types/api/experimental.js +0 -13
  66. package/dist/types/api/rolldown/index.d.ts +0 -3
  67. package/dist/types/api/rolldown/index.js +0 -7
  68. package/dist/types/api/rolldown/rolldown-build.d.ts +0 -12
  69. package/dist/types/api/rolldown/rolldown-build.js +0 -43
  70. package/dist/types/api/watch/index.d.ts +0 -3
  71. package/dist/types/api/watch/index.js +0 -8
  72. package/dist/types/api/watch/watch-emitter.d.ts +0 -31
  73. package/dist/types/api/watch/watch-emitter.js +0 -69
  74. package/dist/types/api/watch/watcher.d.ts +0 -13
  75. package/dist/types/api/watch/watcher.js +0 -66
  76. package/dist/types/binding.d.ts +0 -1327
  77. package/dist/types/builtin-plugin/alias-plugin.d.ts +0 -10
  78. package/dist/types/builtin-plugin/alias-plugin.js +0 -4
  79. package/dist/types/builtin-plugin/constructors.d.ts +0 -20
  80. package/dist/types/builtin-plugin/constructors.js +0 -68
  81. package/dist/types/builtin-plugin/replace-plugin.d.ts +0 -28
  82. package/dist/types/builtin-plugin/replace-plugin.js +0 -29
  83. package/dist/types/builtin-plugin/transform-plugin.d.ts +0 -9
  84. package/dist/types/builtin-plugin/transform-plugin.js +0 -16
  85. package/dist/types/builtin-plugin/utils.d.ts +0 -8
  86. package/dist/types/builtin-plugin/utils.js +0 -19
  87. package/dist/types/cli/arguments/alias.d.ts +0 -16
  88. package/dist/types/cli/arguments/alias.js +0 -63
  89. package/dist/types/cli/arguments/index.d.ts +0 -15
  90. package/dist/types/cli/arguments/index.js +0 -127
  91. package/dist/types/cli/arguments/normalize.d.ts +0 -12
  92. package/dist/types/cli/arguments/normalize.js +0 -48
  93. package/dist/types/cli/arguments/utils.d.ts +0 -8
  94. package/dist/types/cli/arguments/utils.js +0 -67
  95. package/dist/types/cli/colors.d.ts +0 -11
  96. package/dist/types/cli/colors.js +0 -17
  97. package/dist/types/cli/commands/bundle.d.ts +0 -3
  98. package/dist/types/cli/commands/bundle.js +0 -203
  99. package/dist/types/cli/commands/help.d.ts +0 -1
  100. package/dist/types/cli/commands/help.js +0 -88
  101. package/dist/types/cli/index.d.ts +0 -1
  102. package/dist/types/cli/index.js +0 -27
  103. package/dist/types/cli/load-config.d.ts +0 -3
  104. package/dist/types/cli/load-config.js +0 -95
  105. package/dist/types/cli/logger.d.ts +0 -5
  106. package/dist/types/cli/logger.js +0 -35
  107. package/dist/types/constants/plugin-context.d.ts +0 -7
  108. package/dist/types/constants/plugin-context.js +0 -7
  109. package/dist/types/constants/plugin.d.ts +0 -45
  110. package/dist/types/constants/plugin.js +0 -69
  111. package/dist/types/experimental-index.d.ts +0 -9
  112. package/dist/types/experimental-index.js +0 -9
  113. package/dist/types/index.d.ts +0 -28
  114. package/dist/types/index.js +0 -7
  115. package/dist/types/log/logHandler.d.ts +0 -4
  116. package/dist/types/log/logHandler.js +0 -25
  117. package/dist/types/log/logger.d.ts +0 -6
  118. package/dist/types/log/logger.js +0 -107
  119. package/dist/types/log/logging.d.ts +0 -11
  120. package/dist/types/log/logging.js +0 -11
  121. package/dist/types/log/logs.d.ts +0 -18
  122. package/dist/types/log/logs.js +0 -86
  123. package/dist/types/options/input-options.d.ts +0 -170
  124. package/dist/types/options/input-options.js +0 -1
  125. package/dist/types/options/normalized-input-options.d.ts +0 -18
  126. package/dist/types/options/normalized-input-options.js +0 -21
  127. package/dist/types/options/normalized-output-options.d.ts +0 -67
  128. package/dist/types/options/normalized-output-options.js +0 -99
  129. package/dist/types/options/output-options.d.ts +0 -86
  130. package/dist/types/options/output-options.js +0 -1
  131. package/dist/types/options/watch-options.d.ts +0 -5
  132. package/dist/types/options/watch-options.js +0 -1
  133. package/dist/types/parallel-plugin-worker.d.ts +0 -1
  134. package/dist/types/parallel-plugin-worker.js +0 -31
  135. package/dist/types/parallel-plugin.d.ts +0 -1
  136. package/dist/types/parallel-plugin.js +0 -1
  137. package/dist/types/parse-ast-index.d.ts +0 -4
  138. package/dist/types/parse-ast-index.js +0 -73
  139. package/dist/types/plugin/bindingify-build-hooks.d.ts +0 -10
  140. package/dist/types/plugin/bindingify-build-hooks.js +0 -213
  141. package/dist/types/plugin/bindingify-hook-filter.d.ts +0 -7
  142. package/dist/types/plugin/bindingify-hook-filter.js +0 -39
  143. package/dist/types/plugin/bindingify-output-hooks.d.ts +0 -14
  144. package/dist/types/plugin/bindingify-output-hooks.js +0 -189
  145. package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +0 -8
  146. package/dist/types/plugin/bindingify-plugin-hook-meta.js +0 -19
  147. package/dist/types/plugin/bindingify-plugin.d.ts +0 -15
  148. package/dist/types/plugin/bindingify-plugin.js +0 -124
  149. package/dist/types/plugin/bindingify-watch-hooks.d.ts +0 -5
  150. package/dist/types/plugin/bindingify-watch-hooks.js +0 -29
  151. package/dist/types/plugin/hook-filter.d.ts +0 -48
  152. package/dist/types/plugin/hook-filter.js +0 -1
  153. package/dist/types/plugin/index.d.ts +0 -126
  154. package/dist/types/plugin/index.js +0 -1
  155. package/dist/types/plugin/minimal-plugin-context.d.ts +0 -15
  156. package/dist/types/plugin/minimal-plugin-context.js +0 -25
  157. package/dist/types/plugin/parallel-plugin-implementation.d.ts +0 -10
  158. package/dist/types/plugin/parallel-plugin-implementation.js +0 -3
  159. package/dist/types/plugin/parallel-plugin.d.ts +0 -9
  160. package/dist/types/plugin/parallel-plugin.js +0 -6
  161. package/dist/types/plugin/plugin-context-data.d.ts +0 -16
  162. package/dist/types/plugin/plugin-context-data.js +0 -55
  163. package/dist/types/plugin/plugin-context.d.ts +0 -52
  164. package/dist/types/plugin/plugin-context.js +0 -108
  165. package/dist/types/plugin/plugin-driver.d.ts +0 -8
  166. package/dist/types/plugin/plugin-driver.js +0 -88
  167. package/dist/types/plugin/transform-plugin-context.d.ts +0 -17
  168. package/dist/types/plugin/transform-plugin-context.js +0 -37
  169. package/dist/types/types/assert.d.ts +0 -13
  170. package/dist/types/types/assert.js +0 -1
  171. package/dist/types/types/config-export.d.ts +0 -5
  172. package/dist/types/types/config-export.js +0 -1
  173. package/dist/types/types/misc.d.ts +0 -40
  174. package/dist/types/types/misc.js +0 -1
  175. package/dist/types/types/module-info.d.ts +0 -15
  176. package/dist/types/types/module-info.js +0 -1
  177. package/dist/types/types/module-side-effects.d.ts +0 -10
  178. package/dist/types/types/module-side-effects.js +0 -1
  179. package/dist/types/types/output-bundle.d.ts +0 -4
  180. package/dist/types/types/output-bundle.js +0 -1
  181. package/dist/types/types/rolldown-options.d.ts +0 -5
  182. package/dist/types/types/rolldown-options.js +0 -1
  183. package/dist/types/types/rolldown-output.d.ts +0 -63
  184. package/dist/types/types/rolldown-output.js +0 -1
  185. package/dist/types/types/schema.d.ts +0 -33
  186. package/dist/types/types/schema.js +0 -1
  187. package/dist/types/types/sourcemap.d.ts +0 -13
  188. package/dist/types/types/sourcemap.js +0 -16
  189. package/dist/types/types/utils.d.ts +0 -13
  190. package/dist/types/types/utils.js +0 -1
  191. package/dist/types/utils/asset-source.d.ts +0 -4
  192. package/dist/types/utils/asset-source.js +0 -8
  193. package/dist/types/utils/async-flatten.d.ts +0 -1
  194. package/dist/types/utils/async-flatten.js +0 -7
  195. package/dist/types/utils/bindingify-input-options.d.ts +0 -7
  196. package/dist/types/utils/bindingify-input-options.js +0 -225
  197. package/dist/types/utils/bindingify-output-options.d.ts +0 -3
  198. package/dist/types/utils/bindingify-output-options.js +0 -92
  199. package/dist/types/utils/code-frame.d.ts +0 -1
  200. package/dist/types/utils/code-frame.js +0 -46
  201. package/dist/types/utils/compose-js-plugins.d.ts +0 -2
  202. package/dist/types/utils/compose-js-plugins.js +0 -400
  203. package/dist/types/utils/create-bundler-option.d.ts +0 -11
  204. package/dist/types/utils/create-bundler-option.js +0 -53
  205. package/dist/types/utils/create-bundler.d.ts +0 -8
  206. package/dist/types/utils/create-bundler.js +0 -15
  207. package/dist/types/utils/define-config.d.ts +0 -5
  208. package/dist/types/utils/define-config.js +0 -3
  209. package/dist/types/utils/error.d.ts +0 -2
  210. package/dist/types/utils/error.js +0 -65
  211. package/dist/types/utils/initialize-parallel-plugins.d.ts +0 -19
  212. package/dist/types/utils/initialize-parallel-plugins.js +0 -54
  213. package/dist/types/utils/misc.d.ts +0 -6
  214. package/dist/types/utils/misc.js +0 -22
  215. package/dist/types/utils/normalize-hook.d.ts +0 -7
  216. package/dist/types/utils/normalize-hook.js +0 -21
  217. package/dist/types/utils/normalize-plugin-option.d.ts +0 -13
  218. package/dist/types/utils/normalize-plugin-option.js +0 -35
  219. package/dist/types/utils/normalize-string-or-regex.d.ts +0 -2
  220. package/dist/types/utils/normalize-string-or-regex.js +0 -14
  221. package/dist/types/utils/plugin/index.d.ts +0 -2
  222. package/dist/types/utils/plugin/index.js +0 -7
  223. package/dist/types/utils/transform-module-info.d.ts +0 -4
  224. package/dist/types/utils/transform-module-info.js +0 -19
  225. package/dist/types/utils/transform-rendered-chunk.d.ts +0 -4
  226. package/dist/types/utils/transform-rendered-chunk.js +0 -43
  227. package/dist/types/utils/transform-rendered-module.d.ts +0 -3
  228. package/dist/types/utils/transform-rendered-module.js +0 -10
  229. package/dist/types/utils/transform-side-effects.d.ts +0 -3
  230. package/dist/types/utils/transform-side-effects.js +0 -16
  231. package/dist/types/utils/transform-sourcemap.d.ts +0 -3
  232. package/dist/types/utils/transform-sourcemap.js +0 -29
  233. package/dist/types/utils/transform-to-rollup-output.d.ts +0 -11
  234. package/dist/types/utils/transform-to-rollup-output.js +0 -165
  235. package/dist/types/utils/validator.d.ts +0 -7
  236. package/dist/types/utils/validator.js +0 -275
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.2-commit.2666b23",
3
+ "version": "1.0.0-beta.20",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
+ "type": "module",
5
6
  "homepage": "https://rolldown.rs/",
6
7
  "repository": {
7
8
  "type": "git",
@@ -24,36 +25,39 @@
24
25
  "!dist/*.node"
25
26
  ],
26
27
  "bin": {
27
- "rolldown": "./bin/cli.js"
28
+ "rolldown": "./bin/cli.mjs"
28
29
  },
29
- "type": "module",
30
- "main": "./dist/cjs/index.cjs",
31
- "types": "./dist/types/index.d.ts",
30
+ "main": "./dist/index.cjs",
31
+ "types": "./dist/index.d.cts",
32
32
  "exports": {
33
33
  ".": {
34
- "types": "./dist/types/index.d.ts",
35
- "require": "./dist/cjs/index.cjs",
36
- "import": "./dist/esm/index.mjs"
34
+ "require": "./dist/index.cjs",
35
+ "import": "./dist/index.mjs"
36
+ },
37
+ "./config": {
38
+ "require": "./dist/config.cjs",
39
+ "import": "./dist/config.mjs"
37
40
  },
38
41
  "./experimental": {
39
- "types": "./dist/types/experimental-index.d.ts",
40
- "require": "./dist/cjs/experimental-index.cjs",
41
- "import": "./dist/esm/experimental-index.mjs"
42
+ "require": "./dist/experimental-index.cjs",
43
+ "import": "./dist/experimental-index.mjs"
42
44
  },
43
- "./parallel-plugin": {
44
- "types": "./dist/types/parallel-plugin.d.ts",
45
- "require": "./dist/cjs/parallel-plugin.cjs",
46
- "import": "./dist/esm/parallel-plugin.mjs"
45
+ "./filter": {
46
+ "require": "./dist/filter-index.cjs",
47
+ "import": "./dist/filter-index.mjs"
48
+ },
49
+ "./parallelPlugin": {
50
+ "require": "./dist/parallel-plugin.cjs",
51
+ "import": "./dist/parallel-plugin.mjs"
47
52
  },
48
53
  "./parseAst": {
49
- "types": "./dist/types/parse-ast-index.d.ts",
50
- "require": "./dist/cjs/parse-ast-index.cjs",
51
- "import": "./dist/esm/parse-ast-index.mjs"
54
+ "require": "./dist/parse-ast-index.cjs",
55
+ "import": "./dist/parse-ast-index.mjs"
52
56
  },
53
57
  "./package.json": "./package.json"
54
58
  },
55
59
  "imports": {
56
- "#parallel-plugin-worker": "./dist/esm/parallel-plugin-worker.mjs"
60
+ "#parallel-plugin-worker": "./dist/parallel-plugin-worker.mjs"
57
61
  },
58
62
  "publishConfig": {
59
63
  "registry": "https://registry.npmjs.org/",
@@ -79,81 +83,73 @@
79
83
  "wasm": {
80
84
  "initialMemory": 16384,
81
85
  "browser": {
82
- "fs": true
86
+ "fs": true,
87
+ "asyncInit": true
83
88
  }
84
89
  },
85
90
  "dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\n\n"
86
91
  },
87
92
  "dependencies": {
88
- "@oxc-project/types": "0.46.0",
89
- "@valibot/to-json-schema": "1.0.0-beta.4",
90
- "valibot": "1.0.0-beta.12"
91
- },
92
- "peerDependencies": {
93
- "@babel/runtime": ">=7"
94
- },
95
- "peerDependenciesMeta": {
96
- "@babel/runtime": {
97
- "optional": true
98
- }
93
+ "@oxc-project/runtime": "=0.75.0",
94
+ "@oxc-project/types": "=0.75.0",
95
+ "ansis": "^4.0.0",
96
+ "@rolldown/pluginutils": "1.0.0-beta.20"
99
97
  },
100
98
  "devDependencies": {
101
- "@jridgewell/sourcemap-codec": "^1.5.0",
102
- "@napi-rs/cli": "^3.0.0-alpha.65",
103
- "@napi-rs/wasm-runtime": "^0.2.4",
104
- "@oxc-node/core": "^0.0.17",
105
- "@types/fs-extra": "^11.0.4",
106
- "@types/lodash-es": "^4.17.12",
107
- "colorette": "^2.0.20",
108
- "consola": "^3.2.3",
99
+ "@napi-rs/cli": "3.0.0-alpha.91",
100
+ "@napi-rs/wasm-runtime": "^0.2.10",
101
+ "@oxc-node/cli": "^0.0.29",
102
+ "@rollup/plugin-json": "^6.1.0",
103
+ "@valibot/to-json-schema": "1.3.0",
104
+ "buble": "^0.20.0",
105
+ "consola": "^3.4.2",
109
106
  "emnapi": "^1.2.0",
110
107
  "execa": "^9.2.0",
111
- "fs-extra": "^11.2.0",
112
108
  "glob": "^11.0.0",
113
- "locate-character": "^3.0.0",
114
- "npm-run-all2": "^7.0.0",
109
+ "oxc-parser": "=0.75.0",
110
+ "pathe": "^2.0.3",
115
111
  "remeda": "^2.10.0",
112
+ "rolldown-plugin-dts": "^0.13.6",
116
113
  "rollup": "^4.18.0",
117
114
  "signal-exit": "4.1.0",
118
115
  "source-map": "^0.7.4",
119
- "tsx": "^4.19.2",
116
+ "tsx": "^4.19.4",
120
117
  "type-fest": "^4.20.0",
121
- "typedoc": "^0.27.6",
118
+ "typedoc": "^0.28.0",
122
119
  "typescript": "^5.7.3",
123
- "unbuild": "^3.0.0",
124
- "why-is-node-running": "^3.0.0",
120
+ "valibot": "1.1.0",
125
121
  "@rolldown/testing": "0.0.1",
126
- "rolldown": "1.0.0-beta.2-commit.2666b23"
122
+ "rolldown": "1.0.0-beta.20"
127
123
  },
128
124
  "optionalDependencies": {
129
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.2-commit.2666b23",
130
- "@rolldown/binding-darwin-x64": "1.0.0-beta.2-commit.2666b23",
131
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.2-commit.2666b23",
132
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.2-commit.2666b23",
133
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.2-commit.2666b23",
134
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.2-commit.2666b23",
135
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.2-commit.2666b23",
136
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.2-commit.2666b23",
137
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.2-commit.2666b23",
138
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.2-commit.2666b23",
139
- "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.2-commit.2666b23",
140
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.2-commit.2666b23"
125
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.20",
126
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.20",
127
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.20",
128
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.20",
129
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.20",
130
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.20",
131
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.20",
132
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.20",
133
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.20",
134
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.20",
135
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.20",
136
+ "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.20"
141
137
  },
142
138
  "scripts": {
143
139
  "# Scrips for binding #": "_",
144
140
  "artifacts": "napi artifacts --cwd ./src --package-json-path ../package.json -o=../artifacts --npm-dir ../npm",
145
- "build-binding": "napi build -o=./src --manifest-path ../../crates/rolldown_binding/Cargo.toml --platform -p rolldown_binding --js binding.cjs --dts binding.d.ts --no-const-enum",
141
+ "build-binding": "oxnode ./build-binding.ts",
146
142
  "build-binding:release": "pnpm build-binding --release",
147
143
  "build-binding:wasi": "pnpm build-binding --target wasm32-wasip1-threads",
148
144
  "build-binding:wasi:release": "pnpm build-binding --profile release-wasi --target wasm32-wasip1-threads",
149
145
  "# Scrips for node #": "_",
150
- "bak_build-node": "unbuild",
151
- "build-node": "node --import @oxc-node/core/register ./build.ts",
152
- "build-types": "tsc -p ./tsconfig.json",
153
- "build-native:debug": "run-s build-binding build-types build-node",
154
- "build-native:release": "run-s build-binding:release build-types build-node",
155
- "build-wasi:debug": "run-s build-binding build-binding:wasi build-node",
156
- "build-wasi:release": "run-s build-binding build-binding:wasi:release build-node",
146
+ "build-node": "tsx -C dev ./build.ts",
147
+ "build-types-check": "tsc -p ./tsconfig.check.json",
148
+ "build-js-glue": "pnpm run --sequential '/^build-(types|node|types-check)$/'",
149
+ "build-native:debug": "pnpm run --sequential '/^build-(binding|js-glue)$/'",
150
+ "build-native:release": "pnpm run --sequential '/^build-(binding:release|js-glue)$/'",
151
+ "build-browser:debug": "BROWSER_PKG=1 pnpm run --sequential '/^build-(binding|binding:wasi|node)$/'",
152
+ "build-browser:release": "BROWSER_PKG=1 pnpm run --sequential '/^build-(binding|binding:wasi:release|node)$/'",
157
153
  "# Scrips for docs #": "_",
158
154
  "extract-options-doc": "typedoc"
159
155
  }
package/bin/cli.js DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import('../dist/esm/cli.mjs')
@@ -1,79 +0,0 @@
1
- "use strict";
2
- const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-BC6S-BmL.cjs');
4
- const require_binding = require('../shared/binding-orkvONpS.cjs');
5
- const node_url = require_chunk.__toESM(require("node:url"));
6
-
7
- //#region src/plugin/parallel-plugin.ts
8
- function defineParallelPlugin(pluginPath) {
9
- return (options) => {
10
- return { _parallel: {
11
- fileUrl: (0, node_url.pathToFileURL)(pluginPath).href,
12
- options
13
- } };
14
- };
15
- }
16
-
17
- //#endregion
18
- //#region src/api/experimental.ts
19
- const experimental_scan = async (input) => {
20
- const { bundler, stopWorkers } = await require_src.createBundler(input, {});
21
- const output = await bundler.scan();
22
- require_src.handleOutputErrors(output);
23
- await stopWorkers?.();
24
- };
25
-
26
- //#endregion
27
- //#region src/builtin-plugin/transform-plugin.ts
28
- function normalizeEcmaTransformPluginConfig(config) {
29
- if (!config) return undefined;
30
- let normalizedConfig = {
31
- ...config,
32
- exclude: require_src.normalizedStringOrRegex(config.exclude),
33
- include: require_src.normalizedStringOrRegex(config.include)
34
- };
35
- return normalizedConfig;
36
- }
37
- function transformPlugin(config) {
38
- return new require_src.BuiltinPlugin("builtin:transform", normalizeEcmaTransformPluginConfig(config));
39
- }
40
-
41
- //#endregion
42
- //#region src/builtin-plugin/replace-plugin.ts
43
- function replacePlugin(values = {}, options = {}) {
44
- return new require_src.BuiltinPlugin("builtin:replace", {
45
- ...options,
46
- values
47
- });
48
- }
49
-
50
- //#endregion
51
- //#region src/builtin-plugin/alias-plugin.ts
52
- function aliasPlugin(config) {
53
- return new require_src.BuiltinPlugin("builtin:alias", config);
54
- }
55
-
56
- //#endregion
57
- exports.aliasPlugin = aliasPlugin
58
- exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin
59
- exports.composePlugins = require_src.composeJsPlugins
60
- exports.defineParallelPlugin = defineParallelPlugin
61
- exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin
62
- exports.importGlobPlugin = require_src.importGlobPlugin
63
- exports.jsonPlugin = require_src.jsonPlugin
64
- exports.loadFallbackPlugin = require_src.loadFallbackPlugin
65
- exports.manifestPlugin = require_src.manifestPlugin
66
- exports.moduleFederationPlugin = require_src.moduleFederationPlugin
67
- exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin
68
- exports.replacePlugin = replacePlugin
69
- exports.scan = experimental_scan
70
- Object.defineProperty(exports, 'transform', {
71
- enumerable: true,
72
- get: function () {
73
- return import_binding.transform;
74
- }
75
- });
76
- exports.transformPlugin = transformPlugin
77
- exports.viteResolvePlugin = require_src.viteResolvePlugin
78
- exports.wasmFallbackPlugin = require_src.wasmFallbackPlugin
79
- exports.wasmHelperPlugin = require_src.wasmHelperPlugin
@@ -1,8 +0,0 @@
1
- const require_src = require('../shared/src-BC6S-BmL.cjs');
2
- require('../shared/binding-orkvONpS.cjs');
3
-
4
- exports.VERSION = require_src.VERSION
5
- exports.build = require_src.build
6
- exports.defineConfig = require_src.defineConfig
7
- exports.rolldown = require_src.rolldown
8
- exports.watch = require_src.watch
@@ -1,57 +0,0 @@
1
- "use strict";
2
- const require_binding = require('../shared/binding-orkvONpS.cjs');
3
-
4
- //#region src/parse-ast-index.ts
5
- function wrap(result, sourceText) {
6
- let program, module$1, comments, errors, magicString;
7
- return {
8
- get program() {
9
- if (!errors) errors = result.errors;
10
- if (errors.length > 0) return normalizeParseError(sourceText, errors);
11
- if (!program) program = JSON.parse(result.program);
12
- return program;
13
- },
14
- get module() {
15
- if (!module$1) module$1 = result.module;
16
- return module$1;
17
- },
18
- get comments() {
19
- if (!comments) comments = result.comments;
20
- return comments;
21
- },
22
- get errors() {
23
- if (!errors) errors = result.errors;
24
- return errors;
25
- },
26
- get magicString() {
27
- if (!magicString) magicString = result.magicString;
28
- return magicString;
29
- }
30
- };
31
- }
32
- function normalizeParseError(sourceText, errors) {
33
- let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
34
- for (let i = 0; i < errors.length; i++) {
35
- if (i >= 5) {
36
- message += "\n...";
37
- break;
38
- }
39
- const e = errors[i];
40
- message += e.message + "\n" + e.labels.map((label) => {
41
- const location = require_binding.locate(sourceText, label.start, { offsetLine: 1 });
42
- if (!location) return;
43
- return require_binding.getCodeFrame(sourceText, location.line, location.column);
44
- }).filter(Boolean).join("\n");
45
- }
46
- return require_binding.error(require_binding.logParseError(message));
47
- }
48
- function parseAst(filename, sourceText, options) {
49
- return wrap((0, require_binding.import_binding.parseSync)(filename, sourceText, options), sourceText);
50
- }
51
- async function parseAstAsync(filename, sourceText, options) {
52
- return wrap(await (0, require_binding.import_binding.parseAsync)(filename, sourceText, options), sourceText);
53
- }
54
-
55
- //#endregion
56
- exports.parseAst = parseAst
57
- exports.parseAstAsync = parseAstAsync
@@ -1,56 +0,0 @@
1
- import { import_binding } from "../shared/binding-l7VLSKnB.mjs";
2
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-mupmacNC.mjs";
3
- import { pathToFileURL } from "node:url";
4
-
5
- //#region src/plugin/parallel-plugin.ts
6
- function defineParallelPlugin(pluginPath) {
7
- return (options) => {
8
- return { _parallel: {
9
- fileUrl: pathToFileURL(pluginPath).href,
10
- options
11
- } };
12
- };
13
- }
14
-
15
- //#endregion
16
- //#region src/api/experimental.ts
17
- const experimental_scan = async (input) => {
18
- const { bundler, stopWorkers } = await createBundler(input, {});
19
- const output = await bundler.scan();
20
- handleOutputErrors(output);
21
- await stopWorkers?.();
22
- };
23
-
24
- //#endregion
25
- //#region src/builtin-plugin/transform-plugin.ts
26
- function normalizeEcmaTransformPluginConfig(config) {
27
- if (!config) return undefined;
28
- let normalizedConfig = {
29
- ...config,
30
- exclude: normalizedStringOrRegex(config.exclude),
31
- include: normalizedStringOrRegex(config.include)
32
- };
33
- return normalizedConfig;
34
- }
35
- function transformPlugin(config) {
36
- return new BuiltinPlugin("builtin:transform", normalizeEcmaTransformPluginConfig(config));
37
- }
38
-
39
- //#endregion
40
- //#region src/builtin-plugin/replace-plugin.ts
41
- function replacePlugin(values = {}, options = {}) {
42
- return new BuiltinPlugin("builtin:replace", {
43
- ...options,
44
- values
45
- });
46
- }
47
-
48
- //#endregion
49
- //#region src/builtin-plugin/alias-plugin.ts
50
- function aliasPlugin(config) {
51
- return new BuiltinPlugin("builtin:alias", config);
52
- }
53
-
54
- //#endregion
55
- var transform = import_binding.transform;
56
- export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, replacePlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
@@ -1,4 +0,0 @@
1
- import "../shared/binding-l7VLSKnB.mjs";
2
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-mupmacNC.mjs";
3
-
4
- export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,55 +0,0 @@
1
- import { error, getCodeFrame, import_binding, locate, logParseError } from "../shared/binding-l7VLSKnB.mjs";
2
-
3
- //#region src/parse-ast-index.ts
4
- function wrap(result, sourceText) {
5
- let program, module, comments, errors, magicString;
6
- return {
7
- get program() {
8
- if (!errors) errors = result.errors;
9
- if (errors.length > 0) return normalizeParseError(sourceText, errors);
10
- if (!program) program = JSON.parse(result.program);
11
- return program;
12
- },
13
- get module() {
14
- if (!module) module = result.module;
15
- return module;
16
- },
17
- get comments() {
18
- if (!comments) comments = result.comments;
19
- return comments;
20
- },
21
- get errors() {
22
- if (!errors) errors = result.errors;
23
- return errors;
24
- },
25
- get magicString() {
26
- if (!magicString) magicString = result.magicString;
27
- return magicString;
28
- }
29
- };
30
- }
31
- function normalizeParseError(sourceText, errors) {
32
- let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
33
- for (let i = 0; i < errors.length; i++) {
34
- if (i >= 5) {
35
- message += "\n...";
36
- break;
37
- }
38
- const e = errors[i];
39
- message += e.message + "\n" + e.labels.map((label) => {
40
- const location = locate(sourceText, label.start, { offsetLine: 1 });
41
- if (!location) return;
42
- return getCodeFrame(sourceText, location.line, location.column);
43
- }).filter(Boolean).join("\n");
44
- }
45
- return error(logParseError(message));
46
- }
47
- function parseAst(filename, sourceText, options) {
48
- return wrap((0, import_binding.parseSync)(filename, sourceText, options), sourceText);
49
- }
50
- async function parseAstAsync(filename, sourceText, options) {
51
- return wrap(await (0, import_binding.parseAsync)(filename, sourceText, options), sourceText);
52
- }
53
-
54
- //#endregion
55
- export { parseAst, parseAstAsync };