@rspack-canary/browser 1.6.0-canary-6cd722f4-20251022123039 → 1.6.0-canary-4ad8b49f-20251023175711

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.
@@ -13,7 +13,7 @@ export interface Etag {
13
13
  toString(): string;
14
14
  }
15
15
  export type CallbackCache<T> = (err?: WebpackError | null, result?: T) => void;
16
- type GotHandler = (result: any | null, callback: (error: Error | null) => void) => void;
16
+ type GotHandler<T = any> = (result: T | null, callback: (error: Error | null) => void) => void;
17
17
  export declare class Cache {
18
18
  static STAGE_DISK: number;
19
19
  static STAGE_MEMORY: number;
@@ -61,7 +61,7 @@ export declare enum RequestType {
61
61
  export declare enum RequestSyncType {
62
62
  WaitForPendingRequest = "WaitForPendingRequest"
63
63
  }
64
- export type HandleIncomingRequest = (requestType: RequestType, ...args: any[]) => Promise<any> | any;
64
+ export type HandleIncomingRequest = (requestType: RequestType, ...args: any[]) => any;
65
65
  type WorkerArgs = any[];
66
66
  export type WorkerError = Error;
67
67
  export declare function serializeError(error: unknown): WorkerError;
@@ -565,6 +565,7 @@ export declare enum BuiltinPluginName {
565
565
  SideEffectsFlagPlugin = 'SideEffectsFlagPlugin',
566
566
  FlagDependencyExportsPlugin = 'FlagDependencyExportsPlugin',
567
567
  FlagDependencyUsagePlugin = 'FlagDependencyUsagePlugin',
568
+ InlineExportsPlugin = 'InlineExportsPlugin',
568
569
  MangleExportsPlugin = 'MangleExportsPlugin',
569
570
  ModuleConcatenationPlugin = 'ModuleConcatenationPlugin',
570
571
  CssModulesPlugin = 'CssModulesPlugin',
Binary file
package/dist/util/fs.d.ts CHANGED
@@ -68,6 +68,28 @@ interface IDirent {
68
68
  isSocket: () => boolean;
69
69
  name: string | Buffer;
70
70
  }
71
+ export interface StreamOptions {
72
+ flags?: string;
73
+ encoding?: NodeJS.BufferEncoding;
74
+ fd?: any;
75
+ mode?: number;
76
+ autoClose?: boolean;
77
+ emitClose?: boolean;
78
+ start?: number;
79
+ signal?: null | AbortSignal;
80
+ }
81
+ export interface FSImplementation {
82
+ open?: (...args: any[]) => any;
83
+ close?: (...args: any[]) => any;
84
+ }
85
+ export type CreateReadStreamFSImplementation = FSImplementation & {
86
+ read: (...args: any[]) => any;
87
+ };
88
+ export type ReadStreamOptions = StreamOptions & {
89
+ fs?: null | CreateReadStreamFSImplementation;
90
+ end?: number;
91
+ };
92
+ export type CreateReadStream = (path: PathLike, options?: NodeJS.BufferEncoding | ReadStreamOptions) => NodeJS.ReadableStream;
71
93
  export interface OutputFileSystem {
72
94
  writeFile: (arg0: string | number, arg1: string | Buffer, arg2: (arg0?: null | NodeJS.ErrnoException) => void) => void;
73
95
  mkdir: (arg0: string, arg1: (arg0?: null | NodeJS.ErrnoException) => void) => void;
@@ -81,6 +103,7 @@ export interface OutputFileSystem {
81
103
  join?: (arg0: string, arg1: string) => string;
82
104
  relative?: (arg0: string, arg1: string) => string;
83
105
  dirname?: (arg0: string) => string;
106
+ createReadStream?: CreateReadStream;
84
107
  }
85
108
  export type JsonPrimitive = string | number | boolean | null;
86
109
  export type JsonArray = JsonValue[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/browser",
3
- "version": "1.6.0-canary-6cd722f4-20251022123039",
3
+ "version": "1.6.0-canary-4ad8b49f-20251023175711",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",