extension-develop 3.1.1 → 3.2.0-next.2
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.js +37 -38
- package/package.json +1 -2
package/dist/module.js
CHANGED
|
@@ -130594,7 +130594,6 @@ var __webpack_modules__ = {
|
|
|
130594
130594
|
var child_process__rspack_import_2 = __webpack_require__("child_process");
|
|
130595
130595
|
var pintor__rspack_import_3 = __webpack_require__("pintor");
|
|
130596
130596
|
var pintor__rspack_import_3_default = /*#__PURE__*/ __webpack_require__.n(pintor__rspack_import_3);
|
|
130597
|
-
var package_manager_detector__rspack_import_4 = __webpack_require__("package-manager-detector");
|
|
130598
130597
|
function parseJsonSafe(text) {
|
|
130599
130598
|
const s = text && 0xfeff === text.charCodeAt(0) ? text.slice(1) : text;
|
|
130600
130599
|
return JSON.parse(s || '{}');
|
|
@@ -130609,20 +130608,28 @@ var __webpack_modules__ = {
|
|
|
130609
130608
|
}
|
|
130610
130609
|
function getPackageManagerFromEnv() {
|
|
130611
130610
|
const ua = process.env.npm_config_user_agent;
|
|
130612
|
-
if (
|
|
130613
|
-
|
|
130614
|
-
|
|
130615
|
-
|
|
130616
|
-
|
|
130611
|
+
if (ua) {
|
|
130612
|
+
if (ua.includes('pnpm')) return 'pnpm';
|
|
130613
|
+
if (ua.includes('yarn')) return 'yarn';
|
|
130614
|
+
if (ua.includes('bun')) return 'bun';
|
|
130615
|
+
if (ua.includes('npm')) return 'npm';
|
|
130616
|
+
}
|
|
130617
|
+
const execPath = process.env.npm_execpath || process.env.NPM_EXEC_PATH;
|
|
130618
|
+
if (execPath) {
|
|
130619
|
+
if (execPath.includes('pnpm')) return 'pnpm';
|
|
130620
|
+
if (execPath.includes('yarn')) return 'yarn';
|
|
130621
|
+
if (execPath.includes('bun')) return 'bun';
|
|
130622
|
+
if (execPath.includes('npm')) return 'npm';
|
|
130623
|
+
}
|
|
130617
130624
|
}
|
|
130618
130625
|
async function resolvePackageManager() {
|
|
130619
130626
|
const envPm = getPackageManagerFromEnv();
|
|
130620
130627
|
if (envPm) return envPm;
|
|
130621
|
-
return
|
|
130628
|
+
return 'npm';
|
|
130622
130629
|
}
|
|
130623
130630
|
function getOptionalInstallCommand(pm, dependencies) {
|
|
130624
130631
|
const quotedDir = JSON.stringify(__dirname);
|
|
130625
|
-
const pmName =
|
|
130632
|
+
const pmName = pm;
|
|
130626
130633
|
if ('yarn' === pmName) return `yarn --silent add ${dependencies.join(' ')} --cwd ${quotedDir} --optional`;
|
|
130627
130634
|
if ('npm' === pmName || isFromNpx()) return `npm --silent install ${dependencies.join(' ')} --prefix ${quotedDir} --save-optional`;
|
|
130628
130635
|
if (isFromPnpx()) return `pnpm --silent add ${dependencies.join(' ')} --prefix ${quotedDir} --save-optional`;
|
|
@@ -130630,7 +130637,7 @@ var __webpack_modules__ = {
|
|
|
130630
130637
|
return `${fallback} --silent install ${dependencies.join(' ')} --cwd ${quotedDir} --optional`;
|
|
130631
130638
|
}
|
|
130632
130639
|
function getRootInstallCommand(pm) {
|
|
130633
|
-
const pmName =
|
|
130640
|
+
const pmName = pm;
|
|
130634
130641
|
if ('yarn' === pmName) return "yarn install --silent";
|
|
130635
130642
|
if ('npm' === pmName || isFromNpx()) return "npm install --silent";
|
|
130636
130643
|
if (isFromPnpx()) return "pnpm install --silent";
|
|
@@ -132534,10 +132541,6 @@ var __webpack_modules__ = {
|
|
|
132534
132541
|
"use strict";
|
|
132535
132542
|
module.exports = require("os");
|
|
132536
132543
|
},
|
|
132537
|
-
"package-manager-detector" (module) {
|
|
132538
|
-
"use strict";
|
|
132539
|
-
module.exports = require("package-manager-detector");
|
|
132540
|
-
},
|
|
132541
132544
|
"parse5-utilities" (module) {
|
|
132542
132545
|
"use strict";
|
|
132543
132546
|
module.exports = require("parse5-utilities");
|
|
@@ -132584,7 +132587,7 @@ var __webpack_modules__ = {
|
|
|
132584
132587
|
},
|
|
132585
132588
|
"./package.json" (module) {
|
|
132586
132589
|
"use strict";
|
|
132587
|
-
module.exports = JSON.parse('{"rE":"3.
|
|
132590
|
+
module.exports = JSON.parse('{"rE":"3.2.0-next.2","El":{"@rspack/core":"^1.7.2","@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","chokidar":"^5.0.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","firefox-location2":"3.0.0","go-git-it":"^5.0.3","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"}}');
|
|
132588
132591
|
}
|
|
132589
132592
|
};
|
|
132590
132593
|
var __webpack_module_cache__ = {};
|
|
@@ -132930,20 +132933,28 @@ var __webpack_exports__ = {};
|
|
|
132930
132933
|
return Object.keys(dependencies).filter((dep)=>!isDependencyInstalled(dep, packageRoot));
|
|
132931
132934
|
}
|
|
132932
132935
|
const external_cross_spawn_namespaceObject = require("cross-spawn");
|
|
132933
|
-
|
|
132934
|
-
|
|
132935
|
-
|
|
132936
|
-
|
|
132937
|
-
|
|
132936
|
+
function detectPackageManagerFromEnv() {
|
|
132937
|
+
const userAgent = process.env.npm_config_user_agent || '';
|
|
132938
|
+
if (userAgent.includes('pnpm')) return 'pnpm';
|
|
132939
|
+
if (userAgent.includes('yarn')) return 'yarn';
|
|
132940
|
+
if (userAgent.includes('npm')) return 'npm';
|
|
132941
|
+
const execPath = process.env.npm_execpath || process.env.NPM_EXEC_PATH || '';
|
|
132942
|
+
if (execPath.includes('pnpm')) return 'pnpm';
|
|
132943
|
+
if (execPath.includes('yarn')) return 'yarn';
|
|
132944
|
+
execPath.includes('npm');
|
|
132945
|
+
return 'npm';
|
|
132946
|
+
}
|
|
132947
|
+
function getInstallCommandForPath(cwd) {
|
|
132948
|
+
const hasPnpmLock = external_fs_.existsSync(external_path_.join(cwd, 'pnpm-lock.yaml'));
|
|
132949
|
+
const hasYarnLock = external_fs_.existsSync(external_path_.join(cwd, 'yarn.lock'));
|
|
132950
|
+
const hasNpmLock = external_fs_.existsSync(external_path_.join(cwd, 'package-lock.json'));
|
|
132938
132951
|
if (hasPnpmLock) return 'pnpm';
|
|
132939
132952
|
if (hasYarnLock) return 'yarn';
|
|
132940
132953
|
if (hasNpmLock) return 'npm';
|
|
132941
|
-
|
|
132942
|
-
|
|
132943
|
-
|
|
132944
|
-
|
|
132945
|
-
if (pm?.name === 'pnpm') return 'pnpm';
|
|
132946
|
-
return 'npm';
|
|
132954
|
+
return detectPackageManagerFromEnv();
|
|
132955
|
+
}
|
|
132956
|
+
async function getInstallCommand(packageRoot) {
|
|
132957
|
+
return getInstallCommandForPath(packageRoot);
|
|
132947
132958
|
}
|
|
132948
132959
|
function getInstallArgs(command, dependencies, dependenciesMap) {
|
|
132949
132960
|
const depsWithVersions = dependencies.map((dep)=>`${dep}@${dependenciesMap[dep]}`);
|
|
@@ -132996,19 +133007,7 @@ var __webpack_exports__ = {};
|
|
|
132996
133007
|
}
|
|
132997
133008
|
}
|
|
132998
133009
|
async function install_dependencies_getInstallCommand() {
|
|
132999
|
-
|
|
133000
|
-
const hasPnpmLock = external_fs_.existsSync(external_path_.join(cwd, 'pnpm-lock.yaml'));
|
|
133001
|
-
const hasYarnLock = external_fs_.existsSync(external_path_.join(cwd, 'yarn.lock'));
|
|
133002
|
-
const hasNpmLock = external_fs_.existsSync(external_path_.join(cwd, 'package-lock.json'));
|
|
133003
|
-
if (hasPnpmLock) return 'pnpm';
|
|
133004
|
-
if (hasYarnLock) return 'yarn';
|
|
133005
|
-
if (hasNpmLock) return 'npm';
|
|
133006
|
-
const pm = await (0, external_package_manager_detector_.detect)({
|
|
133007
|
-
cwd
|
|
133008
|
-
});
|
|
133009
|
-
if (pm?.name === 'yarn') return 'yarn';
|
|
133010
|
-
if (pm?.name === 'pnpm') return 'pnpm';
|
|
133011
|
-
return 'npm';
|
|
133010
|
+
return getInstallCommandForPath(process.cwd());
|
|
133012
133011
|
}
|
|
133013
133012
|
function install_dependencies_getInstallArgs() {
|
|
133014
133013
|
return [
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"name": "extension-develop",
|
|
25
|
-
"version": "3.
|
|
25
|
+
"version": "3.2.0-next.2",
|
|
26
26
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
27
27
|
"author": {
|
|
28
28
|
"name": "Cezar Augusto",
|
|
@@ -89,7 +89,6 @@
|
|
|
89
89
|
"ignore": "^7.0.5",
|
|
90
90
|
"loader-utils": "^3.3.1",
|
|
91
91
|
"magic-string": "^0.30.21",
|
|
92
|
-
"package-manager-detector": "^1.6.0",
|
|
93
92
|
"parse5": "^8.0.0",
|
|
94
93
|
"parse5-utilities": "^1.0.0",
|
|
95
94
|
"pintor": "0.3.0",
|