rolldown 1.0.0-beta.7-commit.7ddcaea → 1.0.0-beta.7-commit.eeb1005

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,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-at1jEBX8.cjs');
4
- const require_parse_ast_index = require('../shared/parse-ast-index-BzS9mPhQ.cjs');
3
+ const require_src = require('../shared/src-DcTpp5gq.cjs');
4
+ const require_parse_ast_index = require('../shared/parse-ast-index-DbQWN9pL.cjs');
5
5
  const node_process = require_chunk.__toESM(require("node:process"));
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
7
7
  const node_fs = require_chunk.__toESM(require("node:fs"));
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-at1jEBX8.cjs');
4
- const require_parse_ast_index = require('../shared/parse-ast-index-BzS9mPhQ.cjs');
3
+ const require_src = require('../shared/src-DcTpp5gq.cjs');
4
+ const require_parse_ast_index = require('../shared/parse-ast-index-DbQWN9pL.cjs');
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
6
6
 
7
7
  //#region src/plugin/parallel-plugin.ts
@@ -1,5 +1,5 @@
1
- const require_src = require('../shared/src-at1jEBX8.cjs');
2
- require('../shared/parse-ast-index-BzS9mPhQ.cjs');
1
+ const require_src = require('../shared/src-DcTpp5gq.cjs');
2
+ require('../shared/parse-ast-index-DbQWN9pL.cjs');
3
3
 
4
4
  exports.VERSION = require_src.VERSION
5
5
  exports.build = require_src.build
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-at1jEBX8.cjs');
4
- const require_parse_ast_index = require('../shared/parse-ast-index-BzS9mPhQ.cjs');
3
+ const require_src = require('../shared/src-DcTpp5gq.cjs');
4
+ const require_parse_ast_index = require('../shared/parse-ast-index-DbQWN9pL.cjs');
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
6
 
7
7
  //#region src/parallel-plugin-worker.ts
@@ -1,4 +1,4 @@
1
- const require_parse_ast_index = require('../shared/parse-ast-index-BzS9mPhQ.cjs');
1
+ const require_parse_ast_index = require('../shared/parse-ast-index-DbQWN9pL.cjs');
2
2
 
3
3
  exports.parseAst = require_parse_ast_index.parseAst
4
4
  exports.parseAstAsync = require_parse_ast_index.parseAstAsync
package/dist/esm/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { colors } from "../shared/parse-ast-index-CVCVLNV5.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-CRwPiE1a.mjs";
1
+ import { colors } from "../shared/parse-ast-index-B-UemHTj.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-D04zw3bI.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-CVCVLNV5.mjs";
2
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-CRwPiE1a.mjs";
1
+ import { import_binding } from "../shared/parse-ast-index-B-UemHTj.mjs";
2
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-D04zw3bI.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-CVCVLNV5.mjs";
2
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-CRwPiE1a.mjs";
1
+ import "../shared/parse-ast-index-B-UemHTj.mjs";
2
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-D04zw3bI.mjs";
3
3
 
4
4
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,5 +1,5 @@
1
- import { import_binding } from "../shared/parse-ast-index-CVCVLNV5.mjs";
2
- import { PluginContextData, bindingifyPlugin } from "../shared/src-CRwPiE1a.mjs";
1
+ import { import_binding } from "../shared/parse-ast-index-B-UemHTj.mjs";
2
+ import { PluginContextData, bindingifyPlugin } from "../shared/src-D04zw3bI.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-CVCVLNV5.mjs";
1
+ import { parseAst, parseAstAsync } from "../shared/parse-ast-index-B-UemHTj.mjs";
2
2
 
3
3
  export { parseAst, parseAstAsync };
@@ -288,19 +288,7 @@ var require_webcontainer_fallback = __commonJS({ "src/webcontainer-fallback.js"(
288
288
  const baseDir = `/tmp/rolldown-${version}`;
289
289
  const bindingEntry = `${baseDir}/node_modules/@rolldown/binding-wasm32-wasi/rolldown-binding.wasi.cjs`;
290
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 {}
291
+ const bindingPkg = `@rolldown/binding-wasm32-wasi@${version}`;
304
292
  fs.rmSync(baseDir, {
305
293
  recursive: true,
306
294
  force: true
@@ -261,19 +261,7 @@ var require_webcontainer_fallback = require_chunk.__commonJS({ "src/webcontainer
261
261
  const baseDir = `/tmp/rolldown-${version}`;
262
262
  const bindingEntry = `${baseDir}/node_modules/@rolldown/binding-wasm32-wasi/rolldown-binding.wasi.cjs`;
263
263
  if (!fs.existsSync(bindingEntry)) {
264
- let bindingPkg = `@rolldown/binding-wasm32-wasi@${version}`;
265
- try {
266
- const info = JSON.parse(childProcess.execFileSync("npm", [
267
- "why",
268
- "--json",
269
- "rolldown"
270
- ], { encoding: "utf-8" }));
271
- const spec = info[0].dependents[0].spec;
272
- if (spec.startsWith("https://pkg.pr.new/")) {
273
- const commit = spec.split("@").at(-1);
274
- bindingPkg = `https://pkg.pr.new/@rolldown/binding-wasm32-wasi@${commit}`;
275
- }
276
- } catch {}
264
+ const bindingPkg = `@rolldown/binding-wasm32-wasi@${version}`;
277
265
  fs.rmSync(baseDir, {
278
266
  recursive: true,
279
267
  force: true
@@ -1,4 +1,4 @@
1
- import { augmentCodeLocation, colors, error, import_binding, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-CVCVLNV5.mjs";
1
+ import { augmentCodeLocation, colors, error, import_binding, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-B-UemHTj.mjs";
2
2
  import path from "node:path";
3
3
  import * as v from "valibot";
4
4
  import { toJsonSchema } from "@valibot/to-json-schema";
@@ -2860,7 +2860,7 @@ const watch = (input) => {
2860
2860
 
2861
2861
  //#endregion
2862
2862
  //#region package.json
2863
- var version = "1.0.0-beta.7-commit.7ddcaea";
2863
+ var version = "1.0.0-beta.7-commit.eeb1005";
2864
2864
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2865
2865
 
2866
2866
  //#endregion
@@ -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-BzS9mPhQ.cjs');
3
+ const require_parse_ast_index = require('./parse-ast-index-DbQWN9pL.cjs');
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const valibot = require_chunk.__toESM(require("valibot"));
6
6
  const __valibot_to_json_schema = require_chunk.__toESM(require("@valibot/to-json-schema"));
@@ -2862,7 +2862,7 @@ const watch = (input) => {
2862
2862
 
2863
2863
  //#endregion
2864
2864
  //#region package.json
2865
- var version = "1.0.0-beta.7-commit.7ddcaea";
2865
+ var version = "1.0.0-beta.7-commit.eeb1005";
2866
2866
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2867
2867
 
2868
2868
  //#endregion
@@ -1,9 +1,9 @@
1
1
  import type { MaybeArray } from '../types/utils';
2
2
  import type { StringOrRegExp } from '../types/utils';
3
3
  import type { ModuleType } from '../index';
4
- export type StringFilter = MaybeArray<StringOrRegExp> | {
5
- include?: MaybeArray<StringOrRegExp>;
6
- exclude?: MaybeArray<StringOrRegExp>;
4
+ export type StringFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
5
+ include?: MaybeArray<Value>;
6
+ exclude?: MaybeArray<Value>;
7
7
  };
8
8
  interface FormalModuleTypeFilter {
9
9
  include?: ModuleType[];
@@ -16,7 +16,7 @@ import type { ParallelPlugin } from './parallel-plugin';
16
16
  import type { DefinedHookNames } from '../constants/plugin';
17
17
  import type { DEFINED_HOOK_NAMES } from '../constants/plugin';
18
18
  import type { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
19
- import type { HookFilter } from './hook-filter';
19
+ import type { HookFilter, StringFilter } from './hook-filter';
20
20
  import { RenderedChunk } from '../types/rolldown-output';
21
21
  export type ModuleSideEffects = boolean | 'no-treeshake' | null;
22
22
  export type ModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
@@ -104,8 +104,12 @@ export type OutputPluginHooks = DefinedHookNames['augmentChunkHash' | 'generateB
104
104
  export type ParallelPluginHooks = Exclude<keyof FunctionPluginHooks | AddonHooks, FirstPluginHooks | SequentialPluginHooks>;
105
105
  export type HookFilterExtension<K extends keyof FunctionPluginHooks> = K extends 'transform' ? {
106
106
  filter?: HookFilter;
107
- } : K extends 'load' | 'resolveId' ? {
107
+ } : K extends 'load' ? {
108
108
  filter?: Pick<HookFilter, 'id'>;
109
+ } : K extends 'resolveId' ? {
110
+ filter?: {
111
+ id: StringFilter<RegExp>;
112
+ };
109
113
  } : {};
110
114
  export type PluginHooks = {
111
115
  [K in keyof FunctionPluginHooks]: ObjectHook<K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K], HookFilterExtension<K> & (K extends ParallelPluginHooks ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.7-commit.7ddcaea",
3
+ "version": "1.0.0-beta.7-commit.eeb1005",
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-commit.7ddcaea"
126
+ "rolldown": "1.0.0-beta.7-commit.eeb1005"
127
127
  },
128
128
  "optionalDependencies": {
129
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.7-commit.7ddcaea",
130
- "@rolldown/binding-darwin-x64": "1.0.0-beta.7-commit.7ddcaea",
131
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.7-commit.7ddcaea",
132
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.7-commit.7ddcaea",
133
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.7-commit.7ddcaea",
134
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.7-commit.7ddcaea",
135
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.7-commit.7ddcaea",
136
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.7-commit.7ddcaea",
137
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.7-commit.7ddcaea",
138
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.7-commit.7ddcaea",
139
- "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.7-commit.7ddcaea",
140
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.7-commit.7ddcaea"
129
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.7-commit.eeb1005",
130
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.7-commit.eeb1005",
131
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.7-commit.eeb1005",
132
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.7-commit.eeb1005",
133
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.7-commit.eeb1005",
134
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.7-commit.eeb1005",
135
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.7-commit.eeb1005",
136
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.7-commit.eeb1005",
137
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.7-commit.eeb1005",
138
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.7-commit.eeb1005",
139
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.7-commit.eeb1005",
140
+ "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.7-commit.eeb1005"
141
141
  },
142
142
  "scripts": {
143
143
  "# Scrips for binding #": "_",