rolldown 1.0.0-beta.7-commit.169739a → 1.0.0-beta.7-commit.5436742

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.
@@ -1,3 +1,4 @@
1
+ import { BindingHmrOutput } from '../../binding';
1
2
  import type { InputOptions } from '../../options/input-options';
2
3
  import type { OutputOptions } from '../../options/output-options';
3
4
  import type { RolldownOutput } from '../../types/rolldown-output';
@@ -9,6 +10,6 @@ export declare class RolldownBuild {
9
10
  write(outputOptions?: OutputOptions): Promise<RolldownOutput>;
10
11
  close(): Promise<void>;
11
12
  [Symbol.asyncDispose](): Promise<void>;
12
- generateHmrPatch(changedFiles: string[]): Promise<string | void>;
13
+ generateHmrPatch(changedFiles: string[]): Promise<BindingHmrOutput | undefined>;
13
14
  get watchFiles(): string[];
14
15
  }
@@ -160,7 +160,7 @@ export declare class Bundler {
160
160
  close(): Promise<void>
161
161
  get closed(): boolean
162
162
  get watchFiles(): Array<string>
163
- generateHmrPatch(changedFiles: Array<string>): Promise<string>
163
+ generateHmrPatch(changedFiles: Array<string>): Promise<BindingHmrOutput>
164
164
  }
165
165
 
166
166
  export declare class ParallelJsPluginRegistry {
@@ -291,6 +291,7 @@ export interface BindingEmittedChunk {
291
291
  export interface BindingExperimentalHmrOptions {
292
292
  host?: string
293
293
  port?: number
294
+ implement?: string
294
295
  }
295
296
 
296
297
  export interface BindingExperimentalOptions {
@@ -311,6 +312,16 @@ export interface BindingGlobImportPluginConfig {
311
312
  restoreQueryExtension?: boolean
312
313
  }
313
314
 
315
+ export interface BindingHmrBoundaryOutput {
316
+ boundary: string
317
+ acceptedVia: string
318
+ }
319
+
320
+ export interface BindingHmrOutput {
321
+ patch: string
322
+ hmrBoundaries: Array<BindingHmrBoundaryOutput>
323
+ }
324
+
314
325
  export interface BindingHookJsLoadOutput {
315
326
  code: string
316
327
  map?: string
@@ -31,6 +31,7 @@ export type MakeAbsoluteExternalsRelative = boolean | 'ifRelativeSource';
31
31
  export type HmrOptions = boolean | {
32
32
  host?: string;
33
33
  port?: number;
34
+ implement?: string;
34
35
  };
35
36
  export interface InputOptions {
36
37
  input?: InputOption;
@@ -1,8 +1,10 @@
1
- import { HookFilterExtension, Plugin } from '..';
1
+ import { HookFilterExtension, RolldownPluginOption } from '..';
2
+ import { StringOrRegExp } from '../types/utils';
2
3
  type OverrideFilterObject = {
3
4
  transform?: HookFilterExtension<'transform'>['filter'];
4
5
  resolveId?: HookFilterExtension<'resolveId'>['filter'];
5
6
  load?: HookFilterExtension<'load'>['filter'];
7
+ pluginNamePattern?: StringOrRegExp[];
6
8
  };
7
- export declare function withFilter<A, T extends Plugin<A>>(plugin: T, filter_obj: OverrideFilterObject): T;
9
+ export declare function withFilter<A, T extends RolldownPluginOption<A>>(pluginOption: T, filterObject: OverrideFilterObject | OverrideFilterObject[]): T;
8
10
  export {};
@@ -0,0 +1,7 @@
1
+ declare global {
2
+ interface ImportMeta {
3
+ browserBuild?: boolean;
4
+ }
5
+ }
6
+
7
+ export {};
@@ -1,4 +1,3 @@
1
- import { Worker } from 'node:worker_threads';
2
1
  import { ParallelJsPluginRegistry } from '../binding';
3
2
  import type { RolldownPlugin } from '../plugin';
4
3
  export type WorkerData = {
@@ -15,5 +14,4 @@ export declare function initializeParallelPlugins(plugins: RolldownPlugin[]): Pr
15
14
  registry: ParallelJsPluginRegistry;
16
15
  stopWorkers: () => Promise<void>;
17
16
  } | undefined>;
18
- export declare function initializeWorkers(registryId: number, count: number, pluginInfos: ParallelPluginInfo[]): Promise<Worker[]>;
19
17
  export {};
@@ -1,5 +1,6 @@
1
1
  export declare function arraify<T>(value: T | T[]): T[];
2
2
  export declare function isNullish(value: any): value is null | undefined | void;
3
+ export declare function isPromiseLike(value: any): value is PromiseLike<any>;
3
4
  export declare function unimplemented(info?: string): never;
4
5
  export declare function unreachable(info?: string): never;
5
6
  export declare function unsupported(info: string): never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.7-commit.169739a",
3
+ "version": "1.0.0-beta.7-commit.5436742",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "type": "commonjs",
6
6
  "homepage": "https://rolldown.rs/",
@@ -79,7 +79,8 @@
79
79
  "wasm": {
80
80
  "initialMemory": 16384,
81
81
  "browser": {
82
- "fs": true
82
+ "fs": true,
83
+ "asyncInit": true
83
84
  }
84
85
  },
85
86
  "dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\n\n"
@@ -87,6 +88,7 @@
87
88
  "dependencies": {
88
89
  "@oxc-project/types": "0.63.0",
89
90
  "@valibot/to-json-schema": "1.0.0",
91
+ "ansis": "^3.17.0",
90
92
  "valibot": "1.0.0"
91
93
  },
92
94
  "peerDependencies": {
@@ -98,12 +100,11 @@
98
100
  }
99
101
  },
100
102
  "devDependencies": {
101
- "@napi-rs/cli": "^3.0.0-alpha.74",
103
+ "@napi-rs/cli": "^3.0.0-alpha.77",
102
104
  "@napi-rs/wasm-runtime": "^0.2.4",
103
105
  "@oxc-node/core": "^0.0.22",
104
106
  "@types/fs-extra": "^11.0.4",
105
107
  "@types/lodash-es": "^4.17.12",
106
- "colorette": "^2.0.20",
107
108
  "consola": "^3.4.2",
108
109
  "emnapi": "^1.2.0",
109
110
  "execa": "^9.2.0",
@@ -111,6 +112,7 @@
111
112
  "glob": "^11.0.0",
112
113
  "locate-character": "^3.0.0",
113
114
  "oxc-parser": "^0.63.0",
115
+ "pathe": "^2.0.3",
114
116
  "remeda": "^2.10.0",
115
117
  "rollup": "^4.18.0",
116
118
  "signal-exit": "4.1.0",
@@ -120,22 +122,22 @@
120
122
  "typedoc": "^0.28.0",
121
123
  "typescript": "^5.7.3",
122
124
  "unbuild": "^3.0.0",
123
- "@rolldown/testing": "0.0.1",
124
- "rolldown": "1.0.0-beta.7-commit.169739a"
125
+ "rolldown": "1.0.0-beta.7-commit.5436742",
126
+ "@rolldown/testing": "0.0.1"
125
127
  },
126
128
  "optionalDependencies": {
127
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.7-commit.169739a",
128
- "@rolldown/binding-darwin-x64": "1.0.0-beta.7-commit.169739a",
129
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.7-commit.169739a",
130
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.7-commit.169739a",
131
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.7-commit.169739a",
132
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.7-commit.169739a",
133
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.7-commit.169739a",
134
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.7-commit.169739a",
135
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.7-commit.169739a",
136
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.7-commit.169739a",
137
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.7-commit.169739a",
138
- "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.7-commit.169739a"
129
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.7-commit.5436742",
130
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.7-commit.5436742",
131
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.7-commit.5436742",
132
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.7-commit.5436742",
133
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.7-commit.5436742",
134
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.7-commit.5436742",
135
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.7-commit.5436742",
136
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.7-commit.5436742",
137
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.7-commit.5436742",
138
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.7-commit.5436742",
139
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.7-commit.5436742",
140
+ "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.7-commit.5436742"
139
141
  },
140
142
  "scripts": {
141
143
  "# Scrips for binding #": "_",
@@ -151,8 +153,8 @@
151
153
  "build-js-glue": "pnpm run --sequential \"/^build-(types|node|types-check)$/\"",
152
154
  "build-native:debug": "pnpm run --sequential \"/^build-(binding|js-glue)$/\"",
153
155
  "build-native:release": "pnpm run --sequential \"/^build-(binding:release|js-glue)$/\"",
154
- "build-wasi:debug": "pnpm run --sequential \"/^build-(binding|binding:wasi|node)$/\"",
155
- "build-wasi:release": "pnpm run --sequential \"/^build-(binding|binding:wasi:release|node)$/\"",
156
+ "build-browser:debug": "cross-env BROWSER_PKG=1 pnpm run --sequential \"/^build-(binding|binding:wasi|node)$/\"",
157
+ "build-browser:release": "cross-env BROWSER_PKG=1 pnpm run --sequential \"/^build-(binding|binding:wasi:release|node)$/\"",
156
158
  "# Scrips for docs #": "_",
157
159
  "extract-options-doc": "typedoc",
158
160
  "preinstall": "npx only-allow pnpm"
@@ -1,11 +0,0 @@
1
- import { Color } from 'colorette';
2
- export declare const colors: {
3
- bold: Color;
4
- cyan: Color;
5
- dim: Color;
6
- gray: Color;
7
- green: Color;
8
- red: Color;
9
- underline: Color;
10
- yellow: Color;
11
- };