🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@rspack/core

Package Overview
Dependencies
Maintainers
2
Versions
1222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rspack/core - npm Package Compare versions

Comparing version
2.1.0-rc.0
to
2.1.0
+32
dist/rslib-runtime-index.js
var __webpack_modules__ = {}, __webpack_module_cache__ = {};
function __webpack_require__(moduleId) {
var cachedModule = __webpack_module_cache__[moduleId];
if (void 0 !== cachedModule) return cachedModule.exports;
var module = __webpack_module_cache__[moduleId] = {
exports: {}
};
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
}
__webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
return __webpack_require__.d(getter, {
a: getter
}), getter;
}, __webpack_require__.d = (exports, getters, values)=>{
var define = (defs, kind)=>{
for(var key in defs)__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key) && Object.defineProperty(exports, key, {
enumerable: !0,
[kind]: defs[key]
});
};
define(getters, "get"), define(values, "value");
}, __webpack_require__.add = function(modules) {
Object.assign(__webpack_require__.m, modules);
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports)=>{
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {
value: 'Module'
}), Object.defineProperty(exports, '__esModule', {
value: !0
});
};
export { __webpack_require__ };
var __webpack_require__ = {};
__webpack_require__.n = (module)=>{
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
return __webpack_require__.d(getter, {
a: getter
}), getter;
}, __webpack_require__.d = (exports, getters, values)=>{
var define = (defs, kind)=>{
for(var key in defs)__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key) && Object.defineProperty(exports, key, {
enumerable: !0,
[kind]: defs[key]
});
};
define(getters, "get"), define(values, "value");
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports)=>{
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {
value: 'Module'
}), Object.defineProperty(exports, '__esModule', {
value: !0
});
};
export { __webpack_require__ };
+1
-59

@@ -1,2 +0,2 @@

import type { Config, EnvConfig, EsParserConfig, JscConfig, ModuleConfig, ParserConfig, TerserEcmaVersion, TransformConfig, TsParserConfig } from '../../../compiled/@swc/types/index.js';
import type { Config, EnvConfig, EsParserConfig, JscConfig, ModuleConfig, ParserConfig, TransformConfig, TsParserConfig } from '../../../compiled/@swc/types/index.js';
import type { CollectTypeScriptInfoOptions } from './collectTypeScriptInfo.js';

@@ -60,60 +60,2 @@ import type { PluginImportOptions } from './pluginImport.js';

}
export interface TerserCompressOptions {
arguments?: boolean;
arrows?: boolean;
booleans?: boolean;
booleans_as_integers?: boolean;
collapse_vars?: boolean;
comparisons?: boolean;
computed_props?: boolean;
conditionals?: boolean;
dead_code?: boolean;
defaults?: boolean;
directives?: boolean;
drop_console?: boolean;
drop_debugger?: boolean;
ecma?: TerserEcmaVersion;
evaluate?: boolean;
expression?: boolean;
global_defs?: any;
hoist_funs?: boolean;
hoist_props?: boolean;
hoist_vars?: boolean;
ie8?: boolean;
if_return?: boolean;
inline?: 0 | 1 | 2 | 3;
join_vars?: boolean;
keep_classnames?: boolean;
keep_fargs?: boolean;
keep_fnames?: boolean;
keep_infinity?: boolean;
loops?: boolean;
negate_iife?: boolean;
passes?: number;
properties?: boolean;
pure_getters?: any;
pure_funcs?: string[];
reduce_funcs?: boolean;
reduce_vars?: boolean;
sequences?: any;
side_effects?: boolean;
switches?: boolean;
top_retain?: any;
toplevel?: any;
typeofs?: boolean;
unsafe?: boolean;
unsafe_passes?: boolean;
unsafe_arrows?: boolean;
unsafe_comps?: boolean;
unsafe_function?: boolean;
unsafe_math?: boolean;
unsafe_symbols?: boolean;
unsafe_methods?: boolean;
unsafe_proto?: boolean;
unsafe_regexp?: boolean;
unsafe_undefined?: boolean;
unused?: boolean;
const_to_let?: boolean;
module?: boolean;
}
export {};

@@ -43,3 +43,3 @@ import { Compilation } from '../../Compilation.js';

* Setting this option to `'module'` adds attribute `type="module"` to the `script`. This also implies `defer` attribute on the `script`, since modules are automatically deferred.
* @default "defer"
* @default "module" when `output.module` is enabled, otherwise "defer"
* */

@@ -46,0 +46,0 @@ scriptLoading?: 'blocking' | 'defer' | 'module' | 'systemjs-module';

@@ -185,3 +185,3 @@ import type { Compiler } from '../Compiler.js';

unsafe_comps?: boolean;
unsafe_function?: boolean;
unsafe_Function?: boolean;
unsafe_math?: boolean;

@@ -188,0 +188,0 @@ unsafe_symbols?: boolean;

@@ -86,2 +86,4 @@ /**

version?: string;
maxAge?: number;
maxVersions?: number;
snapshot: {

@@ -95,4 +97,2 @@ immutablePaths?: (string | RegExp)[];

directory?: string;
maxAge?: number;
maxGenerations?: number;
};

@@ -99,0 +99,0 @@ portable?: boolean;

@@ -35,2 +35,2 @@ /**

export declare const getter: (obj: HashableObject, hashFunction?: string | HashConstructor) => LazyHashedEtag;
export default getter;
export {};

@@ -17,2 +17,1 @@ /**

export declare const mergeEtags: (first: Etag, second: Etag) => Etag;
export default mergeEtags;

@@ -22,3 +22,2 @@ /**

}
export default HookWebpackError;
/**

@@ -25,0 +24,0 @@ * @param error an error

@@ -8,3 +8,2 @@ import binding, { type AssetInfo } from '@rspack/binding';

};
export type CreateData = binding.JsCreateData;
export type ContextInfo = binding.ContextInfo;

@@ -11,0 +10,0 @@ export type ResolveData = binding.JsResolveData;

@@ -0,7 +1,26 @@

import { EventEmitter } from 'node:events';
import binding from '@rspack/binding';
import type Watchpack from '../compiled/watchpack/index.js';
import type { FileSystemInfoEntry, InputFileSystem, Watcher, WatchFileSystem } from './util/fs.js';
/**
* Minimal watchpack-compatible shim exposed as `NativeWatchFileSystem.watcher`.
*
* It proxies the watchpack-private surface that `ts-checker-rspack-plugin` and
* `fork-ts-checker-webpack-plugin` rely on — `on`/`once` for `change`/`remove`,
* plus `_onChange`/`_onRemove` to inject events — onto the native watcher, so
* those plugins keep working under `experiments.nativeWatcher` unmodified.
*
* APIs that iterate `fileWatchers`/`directoryWatchers` are intentionally not
* supported; plugins needing those should use `WatchFileSystem.emit` instead.
*/
declare class NativeWatcherShim extends EventEmitter {
#private;
constructor(trigger: (kind: 'change' | 'remove', path: string) => void);
_onChange(item: string, _mtime?: number, file?: string, _type?: string): void;
_onRemove(item: string, file?: string, _type?: string): void;
}
export default class NativeWatchFileSystem implements WatchFileSystem {
#private;
constructor(inputFileSystem: InputFileSystem);
get watcher(): NativeWatcherShim | undefined;
watch(files: Iterable<string> & {

@@ -19,2 +38,11 @@ added?: Iterable<string>;

triggerEvent(kind: 'change' | 'remove' | 'create', path: string): void;
on(event: 'change', listener: (filename: string, mtime: number) => void): this;
on(event: 'remove', listener: (filename: string) => void): this;
on(event: 'aggregated', listener: (changes: Set<string>, removals: Set<string>) => void): this;
once(event: 'change', listener: (filename: string, mtime: number) => void): this;
once(event: 'remove', listener: (filename: string) => void): this;
once(event: 'aggregated', listener: (changes: Set<string>, removals: Set<string>) => void): this;
emit(event: 'change', filename: string, mtime: number): boolean;
emit(event: 'remove', filename: string): boolean;
emit(event: 'aggregated', changes: Set<string>, removals: Set<string>): boolean;
formatWatchDependencies(dependencies: Iterable<string> & {

@@ -25,1 +53,2 @@ added?: Iterable<string>;

}
export {};

@@ -14,2 +14,3 @@ /**

export default class NodeWatchFileSystem implements WatchFileSystem {
#private;
inputFileSystem: InputFileSystem;

@@ -20,3 +21,12 @@ watcherOptions: Watchpack.WatchOptions;

watch(files: Iterable<string>, directories: Iterable<string>, missing: Iterable<string>, startTime: number, options: Watchpack.WatchOptions, callback: (error: Error | null, fileTimeInfoEntries: Map<string, FileSystemInfoEntry | 'ignore'>, contextTimeInfoEntries: Map<string, FileSystemInfoEntry | 'ignore'>, changedFiles: Set<string>, removedFiles: Set<string>) => void, callbackUndelayed: (fileName: string, changeTime: number) => void): Watcher;
on(event: 'change', listener: (filename: string, mtime: number) => void): this;
on(event: 'remove', listener: (filename: string) => void): this;
on(event: 'aggregated', listener: (changes: Set<string>, removals: Set<string>) => void): this;
once(event: 'change', listener: (filename: string, mtime: number) => void): this;
once(event: 'remove', listener: (filename: string) => void): this;
once(event: 'aggregated', listener: (changes: Set<string>, removals: Set<string>) => void): this;
emit(event: 'change', filename: string, mtime: number): boolean;
emit(event: 'remove', filename: string): boolean;
emit(event: 'aggregated', changes: Set<string>, removals: Set<string>): boolean;
}
export {};

@@ -25,2 +25,1 @@ /**

export { createCompiler, createMultiCompiler, MultiStats, rspack, Stats };
export default rspack;

@@ -348,3 +348,2 @@ /**

export declare const isReservedRuntimeGlobal: (r: string, compilerRuntimeGlobals: Record<string, string>) => boolean;
export declare function renderModulePrefix(_compilerOptions: RspackOptionsNormalized): string;
export declare enum RuntimeVariable {

@@ -351,0 +350,0 @@ Require = 0,

@@ -5,3 +5,2 @@ import type { Compiler } from '../Compiler.js';

import type { Shared, SharedConfig } from './SharePlugin.js';
export type MakeRequired<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
export interface IndependentSharePluginOptions {

@@ -8,0 +7,0 @@ name: string;

@@ -129,7 +129,2 @@ import type binding from '@rspack/binding';

};
export type KnownStatsProfile = {
total: number;
resolving: number;
building: number;
};
export type StatsModule = KnownStatsModule & Record<string, any>;

@@ -338,3 +333,2 @@ export type KnownStatsModuleIssuer = {

};
export declare const warningFromStatsWarning: (warning: binding.JsStatsError) => Error;
export {};

@@ -14,4 +14,4 @@ /**

export declare const compareIds: <T = string | number>(a: T, b: T) => -1 | 0 | 1;
export declare const compareNumbers: (a: number, b: number) => -1 | 0 | 1;
export declare const compareSelect: <T, R>(getter: Selector<T, R>, comparator: Comparator) => Comparator;
export declare const compareNumbers: (a: number, b: number) => -1 | 0 | 1;
export {};

@@ -1,4 +0,1 @@

export type FakeHook<T> = T & {
_fakeHook: true;
};
export declare function createFakeCompilationDependencies(getDeps: () => string[], addDeps: (deps: string[]) => void): {

@@ -5,0 +2,0 @@ [Symbol.iterator](): Generator<string, void, unknown>;

@@ -116,3 +116,2 @@ /**

};
export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
export type StringCallback = (err: NodeJS.ErrnoException | null, data?: string) => void;

@@ -128,3 +127,2 @@ export type BufferCallback = (err: NodeJS.ErrnoException | null, data?: Buffer) => void;

export type StatsOrBigIntStatsCallback = (err: NodeJS.ErrnoException | null, stats?: IStats | IBigIntStats) => void;
export type NumberCallback = (err: NodeJS.ErrnoException | null, data?: number) => void;
export type ReadJsonCallback = (err: NodeJS.ErrnoException | Error | null, data?: JsonObject) => void;

@@ -325,8 +323,2 @@ export type PathLike = string | Buffer | URL;

export type IntermediateFileSystem = InputFileSystem & OutputFileSystem & IntermediateFileSystemExtras;
export type WriteStreamOptions = {
flags?: string;
encoding?: 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'utf-16le' | 'ucs2' | 'ucs-2' | 'latin1' | 'binary' | 'base64' | 'base64url' | 'hex';
fd?: any;
mode?: number;
};
export type MakeDirectoryOptions = {

@@ -377,3 +369,12 @@ recursive?: boolean;

}, startTime: number, options: WatchOptions, callback: (error: Error | null, fileTimeInfoEntries: Map<string, FileSystemInfoEntry | 'ignore'>, contextTimeInfoEntries: Map<string, FileSystemInfoEntry | 'ignore'>, changedFiles: Set<string>, removedFiles: Set<string>) => void, callbackUndelayed: (fileName: string, changeTime: number) => void): Watcher;
on?(event: 'change', listener: (filename: string, mtime: number) => void): this;
on?(event: 'remove', listener: (filename: string) => void): this;
on?(event: 'aggregated', listener: (changes: Set<string>, removals: Set<string>) => void): this;
once?(event: 'change', listener: (filename: string, mtime: number) => void): this;
once?(event: 'remove', listener: (filename: string) => void): this;
once?(event: 'aggregated', listener: (changes: Set<string>, removals: Set<string>) => void): this;
emit?(event: 'change', filename: string, mtime: number): boolean;
emit?(event: 'remove', filename: string): boolean;
emit?(event: 'aggregated', changes: Set<string>, removals: Set<string>): boolean;
}
export {};
let createMd4, createXxhash64, url;
import { __webpack_require__ } from "./612.js";
import { __webpack_require__ } from "./rslib-runtime-worker.js";
import node_fs from "node:fs";

@@ -4,0 +4,0 @@ import node_querystring from "node:querystring";

{
"name": "@rspack/core",
"version": "2.1.0-rc.0",
"version": "2.1.0",
"webpackVersion": "5.75.0",

@@ -61,3 +61,3 @@ "license": "MIT",

"dependencies": {
"@rspack/binding": "2.1.0-rc.0"
"@rspack/binding": "2.1.0"
},

@@ -64,0 +64,0 @@ "peerDependencies": {

var __webpack_modules__ = {}, __webpack_module_cache__ = {};
function __webpack_require__(moduleId) {
var cachedModule = __webpack_module_cache__[moduleId];
if (void 0 !== cachedModule) return cachedModule.exports;
var module = __webpack_module_cache__[moduleId] = {
exports: {}
};
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
}
__webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
return __webpack_require__.d(getter, {
a: getter
}), getter;
}, __webpack_require__.d = (exports, getters, values)=>{
var define = (defs, kind)=>{
for(var key in defs)__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key) && Object.defineProperty(exports, key, {
enumerable: !0,
[kind]: defs[key]
});
};
define(getters, "get"), define(values, "value");
}, __webpack_require__.add = function(modules) {
Object.assign(__webpack_require__.m, modules);
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports)=>{
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {
value: 'Module'
}), Object.defineProperty(exports, '__esModule', {
value: !0
});
};
export { __webpack_require__ };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display