rolldown 1.0.0-beta.3-commit.73fa972 → 1.0.0-beta.3-commit.7b0c517

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/dist/cjs/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-Ddi0ioIv.cjs');
3
+ const require_src = require('../shared/src-1SOKv3Pa.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-Dh_sWnMa.cjs');
5
5
  const node_process = require_chunk.__toESM(require("node:process"));
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-Ddi0ioIv.cjs');
3
+ const require_src = require('../shared/src-1SOKv3Pa.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-Dh_sWnMa.cjs');
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
6
6
 
@@ -1,4 +1,4 @@
1
- const require_src = require('../shared/src-Ddi0ioIv.cjs');
1
+ const require_src = require('../shared/src-1SOKv3Pa.cjs');
2
2
  require('../shared/parse-ast-index-Dh_sWnMa.cjs');
3
3
 
4
4
  exports.VERSION = require_src.VERSION
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-Ddi0ioIv.cjs');
3
+ const require_src = require('../shared/src-1SOKv3Pa.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-Dh_sWnMa.cjs');
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
6
 
package/dist/esm/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { colors } from "../shared/parse-ast-index-DIxeQDpE.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-COxk9RoQ.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-Cdwah9uk.mjs";
3
3
  import process$1, { cwd } from "node:process";
4
4
  import path, { sep } from "node:path";
5
5
  import fs from "node:fs";
@@ -1,5 +1,5 @@
1
1
  import { import_binding } from "../shared/parse-ast-index-DIxeQDpE.mjs";
2
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-COxk9RoQ.mjs";
2
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-Cdwah9uk.mjs";
3
3
  import { pathToFileURL } from "node:url";
4
4
 
5
5
  //#region src/plugin/parallel-plugin.ts
@@ -1,4 +1,4 @@
1
1
  import "../shared/parse-ast-index-DIxeQDpE.mjs";
2
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-COxk9RoQ.mjs";
2
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-Cdwah9uk.mjs";
3
3
 
4
4
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,5 +1,5 @@
1
1
  import { import_binding } from "../shared/parse-ast-index-DIxeQDpE.mjs";
2
- import { PluginContextData, bindingifyPlugin } from "../shared/src-COxk9RoQ.mjs";
2
+ import { PluginContextData, bindingifyPlugin } from "../shared/src-Cdwah9uk.mjs";
3
3
  import { parentPort, workerData } from "node:worker_threads";
4
4
 
5
5
  //#region src/parallel-plugin-worker.ts
@@ -524,7 +524,10 @@ const ResolveOptionsSchema = valibot.strictObject({
524
524
  symlinks: valibot.optional(valibot.boolean()),
525
525
  tsconfigFilename: valibot.optional(valibot.string())
526
526
  });
527
- const TreeshakingOptionsSchema = valibot.union([valibot.boolean(), valibot.looseObject({ annotations: valibot.optional(valibot.boolean()) })]);
527
+ const TreeshakingOptionsSchema = valibot.union([valibot.boolean(), valibot.looseObject({
528
+ annotations: valibot.optional(valibot.boolean()),
529
+ manualPureFunctions: valibot.optional(valibot.array(valibot.string()))
530
+ })]);
528
531
  const OnLogSchema = valibot.pipe(valibot.function(), valibot.args(valibot.tuple([
529
532
  LogLevelSchema,
530
533
  RollupLogSchema,
@@ -2164,7 +2167,11 @@ function bindingifyTreeshakeOptions(config) {
2164
2167
  moduleSideEffects: true,
2165
2168
  annotations: true
2166
2169
  };
2167
- let normalizedConfig = { moduleSideEffects: true };
2170
+ let normalizedConfig = {
2171
+ moduleSideEffects: true,
2172
+ annotations: config.annotations ?? true,
2173
+ manualPureFunctions: config.manualPureFunctions
2174
+ };
2168
2175
  if (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;
2169
2176
  else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
2170
2177
  external: true,
@@ -2174,7 +2181,6 @@ function bindingifyTreeshakeOptions(config) {
2174
2181
  sideEffects: true
2175
2182
  }];
2176
2183
  else normalizedConfig.moduleSideEffects = config.moduleSideEffects;
2177
- normalizedConfig.annotations = config.annotations ?? true;
2178
2184
  return normalizedConfig;
2179
2185
  }
2180
2186
 
@@ -2789,7 +2795,7 @@ const watch = (input) => {
2789
2795
 
2790
2796
  //#endregion
2791
2797
  //#region package.json
2792
- var version = "1.0.0-beta.3-commit.73fa972";
2798
+ var version = "1.0.0-beta.3-commit.7b0c517";
2793
2799
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2794
2800
 
2795
2801
  //#endregion
@@ -522,7 +522,10 @@ const ResolveOptionsSchema = v.strictObject({
522
522
  symlinks: v.optional(v.boolean()),
523
523
  tsconfigFilename: v.optional(v.string())
524
524
  });
525
- const TreeshakingOptionsSchema = v.union([v.boolean(), v.looseObject({ annotations: v.optional(v.boolean()) })]);
525
+ const TreeshakingOptionsSchema = v.union([v.boolean(), v.looseObject({
526
+ annotations: v.optional(v.boolean()),
527
+ manualPureFunctions: v.optional(v.array(v.string()))
528
+ })]);
526
529
  const OnLogSchema = v.pipe(v.function(), v.args(v.tuple([
527
530
  LogLevelSchema,
528
531
  RollupLogSchema,
@@ -2162,7 +2165,11 @@ function bindingifyTreeshakeOptions(config) {
2162
2165
  moduleSideEffects: true,
2163
2166
  annotations: true
2164
2167
  };
2165
- let normalizedConfig = { moduleSideEffects: true };
2168
+ let normalizedConfig = {
2169
+ moduleSideEffects: true,
2170
+ annotations: config.annotations ?? true,
2171
+ manualPureFunctions: config.manualPureFunctions
2172
+ };
2166
2173
  if (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;
2167
2174
  else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
2168
2175
  external: true,
@@ -2172,7 +2179,6 @@ function bindingifyTreeshakeOptions(config) {
2172
2179
  sideEffects: true
2173
2180
  }];
2174
2181
  else normalizedConfig.moduleSideEffects = config.moduleSideEffects;
2175
- normalizedConfig.annotations = config.annotations ?? true;
2176
2182
  return normalizedConfig;
2177
2183
  }
2178
2184
 
@@ -2787,7 +2793,7 @@ const watch = (input) => {
2787
2793
 
2788
2794
  //#endregion
2789
2795
  //#region package.json
2790
- var version = "1.0.0-beta.3-commit.73fa972";
2796
+ var version = "1.0.0-beta.3-commit.7b0c517";
2791
2797
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2792
2798
 
2793
2799
  //#endregion
@@ -663,6 +663,7 @@ export interface BindingTransformPluginConfig {
663
663
  export interface BindingTreeshake {
664
664
  moduleSideEffects: boolean | BindingModuleSideEffectsRule[] | ((id: string, is_external: boolean) => boolean | undefined)
665
665
  annotations?: boolean
666
+ manualPureFunctions?: Array<string>
666
667
  }
667
668
 
668
669
  export interface BindingViteResolvePluginConfig {
@@ -7,4 +7,5 @@ export type ModuleSideEffectsOption = boolean | ModuleSideEffectsRule[] | ((id:
7
7
  export type TreeshakingOptions = {
8
8
  moduleSideEffects?: ModuleSideEffectsOption;
9
9
  annotations?: boolean;
10
+ manualPureFunctions?: string[];
10
11
  } | boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.3-commit.73fa972",
3
+ "version": "1.0.0-beta.3-commit.7b0c517",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "repository": {
@@ -122,21 +122,21 @@
122
122
  "unbuild": "^3.0.0",
123
123
  "why-is-node-running": "^3.0.0",
124
124
  "@rolldown/testing": "0.0.1",
125
- "rolldown": "1.0.0-beta.3-commit.73fa972"
125
+ "rolldown": "1.0.0-beta.3-commit.7b0c517"
126
126
  },
127
127
  "optionalDependencies": {
128
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.73fa972",
129
- "@rolldown/binding-darwin-x64": "1.0.0-beta.3-commit.73fa972",
130
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.3-commit.73fa972",
131
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.3-commit.73fa972",
132
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.3-commit.73fa972",
133
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.3-commit.73fa972",
134
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.3-commit.73fa972",
135
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.3-commit.73fa972",
136
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.3-commit.73fa972",
137
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.73fa972",
138
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.3-commit.73fa972",
139
- "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.3-commit.73fa972"
128
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.7b0c517",
129
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.3-commit.7b0c517",
130
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.3-commit.7b0c517",
131
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.3-commit.7b0c517",
132
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.3-commit.7b0c517",
133
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.3-commit.7b0c517",
134
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.3-commit.7b0c517",
135
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.3-commit.7b0c517",
136
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.3-commit.7b0c517",
137
+ "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.3-commit.7b0c517",
138
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.3-commit.7b0c517",
139
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.7b0c517"
140
140
  },
141
141
  "scripts": {
142
142
  "# Scrips for binding #": "_",