extension-develop 3.9.0-next.5 → 3.9.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/module.cjs +62 -13
- package/package.json +1 -1
package/dist/module.cjs
CHANGED
|
@@ -134191,13 +134191,17 @@ var __webpack_modules__ = {
|
|
|
134191
134191
|
return `${getLoggingPrefix('success')} Dependencies installed. Run the command again to proceed.`;
|
|
134192
134192
|
}
|
|
134193
134193
|
function buildWebpack(projectDir, stats, browser) {
|
|
134194
|
-
const statsJson = stats?.toJson(
|
|
134194
|
+
const statsJson = stats?.toJson({
|
|
134195
|
+
all: false,
|
|
134196
|
+
assets: true,
|
|
134197
|
+
time: true
|
|
134198
|
+
});
|
|
134195
134199
|
const outputPath = 'string' == typeof stats?.compilation?.outputOptions?.path ? stats.compilation.outputOptions.path : '';
|
|
134196
134200
|
const manifestPath = outputPath ? path__rspack_import_1.join(outputPath, 'manifest.json') : path__rspack_import_1.join(projectDir, 'manifest.json');
|
|
134197
134201
|
const manifest = JSON.parse(fs__rspack_import_0.readFileSync(manifestPath, 'utf8'));
|
|
134198
134202
|
const assets = statsJson?.assets;
|
|
134199
134203
|
const heading = `${getLoggingPrefix('info')} Building ${pintor__rspack_import_2_default().blue(manifest.name)} extension using ${capitalizedBrowserName(browser)} defaults...\n`;
|
|
134200
|
-
const buildTime = `\nBuild completed in ${((statsJson?.time || 0) / 1000).toFixed(2)} seconds
|
|
134204
|
+
const buildTime = `\nBuild completed in ${((statsJson?.time || 0) / 1000).toFixed(2)} seconds.\n`;
|
|
134201
134205
|
const buildTarget = `Build Target: ${pintor__rspack_import_2_default().gray(capitalizedBrowserName(browser))}\n`;
|
|
134202
134206
|
const buildStatus = `Build Status: ${stats?.hasErrors() ? pintor__rspack_import_2_default().red('Failed') : pintor__rspack_import_2_default().green('Success')}\n`;
|
|
134203
134207
|
const version1 = `\nVersion: ${pintor__rspack_import_2_default().gray(manifest.version)}\n`;
|
|
@@ -134258,13 +134262,13 @@ var __webpack_modules__ = {
|
|
|
134258
134262
|
if (haystack.includes('runtime') || haystack.includes('will fail') || haystack.includes('cannot resolve') || haystack.includes('service_worker')) return 'Runtime-risk';
|
|
134259
134263
|
return 'Warning';
|
|
134260
134264
|
}
|
|
134261
|
-
function
|
|
134262
|
-
if ('Performance' === category) return '
|
|
134263
|
-
if ('Deprecation' === category) return 'Move to the supported API
|
|
134265
|
+
function suggestedHintForWarning(category) {
|
|
134266
|
+
if ('Performance' === category) return 'Inspect the largest startup bundles and split optional code paths.';
|
|
134267
|
+
if ('Deprecation' === category) return 'Move to the supported API or plugin path before the next update.';
|
|
134264
134268
|
if ('Configuration' === category) return 'Review extension and bundler config keys, then remove or rename invalid options.';
|
|
134265
134269
|
if ('Compatibility' === category) return 'Verify browser target and manifest compatibility for this build.';
|
|
134266
|
-
if ('Runtime-risk' === category) return 'Address this
|
|
134267
|
-
return 'Re-run with
|
|
134270
|
+
if ('Runtime-risk' === category) return 'Address this before release; it may fail or degrade at runtime.';
|
|
134271
|
+
return 'Re-run with EXTENSION_VERBOSE=1 to inspect full warning details.';
|
|
134268
134272
|
}
|
|
134269
134273
|
function buildSuccessWithWarnings(warningCount) {
|
|
134270
134274
|
return `${getLoggingPrefix('warn')} Build succeeded with ${warningCount} warning(s). Your extension is ${pintor__rspack_import_2_default().green('ready for deployment')}.`;
|
|
@@ -134272,19 +134276,20 @@ var __webpack_modules__ = {
|
|
|
134272
134276
|
function buildWarningsDetails(warnings) {
|
|
134273
134277
|
if (!Array.isArray(warnings) || 0 === warnings.length) return '';
|
|
134274
134278
|
const blocks = [];
|
|
134275
|
-
const sectionHeader = `${getLoggingPrefix('warn')} Warning details\n`;
|
|
134276
134279
|
warnings.forEach((warning, index)=>{
|
|
134277
134280
|
const message = getWarningMessage(warning);
|
|
134278
134281
|
const source = getWarningSource(warning);
|
|
134279
134282
|
const artifact = getWarningArtifact(warning);
|
|
134280
134283
|
const category = classifyWarning(message, source);
|
|
134281
|
-
const
|
|
134282
|
-
if (!message) return void blocks.push(
|
|
134284
|
+
const hint = suggestedHintForWarning(category);
|
|
134285
|
+
if (!message) return void blocks.push(`${getLoggingPrefix('warn')} Warning ${index + 1}: details were suppressed by tool output.\n${formatWarningLabelLine('Source', pintor__rspack_import_2_default().gray(source))}\n${formatWarningLabelLine('Hint', 'Re-run with EXTENSION_VERBOSE=1 to inspect full warning messages.')}`);
|
|
134286
|
+
const performanceWarning = parsePerformanceWarning(warning, source, artifact);
|
|
134287
|
+
if (performanceWarning) return void blocks.push(performanceWarning);
|
|
134283
134288
|
const oneLine = message.replace(/\s+/g, ' ').trim();
|
|
134284
134289
|
const artifactSuffix = artifact ? ` ${pintor__rspack_import_2_default().gray(`(${artifact})`)}` : '';
|
|
134285
|
-
blocks.push(
|
|
134290
|
+
blocks.push(`${getLoggingPrefix('warn')} ${category}: ${oneLine}${artifactSuffix}\n${formatWarningLabelLine('Source', pintor__rspack_import_2_default().gray(source))}\n${formatWarningLabelLine('Hint', hint)}`);
|
|
134286
134291
|
});
|
|
134287
|
-
return
|
|
134292
|
+
return blocks.join('\n\n');
|
|
134288
134293
|
}
|
|
134289
134294
|
function fetchingProjectPath(owner, project) {
|
|
134290
134295
|
return fmt.block('Fetching project', [
|
|
@@ -134386,6 +134391,49 @@ var __webpack_modules__ = {
|
|
|
134386
134391
|
});
|
|
134387
134392
|
return `.\n${printTree(assetTree)}`;
|
|
134388
134393
|
}
|
|
134394
|
+
function formatWarningLabelLine(label, value) {
|
|
134395
|
+
return `${pintor__rspack_import_2_default().gray('│')} ${pintor__rspack_import_2_default().gray(`${label}:`)} ${value}`;
|
|
134396
|
+
}
|
|
134397
|
+
function parsePerformanceWarning(warning, source, _artifact) {
|
|
134398
|
+
const normalized = getWarningBody(warning).replace(/\r/g, '');
|
|
134399
|
+
const lower = normalized.toLowerCase();
|
|
134400
|
+
const threshold = normalized.match(/\(([\d.]+\s(?:KiB|MiB|GiB|KB|MB|GB))\)/)?.[1] || '';
|
|
134401
|
+
if (lower.includes('asset size limit')) return formatPerformanceWarningBlock({
|
|
134402
|
+
title: 'asset size limit exceeded',
|
|
134403
|
+
threshold,
|
|
134404
|
+
impact: 'Large emitted files can increase package size and slow extension startup.',
|
|
134405
|
+
source,
|
|
134406
|
+
hint: 'Inspect the largest startup bundles and split optional code paths.'
|
|
134407
|
+
});
|
|
134408
|
+
if (lower.includes('entrypoint size limit')) return formatPerformanceWarningBlock({
|
|
134409
|
+
title: 'entrypoint size limit exceeded',
|
|
134410
|
+
threshold,
|
|
134411
|
+
impact: 'Startup entrypoints are heavier than recommended.',
|
|
134412
|
+
source,
|
|
134413
|
+
hint: 'Keep startup entrypoints thin and defer non-critical code.'
|
|
134414
|
+
});
|
|
134415
|
+
}
|
|
134416
|
+
function formatPerformanceWarningBlock(options) {
|
|
134417
|
+
const lines = [
|
|
134418
|
+
`${getLoggingPrefix('warn')} Performance: ${options.title}`
|
|
134419
|
+
];
|
|
134420
|
+
if (options.threshold) lines.push(formatWarningLabelLine('Threshold', options.threshold));
|
|
134421
|
+
lines.push(formatWarningLabelLine('Impact', options.impact));
|
|
134422
|
+
lines.push(pintor__rspack_import_2_default().gray('│'));
|
|
134423
|
+
lines.push(formatWarningLabelLine('Source', pintor__rspack_import_2_default().gray(options.source)));
|
|
134424
|
+
lines.push(formatWarningLabelLine('Hint', options.hint));
|
|
134425
|
+
return lines.join('\n');
|
|
134426
|
+
}
|
|
134427
|
+
function getWarningBody(warning) {
|
|
134428
|
+
if (!warning) return '';
|
|
134429
|
+
if ('string' == typeof warning) return warning;
|
|
134430
|
+
return [
|
|
134431
|
+
warning.message,
|
|
134432
|
+
warning.details,
|
|
134433
|
+
warning.reason,
|
|
134434
|
+
warning.description
|
|
134435
|
+
].filter((value)=>'string' == typeof value && value.trim().length > 0).join('\n');
|
|
134436
|
+
}
|
|
134389
134437
|
function isUsingExperimentalConfig(integration) {
|
|
134390
134438
|
return `${getLoggingPrefix('info')} Using ${pintor__rspack_import_2_default().yellow(integration)}.`;
|
|
134391
134439
|
}
|
|
@@ -135416,7 +135464,7 @@ var __webpack_modules__ = {
|
|
|
135416
135464
|
},
|
|
135417
135465
|
"./package.json" (module) {
|
|
135418
135466
|
"use strict";
|
|
135419
|
-
module.exports = JSON.parse('{"rE":"3.9.0
|
|
135467
|
+
module.exports = JSON.parse('{"rE":"3.9.0","El":{"@rspack/core":"^1.7.5","@rspack/dev-server":"^1.1.5","@swc/core":"^1.15.8","@swc/helpers":"^0.5.18","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chrome-location2":"4.0.0","chromium-location":"2.0.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^17.2.3","edge-location":"2.2.0","extension-from-store":"^0.1.1","firefox-location2":"3.0.0","go-git-it":"^5.1.1","ignore":"^7.0.5","loader-utils":"^3.3.1","magic-string":"^0.30.21","parse5":"^8.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.3.3","tiny-glob":"^0.2.9","unique-names-generator":"^4.7.1","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.19.0"}}');
|
|
135420
135468
|
}
|
|
135421
135469
|
};
|
|
135422
135470
|
var __webpack_module_cache__ = {};
|
|
@@ -136333,6 +136381,7 @@ var __webpack_exports__ = {};
|
|
|
136333
136381
|
plugins: allPluginsButBrowserRunners
|
|
136334
136382
|
});
|
|
136335
136383
|
const compilerConfig = merge(userConfig);
|
|
136384
|
+
compilerConfig.stats = false;
|
|
136336
136385
|
const compiler = rspack(compilerConfig);
|
|
136337
136386
|
let summary = {
|
|
136338
136387
|
browser,
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"webpack/webpack-lib/optional-dependencies.json"
|
|
26
26
|
],
|
|
27
27
|
"name": "extension-develop",
|
|
28
|
-
"version": "3.9.0
|
|
28
|
+
"version": "3.9.0",
|
|
29
29
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Cezar Augusto",
|