extension-develop 3.9.4 → 3.10.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/270.cjs +12 -1
- package/dist/552.cjs +11 -1
- package/dist/module.cjs +35 -3
- package/dist/warn-no-default-export.cjs +2 -1
- package/package.json +1 -1
package/dist/270.cjs
CHANGED
|
@@ -10396,6 +10396,7 @@ Set background.noDynamicEntryWarning to true to disable this warning.
|
|
|
10396
10396
|
persistProfile: devOptions.persistProfile,
|
|
10397
10397
|
preferences: darkDefaults.preferences,
|
|
10398
10398
|
browserFlags: darkDefaults.browserFlags,
|
|
10399
|
+
excludeBrowserFlags: devOptions.excludeBrowserFlags,
|
|
10399
10400
|
chromiumBinary: devOptions.chromiumBinary,
|
|
10400
10401
|
geckoBinary: devOptions.geckoBinary,
|
|
10401
10402
|
instanceId: devOptions.instanceId,
|
|
@@ -10543,7 +10544,17 @@ Set background.noDynamicEntryWarning to true to disable this warning.
|
|
|
10543
10544
|
function scrubBrand(txt, brand = 'Extension.js') {
|
|
10544
10545
|
if (!txt) return txt;
|
|
10545
10546
|
const safeBrand = brand.replace(/\$/g, '$$$$');
|
|
10546
|
-
|
|
10547
|
+
const preserved = [];
|
|
10548
|
+
const preserve = (value)=>{
|
|
10549
|
+
const token = `__EXT_BRAND_PRESERVE_${preserved.length}__`;
|
|
10550
|
+
preserved.push(value);
|
|
10551
|
+
return token;
|
|
10552
|
+
};
|
|
10553
|
+
let output = txt.replace(/\bRspack\b(?=\s+performance recommendations:)/gi, preserve).replace(/https?:\/\/rspack\.(?:rs|dev)\/[^\s)]+/gi, preserve).replace(RegExp("(?<!@)\\bRspack\\b", "gi"), safeBrand).replace(RegExp("(?<!@)\\bWebpack\\b", "gi"), safeBrand).replace(RegExp("(?<!@)\\bwebpack-dev-server\\b", "gi"), `${safeBrand} dev server`).replace(RegExp("(?<!@)\\bRspackDevServer\\b", "gi"), `${safeBrand} dev server`).replace(/ModuleBuildError:\s*/g, '').replace(/ModuleParseError:\s*/g, '').replace(/Error:\s*Module\s+build\s+failed.*?\n/gi, '').replace(/\n{3,}/g, '\n\n').replace(/\n{2}(?=WARNING in )/g, '\n');
|
|
10554
|
+
preserved.forEach((value, index)=>{
|
|
10555
|
+
output = output.replace(`__EXT_BRAND_PRESERVE_${index}__`, value);
|
|
10556
|
+
});
|
|
10557
|
+
return output;
|
|
10547
10558
|
}
|
|
10548
10559
|
function makeSanitizedConsole(brand = 'Extension.js') {
|
|
10549
10560
|
const sanitize = (a)=>'string' == typeof a ? scrubBrand(a, brand) : a;
|
package/dist/552.cjs
CHANGED
|
@@ -11,7 +11,17 @@ exports.modules = {
|
|
|
11
11
|
function scrubBrand(txt, brand = 'Extension.js') {
|
|
12
12
|
if (!txt) return txt;
|
|
13
13
|
const safeBrand = brand.replace(/\$/g, '$$$$');
|
|
14
|
-
|
|
14
|
+
const preserved = [];
|
|
15
|
+
const preserve = (value)=>{
|
|
16
|
+
const token = `__EXT_BRAND_PRESERVE_${preserved.length}__`;
|
|
17
|
+
preserved.push(value);
|
|
18
|
+
return token;
|
|
19
|
+
};
|
|
20
|
+
let output = txt.replace(/\bRspack\b(?=\s+performance recommendations:)/gi, preserve).replace(/https?:\/\/rspack\.(?:rs|dev)\/[^\s)]+/gi, preserve).replace(RegExp("(?<!@)\\bRspack\\b", "gi"), safeBrand).replace(RegExp("(?<!@)\\bWebpack\\b", "gi"), safeBrand).replace(RegExp("(?<!@)\\bwebpack-dev-server\\b", "gi"), `${safeBrand} dev server`).replace(RegExp("(?<!@)\\bRspackDevServer\\b", "gi"), `${safeBrand} dev server`).replace(/ModuleBuildError:\s*/g, '').replace(/ModuleParseError:\s*/g, '').replace(/Error:\s*Module\s+build\s+failed.*?\n/gi, '').replace(/\n{3,}/g, '\n\n').replace(/\n{2}(?=WARNING in )/g, '\n');
|
|
21
|
+
preserved.forEach((value, index)=>{
|
|
22
|
+
output = output.replace(`__EXT_BRAND_PRESERVE_${index}__`, value);
|
|
23
|
+
});
|
|
24
|
+
return output;
|
|
15
25
|
}
|
|
16
26
|
function makeSanitizedConsole(brand = 'Extension.js') {
|
|
17
27
|
const sanitize = (a)=>'string' == typeof a ? scrubBrand(a, brand) : a;
|
package/dist/module.cjs
CHANGED
|
@@ -131829,7 +131829,8 @@ var __webpack_modules__ = {
|
|
|
131829
131829
|
var _webpack_lib_optional_dependencies__rspack_import_7 = __webpack_require__("./webpack/webpack-lib/optional-dependencies.ts");
|
|
131830
131830
|
var _webpack_lib_package_manager__rspack_import_8 = __webpack_require__("./webpack/webpack-lib/package-manager.ts");
|
|
131831
131831
|
function parseJsonSafe(text) {
|
|
131832
|
-
const
|
|
131832
|
+
const raw = 'string' == typeof text ? text : String(text || '');
|
|
131833
|
+
const s = raw && 0xfeff === raw.charCodeAt(0) ? raw.slice(1) : raw;
|
|
131833
131834
|
return JSON.parse(s || '{}');
|
|
131834
131835
|
}
|
|
131835
131836
|
function resolveDevelopRootFromDir(dir) {
|
|
@@ -131987,6 +131988,33 @@ var __webpack_modules__ = {
|
|
|
131987
131988
|
version: _package_json__rspack_import_5.rE
|
|
131988
131989
|
}, null, 2) + '\n');
|
|
131989
131990
|
}
|
|
131991
|
+
function getPinnedOptionalDependencyMap(dependencies) {
|
|
131992
|
+
const specs = (0, _webpack_lib_optional_dependencies__rspack_import_7.ad)(dependencies);
|
|
131993
|
+
const pinned = {};
|
|
131994
|
+
for(let i = 0; i < dependencies.length; i++){
|
|
131995
|
+
const dependencyId = dependencies[i];
|
|
131996
|
+
const spec = specs[i] || '';
|
|
131997
|
+
const versionSeparator = spec.lastIndexOf('@');
|
|
131998
|
+
if (dependencyId && !(versionSeparator <= 0)) pinned[dependencyId] = spec.slice(versionSeparator + 1);
|
|
131999
|
+
}
|
|
132000
|
+
return pinned;
|
|
132001
|
+
}
|
|
132002
|
+
function ensureOptionalDependenciesManifest(installBaseDir, dependencies) {
|
|
132003
|
+
if (!dependencies.length) return;
|
|
132004
|
+
const packageJsonPath = path__rspack_import_0.join(installBaseDir, 'package.json');
|
|
132005
|
+
const current = parseJsonSafe(fs__rspack_import_1.readFileSync(packageJsonPath, 'utf8'));
|
|
132006
|
+
const nextOptionalDependencies = {
|
|
132007
|
+
...current.optionalDependencies || {},
|
|
132008
|
+
...getPinnedOptionalDependencyMap(dependencies)
|
|
132009
|
+
};
|
|
132010
|
+
const didChange = dependencies.some((dependencyId)=>current.optionalDependencies?.[dependencyId] !== nextOptionalDependencies[dependencyId]);
|
|
132011
|
+
if (!didChange) return;
|
|
132012
|
+
fs__rspack_import_1.writeFileSync(packageJsonPath, JSON.stringify({
|
|
132013
|
+
...current,
|
|
132014
|
+
private: true,
|
|
132015
|
+
optionalDependencies: nextOptionalDependencies
|
|
132016
|
+
}, null, 2) + '\n');
|
|
132017
|
+
}
|
|
131990
132018
|
function getOptionalInstallCommand(pm, dependencies, installBaseDir) {
|
|
131991
132019
|
const pmName = pm.name;
|
|
131992
132020
|
const dependencySpecs = (0, _webpack_lib_optional_dependencies__rspack_import_7.ad)(dependencies);
|
|
@@ -132082,6 +132110,7 @@ var __webpack_modules__ = {
|
|
|
132082
132110
|
try {
|
|
132083
132111
|
installBaseDir = resolveOptionalInstallRoot();
|
|
132084
132112
|
ensureOptionalInstallBaseDir(installBaseDir);
|
|
132113
|
+
ensureOptionalDependenciesManifest(installBaseDir, dependencies);
|
|
132085
132114
|
pm = (0, _webpack_lib_package_manager__rspack_import_8._c)({
|
|
132086
132115
|
cwd: installBaseDir
|
|
132087
132116
|
});
|
|
@@ -134889,6 +134918,9 @@ var __webpack_modules__ = {
|
|
|
134889
134918
|
}
|
|
134890
134919
|
const missingAfterInstall = input.verifyPackageIds.filter((id)=>!verifyPackageInInstallRoot(id, input.installRoot));
|
|
134891
134920
|
if (missingAfterInstall.length > 0) {
|
|
134921
|
+
await (0, _plugin_css_css_lib_integrations__rspack_import_3.tm)(input.integration, input.installDependencies);
|
|
134922
|
+
const missingAfterRetry = input.verifyPackageIds.filter((id)=>!verifyPackageInInstallRoot(id, input.installRoot));
|
|
134923
|
+
if (0 === missingAfterRetry.length) return;
|
|
134892
134924
|
const diagnostics = buildDiagnostics({
|
|
134893
134925
|
integration: input.integration,
|
|
134894
134926
|
dependencyId: input.dependencyId,
|
|
@@ -134897,7 +134929,7 @@ var __webpack_modules__ = {
|
|
|
134897
134929
|
installDependencies: input.installDependencies,
|
|
134898
134930
|
verifyPackageIds: input.verifyPackageIds
|
|
134899
134931
|
});
|
|
134900
|
-
throw new Error(`[${input.integration}] Optional dependency install reported success but packages are missing: ${
|
|
134932
|
+
throw new Error(`[${input.integration}] Optional dependency install reported success but packages are missing: ${missingAfterRetry.join(', ')}.\n` + JSON.stringify(diagnostics, null, 2));
|
|
134901
134933
|
}
|
|
134902
134934
|
}
|
|
134903
134935
|
async function ensureInstalledAndVerified(input) {
|
|
@@ -135647,7 +135679,7 @@ var __webpack_modules__ = {
|
|
|
135647
135679
|
},
|
|
135648
135680
|
"./package.json" (module) {
|
|
135649
135681
|
"use strict";
|
|
135650
|
-
module.exports = JSON.parse('{"rE":"3.
|
|
135682
|
+
module.exports = JSON.parse('{"rE":"3.10.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"}}');
|
|
135651
135683
|
}
|
|
135652
135684
|
};
|
|
135653
135685
|
var __webpack_module_cache__ = {};
|
|
@@ -75,7 +75,8 @@ require("crypto");
|
|
|
75
75
|
require("child_process");
|
|
76
76
|
(0, external_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
|
|
77
77
|
function parseJsonSafe(text) {
|
|
78
|
-
const
|
|
78
|
+
const raw = 'string' == typeof text ? text : String(text || '');
|
|
79
|
+
const s = raw && 0xfeff === raw.charCodeAt(0) ? raw.slice(1) : raw;
|
|
79
80
|
return JSON.parse(s || '{}');
|
|
80
81
|
}
|
|
81
82
|
function hasDependency(projectPath, dependency) {
|
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.
|
|
28
|
+
"version": "3.10.0",
|
|
29
29
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Cezar Augusto",
|