rolldown 1.0.0-beta.7 → 1.0.0-beta.7-commit.c6972f4

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-dFNL8gOq.cjs');
3
+ const require_src = require('../shared/src-B6jB5g3D.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-C8v5UEr2.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-dFNL8gOq.cjs');
3
+ const require_src = require('../shared/src-B6jB5g3D.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-C8v5UEr2.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-dFNL8gOq.cjs');
1
+ const require_src = require('../shared/src-B6jB5g3D.cjs');
2
2
  require('../shared/parse-ast-index-C8v5UEr2.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-dFNL8gOq.cjs');
3
+ const require_src = require('../shared/src-B6jB5g3D.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-C8v5UEr2.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
- import { colors } from "../shared/parse-ast-index-BN2JFoRu.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-DcMgB17h.mjs";
1
+ import { colors } from "../shared/parse-ast-index-Ca0DdpwB.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-DEJ6BqAM.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
- import { import_binding } from "../shared/parse-ast-index-BN2JFoRu.mjs";
2
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-DcMgB17h.mjs";
1
+ import { import_binding } from "../shared/parse-ast-index-Ca0DdpwB.mjs";
2
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-DEJ6BqAM.mjs";
3
3
  import { pathToFileURL } from "node:url";
4
4
 
5
5
  //#region src/plugin/parallel-plugin.ts
@@ -1,4 +1,4 @@
1
- import "../shared/parse-ast-index-BN2JFoRu.mjs";
2
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-DcMgB17h.mjs";
1
+ import "../shared/parse-ast-index-Ca0DdpwB.mjs";
2
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-DEJ6BqAM.mjs";
3
3
 
4
4
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,5 +1,5 @@
1
- import { import_binding } from "../shared/parse-ast-index-BN2JFoRu.mjs";
2
- import { PluginContextData, bindingifyPlugin } from "../shared/src-DcMgB17h.mjs";
1
+ import { import_binding } from "../shared/parse-ast-index-Ca0DdpwB.mjs";
2
+ import { PluginContextData, bindingifyPlugin } from "../shared/src-DEJ6BqAM.mjs";
3
3
  import { parentPort, workerData } from "node:worker_threads";
4
4
 
5
5
  //#region src/parallel-plugin-worker.ts
@@ -1,3 +1,3 @@
1
- import { parseAst, parseAstAsync } from "../shared/parse-ast-index-BN2JFoRu.mjs";
1
+ import { parseAst, parseAstAsync } from "../shared/parse-ast-index-Ca0DdpwB.mjs";
2
2
 
3
3
  export { parseAst, parseAstAsync };
@@ -278,6 +278,45 @@ function augmentCodeLocation(properties, pos, source, id) {
278
278
  }
279
279
  }
280
280
 
281
+ //#endregion
282
+ //#region src/webcontainer-fallback.js
283
+ var require_webcontainer_fallback = __commonJS({ "src/webcontainer-fallback.js"(exports, module) {
284
+ const fs = __require("node:fs");
285
+ const childProcess = __require("node:child_process");
286
+ const rolldownPkg = JSON.parse(fs.readFileSync(__require.resolve("rolldown/package.json"), "utf-8"));
287
+ const version = rolldownPkg.version;
288
+ const baseDir = `/tmp/rolldown-${version}`;
289
+ const bindingEntry = `${baseDir}/node_modules/@rolldown/binding-wasm32-wasi/rolldown-binding.wasi.cjs`;
290
+ if (!fs.existsSync(bindingEntry)) {
291
+ let bindingPkg = `@rolldown/binding-wasm32-wasi@${version}`;
292
+ try {
293
+ const info = JSON.parse(childProcess.execFileSync("npm", [
294
+ "why",
295
+ "--json",
296
+ "rolldown"
297
+ ], { encoding: "utf-8" }));
298
+ const spec = info[0].dependents[0].spec;
299
+ if (spec.startsWith("https://pkg.pr.new/")) {
300
+ const commit = spec.split("@").at(-1);
301
+ bindingPkg = `https://pkg.pr.new/@rolldown/binding-wasm32-wasi@${commit}`;
302
+ }
303
+ } catch (e) {
304
+ console.error(e);
305
+ }
306
+ fs.rmSync(baseDir, {
307
+ recursive: true,
308
+ force: true
309
+ });
310
+ fs.mkdirSync(baseDir, { recursive: true });
311
+ console.log(`[rolldown] Downloading ${bindingPkg} on WebContainer...`);
312
+ childProcess.execFileSync("pnpm", ["i", bindingPkg], {
313
+ cwd: baseDir,
314
+ stdio: "inherit"
315
+ });
316
+ }
317
+ module.exports = __require(bindingEntry);
318
+ } });
319
+
281
320
  //#endregion
282
321
  //#region src/binding.js
283
322
  var require_binding = __commonJS({ "src/binding.js"(exports, module) {
@@ -568,6 +607,11 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
568
607
  if (process.env.NAPI_RS_FORCE_WASI) loadErrors.push(err);
569
608
  }
570
609
  }
610
+ if (!nativeBinding && globalThis.process?.versions?.["webcontainer"]) try {
611
+ nativeBinding = require_webcontainer_fallback();
612
+ } catch (err) {
613
+ loadErrors.push(err);
614
+ }
571
615
  if (!nativeBinding) {
572
616
  if (loadErrors.length > 0) throw new Error("Failed to load native binding", { cause: loadErrors });
573
617
  throw new Error(`Failed to load native binding`);
@@ -2861,7 +2861,7 @@ const watch = (input) => {
2861
2861
 
2862
2862
  //#endregion
2863
2863
  //#region package.json
2864
- var version = "1.0.0-beta.7";
2864
+ var version = "1.0.0-beta.7-commit.c6972f4";
2865
2865
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2866
2866
 
2867
2867
  //#endregion
@@ -1,4 +1,4 @@
1
- import { augmentCodeLocation, colors, error, import_binding, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-BN2JFoRu.mjs";
1
+ import { augmentCodeLocation, colors, error, import_binding, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-Ca0DdpwB.mjs";
2
2
  import path from "node:path";
3
3
  import * as v from "valibot";
4
4
  import { toJsonSchema } from "@valibot/to-json-schema";
@@ -2859,7 +2859,7 @@ const watch = (input) => {
2859
2859
 
2860
2860
  //#endregion
2861
2861
  //#region package.json
2862
- var version = "1.0.0-beta.7";
2862
+ var version = "1.0.0-beta.7-commit.c6972f4";
2863
2863
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2864
2864
 
2865
2865
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.7",
3
+ "version": "1.0.0-beta.7-commit.c6972f4",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "repository": {
@@ -123,21 +123,21 @@
123
123
  "unbuild": "^3.0.0",
124
124
  "why-is-node-running": "^3.0.0",
125
125
  "@rolldown/testing": "0.0.1",
126
- "rolldown": "1.0.0-beta.7"
126
+ "rolldown": "1.0.0-beta.7-commit.c6972f4"
127
127
  },
128
128
  "optionalDependencies": {
129
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.7",
130
- "@rolldown/binding-darwin-x64": "1.0.0-beta.7",
131
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.7",
132
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.7",
133
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.7",
134
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.7",
135
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.7",
136
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.7",
137
- "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.7",
138
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.7",
139
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.7",
140
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.7"
129
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.7-commit.c6972f4",
130
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.7-commit.c6972f4",
131
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.7-commit.c6972f4",
132
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.7-commit.c6972f4",
133
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.7-commit.c6972f4",
134
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.7-commit.c6972f4",
135
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.7-commit.c6972f4",
136
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.7-commit.c6972f4",
137
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.7-commit.c6972f4",
138
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.7-commit.c6972f4",
139
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.7-commit.c6972f4",
140
+ "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.7-commit.c6972f4"
141
141
  },
142
142
  "scripts": {
143
143
  "# Scrips for binding #": "_",