deps: update corepack to 0.33.0 · nodejs/node@f8a2a1e
@@ -21683,7 +21683,7 @@ function String2(descriptor, ...args) {
2168321683}
21684216842168521685// package.json
21686-var version = "0.32.0";
21686+var version = "0.33.0";
21687216872168821688// sources/Engine.ts
2168921689var import_fs9 = __toESM(require("fs"));
@@ -21697,7 +21697,7 @@ var import_valid4 = __toESM(require_valid2());
2169721697var config_default = {
2169821698 definitions: {
2169921699 npm: {
21700- default: "11.1.0+sha1.dba08f7d0f5301ebedaf968b4f74b2282f97a750",
21700+ default: "11.4.1+sha1.80350af543069991de20657ebcd07d9624cfad06",
2170121701 fetchLatestFrom: {
2170221702 type: "npm",
2170321703 package: "npm"
@@ -21734,7 +21734,7 @@ var config_default = {
2173421734 }
2173521735 },
2173621736 pnpm: {
21737- default: "10.5.2+sha1.ca68c0441df195b7e2992f1d1cb12fb731f82d78",
21737+ default: "10.11.0+sha1.4048eeefd564ff1ab248fac3e2854d38245fe2f1",
2173821738 fetchLatestFrom: {
2173921739 type: "npm",
2174021740 package: "pnpm"
@@ -21798,7 +21798,7 @@ var config_default = {
2179821798 package: "yarn"
2179921799 },
2180021800 transparent: {
21801- default: "4.6.0+sha224.acd0786f07ffc6c933940eb65fc1d627131ddf5455bddcc295dc90fd",
21801+ default: "4.9.1+sha224.4285002185abb91fe2b781f27fd1e078086c37a7b095f6ea4ee25971",
2180221802 commands: [
2180321803 [
2180421804"yarn",
@@ -22105,6 +22105,10 @@ async function getProxyAgent(input) {
2210522105}
22106221062210722107// sources/corepackUtils.ts
22108+var YARN_SWITCH_REGEX = /[/\\]switch[/\\]bin[/\\]/;
22109+function isYarnSwitchPath(p) {
22110+ return YARN_SWITCH_REGEX.test(p);
22111+}
2210822112function getRegistryFromPackageManagerSpec(spec) {
2210922113 return process.env.COREPACK_NPM_REGISTRY ? spec.npmRegistry ?? spec.registry : spec.registry;
2211022114}
@@ -22896,7 +22900,7 @@ var Engine = class {
2289622900 case `NoSpec`: {
2289722901 if (typeof locator.reference === `function`)
2289822902 fallbackDescriptor.range = await locator.reference();
22899- if (import_process3.default.env.COREPACK_ENABLE_AUTO_PIN !== `0`) {
22903+ if (import_process3.default.env.COREPACK_ENABLE_AUTO_PIN === `1`) {
2290022904 const resolved = await this.resolveDescriptor(fallbackDescriptor, { allowTags: true });
2290122905 if (resolved === null)
2290222906 throw new UsageError(`Failed to successfully resolve '${fallbackDescriptor.range}' to a valid ${fallbackDescriptor.name} release`);
@@ -22906,7 +22910,7 @@ var Engine = class {
2290622910 console.error();
2290722911 await setLocalPackageManager(import_path9.default.dirname(result.target), installSpec);
2290822912 }
22909- log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} in the absence of "packageManage" field in ${result.target}`);
22913+ log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} in the absence of "packageManager" field in ${result.target}`);
2291022914 return fallbackDescriptor;
2291122915 }
2291222916 case `Found`: {
@@ -23070,6 +23074,10 @@ var DisableCommand = class extends Command {
2307023074 async removePosixLink(installDirectory, binName) {
2307123075 const file = import_path10.default.join(installDirectory, binName);
2307223076 try {
23077+ if (binName.includes(`yarn`) && isYarnSwitchPath(await import_fs11.default.promises.realpath(file))) {
23078+ console.warn(`${binName} is already installed in ${file} and points to a Yarn Switch install - skipping`);
23079+ return;
23080+ }
2307323081 await import_fs11.default.promises.unlink(file);
2307423082 } catch (err) {
2307523083 if (err.code !== `ENOENT`) {
@@ -23147,6 +23155,10 @@ var EnableCommand = class extends Command {
2314723155 const symlink = import_path11.default.relative(installDirectory, import_path11.default.join(distFolder, `${binName}.js`));
2314823156 if (import_fs12.default.existsSync(file)) {
2314923157 const currentSymlink = await import_fs12.default.promises.readlink(file);
23158+ if (binName.includes(`yarn`) && isYarnSwitchPath(await import_fs12.default.promises.realpath(file))) {
23159+ console.warn(`${binName} is already installed in ${file} and points to a Yarn Switch install - skipping`);
23160+ return;
23161+ }
2315023162 if (currentSymlink !== symlink) {
2315123163 await import_fs12.default.promises.unlink(file);
2315223164 } else {