From 904ae8ab7d61ee6fcb9737102e6fbbc6e191fd8b Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Thu, 12 Oct 2023 19:47:31 +0000 Subject: [PATCH] forgot to run npm run pack Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- dist/lerna.js | 21 ++++++++++++++++++--- dist/vsce.js | 29 +++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/dist/lerna.js b/dist/lerna.js index 637cec6..cc474f0 100644 --- a/dist/lerna.js +++ b/dist/lerna.js @@ -5547,6 +5547,19 @@ __export(utils_exports, { }); var fs = __toESM(require("fs")); var exec = __toESM(require_exec()); +var usePnpm; +function npxCmd() { + return __async(this, null, function* () { + if (usePnpm == null) { + try { + usePnpm = (yield exec.exec("pnpm", ["--version"], { silent: true })) === 0 ? true : false; + } catch (error) { + usePnpm = false; + } + } + return usePnpm ? "pnpm dlx" : "npx"; + }); +} function lernaList(onlyChanged) { return __async(this, null, function* () { const cmdArgs = ["lerna"]; @@ -5566,9 +5579,11 @@ function lernaVersion(newVersion, excludeDirs) { if (excludeDirs) { cmdArgs.push("--ignore-changes", ...excludeDirs.map((dir) => dir + "/**")); } - yield exec.exec("npx", ["lerna", "version", newVersion, ...cmdArgs]); - if (!fs.existsSync("yarn.lock")) { + yield exec.exec(yield npxCmd(), ["lerna", "version", newVersion, ...cmdArgs]); + if (!fs.existsSync("yarn.lock") && !usePnpm) { yield exec.exec("npm", ["install", "--package-lock-only", "--ignore-scripts", "--no-audit"]); + } else if (usePnpm) { + yield exec.exec("pnpm", ["install", "--lockfile-only", "--ignore-scripts"]); } }); } @@ -5664,7 +5679,7 @@ function version_default2(context, config) { } yield lernaVersion(context.version.new, Object.keys(context.version.overrides)); context.changedFiles.push("lerna.json", "package.json"); - const lockfilePath = yield (0, import_find_up.default)(["yarn.lock", "npm-shrinkwrap.json", "package-lock.json"]); + const lockfilePath = yield (0, import_find_up.default)(["pnpm-lock.yaml", "yarn.lock", "npm-shrinkwrap.json", "package-lock.json"]); if (lockfilePath != null) { context.changedFiles.push(path2.relative(context.rootDir, lockfilePath)); } else { diff --git a/dist/vsce.js b/dist/vsce.js index dac6640..8404ac0 100644 --- a/dist/vsce.js +++ b/dist/vsce.js @@ -1135,10 +1135,23 @@ var fs = __toESM(require("fs")); var path = __toESM(require("path")); var exec = __toESM(require_exec()); var import_core = require("./core"); +var usePnpm; +function npxCmd() { + return __async(this, null, function* () { + if (usePnpm == null) { + try { + usePnpm = (yield exec.exec("pnpm", ["--version"], { silent: true })) === 0 ? true : false; + } catch (error) { + usePnpm = false; + } + } + return usePnpm ? "pnpm dlx" : "npx"; + }); +} function ovsxInfo(extensionName) { return __async(this, null, function* () { try { - const cmdOutput = yield exec.getExecOutput("npx", ["ovsx", "get", extensionName, "--metadata"]); + const cmdOutput = yield exec.getExecOutput(yield npxCmd(), ["ovsx", "get", extensionName, "--metadata"]); return JSON.parse(cmdOutput.stdout); } catch (e) { } @@ -1155,15 +1168,15 @@ function ovsxPublish(context, vsixPath) { if (context.version.prerelease != null) { cmdArgs.push("--pre-release"); } - yield import_core.utils.dryRunTask(context, `npx ${cmdArgs.join(" ")}`, () => __async(this, null, function* () { - yield exec.exec("npx", cmdArgs); + yield import_core.utils.dryRunTask(context, `${yield npxCmd()} ${cmdArgs.join(" ")}`, () => __async(this, null, function* () { + yield exec.exec(yield npxCmd(), cmdArgs); })); }); } function vsceInfo(extensionName) { return __async(this, null, function* () { try { - const cmdOutput = yield exec.getExecOutput("npx", ["vsce", "show", extensionName, "--json"]); + const cmdOutput = yield exec.getExecOutput(yield npxCmd(), ["vsce", "show", extensionName, "--json"]); return JSON.parse(cmdOutput.stdout); } catch (e) { } @@ -1179,7 +1192,7 @@ function vscePackage(context) { if (context.version.prerelease != null) { cmdArgs.push("--pre-release"); } - const cmdOutput = yield exec.getExecOutput("npx", cmdArgs); + const cmdOutput = yield exec.getExecOutput(yield npxCmd(), cmdArgs); return (_a = cmdOutput.stdout.trim().match(/Packaged: (.*\.vsix)/)) == null ? void 0 : _a[1]; }); } @@ -1194,14 +1207,14 @@ function vscePublish(context, vsixPath) { if (context.version.prerelease != null) { cmdArgs.push("--pre-release"); } - yield import_core.utils.dryRunTask(context, `npx ${cmdArgs.join(" ")}`, () => __async(this, null, function* () { - yield exec.exec("npx", cmdArgs); + yield import_core.utils.dryRunTask(context, `${yield npxCmd()} ${cmdArgs.join(" ")}`, () => __async(this, null, function* () { + yield exec.exec(yield npxCmd(), cmdArgs); })); }); } function verifyToken(tool, publisher) { return __async(this, null, function* () { - yield exec.exec("npx", [tool, "verify-pat", publisher]); + yield exec.exec(yield npxCmd(), [tool, "verify-pat", publisher]); }); }