rolldown 1.0.0-beta.1-commit.35fb1f8 → 1.0.0-beta.10

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 (153) hide show
  1. package/bin/cli.mjs +2 -0
  2. package/dist/cli.cjs +1748 -0
  3. package/dist/cli.d.cts +1 -0
  4. package/dist/cli.d.mts +1 -0
  5. package/dist/cli.mjs +1745 -0
  6. package/dist/config.cjs +12 -0
  7. package/dist/config.d.cts +12 -0
  8. package/dist/config.d.mts +12 -0
  9. package/dist/config.mjs +10 -0
  10. package/dist/experimental-index.cjs +132 -0
  11. package/dist/experimental-index.d.cts +96 -0
  12. package/dist/experimental-index.d.mts +96 -0
  13. package/dist/experimental-index.mjs +91 -0
  14. package/dist/filter-index.cjs +105 -0
  15. package/dist/filter-index.d.cts +5 -0
  16. package/dist/filter-index.d.mts +5 -0
  17. package/dist/filter-index.mjs +44 -0
  18. package/dist/index.cjs +9 -0
  19. package/dist/index.d.cts +4 -0
  20. package/dist/index.d.mts +4 -0
  21. package/dist/index.mjs +5 -0
  22. package/dist/{cjs/parallel-plugin-worker.cjs → parallel-plugin-worker.cjs} +7 -14
  23. package/dist/parallel-plugin-worker.d.cts +1 -0
  24. package/dist/parallel-plugin-worker.d.mts +1 -0
  25. package/dist/{esm/parallel-plugin-worker.mjs → parallel-plugin-worker.mjs} +5 -11
  26. package/dist/{cjs/parallel-plugin.cjs → parallel-plugin.cjs} +1 -2
  27. package/dist/parallel-plugin.d.cts +15 -0
  28. package/dist/parallel-plugin.d.mts +15 -0
  29. package/dist/{esm/parallel-plugin.mjs → parallel-plugin.mjs} +0 -1
  30. package/dist/parse-ast-index.cjs +4 -0
  31. package/dist/parse-ast-index.d.cts +9 -0
  32. package/dist/parse-ast-index.d.mts +9 -0
  33. package/dist/parse-ast-index.mjs +3 -0
  34. package/dist/shared/binding.d-Bl5Vi4GH.d.mts +1702 -0
  35. package/dist/shared/binding.d-DcFBMcjI.d.cts +1702 -0
  36. package/dist/shared/{chunk-qZFfknuJ.cjs → chunk-DDkG_k5U.cjs} +0 -1
  37. package/dist/shared/define-config.d-B2xOSmbM.d.cts +1082 -0
  38. package/dist/shared/define-config.d-USfUuKiR.d.mts +1082 -0
  39. package/dist/shared/load-config-D6gW8FDa.cjs +125 -0
  40. package/dist/shared/load-config-eyuttVHY.mjs +119 -0
  41. package/dist/shared/misc-BKp5iIef.cjs +67 -0
  42. package/dist/shared/misc-BN0nse6C.mjs +25 -0
  43. package/dist/shared/{binding-fhgdIkpS.cjs → parse-ast-index-BvK1MT-L.cjs} +347 -309
  44. package/dist/shared/{binding-Bl7VQy7c.mjs → parse-ast-index-PSQWLeSo.mjs} +334 -277
  45. package/dist/shared/prompt-8EeOGx1_.cjs +854 -0
  46. package/dist/shared/prompt-C3zHEaSG.mjs +852 -0
  47. package/dist/shared/src-C2v46mL8.cjs +4654 -0
  48. package/dist/shared/src-D-VRn8rI.mjs +4456 -0
  49. package/package.json +62 -61
  50. package/bin/cli.js +0 -2
  51. package/dist/cjs/cli.cjs +0 -769
  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/cli.mjs +0 -766
  56. package/dist/esm/experimental-index.mjs +0 -56
  57. package/dist/esm/index.mjs +0 -4
  58. package/dist/esm/parse-ast-index.mjs +0 -55
  59. package/dist/shared/consola_36c0034f-Cx52UqEq.mjs +0 -832
  60. package/dist/shared/consola_36c0034f-CynBWXXO.cjs +0 -859
  61. package/dist/shared/prompt-B58MxVuU.cjs +0 -762
  62. package/dist/shared/prompt-DjjlOckE.mjs +0 -758
  63. package/dist/shared/src-Busnx6mE.cjs +0 -2812
  64. package/dist/shared/src-DNOXsZr0.mjs +0 -2631
  65. package/dist/tsconfig.dts.tsbuildinfo +0 -1
  66. package/dist/types/api/build.d.ts +0 -18
  67. package/dist/types/api/experimental.d.ts +0 -7
  68. package/dist/types/api/rolldown/index.d.ts +0 -3
  69. package/dist/types/api/rolldown/rolldown-build.d.ts +0 -12
  70. package/dist/types/api/watch/index.d.ts +0 -3
  71. package/dist/types/api/watch/watch-emitter.d.ts +0 -31
  72. package/dist/types/api/watch/watcher.d.ts +0 -13
  73. package/dist/types/binding.d.ts +0 -1287
  74. package/dist/types/builtin-plugin/alias-plugin.d.ts +0 -10
  75. package/dist/types/builtin-plugin/constructors.d.ts +0 -20
  76. package/dist/types/builtin-plugin/replace-plugin.d.ts +0 -28
  77. package/dist/types/builtin-plugin/transform-plugin.d.ts +0 -9
  78. package/dist/types/builtin-plugin/utils.d.ts +0 -8
  79. package/dist/types/cli/arguments/alias.d.ts +0 -16
  80. package/dist/types/cli/arguments/index.d.ts +0 -15
  81. package/dist/types/cli/arguments/normalize.d.ts +0 -12
  82. package/dist/types/cli/arguments/utils.d.ts +0 -8
  83. package/dist/types/cli/colors.d.ts +0 -11
  84. package/dist/types/cli/commands/bundle.d.ts +0 -3
  85. package/dist/types/cli/commands/help.d.ts +0 -1
  86. package/dist/types/cli/index.d.ts +0 -1
  87. package/dist/types/cli/load-config.d.ts +0 -3
  88. package/dist/types/cli/logger.d.ts +0 -5
  89. package/dist/types/constants/plugin-context.d.ts +0 -7
  90. package/dist/types/constants/plugin.d.ts +0 -45
  91. package/dist/types/experimental-index.d.ts +0 -9
  92. package/dist/types/index.d.ts +0 -28
  93. package/dist/types/log/logHandler.d.ts +0 -4
  94. package/dist/types/log/logger.d.ts +0 -6
  95. package/dist/types/log/logging.d.ts +0 -11
  96. package/dist/types/log/logs.d.ts +0 -18
  97. package/dist/types/options/input-options.d.ts +0 -125
  98. package/dist/types/options/normalized-input-options.d.ts +0 -18
  99. package/dist/types/options/normalized-output-options.d.ts +0 -67
  100. package/dist/types/options/output-options.d.ts +0 -80
  101. package/dist/types/options/watch-options.d.ts +0 -5
  102. package/dist/types/parallel-plugin-worker.d.ts +0 -1
  103. package/dist/types/parallel-plugin.d.ts +0 -1
  104. package/dist/types/parse-ast-index.d.ts +0 -4
  105. package/dist/types/plugin/bindingify-build-hooks.d.ts +0 -10
  106. package/dist/types/plugin/bindingify-hook-filter.d.ts +0 -7
  107. package/dist/types/plugin/bindingify-output-hooks.d.ts +0 -14
  108. package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +0 -8
  109. package/dist/types/plugin/bindingify-plugin.d.ts +0 -15
  110. package/dist/types/plugin/bindingify-watch-hooks.d.ts +0 -5
  111. package/dist/types/plugin/hook-filter.d.ts +0 -48
  112. package/dist/types/plugin/index.d.ts +0 -126
  113. package/dist/types/plugin/minimal-plugin-context.d.ts +0 -15
  114. package/dist/types/plugin/parallel-plugin-implementation.d.ts +0 -10
  115. package/dist/types/plugin/parallel-plugin.d.ts +0 -9
  116. package/dist/types/plugin/plugin-context-data.d.ts +0 -16
  117. package/dist/types/plugin/plugin-context.d.ts +0 -52
  118. package/dist/types/plugin/plugin-driver.d.ts +0 -8
  119. package/dist/types/plugin/transform-plugin-context.d.ts +0 -17
  120. package/dist/types/types/assert.d.ts +0 -13
  121. package/dist/types/types/config-export.d.ts +0 -5
  122. package/dist/types/types/misc.d.ts +0 -40
  123. package/dist/types/types/module-info.d.ts +0 -15
  124. package/dist/types/types/module-side-effects.d.ts +0 -10
  125. package/dist/types/types/output-bundle.d.ts +0 -4
  126. package/dist/types/types/rolldown-options.d.ts +0 -5
  127. package/dist/types/types/rolldown-output.d.ts +0 -63
  128. package/dist/types/types/schema.d.ts +0 -33
  129. package/dist/types/types/sourcemap.d.ts +0 -13
  130. package/dist/types/types/utils.d.ts +0 -13
  131. package/dist/types/utils/asset-source.d.ts +0 -4
  132. package/dist/types/utils/async-flatten.d.ts +0 -1
  133. package/dist/types/utils/bindingify-input-options.d.ts +0 -7
  134. package/dist/types/utils/bindingify-output-options.d.ts +0 -3
  135. package/dist/types/utils/code-frame.d.ts +0 -1
  136. package/dist/types/utils/compose-js-plugins.d.ts +0 -2
  137. package/dist/types/utils/create-bundler-option.d.ts +0 -11
  138. package/dist/types/utils/create-bundler.d.ts +0 -8
  139. package/dist/types/utils/define-config.d.ts +0 -5
  140. package/dist/types/utils/error.d.ts +0 -2
  141. package/dist/types/utils/initialize-parallel-plugins.d.ts +0 -19
  142. package/dist/types/utils/misc.d.ts +0 -6
  143. package/dist/types/utils/normalize-hook.d.ts +0 -7
  144. package/dist/types/utils/normalize-plugin-option.d.ts +0 -13
  145. package/dist/types/utils/normalize-string-or-regex.d.ts +0 -2
  146. package/dist/types/utils/plugin/index.d.ts +0 -2
  147. package/dist/types/utils/transform-module-info.d.ts +0 -4
  148. package/dist/types/utils/transform-rendered-chunk.d.ts +0 -4
  149. package/dist/types/utils/transform-rendered-module.d.ts +0 -3
  150. package/dist/types/utils/transform-side-effects.d.ts +0 -3
  151. package/dist/types/utils/transform-sourcemap.d.ts +0 -3
  152. package/dist/types/utils/transform-to-rollup-output.d.ts +0 -11
  153. package/dist/types/utils/validator.d.ts +0 -7
@@ -1,79 +0,0 @@
1
- "use strict";
2
- const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-Busnx6mE.cjs');
4
- const require_binding = require('../shared/binding-fhgdIkpS.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-Busnx6mE.cjs');
2
- require('../shared/binding-fhgdIkpS.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-fhgdIkpS.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