@rsbuild/core 1.6.7-canary-57e2a56d-20251120152633 → 1.6.8
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/compiled/css-loader/index.js +18 -18
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rspack-manifest-plugin/index.d.ts +1 -0
- package/compiled/rspack-manifest-plugin/index.js +19 -5
- package/compiled/rspack-manifest-plugin/package.json +1 -1
- package/compiled/style-loader/index.js +10 -10
- package/dist/0~open.js +163 -85
- package/dist/2~open.cjs +194 -114
- package/dist/{169.js → 506.js} +19 -23
- package/dist/index.cjs +19 -22
- package/dist/index.js +1 -1
- package/dist-types/helpers/stats.d.ts +0 -1
- package/dist-types/types/config.d.ts +30 -5
- package/package.json +5 -5
- /package/dist/{169.js.LICENSE.txt → 506.js.LICENSE.txt} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -4230,7 +4230,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
4230
4230
|
async function createContext(options, userConfig) {
|
|
4231
4231
|
let { cwd } = options, rootPath = userConfig.root ? ensureAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0, bundlerType = userConfig.provider ? 'webpack' : 'rspack';
|
|
4232
4232
|
return {
|
|
4233
|
-
version: "1.6.
|
|
4233
|
+
version: "1.6.8",
|
|
4234
4234
|
rootPath,
|
|
4235
4235
|
distPath: '',
|
|
4236
4236
|
cachePath,
|
|
@@ -5728,7 +5728,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
5728
5728
|
logger.debug("failed to open start URL with apple script."), logger.debug(err);
|
|
5729
5729
|
}
|
|
5730
5730
|
}
|
|
5731
|
-
let { apps, default: baseOpen } = await __webpack_require__.e("664").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/open@
|
|
5731
|
+
let { apps, default: baseOpen } = await __webpack_require__.e("664").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js"));
|
|
5732
5732
|
try {
|
|
5733
5733
|
let options = browser1 ? {
|
|
5734
5734
|
app: {
|
|
@@ -5771,7 +5771,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
5771
5771
|
})(config);
|
|
5772
5772
|
clearCache && (openedURLs = []);
|
|
5773
5773
|
let urls = [], host = await getHostInUrl(config.server.host), baseUrl = `${https ? 'https' : 'http'}://${host}:${port}`;
|
|
5774
|
-
for (let url of (targets.length ? urls.push(...targets.map((target)=>resolveUrl(replacePortPlaceholder(target, port), baseUrl))) : routes.length
|
|
5774
|
+
for (let url of (targets.length ? urls.push(...targets.map((target)=>resolveUrl(replacePortPlaceholder(target, port), baseUrl))) : routes.length ? urls.push(`${baseUrl}${routes[0].pathname}`) : urls.push(baseUrl), before && await before(), urls))openedURLs.includes(url) || (openBrowser(url), openedURLs.push(url));
|
|
5775
5775
|
}
|
|
5776
5776
|
function recursiveChunkGroup(chunkGroup, visited = new Set()) {
|
|
5777
5777
|
if (visited.has(chunkGroup)) return [];
|
|
@@ -8825,21 +8825,17 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
8825
8825
|
],
|
|
8826
8826
|
raw: !0
|
|
8827
8827
|
}, ({ code, emitFile, resourcePath })=>{
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
parsed.dir && (basename = parsed.name);
|
|
8833
|
-
}
|
|
8834
|
-
return basename ? `${basename}.node` : null;
|
|
8835
|
-
})(resourcePath);
|
|
8836
|
-
if (null === name) throw Error(`${color.dim('[rsbuild:node-addons]')} Failed to load Node.js addon: ${color.yellow(resourcePath)}`);
|
|
8837
|
-
return emitFile(name, code), `
|
|
8828
|
+
var resourcePath1;
|
|
8829
|
+
let name, name1 = (name = (resourcePath1 = resourcePath) && external_node_path_default().parse(resourcePath1).name) ? `${name}.node` : null;
|
|
8830
|
+
if (null === name1) throw Error(`${color.dim('[rsbuild:node-addons]')} Failed to load Node.js addon: ${color.yellow(resourcePath)}`);
|
|
8831
|
+
return emitFile(name1, code), `
|
|
8838
8832
|
try {
|
|
8839
|
-
const path = require("path");
|
|
8840
|
-
process.dlopen(module, path.join(__dirname, "${
|
|
8833
|
+
const path = require("node:path");
|
|
8834
|
+
process.dlopen(module, path.join(__dirname, "${name1}"));
|
|
8841
8835
|
} catch (error) {
|
|
8842
|
-
throw new Error('Failed to load Node.js addon: "${
|
|
8836
|
+
throw new Error('Failed to load Node.js addon: "${name1}"', {
|
|
8837
|
+
cause: error,
|
|
8838
|
+
});
|
|
8843
8839
|
}
|
|
8844
8840
|
`;
|
|
8845
8841
|
});
|
|
@@ -9404,8 +9400,8 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
9404
9400
|
filter,
|
|
9405
9401
|
writeToFileEmit: isDev && !0 !== writeToDisk,
|
|
9406
9402
|
generate: (htmlPaths = htmlPaths1, manifestOptions = manifestOptions1, environment1 = environment, (_seed, files, entries, { compilation })=>{
|
|
9407
|
-
let chunkEntries = new Map(), licenseMap = new Map(), publicPath = getPublicPathFromCompiler(compilation), allFiles = files.map((file)=>{
|
|
9408
|
-
if (file.chunk) for (let entryName of recursiveChunkEntryNames(file.chunk))chunkEntries.set(entryName, [
|
|
9403
|
+
let chunkEntries = new Map(), licenseMap = new Map(), publicPath = getPublicPathFromCompiler(compilation), integrity = {}, allFiles = files.map((file)=>{
|
|
9404
|
+
if (file.integrity && (integrity[file.path] = file.integrity), file.chunk) for (let entryName of recursiveChunkEntryNames(file.chunk))chunkEntries.set(entryName, [
|
|
9409
9405
|
file,
|
|
9410
9406
|
...chunkEntries.get(entryName) || []
|
|
9411
9407
|
]);
|
|
@@ -9445,7 +9441,8 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
9445
9441
|
}
|
|
9446
9442
|
let manifestData = {
|
|
9447
9443
|
allFiles,
|
|
9448
|
-
entries: manifestEntries
|
|
9444
|
+
entries: manifestEntries,
|
|
9445
|
+
integrity
|
|
9449
9446
|
};
|
|
9450
9447
|
if (manifestOptions.generate) {
|
|
9451
9448
|
let generatedManifest = manifestOptions.generate({
|
|
@@ -9859,7 +9856,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
9859
9856
|
};
|
|
9860
9857
|
function setupCommands() {
|
|
9861
9858
|
let cli = ((name = "")=>new CAC(name))('rsbuild');
|
|
9862
|
-
cli.version("1.6.
|
|
9859
|
+
cli.version("1.6.8"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
|
|
9863
9860
|
default: 'auto'
|
|
9864
9861
|
}).option('--env-dir <dir>', 'Set the directory for loading `.env` files').option('--env-mode <mode>', 'Set the env mode to load the `.env.[mode]` file').option('--environment <name>', 'Set the environment name(s) to build', {
|
|
9865
9862
|
type: [
|
|
@@ -9928,7 +9925,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
9928
9925
|
}
|
|
9929
9926
|
function showGreeting() {
|
|
9930
9927
|
let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
|
|
9931
|
-
logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.6.
|
|
9928
|
+
logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.6.8\n`);
|
|
9932
9929
|
}
|
|
9933
9930
|
function setupLogLevel() {
|
|
9934
9931
|
let logLevelIndex = process.argv.findIndex((item)=>'--log-level' === item || '--logLevel' === item);
|
|
@@ -9949,7 +9946,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
9949
9946
|
logger.error('Failed to start Rsbuild CLI.'), logger.error(err);
|
|
9950
9947
|
}
|
|
9951
9948
|
}
|
|
9952
|
-
let src_version = "1.6.
|
|
9949
|
+
let src_version = "1.6.8";
|
|
9953
9950
|
})(), exports.PLUGIN_CSS_NAME = __webpack_exports__.PLUGIN_CSS_NAME, exports.PLUGIN_SWC_NAME = __webpack_exports__.PLUGIN_SWC_NAME, exports.createRsbuild = __webpack_exports__.createRsbuild, exports.defaultAllowedOrigins = __webpack_exports__.defaultAllowedOrigins, exports.defineConfig = __webpack_exports__.defineConfig, exports.ensureAssetPrefix = __webpack_exports__.ensureAssetPrefix, exports.loadConfig = __webpack_exports__.loadConfig, exports.loadEnv = __webpack_exports__.loadEnv, exports.logger = __webpack_exports__.logger, exports.mergeRsbuildConfig = __webpack_exports__.mergeRsbuildConfig, exports.rspack = __webpack_exports__.rspack, exports.runCLI = __webpack_exports__.runCLI, exports.version = __webpack_exports__.version, __webpack_exports__)-1 === [
|
|
9954
9951
|
"PLUGIN_CSS_NAME",
|
|
9955
9952
|
"PLUGIN_SWC_NAME",
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig, loadEnv, logger, mergeRsbuildConfig, rspack, runCLI, version } from "./
|
|
1
|
+
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig, loadEnv, logger, mergeRsbuildConfig, rspack, runCLI, version } from "./506.js";
|
|
@@ -6,7 +6,6 @@ import type { ActionType, RsbuildStats, Rspack } from '../types';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const getStatsErrors: ({ errors, children, }: RsbuildStats) => Rspack.StatsError[];
|
|
8
8
|
export declare const getStatsWarnings: ({ warnings, children, }: RsbuildStats) => Rspack.StatsError[];
|
|
9
|
-
export declare const getStatsAssetsOptions: () => Rspack.StatsOptions;
|
|
10
9
|
export type RsbuildAsset = {
|
|
11
10
|
/**
|
|
12
11
|
* The name of the asset.
|
|
@@ -933,25 +933,50 @@ export type InlineChunkConfig = boolean | InlineChunkTest | {
|
|
|
933
933
|
test: InlineChunkTest;
|
|
934
934
|
};
|
|
935
935
|
export type ManifestByEntry = {
|
|
936
|
+
/**
|
|
937
|
+
* Files that are required during the initial load of the entry.
|
|
938
|
+
*/
|
|
936
939
|
initial?: {
|
|
940
|
+
/** Initial JavaScript files for this entry. */
|
|
937
941
|
js?: string[];
|
|
942
|
+
/** Initial CSS files for this entry. */
|
|
938
943
|
css?: string[];
|
|
939
944
|
};
|
|
945
|
+
/**
|
|
946
|
+
* Files that may be loaded asynchronously.
|
|
947
|
+
* Usually code-split chunks or lazily loaded chunks.
|
|
948
|
+
*/
|
|
940
949
|
async?: {
|
|
950
|
+
/** Async JavaScript files for this entry. */
|
|
941
951
|
js?: string[];
|
|
952
|
+
/** Async CSS files for this entry. */
|
|
942
953
|
css?: string[];
|
|
943
954
|
};
|
|
944
|
-
/**
|
|
945
|
-
assets?: string[];
|
|
955
|
+
/** HTML files generated for this entry, if any. */
|
|
946
956
|
html?: string[];
|
|
957
|
+
/**
|
|
958
|
+
* Additional assets associated with this entry.
|
|
959
|
+
* For example images、fonts、source maps and other non JS or CSS files.
|
|
960
|
+
*/
|
|
961
|
+
assets?: string[];
|
|
947
962
|
};
|
|
948
963
|
export type ManifestData = {
|
|
964
|
+
/**
|
|
965
|
+
* A flat list of all emitted asset files.
|
|
966
|
+
*/
|
|
967
|
+
allFiles: string[];
|
|
968
|
+
/**
|
|
969
|
+
* Maps each entry name to its associated output files.
|
|
970
|
+
*/
|
|
949
971
|
entries: {
|
|
950
|
-
/** relate to Rsbuild's source.entry config */
|
|
951
972
|
[entryName: string]: ManifestByEntry;
|
|
952
973
|
};
|
|
953
|
-
/**
|
|
954
|
-
|
|
974
|
+
/**
|
|
975
|
+
* Subresource Integrity (SRI) hashes for emitted assets.
|
|
976
|
+
* The key is the asset file path, and the value is its integrity hash.
|
|
977
|
+
* This field is available only when the `security.sri` option is enabled.
|
|
978
|
+
*/
|
|
979
|
+
integrity: Record<string, string>;
|
|
955
980
|
};
|
|
956
981
|
export type ManifestObjectConfig = {
|
|
957
982
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.8",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "
|
|
49
|
+
"@rspack/core": "1.6.4",
|
|
50
50
|
"@rspack/lite-tapable": "~1.1.0",
|
|
51
51
|
"@swc/helpers": "^0.5.17",
|
|
52
52
|
"core-js": "~3.47.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"memfs": "^4.51.0",
|
|
78
78
|
"mrmime": "^2.0.1",
|
|
79
79
|
"on-finished": "2.4.1",
|
|
80
|
-
"open": "^
|
|
80
|
+
"open": "^11.0.0",
|
|
81
81
|
"picocolors": "^1.1.1",
|
|
82
82
|
"postcss": "^8.5.6",
|
|
83
83
|
"postcss-load-config": "6.0.1",
|
|
@@ -87,13 +87,13 @@
|
|
|
87
87
|
"reduce-configs": "^1.1.1",
|
|
88
88
|
"rslog": "^1.3.0",
|
|
89
89
|
"rspack-chain": "^1.4.1",
|
|
90
|
-
"rspack-manifest-plugin": "5.
|
|
90
|
+
"rspack-manifest-plugin": "5.2.0",
|
|
91
91
|
"sirv": "^3.0.2",
|
|
92
92
|
"stacktrace-parser": "^0.1.11",
|
|
93
93
|
"style-loader": "3.3.4",
|
|
94
94
|
"tinyglobby": "0.2.14",
|
|
95
95
|
"typescript": "^5.9.3",
|
|
96
|
-
"webpack": "^5.
|
|
96
|
+
"webpack": "^5.103.0",
|
|
97
97
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
98
98
|
"webpack-merge": "6.0.1",
|
|
99
99
|
"ws": "^8.18.3"
|
|
File without changes
|