@rspack-debug/browser 2.0.0-beta.7 → 2.0.0-beta.9
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/Compilation.d.ts +2 -0
- package/dist/FileSystem.d.ts +1 -1
- package/dist/browser/BrowserRequirePlugin.d.ts +1 -1
- package/dist/browser/fs.d.ts +1 -1
- package/dist/builtin-loader/swc/pluginImport.d.ts +1 -1
- package/dist/builtin-loader/swc/types.d.ts +6 -0
- package/dist/builtin-plugin/EsmNodeTargetPlugin.d.ts +9 -0
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/config/types.d.ts +5 -2
- package/dist/exports.d.ts +3 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.js +607 -434
- package/dist/napi-binding.d.ts +41 -32
- package/dist/swc.d.ts +1 -1
- package/dist/wasi-worker-browser.mjs +268 -159
- package/package.json +3 -3
- package/dist/rslib-runtime.js +0 -65
package/dist/Compilation.d.ts
CHANGED
|
@@ -433,6 +433,8 @@ export declare class Entries implements Map<string, EntryData> {
|
|
|
433
433
|
has(key: string): boolean;
|
|
434
434
|
set(key: string, value: EntryData): this;
|
|
435
435
|
delete(key: string): boolean;
|
|
436
|
+
getOrInsert(key: string, defaultValue: EntryData): EntryData;
|
|
437
|
+
getOrInsertComputed(key: string, callback: (key: string) => EntryData): EntryData;
|
|
436
438
|
get(key: string): EntryData | undefined;
|
|
437
439
|
keys(): ReturnType<Map<string, EntryData>['keys']>;
|
|
438
440
|
}
|
package/dist/FileSystem.d.ts
CHANGED
|
@@ -51,4 +51,4 @@ declare class ThreadsafeIntermediateNodeFS extends ThreadsafeOutputNodeFS {
|
|
|
51
51
|
constructor(fs?: IntermediateFileSystem);
|
|
52
52
|
static __to_binding(fs?: IntermediateFileSystem): ThreadsafeIntermediateNodeFS;
|
|
53
53
|
}
|
|
54
|
-
export { ThreadsafeInputNodeFS,
|
|
54
|
+
export { ThreadsafeInputNodeFS, ThreadsafeIntermediateNodeFS, ThreadsafeOutputNodeFS, };
|
|
@@ -31,7 +31,7 @@ export declare class BrowserRequirePlugin {
|
|
|
31
31
|
* This is an unsafe way to execute code in the browser using `new Function`.
|
|
32
32
|
* It is your responsibility to ensure that your application is not vulnerable to attacks due to this function.
|
|
33
33
|
*/
|
|
34
|
-
static unsafeExecute: (
|
|
34
|
+
static unsafeExecute: (code: string, runtime: CommonJsRuntime) => void;
|
|
35
35
|
constructor(options: BrowserRequirePluginOptions);
|
|
36
36
|
apply(compiler: Compiler): void;
|
|
37
37
|
}
|
package/dist/browser/fs.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ declare const readFileSync: (file: import("memfs/lib/core").TFileId, options?: i
|
|
|
10
10
|
(path: import("memfs/lib/node/types/misc").PathLike, options: import("memfs/lib/node/types/options").IReaddirOptions | string, callback: import("memfs/lib/node/types/misc").TCallback<import("memfs/lib/encoding").TDataOut[] | import("memfs/lib/node/Dirent").Dirent[]>): any;
|
|
11
11
|
}, watch: (path: import("memfs/lib/node/types/misc").PathLike, options?: import("memfs/lib/node/volume").IWatchOptions | string, listener?: (eventType: string, filename: string) => void) => import("memfs/lib/node/volume").FSWatcher;
|
|
12
12
|
export default fs;
|
|
13
|
-
export {
|
|
13
|
+
export { existsSync, lstat, readdir, readdirSync, readFileSync, watch };
|
|
@@ -29,5 +29,5 @@ type PluginImportConfig = {
|
|
|
29
29
|
};
|
|
30
30
|
type PluginImportOptions = PluginImportConfig[];
|
|
31
31
|
declare function resolvePluginImport(pluginImport: PluginImportOptions): RawPluginImportConfig[] | undefined;
|
|
32
|
-
export { resolvePluginImport };
|
|
33
32
|
export type { PluginImportOptions };
|
|
33
|
+
export { resolvePluginImport };
|
|
@@ -9,6 +9,12 @@ export type SwcLoaderEsParserConfig = EsParserConfig;
|
|
|
9
9
|
export type SwcLoaderTsParserConfig = TsParserConfig;
|
|
10
10
|
export type SwcLoaderTransformConfig = TransformConfig;
|
|
11
11
|
export type SwcLoaderOptions = Config & {
|
|
12
|
+
/**
|
|
13
|
+
* When set to `"auto"`, `builtin:swc-loader` infers `jsc.parser` from the resource extension.
|
|
14
|
+
* This is useful when one rule needs to handle mixed module types such as `.js`, `.jsx`, `.ts`, and `.tsx`.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
detectSyntax?: false | 'auto';
|
|
12
18
|
isModule?: boolean | 'unknown';
|
|
13
19
|
/**
|
|
14
20
|
* Collects information from TypeScript's AST for consumption by subsequent Rspack processes,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const EsmNodeTargetPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -28,6 +28,7 @@ export * from './EnableWasmLoadingPlugin';
|
|
|
28
28
|
export * from './EnsureChunkConditionsPlugin';
|
|
29
29
|
export * from './EntryPlugin';
|
|
30
30
|
export * from './EsmLibraryPlugin';
|
|
31
|
+
export * from './EsmNodeTargetPlugin';
|
|
31
32
|
export * from './EvalDevToolModulePlugin';
|
|
32
33
|
export * from './EvalSourceMapDevToolPlugin';
|
|
33
34
|
export * from './ExternalsPlugin';
|
package/dist/config/types.d.ts
CHANGED
|
@@ -600,8 +600,6 @@ export type ResolveOptions = {
|
|
|
600
600
|
byDependency?: Record<string, ResolveOptions>;
|
|
601
601
|
/** enable Yarn PnP */
|
|
602
602
|
pnp?: boolean;
|
|
603
|
-
/** Path to PnP manifest file */
|
|
604
|
-
pnpManifest?: string | false;
|
|
605
603
|
};
|
|
606
604
|
/** Used to configure the Rspack module resolution */
|
|
607
605
|
export type Resolve = ResolveOptions;
|
|
@@ -895,6 +893,11 @@ export type JavascriptParserOptions = {
|
|
|
895
893
|
* @default false
|
|
896
894
|
*/
|
|
897
895
|
deferImport?: boolean;
|
|
896
|
+
/**
|
|
897
|
+
* Whether to enable import.meta.resolve().
|
|
898
|
+
* @default false
|
|
899
|
+
*/
|
|
900
|
+
importMetaResolve?: boolean;
|
|
898
901
|
};
|
|
899
902
|
export type JsonParserOptions = {
|
|
900
903
|
/**
|
package/dist/exports.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
declare const rspackVersion: string;
|
|
2
2
|
declare const version: string;
|
|
3
|
-
export { rspackVersion, version };
|
|
4
3
|
export type { Asset, AssetInfo, Assets, ChunkPathData, CompilationParams, LogEntry, PathData, } from './Compilation';
|
|
5
4
|
export { Compilation } from './Compilation';
|
|
6
5
|
export { Compiler, type CompilerHooks } from './Compiler';
|
|
7
6
|
export type { MultiCompilerOptions, MultiRspackOptions } from './MultiCompiler';
|
|
8
7
|
export { MultiCompiler } from './MultiCompiler';
|
|
8
|
+
export { rspackVersion, version };
|
|
9
9
|
import { RspackOptionsApply } from './rspackOptionsApply';
|
|
10
|
-
export { RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply };
|
|
11
10
|
export type { ChunkGroup } from './binding';
|
|
12
11
|
export { AsyncDependenciesBlock, Dependency, EntryDependency, } from './binding';
|
|
13
12
|
export type { Chunk } from './Chunk';
|
|
@@ -26,9 +25,10 @@ export { RuntimeModule } from './RuntimeModule';
|
|
|
26
25
|
export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule, } from './Stats';
|
|
27
26
|
export { Stats } from './Stats';
|
|
28
27
|
export { StatsErrorCode } from './stats/statsFactoryUtils';
|
|
28
|
+
export { RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply };
|
|
29
29
|
import * as ModuleFilenameHelpers from './lib/ModuleFilenameHelpers';
|
|
30
|
-
export { ModuleFilenameHelpers };
|
|
31
30
|
export { Template } from './Template';
|
|
31
|
+
export { ModuleFilenameHelpers };
|
|
32
32
|
export declare const WebpackError: ErrorConstructor;
|
|
33
33
|
export type { Watching } from './Watching';
|
|
34
34
|
import * as sources from 'webpack-sources';
|
package/dist/index.d.ts
CHANGED