rolldown 1.2.7 → 1.2.9

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 (35) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +2 -2
  4. package/dist/experimental-index.d.mts +9 -4
  5. package/dist/experimental-index.mjs +10 -9
  6. package/dist/experimental-runtime-types.d.ts +19 -0
  7. package/dist/experimental-runtime.d.ts +19 -0
  8. package/dist/experimental-runtime.mjs +42 -0
  9. package/dist/filter-index.d.mts +1 -1
  10. package/dist/index.d.mts +2 -2
  11. package/dist/index.mjs +4 -4
  12. package/dist/parallel-plugin-worker.mjs +2 -2
  13. package/dist/parallel-plugin.d.mts +1 -1
  14. package/dist/parse-ast-index.d.mts +1 -1
  15. package/dist/parse-ast-index.mjs +1 -1
  16. package/dist/plugins-index.d.mts +3 -3
  17. package/dist/plugins-index.mjs +2 -2
  18. package/dist/shared/{binding-DZuNHVw4.d.mts → binding-BTa6BPQe.d.mts} +23 -36
  19. package/dist/shared/{binding-DmImI4pj.mjs → binding-BbrDfv1x.mjs} +53 -28
  20. package/dist/shared/{bindingify-input-options-DrImMHKQ.mjs → bindingify-input-options-D4l624og.mjs} +9 -8
  21. package/dist/shared/{constructors-BM20b11r.d.mts → constructors-CmDKpWIU.d.mts} +2 -2
  22. package/dist/shared/{constructors-mRbcbLyX.mjs → constructors-D9jwEbE4.mjs} +1 -1
  23. package/dist/shared/{create-bundler-option-CjAOgWvM.mjs → create-bundler-option-DJpvtSqr.mjs} +120 -160
  24. package/dist/shared/{define-config-DNX0WekP.d.mts → define-config-BFdLpVut.d.mts} +10 -1
  25. package/dist/shared/{error-BP8lJHle.mjs → error-CGhV1ebk.mjs} +1 -1
  26. package/dist/shared/{load-config-Dd8RvLlS.mjs → load-config-qRezutA0.mjs} +1 -1
  27. package/dist/shared/{normalize-string-or-regex-Dm69lpQ-.mjs → normalize-string-or-regex-zc1bUto6.mjs} +1 -1
  28. package/dist/shared/{parse-CjRABVv7.mjs → parse-DltPb1DL.mjs} +2 -2
  29. package/dist/shared/{resolve-tsconfig-BlNGaH3Y.mjs → resolve-tsconfig-Bf6oL9fm.mjs} +2 -2
  30. package/dist/shared/{rolldown-DfXO5K1m.mjs → rolldown-Ld3ZGGCt.mjs} +4 -4
  31. package/dist/shared/{transform-CVse9_mH.d.mts → transform-DK_nCt9j.d.mts} +1 -1
  32. package/dist/shared/{watch-C94GTIM2.mjs → watch-BDSxrMiV.mjs} +4 -4
  33. package/dist/utils-index.d.mts +3 -3
  34. package/dist/utils-index.mjs +5 -5
  35. package/package.json +28 -25
@@ -1,5 +1,5 @@
1
1
  import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-xuHO4mAy.mjs";
2
- import { H as ParserOptions, I as JsxOptions, L as ManglePropertiesOptions$1, M as BindingWatcherBundler, N as ExternalMemoryStatus, R as MinifyOptions$1, U as PreRenderedChunk, c as BindingHookResolveIdExtraArgs, d as BindingMagicString, g as BindingRenderedChunk, m as BindingPluginContextResolveOptions, q as TransformOptions$1, t as BindingBuiltinPluginName, v as BindingTransformHookExtraArgs } from "./binding-DZuNHVw4.mjs";
2
+ import { H as ParserOptions, I as JsxOptions, L as ManglePropertiesOptions$1, M as BindingWatcherBundler, N as ExternalMemoryStatus, R as MinifyOptions$1, U as PreRenderedChunk, c as BindingHookResolveIdExtraArgs, d as BindingMagicString, g as BindingRenderedChunk, m as BindingPluginContextResolveOptions, q as TransformOptions$1, t as BindingBuiltinPluginName, v as BindingTransformHookExtraArgs } from "./binding-BTa6BPQe.mjs";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
  import { Program } from "@oxc-project/types";
5
5
  //#region src/types/misc.d.ts
@@ -376,6 +376,10 @@ interface CommentsOptions {
376
376
  }
377
377
  /** @inline @category Code Splitting */
378
378
  interface ChunkingContext {
379
+ /**
380
+ * The returned object and its dependency arrays are reused within the current chunking pass.
381
+ * Treat graph fields as read-only. `meta` properties and the `moduleSideEffects` field remain mutable.
382
+ */
379
383
  getModuleInfo(moduleId: string): ModuleInfo | null;
380
384
  }
381
385
  interface OutputOptions {
@@ -1612,6 +1616,11 @@ interface ChecksOptions {
1612
1616
  * @default true
1613
1617
  * */
1614
1618
  filenameConflict?: boolean;
1619
+ /**
1620
+ * Whether to emit warnings for module-level directives other than `use strict`.
1621
+ * @default true
1622
+ * */
1623
+ moduleLevelDirective?: boolean;
1615
1624
  /**
1616
1625
  * Whether to emit warnings when a CommonJS variable is used in an ES module.
1617
1626
  *
@@ -1,4 +1,4 @@
1
- import { t as require_binding } from "./binding-DmImI4pj.mjs";
1
+ import { t as require_binding } from "./binding-BbrDfv1x.mjs";
2
2
  //#region src/types/sourcemap.ts
3
3
  function bindingifySourcemap(map) {
4
4
  if (map == null) return;
@@ -1,4 +1,4 @@
1
- import { t as rolldown } from "./rolldown-DfXO5K1m.mjs";
1
+ import { t as rolldown } from "./rolldown-Ld3ZGGCt.mjs";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { readdir } from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DmImI4pj.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
2
  import { l as logPluginError, n as error } from "./logs-DmYCAKcW.mjs";
3
3
  //#region src/builtin-plugin/utils.ts
4
4
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
@@ -1,5 +1,5 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DmImI4pj.mjs";
2
- //#region ../../node_modules/.pnpm/oxc-parser@0.148.0/node_modules/oxc-parser/src-js/wrap.js
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
+ //#region ../../node_modules/.pnpm/oxc-parser@0.150.0/node_modules/oxc-parser/src-js/wrap.js
3
3
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
4
4
  function wrap(result) {
5
5
  let program, module, comments, errors;
@@ -1,5 +1,5 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DmImI4pj.mjs";
2
- import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-BP8lJHle.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
+ import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-CGhV1ebk.mjs";
3
3
  //#region src/utils/minify.ts
4
4
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
5
5
  /**
@@ -1,7 +1,7 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DmImI4pj.mjs";
2
- import { f as __decorate, h as PlainObjectLike, m as lazyProp, u as transformToRollupOutput } from "./bindingify-input-options-DrImMHKQ.mjs";
3
- import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./create-bundler-option-CjAOgWvM.mjs";
4
- import { i as unwrapBindingResult } from "./error-BP8lJHle.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
+ import { f as __decorate, h as PlainObjectLike, m as lazyProp, u as transformToRollupOutput } from "./bindingify-input-options-D4l624og.mjs";
3
+ import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./create-bundler-option-DJpvtSqr.mjs";
4
+ import { i as unwrapBindingResult } from "./error-CGhV1ebk.mjs";
5
5
  //#region src/types/rolldown-output-impl.ts
6
6
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
7
7
  var RolldownOutputImpl = class extends PlainObjectLike {
@@ -1,5 +1,5 @@
1
1
  import { a as RolldownLog } from "./logging-xuHO4mAy.mjs";
2
- import { H as ParserOptions$1, J as TsconfigCache$1, K as SourceMap, R as MinifyOptions$1, V as ParseResult$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, x as BindingTsconfigResult, z as MinifyResult$1 } from "./binding-DZuNHVw4.mjs";
2
+ import { H as ParserOptions$1, J as TsconfigCache$1, K as SourceMap, R as MinifyOptions$1, V as ParseResult$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, x as BindingTsconfigResult, z as MinifyResult$1 } from "./binding-BTa6BPQe.mjs";
3
3
  //#region src/utils/resolve-tsconfig.d.ts
4
4
  /**
5
5
  * Cache for tsconfig resolution to avoid redundant file system operations.
@@ -1,9 +1,9 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DmImI4pj.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
2
  import { s as logMultipleWatcherOption } from "./logs-DmYCAKcW.mjs";
3
- import { C as LOG_LEVEL_WARN } from "./bindingify-input-options-DrImMHKQ.mjs";
3
+ import { C as LOG_LEVEL_WARN } from "./bindingify-input-options-D4l624og.mjs";
4
4
  import { t as arraify } from "./misc-DOSKtd97.mjs";
5
- import { l as PluginDriver, t as createBundlerOptions } from "./create-bundler-option-CjAOgWvM.mjs";
6
- import { t as aggregateBindingErrorsIntoJsError } from "./error-BP8lJHle.mjs";
5
+ import { l as PluginDriver, t as createBundlerOptions } from "./create-bundler-option-DJpvtSqr.mjs";
6
+ import { t as aggregateBindingErrorsIntoJsError } from "./error-CGhV1ebk.mjs";
7
7
  //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
8
8
  /**
9
9
  * This is not the set of all possible signals.
@@ -1,8 +1,8 @@
1
- import { b as BindingTsconfigRawOptions, y as BindingTsconfigCompilerOptions } from "./shared/binding-DZuNHVw4.mjs";
2
- import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-CVse9_mH.mjs";
1
+ import { b as BindingTsconfigRawOptions, y as BindingTsconfigCompilerOptions } from "./shared/binding-BTa6BPQe.mjs";
2
+ import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-DK_nCt9j.mjs";
3
3
  import * as ESTree from "@oxc-project/types";
4
4
  import { Program } from "@oxc-project/types";
5
- //#region ../../node_modules/.pnpm/oxc-parser@0.148.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
5
+ //#region ../../node_modules/.pnpm/oxc-parser@0.150.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
6
6
  interface VisitorObject$1 {
7
7
  DebuggerStatement?: (node: ESTree.DebuggerStatement) => void;
8
8
  "DebuggerStatement:exit"?: (node: ESTree.DebuggerStatement) => void;
@@ -1,6 +1,6 @@
1
- import { n as parseSync, t as parse } from "./shared/parse-CjRABVv7.mjs";
2
- import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-BlNGaH3Y.mjs";
3
- //#region ../../node_modules/.pnpm/oxc-parser@0.148.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
1
+ import { n as parseSync, t as parse } from "./shared/parse-DltPb1DL.mjs";
2
+ import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-Bf6oL9fm.mjs";
3
+ //#region ../../node_modules/.pnpm/oxc-parser@0.150.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)) {
@@ -2008,7 +2008,7 @@ function walkTSUnionType(node, visitors) {
2008
2008
  exit !== null && exit(node);
2009
2009
  }
2010
2010
  //#endregion
2011
- //#region ../../node_modules/.pnpm/oxc-parser@0.148.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2011
+ //#region ../../node_modules/.pnpm/oxc-parser@0.150.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2012
2012
  /** Mapping from node type name to node type ID */
2013
2013
  const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
2014
2014
  ["DebuggerStatement", 0],
@@ -2178,7 +2178,7 @@ const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
2178
2178
  ["TSUnionType", 164]
2179
2179
  ]);
2180
2180
  //#endregion
2181
- //#region ../../node_modules/.pnpm/oxc-parser@0.148.0/node_modules/oxc-parser/src-js/visit/visitor.js
2181
+ //#region ../../node_modules/.pnpm/oxc-parser@0.150.0/node_modules/oxc-parser/src-js/visit/visitor.js
2182
2182
  let compiledVisitor;
2183
2183
  function createCompiledVisitor() {
2184
2184
  compiledVisitor = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "keywords": [
6
6
  "bundler",
@@ -11,6 +11,9 @@
11
11
  "webpack"
12
12
  ],
13
13
  "homepage": "https://rolldown.rs/",
14
+ "bugs": {
15
+ "url": "https://github.com/rolldown/rolldown/issues"
16
+ },
14
17
  "license": "MIT",
15
18
  "repository": {
16
19
  "type": "git",
@@ -61,31 +64,31 @@
61
64
  "registry": "https://registry.npmjs.org/"
62
65
  },
63
66
  "dependencies": {
64
- "@oxc-project/types": "=0.148.0",
67
+ "@oxc-project/types": "=0.150.0",
65
68
  "@rolldown/pluginutils": "^1.0.0"
66
69
  },
67
70
  "devDependencies": {
68
- "@emnapi/core": "2.0.0-alpha.4",
69
- "@emnapi/runtime": "2.0.0-alpha.4",
70
- "@napi-rs/cli": "^3.8.2",
71
+ "@emnapi/core": "2.0.0-alpha.5",
72
+ "@emnapi/runtime": "2.0.0-alpha.5",
73
+ "@napi-rs/cli": "^3.10.0",
71
74
  "@napi-rs/wasm-runtime": "~1.2.2",
72
75
  "@oxc-node/cli": "^0.1.0",
73
76
  "cac": "^7.0.0",
74
77
  "consola": "^3.4.2",
75
- "emnapi": "2.0.0-alpha.4",
78
+ "emnapi": "2.0.0-alpha.5",
76
79
  "execa": "^9.2.0",
77
80
  "fresh-import": "^0.2.1",
78
81
  "glob": "^13.0.0",
79
- "oxc-parser": "=0.148.0",
82
+ "oxc-parser": "=0.150.0",
80
83
  "pathe": "^2.0.3",
81
- "remeda": "^2.45.0",
82
- "rolldown": "1.2.7",
84
+ "remeda": "^2.48.0",
85
+ "rolldown": "1.2.9",
83
86
  "rolldown-plugin-dts": "^0.28.0",
84
87
  "rollup": "^4.63.0",
85
88
  "signal-exit": "4.1.0",
86
89
  "source-map": "0.8.0",
87
90
  "typescript": "^6.0.0",
88
- "valibot": "1.4.2"
91
+ "valibot": "1.5.0"
89
92
  },
90
93
  "napi": {
91
94
  "binaryName": "rolldown-binding",
@@ -122,21 +125,21 @@
122
125
  "node": "^20.19.0 || >=22.12.0"
123
126
  },
124
127
  "optionalDependencies": {
125
- "@rolldown/binding-darwin-arm64": "1.2.7",
126
- "@rolldown/binding-android-arm64": "1.2.7",
127
- "@rolldown/binding-win32-arm64-msvc": "1.2.7",
128
- "@rolldown/binding-linux-arm64-gnu": "1.2.7",
129
- "@rolldown/binding-linux-arm64-musl": "1.2.7",
130
- "@rolldown/binding-openharmony-arm64": "1.2.7",
131
- "@rolldown/binding-android-arm-eabi": "1.2.7",
132
- "@rolldown/binding-linux-arm-gnueabihf": "1.2.7",
133
- "@rolldown/binding-linux-ppc64-gnu": "1.2.7",
134
- "@rolldown/binding-linux-s390x-gnu": "1.2.7",
135
- "@rolldown/binding-darwin-x64": "1.2.7",
136
- "@rolldown/binding-win32-x64-msvc": "1.2.7",
137
- "@rolldown/binding-freebsd-x64": "1.2.7",
138
- "@rolldown/binding-linux-x64-gnu": "1.2.7",
139
- "@rolldown/binding-linux-x64-musl": "1.2.7"
128
+ "@rolldown/binding-darwin-arm64": "1.2.9",
129
+ "@rolldown/binding-android-arm64": "1.2.9",
130
+ "@rolldown/binding-win32-arm64-msvc": "1.2.9",
131
+ "@rolldown/binding-linux-arm64-gnu": "1.2.9",
132
+ "@rolldown/binding-linux-arm64-musl": "1.2.9",
133
+ "@rolldown/binding-openharmony-arm64": "1.2.9",
134
+ "@rolldown/binding-android-arm-eabi": "1.2.9",
135
+ "@rolldown/binding-linux-arm-gnueabihf": "1.2.9",
136
+ "@rolldown/binding-linux-ppc64-gnu": "1.2.9",
137
+ "@rolldown/binding-linux-s390x-gnu": "1.2.9",
138
+ "@rolldown/binding-darwin-x64": "1.2.9",
139
+ "@rolldown/binding-win32-x64-msvc": "1.2.9",
140
+ "@rolldown/binding-freebsd-x64": "1.2.9",
141
+ "@rolldown/binding-linux-x64-gnu": "1.2.9",
142
+ "@rolldown/binding-linux-x64-musl": "1.2.9"
140
143
  },
141
144
  "scripts": {
142
145
  "# Scrips for binding #": "_",