@rspack/core 1.5.3 → 1.5.4
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 +7 -7
- package/module.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -7751,7 +7751,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7751
7751
|
};
|
7752
7752
|
}
|
7753
7753
|
}
|
7754
|
-
let
|
7754
|
+
let DELTA_A_TO_Z = 26, NUMBER_OF_IDENTIFIER_START_CHARS = 54, NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = 64, FUNCTION_CONTENT_REGEX = /^function\s?\(\)\s?\{\r?\n?|\r?\n?\}$/g, INDENT_MULTILINE_REGEX = /^\t/gm, LINE_SEPARATOR_REGEX = /\r?\n/g, IDENTIFIER_NAME_REPLACE_REGEX = /^([^a-zA-Z$_])/, IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX = /[^a-zA-Z0-9$]+/g, COMMENT_END_REGEX = /\*\//g, PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g, MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g;
|
7755
7755
|
class Template {
|
7756
7756
|
static getFunctionContent(fn) {
|
7757
7757
|
return fn.toString().replace(FUNCTION_CONTENT_REGEX, "").replace(INDENT_MULTILINE_REGEX, "").replace(LINE_SEPARATOR_REGEX, "\n");
|
@@ -8653,7 +8653,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8653
8653
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
8654
8654
|
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), !1 === experiments.topLevelAwait && console.warn("`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration."), 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", !1), 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", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !1);
|
8655
8655
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
8656
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.5.
|
8656
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.5.4"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
8657
8657
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst })=>{
|
8658
8658
|
if (assertNotNill(module.parser), assertNotNill(module.generator), defaults_F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), defaults_F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), defaults_F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), ((parserOptions, { usedExports, inlineConst })=>{
|
8659
8659
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !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", [
|
@@ -8662,7 +8662,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8662
8662
|
})(module.parser.javascript, {
|
8663
8663
|
usedExports,
|
8664
8664
|
inlineConst
|
8665
|
-
}), defaults_F(module.parser,
|
8665
|
+
}), defaults_F(module.parser, "json", ()=>({})), assertNotNill(module.parser.json), D(module.parser.json, "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), defaults_F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), D(module.generator.json, "JSONParse", !0), css) {
|
8666
8666
|
defaults_F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), D(module.parser.css, "url", !0), defaults_F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), D(module.parser["css/auto"], "url", !0), defaults_F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), D(module.parser["css/module"], "url", !0), defaults_F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), defaults_F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is");
|
8667
8667
|
let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
|
8668
8668
|
D(module.generator["css/auto"], "localIdentName", localIdentName), D(module.generator["css/auto"], "esModule", !0), defaults_F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", localIdentName), D(module.generator["css/module"], "esModule", !0);
|
@@ -10297,7 +10297,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
10297
10297
|
});
|
10298
10298
|
}
|
10299
10299
|
}
|
10300
|
-
let CORE_VERSION = "1.5.
|
10300
|
+
let CORE_VERSION = "1.5.4", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
10301
10301
|
|
10302
10302
|
Help:
|
10303
10303
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
@@ -11581,7 +11581,7 @@ Help:
|
|
11581
11581
|
obj.children = this.stats.map((stat, idx)=>{
|
11582
11582
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
11583
11583
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
11584
|
-
}), childOptions.version && (obj.rspackVersion = "1.5.
|
11584
|
+
}), childOptions.version && (obj.rspackVersion = "1.5.4", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
11585
11585
|
let mapError = (j, obj)=>({
|
11586
11586
|
...obj,
|
11587
11587
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
@@ -12481,7 +12481,7 @@ Help:
|
|
12481
12481
|
object.hash = context.getStatsCompilation(compilation).hash;
|
12482
12482
|
},
|
12483
12483
|
version: (object)=>{
|
12484
|
-
object.version = "5.75.0", object.rspackVersion = "1.5.
|
12484
|
+
object.version = "5.75.0", object.rspackVersion = "1.5.4";
|
12485
12485
|
},
|
12486
12486
|
env: (object, _compilation, _context, { _env })=>{
|
12487
12487
|
object.env = _env;
|
@@ -15796,7 +15796,7 @@ Help:
|
|
15796
15796
|
let _options = JSON.stringify(options || {});
|
15797
15797
|
return binding_default().transform(source, _options);
|
15798
15798
|
}
|
15799
|
-
let exports_rspackVersion = "1.5.
|
15799
|
+
let exports_rspackVersion = "1.5.4", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
15800
15800
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
15801
15801
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
15802
15802
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
package/module.d.ts
CHANGED
@@ -177,7 +177,7 @@ declare namespace Rspack {
|
|
177
177
|
loaded: boolean;
|
178
178
|
parents: NodeJS.Module["id"][] | null | undefined;
|
179
179
|
children: NodeJS.Module["id"][];
|
180
|
-
hot?: Hot
|
180
|
+
hot?: Hot;
|
181
181
|
}
|
182
182
|
|
183
183
|
interface RequireResolve {
|
@@ -219,7 +219,7 @@ interface ImportMeta {
|
|
219
219
|
url: string;
|
220
220
|
// TODO: unsupported
|
221
221
|
// webpack: number;
|
222
|
-
webpackHot
|
222
|
+
webpackHot?: Rspack.Hot;
|
223
223
|
webpackContext: (
|
224
224
|
request: string,
|
225
225
|
options?: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.5.
|
3
|
+
"version": "1.5.4",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -39,7 +39,7 @@
|
|
39
39
|
"devDependencies": {
|
40
40
|
"@ast-grep/napi": "^0.39.1",
|
41
41
|
"@rsbuild/plugin-node-polyfill": "^1.4.1",
|
42
|
-
"@rslib/core": "0.
|
42
|
+
"@rslib/core": "0.13.0",
|
43
43
|
"@swc/types": "0.1.24",
|
44
44
|
"@types/graceful-fs": "4.1.9",
|
45
45
|
"@types/watchpack": "^2.4.4",
|
@@ -60,7 +60,7 @@
|
|
60
60
|
"dependencies": {
|
61
61
|
"@module-federation/runtime-tools": "0.18.0",
|
62
62
|
"@rspack/lite-tapable": "1.0.1",
|
63
|
-
"@rspack/binding": "1.5.
|
63
|
+
"@rspack/binding": "1.5.4"
|
64
64
|
},
|
65
65
|
"peerDependencies": {
|
66
66
|
"@swc/helpers": ">=0.5.1"
|