@rspack/core 1.4.6 → 1.4.7-alpha.0
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/index.js +12 -28
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -2678,17 +2678,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2678
2678
|
if ("string" == typeof bufLike) return Buffer.from(bufLike);
|
2679
2679
|
if (bufLike instanceof Uint8Array) return Buffer.from(bufLike.buffer);
|
2680
2680
|
throw Error("Buffer, Uint8Array or string expected");
|
2681
|
-
}, toObject = (input)=>{
|
2682
|
-
let s;
|
2683
|
-
if (Buffer.isBuffer(input)) s = input.toString("utf8");
|
2684
|
-
else if (input && "object" == typeof input) return input;
|
2685
|
-
else if ("string" == typeof input) s = input;
|
2686
|
-
else throw Error("Buffer or string or object expected");
|
2687
|
-
return JSON.parse(s);
|
2688
2681
|
};
|
2689
|
-
function serializeObject(map) {
|
2690
|
-
if (!isNil(map)) return "string" == typeof map ? map ? toBuffer(map) : void 0 : toBuffer(JSON.stringify(map));
|
2691
|
-
}
|
2692
2682
|
function stringifyLoaderObject(o) {
|
2693
2683
|
return o.path + o.query + o.fragment;
|
2694
2684
|
}
|
@@ -3354,14 +3344,6 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3354
3344
|
return loader.loaderItem;
|
3355
3345
|
}
|
3356
3346
|
}
|
3357
|
-
class JsSourceMap {
|
3358
|
-
static __from_binding(map) {
|
3359
|
-
return isNil(map) ? void 0 : toObject(map);
|
3360
|
-
}
|
3361
|
-
static __to_binding(map) {
|
3362
|
-
return serializeObject(map);
|
3363
|
-
}
|
3364
|
-
}
|
3365
3347
|
function getCurrentLoader(loaderContext, index = loaderContext.loaderIndex) {
|
3366
3348
|
return loaderContext.loaders?.length && index < loaderContext.loaders.length && index >= 0 && loaderContext.loaders[index] ? loaderContext.loaders[index] : null;
|
3367
3349
|
}
|
@@ -3790,14 +3772,14 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3790
3772
|
]);
|
3791
3773
|
if (args.some((value)=>void 0 !== value)) {
|
3792
3774
|
let [content, sourceMap, additionalData] = args;
|
3793
|
-
context.content = isNil(content) ? null : toBuffer(content), context.sourceMap =
|
3775
|
+
context.content = isNil(content) ? null : toBuffer(content), context.sourceMap = sourceMap || void 0, context.additionalData = additionalData || void 0;
|
3794
3776
|
break;
|
3795
3777
|
}
|
3796
3778
|
}
|
3797
3779
|
break;
|
3798
3780
|
case binding_.JsLoaderState.Normal:
|
3799
3781
|
{
|
3800
|
-
let content = context.content, sourceMap =
|
3782
|
+
let content = context.content, sourceMap = context.sourceMap, additionalData = context.additionalData;
|
3801
3783
|
for(; loaderContext.loaderIndex >= 0;){
|
3802
3784
|
let currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex], parallelism = enableParallelism(currentLoaderObject);
|
3803
3785
|
if (currentLoaderObject.shouldYield()) break;
|
@@ -3813,7 +3795,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3813
3795
|
additionalData
|
3814
3796
|
]));
|
3815
3797
|
}
|
3816
|
-
context.content = isNil(content) ? null : toBuffer(content), context.sourceMap =
|
3798
|
+
context.content = isNil(content) ? null : toBuffer(content), context.sourceMap = sourceMap || void 0, context.additionalData = additionalData || void 0, context.__internal__utf8Hint = "string" == typeof content;
|
3817
3799
|
break;
|
3818
3800
|
}
|
3819
3801
|
default:
|
@@ -9377,7 +9359,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9377
9359
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
9378
9360
|
defaults_F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !0), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !0), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1);
|
9379
9361
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
9380
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.
|
9362
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.7-alpha.0"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
9381
9363
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
|
9382
9364
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
9383
9365
|
"..."
|
@@ -10255,14 +10237,16 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
10255
10237
|
this.suspended && (this.suspended = !1, this.#invalidate());
|
10256
10238
|
}
|
10257
10239
|
}
|
10258
|
-
let CORE_VERSION = "1.4.
|
10240
|
+
let CORE_VERSION = "1.4.7-alpha.0", checkVersion = ()=>CORE_VERSION === binding_.EXPECTED_RSPACK_CORE_VERSION || CORE_VERSION.includes("canary") ? null : Error(bindingVersionCheck_errorMessage(CORE_VERSION, binding_.EXPECTED_RSPACK_CORE_VERSION)), bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
10259
10241
|
|
10260
10242
|
Help:
|
10261
|
-
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
10262
|
-
|
10243
|
+
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
10244
|
+
The expected version of @rspack/core to the current binding is ${expectedCoreVersion}.
|
10245
|
+
` : `Unmatched version @rspack/core@${coreVersion} and @rspack/binding@${expectedCoreVersion}.
|
10263
10246
|
|
10264
10247
|
Help:
|
10265
10248
|
Please ensure the version of @rspack/binding and @rspack/core is the same.
|
10249
|
+
The expected version of @rspack/core to the current binding is ${expectedCoreVersion}.
|
10266
10250
|
`, createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap)=>{
|
10267
10251
|
let getOptions = (uid)=>getPluginOptions(getCompiler().__internal__get_compilation(), uid);
|
10268
10252
|
return {
|
@@ -11518,7 +11502,7 @@ Help:
|
|
11518
11502
|
obj.children = this.stats.map((stat, idx)=>{
|
11519
11503
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
11520
11504
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
11521
|
-
}), childOptions.version && (obj.rspackVersion = "1.4.
|
11505
|
+
}), childOptions.version && (obj.rspackVersion = "1.4.7-alpha.0", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
11522
11506
|
let mapError = (j, obj)=>({
|
11523
11507
|
...obj,
|
11524
11508
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
@@ -12418,7 +12402,7 @@ Help:
|
|
12418
12402
|
object.hash = context.getStatsCompilation(compilation).hash;
|
12419
12403
|
},
|
12420
12404
|
version: (object)=>{
|
12421
|
-
object.version = "5.75.0", object.rspackVersion = "1.4.
|
12405
|
+
object.version = "5.75.0", object.rspackVersion = "1.4.7-alpha.0";
|
12422
12406
|
},
|
12423
12407
|
env: (object, _compilation, _context, { _env })=>{
|
12424
12408
|
object.env = _env;
|
@@ -15841,7 +15825,7 @@ Help:
|
|
15841
15825
|
let _options = JSON.stringify(options || {});
|
15842
15826
|
return binding_default().transform(source, _options);
|
15843
15827
|
}
|
15844
|
-
let exports_rspackVersion = "1.4.
|
15828
|
+
let exports_rspackVersion = "1.4.7-alpha.0", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
15845
15829
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
15846
15830
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
15847
15831
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.7-alpha.0",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -58,7 +58,7 @@
|
|
58
58
|
"dependencies": {
|
59
59
|
"@module-federation/runtime-tools": "0.15.0",
|
60
60
|
"@rspack/lite-tapable": "1.0.1",
|
61
|
-
"@rspack/binding": "1.4.
|
61
|
+
"@rspack/binding": "1.4.7-alpha.0"
|
62
62
|
},
|
63
63
|
"peerDependencies": {
|
64
64
|
"@swc/helpers": ">=0.5.1"
|