rolldown 1.0.0-beta.7-commit.b7224c1 → 1.0.0-beta.7-commit.8d551a2

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 (34) hide show
  1. package/bin/cli.mjs +2 -0
  2. package/dist/{cjs/cli.cjs → cli.cjs} +4 -5
  3. package/dist/cli.mjs +1829 -0
  4. package/dist/{cjs/experimental-index.cjs → experimental-index.cjs} +3 -3
  5. package/dist/{esm/experimental-index.mjs → experimental-index.mjs} +13 -2
  6. package/dist/{cjs/index.cjs → index.cjs} +2 -2
  7. package/dist/index.mjs +5 -0
  8. package/dist/{cjs/parallel-plugin-worker.cjs → parallel-plugin-worker.cjs} +3 -4
  9. package/dist/parallel-plugin-worker.mjs +47 -0
  10. package/dist/parse-ast-index.cjs +4 -0
  11. package/dist/parse-ast-index.mjs +4 -0
  12. package/dist/shared/chunk-DUYDk_2O.mjs +33 -0
  13. package/dist/shared/{parse-ast-index-DaIG9gVZ.mjs → parse-ast-index-5U4JtZBO.mjs} +108 -110
  14. package/dist/shared/{parse-ast-index-CkTB4l_X.cjs → parse-ast-index-BfKb9n4T.cjs} +1 -1
  15. package/dist/shared/prompt-W5YHe0v6.mjs +854 -0
  16. package/dist/shared/src-B5-P3A9k.mjs +4311 -0
  17. package/dist/shared/{src-DLdaSnAQ.cjs → src-DrZP0HZs.cjs} +15 -4
  18. package/dist/tsconfig.tsbuildinfo +1 -1
  19. package/dist/types/api/rolldown/rolldown-build.d.ts +1 -0
  20. package/dist/types/binding.d.ts +8 -2
  21. package/dist/types/index.d.ts +2 -2
  22. package/dist/types/options/input-options.d.ts +5 -1
  23. package/dist/types/plugin/index.d.ts +1 -2
  24. package/package.json +39 -38
  25. package/bin/cli.js +0 -2
  26. package/dist/cjs/parse-ast-index.cjs +0 -4
  27. package/dist/esm/cli.mjs +0 -1755
  28. package/dist/esm/index.mjs +0 -4
  29. package/dist/esm/parallel-plugin-worker.mjs +0 -41
  30. package/dist/esm/parse-ast-index.mjs +0 -3
  31. package/dist/shared/prompt-C6jWWCza.mjs +0 -852
  32. package/dist/shared/src-4GSMzVRq.mjs +0 -2888
  33. /package/dist/{cjs/parallel-plugin.cjs → parallel-plugin.cjs} +0 -0
  34. /package/dist/{esm/parallel-plugin.mjs → parallel-plugin.mjs} +0 -0
@@ -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-CkTB4l_X.cjs');
3
+ const require_parse_ast_index = require('./parse-ast-index-BfKb9n4T.cjs');
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const __valibot_to_json_schema = require_chunk.__toESM(require("@valibot/to-json-schema"));
6
6
  const valibot = require_chunk.__toESM(require("valibot"));
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
9
9
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
10
10
 
11
11
  //#region package.json
12
- var version = "1.0.0-beta.7-commit.b7224c1";
12
+ var version = "1.0.0-beta.7-commit.8d551a2";
13
13
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
14
14
 
15
15
  //#endregion
@@ -1041,7 +1041,9 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
1041
1041
  });
1042
1042
  data.loadModulePromiseMap.set(id, promise);
1043
1043
  try {
1044
- await context.load(id, bindingifySideEffects(options.moduleSideEffects), resolveFn);
1044
+ await context.load(id, bindingifySideEffects(options.moduleSideEffects), (_success) => {
1045
+ resolveFn();
1046
+ });
1045
1047
  } finally {
1046
1048
  data.loadModulePromiseMap.delete(id);
1047
1049
  }
@@ -2087,7 +2089,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
2087
2089
  disableLiveBindings: inputOptions.experimental?.disableLiveBindings,
2088
2090
  viteMode: inputOptions.experimental?.viteMode,
2089
2091
  resolveNewUrlToAsset: inputOptions.experimental?.resolveNewUrlToAsset,
2090
- hmr: inputOptions.experimental?.hmr
2092
+ hmr: bindingifyHmr(inputOptions.experimental?.hmr)
2091
2093
  },
2092
2094
  profilerNames: inputOptions?.profilerNames,
2093
2095
  jsx: bindingifyJsx(inputOptions.jsx),
@@ -2109,6 +2111,12 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
2109
2111
  makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative)
2110
2112
  };
2111
2113
  }
2114
+ function bindingifyHmr(hmr) {
2115
+ if (hmr) {
2116
+ if (typeof hmr === "boolean") return hmr ? {} : void 0;
2117
+ return hmr;
2118
+ }
2119
+ }
2112
2120
  function bindingifyExternal(external) {
2113
2121
  if (external) {
2114
2122
  if (typeof external === "function") return (id, importer, isResolved) => {
@@ -2727,6 +2735,9 @@ var RolldownBuild = class {
2727
2735
  async generateHmrPatch(changedFiles) {
2728
2736
  return this.#bundler?.bundler.generateHmrPatch(changedFiles);
2729
2737
  }
2738
+ get watchFiles() {
2739
+ return this.#bundler?.bundler.watchFiles ?? [];
2740
+ }
2730
2741
  };
2731
2742
 
2732
2743
  //#endregion