rolldown 0.14.0-snapshot-92a5443-20241127113838 → 0.14.0-snapshot-5e571e4-20241128015029

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-BK2Ye-xa.cjs');
3
- const require_src = require('../shared/src-DFRPnBbx.cjs');
3
+ const require_src = require('../shared/src-DYbOGfdP.cjs');
4
4
  const require_consola_36c0034f = require('../shared/consola_36c0034f--b2gQiI0.cjs');
5
5
  const zod = require_chunk.__toESM(require("zod"));
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
@@ -1546,7 +1546,8 @@ const inputOptionsSchema = zod.z.strictObject({
1546
1546
  experimental: zod.z.strictObject({
1547
1547
  enableComposingJsPlugins: zod.z.boolean().optional(),
1548
1548
  strictExecutionOrder: zod.z.boolean().optional(),
1549
- disableLiveBindings: zod.z.boolean().optional()
1549
+ disableLiveBindings: zod.z.boolean().optional(),
1550
+ resolveNewUrlToAsset: zod.z.boolean().optional()
1550
1551
  }).optional(),
1551
1552
  define: zod.z.record(zod.z.string()).describe("Define global variables").optional(),
1552
1553
  inject: zod.z.record(zod.z.string().or(zod.z.tuple([zod.z.string(), zod.z.string()]))).optional(),
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-BK2Ye-xa.cjs');
3
- const require_src = require('../shared/src-DFRPnBbx.cjs');
3
+ const require_src = require('../shared/src-DYbOGfdP.cjs');
4
4
  const node_url = require_chunk.__toESM(require("node:url"));
5
5
 
6
6
  //#region src/plugin/parallel-plugin.ts
@@ -1,4 +1,4 @@
1
- const require_src = require('../shared/src-DFRPnBbx.cjs');
1
+ const require_src = require('../shared/src-DYbOGfdP.cjs');
2
2
 
3
3
  exports.VERSION = require_src.VERSION
4
4
  exports.defineConfig = require_src.defineConfig
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-BK2Ye-xa.cjs');
3
- const require_src = require('../shared/src-DFRPnBbx.cjs');
3
+ const require_src = require('../shared/src-DYbOGfdP.cjs');
4
4
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
5
5
 
6
6
  //#region src/parallel-plugin-worker.ts
package/dist/esm/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, __export, arraify, description, rolldown, version, watch } from "../shared/src-DfJJcn6t.mjs";
1
+ import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, __export, arraify, description, rolldown, version, watch } from "../shared/src-8RR4HLh5.mjs";
2
2
  import { createConsola } from "../shared/consola_36c0034f-DWsVjwtA.mjs";
3
3
  import { ZodFirstPartyTypeKind, ZodFirstPartyTypeKind as ZodFirstPartyTypeKind$1, ZodFirstPartyTypeKind as ZodFirstPartyTypeKind$2, z, z as z$1, z as z$2, z as z$3 } from "zod";
4
4
  import nodePath, { default as path } from "node:path";
@@ -1543,7 +1543,8 @@ const inputOptionsSchema = z$2.strictObject({
1543
1543
  experimental: z$2.strictObject({
1544
1544
  enableComposingJsPlugins: z$2.boolean().optional(),
1545
1545
  strictExecutionOrder: z$2.boolean().optional(),
1546
- disableLiveBindings: z$2.boolean().optional()
1546
+ disableLiveBindings: z$2.boolean().optional(),
1547
+ resolveNewUrlToAsset: z$2.boolean().optional()
1547
1548
  }).optional(),
1548
1549
  define: z$2.record(z$2.string()).describe("Define global variables").optional(),
1549
1550
  inject: z$2.record(z$2.string().or(z$2.tuple([z$2.string(), z$2.string()]))).optional(),
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin, __toESM, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, require_binding, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-DfJJcn6t.mjs";
1
+ import { BuiltinPlugin, __toESM, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, require_binding, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-8RR4HLh5.mjs";
2
2
  import { pathToFileURL } from "node:url";
3
3
 
4
4
  //#region src/plugin/parallel-plugin.ts
@@ -1,3 +1,3 @@
1
- import { VERSION, defineConfig, rolldown, watch } from "../shared/src-DfJJcn6t.mjs";
1
+ import { VERSION, defineConfig, rolldown, watch } from "../shared/src-8RR4HLh5.mjs";
2
2
 
3
3
  export { VERSION, defineConfig, rolldown, watch };
@@ -1,4 +1,4 @@
1
- import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-DfJJcn6t.mjs";
1
+ import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-8RR4HLh5.mjs";
2
2
  import { parentPort, workerData } from "node:worker_threads";
3
3
 
4
4
  //#region src/parallel-plugin-worker.ts
@@ -1392,16 +1392,15 @@ function bindingifyResolveId(args) {
1392
1392
  external: true
1393
1393
  };
1394
1394
  if (typeof ret === "string") return { id: ret };
1395
- const result = {
1396
- id: ret.id,
1397
- external: ret.external
1398
- };
1399
- if (ret.moduleSideEffects !== null) result.sideEffects = bindingifySideEffects(ret.moduleSideEffects);
1400
1395
  args.pluginContextData.updateModuleOption(ret.id, {
1401
1396
  meta: ret.meta || {},
1402
1397
  moduleSideEffects: ret.moduleSideEffects || null
1403
1398
  });
1404
- return result;
1399
+ return {
1400
+ id: ret.id,
1401
+ external: ret.external,
1402
+ sideEffects: bindingifySideEffects(ret.moduleSideEffects)
1403
+ };
1405
1404
  },
1406
1405
  meta: bindingifyPluginHookMeta(meta),
1407
1406
  filter: bindingifyResolveIdFilter(options.filter)
@@ -1467,18 +1466,17 @@ function bindingifyLoad(args) {
1467
1466
  const ret = await handler.call(new PluginContext(ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, id), id);
1468
1467
  if (ret == null) return;
1469
1468
  if (typeof ret === "string") return { code: ret };
1470
- let map = preProcessSourceMap(ret, id);
1471
- const result = {
1472
- code: ret.code,
1473
- map: map !== undefined ? bindingifySourcemap$1(map) : undefined,
1474
- moduleType: ret.moduleType
1475
- };
1476
- if (ret.moduleSideEffects !== null) result.sideEffects = bindingifySideEffects(ret.moduleSideEffects);
1477
1469
  args.pluginContextData.updateModuleOption(id, {
1478
1470
  meta: ret.meta || {},
1479
1471
  moduleSideEffects: ret.moduleSideEffects || null
1480
1472
  });
1481
- return result;
1473
+ let map = preProcessSourceMap(ret, id);
1474
+ return {
1475
+ code: ret.code,
1476
+ map: bindingifySourcemap$1(map),
1477
+ moduleType: ret.moduleType,
1478
+ sideEffects: bindingifySideEffects(ret.moduleSideEffects)
1479
+ };
1482
1480
  },
1483
1481
  meta: bindingifyPluginHookMeta(meta),
1484
1482
  filter: bindingifyLoadFilter(options.filter)
@@ -1955,7 +1953,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, onLog,
1955
1953
  experimental: {
1956
1954
  strictExecutionOrder: inputOptions.experimental?.strictExecutionOrder,
1957
1955
  disableLiveBindings: inputOptions.experimental?.disableLiveBindings,
1958
- viteMode: inputOptions.experimental?.viteMode
1956
+ viteMode: inputOptions.experimental?.viteMode,
1957
+ resolveNewUrlToAsset: inputOptions.experimental?.resolveNewUrlToAsset
1959
1958
  },
1960
1959
  profilerNames: inputOptions?.profilerNames,
1961
1960
  jsx: bindingifyJsx(inputOptions.jsx),
@@ -1360,16 +1360,15 @@ function bindingifyResolveId(args) {
1360
1360
  external: true
1361
1361
  };
1362
1362
  if (typeof ret === "string") return { id: ret };
1363
- const result = {
1364
- id: ret.id,
1365
- external: ret.external
1366
- };
1367
- if (ret.moduleSideEffects !== null) result.sideEffects = bindingifySideEffects(ret.moduleSideEffects);
1368
1363
  args.pluginContextData.updateModuleOption(ret.id, {
1369
1364
  meta: ret.meta || {},
1370
1365
  moduleSideEffects: ret.moduleSideEffects || null
1371
1366
  });
1372
- return result;
1367
+ return {
1368
+ id: ret.id,
1369
+ external: ret.external,
1370
+ sideEffects: bindingifySideEffects(ret.moduleSideEffects)
1371
+ };
1373
1372
  },
1374
1373
  meta: bindingifyPluginHookMeta(meta),
1375
1374
  filter: bindingifyResolveIdFilter(options.filter)
@@ -1435,18 +1434,17 @@ function bindingifyLoad(args) {
1435
1434
  const ret = await handler.call(new PluginContext(ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, id), id);
1436
1435
  if (ret == null) return;
1437
1436
  if (typeof ret === "string") return { code: ret };
1438
- let map = preProcessSourceMap(ret, id);
1439
- const result = {
1440
- code: ret.code,
1441
- map: map !== undefined ? bindingifySourcemap$1(map) : undefined,
1442
- moduleType: ret.moduleType
1443
- };
1444
- if (ret.moduleSideEffects !== null) result.sideEffects = bindingifySideEffects(ret.moduleSideEffects);
1445
1437
  args.pluginContextData.updateModuleOption(id, {
1446
1438
  meta: ret.meta || {},
1447
1439
  moduleSideEffects: ret.moduleSideEffects || null
1448
1440
  });
1449
- return result;
1441
+ let map = preProcessSourceMap(ret, id);
1442
+ return {
1443
+ code: ret.code,
1444
+ map: bindingifySourcemap$1(map),
1445
+ moduleType: ret.moduleType,
1446
+ sideEffects: bindingifySideEffects(ret.moduleSideEffects)
1447
+ };
1450
1448
  },
1451
1449
  meta: bindingifyPluginHookMeta(meta),
1452
1450
  filter: bindingifyLoadFilter(options.filter)
@@ -1923,7 +1921,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, onLog,
1923
1921
  experimental: {
1924
1922
  strictExecutionOrder: inputOptions.experimental?.strictExecutionOrder,
1925
1923
  disableLiveBindings: inputOptions.experimental?.disableLiveBindings,
1926
- viteMode: inputOptions.experimental?.viteMode
1924
+ viteMode: inputOptions.experimental?.viteMode,
1925
+ resolveNewUrlToAsset: inputOptions.experimental?.resolveNewUrlToAsset
1927
1926
  },
1928
1927
  profilerNames: inputOptions?.profilerNames,
1929
1928
  jsx: bindingifyJsx(inputOptions.jsx),
@@ -216,6 +216,7 @@ export interface BindingExperimentalOptions {
216
216
  strictExecutionOrder?: boolean
217
217
  disableLiveBindings?: boolean
218
218
  viteMode?: boolean
219
+ resolveNewUrlToAsset?: boolean
219
220
  }
220
221
 
221
222
  export interface BindingGeneralHookFilter {
@@ -127,13 +127,16 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
127
127
  enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;
128
128
  strictExecutionOrder: z.ZodOptional<z.ZodBoolean>;
129
129
  disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
130
+ resolveNewUrlToAsset: z.ZodOptional<z.ZodBoolean>;
130
131
  }, "strict", z.ZodTypeAny, {
131
132
  strictExecutionOrder?: boolean | undefined;
132
133
  disableLiveBindings?: boolean | undefined;
134
+ resolveNewUrlToAsset?: boolean | undefined;
133
135
  enableComposingJsPlugins?: boolean | undefined;
134
136
  }, {
135
137
  strictExecutionOrder?: boolean | undefined;
136
138
  disableLiveBindings?: boolean | undefined;
139
+ resolveNewUrlToAsset?: boolean | undefined;
137
140
  enableComposingJsPlugins?: boolean | undefined;
138
141
  }>>;
139
142
  define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -122,13 +122,16 @@ export declare const inputOptionsSchema: z.ZodObject<{
122
122
  enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;
123
123
  strictExecutionOrder: z.ZodOptional<z.ZodBoolean>;
124
124
  disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
125
+ resolveNewUrlToAsset: z.ZodOptional<z.ZodBoolean>;
125
126
  }, "strict", z.ZodTypeAny, {
126
127
  strictExecutionOrder?: boolean | undefined;
127
128
  disableLiveBindings?: boolean | undefined;
129
+ resolveNewUrlToAsset?: boolean | undefined;
128
130
  enableComposingJsPlugins?: boolean | undefined;
129
131
  }, {
130
132
  strictExecutionOrder?: boolean | undefined;
131
133
  disableLiveBindings?: boolean | undefined;
134
+ resolveNewUrlToAsset?: boolean | undefined;
132
135
  enableComposingJsPlugins?: boolean | undefined;
133
136
  }>>;
134
137
  define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -262,6 +265,7 @@ export declare const inputOptionsSchema: z.ZodObject<{
262
265
  experimental?: {
263
266
  strictExecutionOrder?: boolean | undefined;
264
267
  disableLiveBindings?: boolean | undefined;
268
+ resolveNewUrlToAsset?: boolean | undefined;
265
269
  enableComposingJsPlugins?: boolean | undefined;
266
270
  } | undefined;
267
271
  profilerNames?: boolean | undefined;
@@ -338,6 +342,7 @@ export declare const inputOptionsSchema: z.ZodObject<{
338
342
  experimental?: {
339
343
  strictExecutionOrder?: boolean | undefined;
340
344
  disableLiveBindings?: boolean | undefined;
345
+ resolveNewUrlToAsset?: boolean | undefined;
341
346
  enableComposingJsPlugins?: boolean | undefined;
342
347
  } | undefined;
343
348
  profilerNames?: boolean | undefined;
@@ -469,13 +474,16 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extend
469
474
  enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;
470
475
  strictExecutionOrder: z.ZodOptional<z.ZodBoolean>;
471
476
  disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
477
+ resolveNewUrlToAsset: z.ZodOptional<z.ZodBoolean>;
472
478
  }, "strict", z.ZodTypeAny, {
473
479
  strictExecutionOrder?: boolean | undefined;
474
480
  disableLiveBindings?: boolean | undefined;
481
+ resolveNewUrlToAsset?: boolean | undefined;
475
482
  enableComposingJsPlugins?: boolean | undefined;
476
483
  }, {
477
484
  strictExecutionOrder?: boolean | undefined;
478
485
  disableLiveBindings?: boolean | undefined;
486
+ resolveNewUrlToAsset?: boolean | undefined;
479
487
  enableComposingJsPlugins?: boolean | undefined;
480
488
  }>>;
481
489
  define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -61,6 +61,7 @@ export interface InputOptions {
61
61
  strictExecutionOrder?: boolean;
62
62
  disableLiveBindings?: boolean;
63
63
  viteMode?: boolean;
64
+ resolveNewUrlToAsset?: boolean;
64
65
  };
65
66
  define?: Record<string, string>;
66
67
  /**
@@ -1,4 +1,4 @@
1
- import type { RolldownPlugin } from '..';
1
+ import type { RolldownPlugin } from 'rolldown';
2
2
  import type { InputOptions } from '../options/input-options';
3
3
  import type { OutputOptions } from '../options/output-options';
4
4
  import type { BindingInputOptions } from '../binding';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "0.14.0-snapshot-92a5443-20241127113838",
3
+ "version": "0.14.0-snapshot-5e571e4-20241128015029",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "repository": {
@@ -93,6 +93,7 @@
93
93
  "@jridgewell/sourcemap-codec": "^1.5.0",
94
94
  "@napi-rs/cli": "^3.0.0-alpha.60",
95
95
  "@napi-rs/wasm-runtime": "^0.2.4",
96
+ "@types/fs-extra": "^11.0.4",
96
97
  "@types/lodash-es": "^4.17.12",
97
98
  "colorette": "^2.0.20",
98
99
  "consola": "^3.2.3",
@@ -109,25 +110,24 @@
109
110
  "tsx": "^4.19.2",
110
111
  "type-fest": "^4.20.0",
111
112
  "unbuild": "^2.0.0",
112
- "vite": "^5.2.13",
113
113
  "why-is-node-running": "^3.0.0",
114
114
  "zod-to-json-schema": "^3.23.2",
115
115
  "@rolldown/testing": "0.0.1",
116
- "rolldown": "0.14.0-snapshot-92a5443-20241127113838"
116
+ "rolldown": "0.14.0-snapshot-5e571e4-20241128015029"
117
117
  },
118
118
  "optionalDependencies": {
119
- "@rolldown/binding-darwin-x64": "0.14.0-snapshot-92a5443-20241127113838",
120
- "@rolldown/binding-darwin-arm64": "0.14.0-snapshot-92a5443-20241127113838",
121
- "@rolldown/binding-freebsd-x64": "0.14.0-snapshot-92a5443-20241127113838",
122
- "@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-92a5443-20241127113838",
123
- "@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-92a5443-20241127113838",
124
- "@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-92a5443-20241127113838",
125
- "@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-92a5443-20241127113838",
126
- "@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-92a5443-20241127113838",
127
- "@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-92a5443-20241127113838",
128
- "@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-92a5443-20241127113838",
129
- "@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-92a5443-20241127113838",
130
- "@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-92a5443-20241127113838"
119
+ "@rolldown/binding-darwin-arm64": "0.14.0-snapshot-5e571e4-20241128015029",
120
+ "@rolldown/binding-freebsd-x64": "0.14.0-snapshot-5e571e4-20241128015029",
121
+ "@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-5e571e4-20241128015029",
122
+ "@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-5e571e4-20241128015029",
123
+ "@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-5e571e4-20241128015029",
124
+ "@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-5e571e4-20241128015029",
125
+ "@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-5e571e4-20241128015029",
126
+ "@rolldown/binding-darwin-x64": "0.14.0-snapshot-5e571e4-20241128015029",
127
+ "@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-5e571e4-20241128015029",
128
+ "@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-5e571e4-20241128015029",
129
+ "@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-5e571e4-20241128015029",
130
+ "@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-5e571e4-20241128015029"
131
131
  },
132
132
  "scripts": {
133
133
  "# Scrips for binding #": "_",