diff --git a/deps/corepack/CHANGELOG.md b/deps/corepack/CHANGELOG.md index ad0bba51c6b..e4f0b185a73 100644 --- a/deps/corepack/CHANGELOG.md +++ b/deps/corepack/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.33.0](https://github.com/nodejs/corepack/compare/v0.32.0...v0.33.0) (2025-06-02) + + +### Features + +* Adds guard to avoid stepping on Yarn's feet ([#714](https://github.com/nodejs/corepack/issues/714)) ([5fc3691](https://github.com/nodejs/corepack/commit/5fc3691354eb5bdeca17a9495b234584353f0151)) +* update package manager versions ([#671](https://github.com/nodejs/corepack/issues/671)) ([b45b3a3](https://github.com/nodejs/corepack/commit/b45b3a3244bacfbaf65188ae8c04209a1e98307d)) + + +### Bug Fixes + +* debug text typo ([#698](https://github.com/nodejs/corepack/issues/698)) ([0b94797](https://github.com/nodejs/corepack/commit/0b94797f96e30e46e466873fe7d437d0471cd92c)) + ## [0.32.0](https://github.com/nodejs/corepack/compare/v0.31.0...v0.32.0) (2025-02-28) diff --git a/deps/corepack/README.md b/deps/corepack/README.md index 67d396d5ca9..079746ee796 100644 --- a/deps/corepack/README.md +++ b/deps/corepack/README.md @@ -286,8 +286,8 @@ same major line. Should you need to upgrade to a new major, use an explicit package manager, and to not update the Last Known Good version when it downloads a new version of the same major line. -- `COREPACK_ENABLE_AUTO_PIN` can be set to `0` to prevent Corepack from - updating the `packageManager` field when it detects that the local package +- `COREPACK_ENABLE_AUTO_PIN` can be set to `1` to instruct Corepack to + update the `packageManager` field when it detects that the local package doesn't list it. In general we recommend to always list a `packageManager` field (which you can easily set through `corepack use [name]@[version]`), as it ensures that your project installs are always deterministic. diff --git a/deps/corepack/dist/lib/corepack.cjs b/deps/corepack/dist/lib/corepack.cjs index 7a098cbe250..c6854077d0f 100644 --- a/deps/corepack/dist/lib/corepack.cjs +++ b/deps/corepack/dist/lib/corepack.cjs @@ -21683,7 +21683,7 @@ function String2(descriptor, ...args) { } // package.json -var version = "0.32.0"; +var version = "0.33.0"; // sources/Engine.ts var import_fs9 = __toESM(require("fs")); @@ -21697,7 +21697,7 @@ var import_valid4 = __toESM(require_valid2()); var config_default = { definitions: { npm: { - default: "11.1.0+sha1.dba08f7d0f5301ebedaf968b4f74b2282f97a750", + default: "11.4.1+sha1.80350af543069991de20657ebcd07d9624cfad06", fetchLatestFrom: { type: "npm", package: "npm" @@ -21734,7 +21734,7 @@ var config_default = { } }, pnpm: { - default: "10.5.2+sha1.ca68c0441df195b7e2992f1d1cb12fb731f82d78", + default: "10.11.0+sha1.4048eeefd564ff1ab248fac3e2854d38245fe2f1", fetchLatestFrom: { type: "npm", package: "pnpm" @@ -21798,7 +21798,7 @@ var config_default = { package: "yarn" }, transparent: { - default: "4.6.0+sha224.acd0786f07ffc6c933940eb65fc1d627131ddf5455bddcc295dc90fd", + default: "4.9.1+sha224.4285002185abb91fe2b781f27fd1e078086c37a7b095f6ea4ee25971", commands: [ [ "yarn", @@ -22105,6 +22105,10 @@ async function getProxyAgent(input) { } // sources/corepackUtils.ts +var YARN_SWITCH_REGEX = /[/\\]switch[/\\]bin[/\\]/; +function isYarnSwitchPath(p) { + return YARN_SWITCH_REGEX.test(p); +} function getRegistryFromPackageManagerSpec(spec) { return process.env.COREPACK_NPM_REGISTRY ? spec.npmRegistry ?? spec.registry : spec.registry; } @@ -22896,7 +22900,7 @@ var Engine = class { case `NoSpec`: { if (typeof locator.reference === `function`) fallbackDescriptor.range = await locator.reference(); - if (import_process3.default.env.COREPACK_ENABLE_AUTO_PIN !== `0`) { + if (import_process3.default.env.COREPACK_ENABLE_AUTO_PIN === `1`) { const resolved = await this.resolveDescriptor(fallbackDescriptor, { allowTags: true }); if (resolved === null) throw new UsageError(`Failed to successfully resolve '${fallbackDescriptor.range}' to a valid ${fallbackDescriptor.name} release`); @@ -22906,7 +22910,7 @@ var Engine = class { console.error(); await setLocalPackageManager(import_path9.default.dirname(result.target), installSpec); } - log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} in the absence of "packageManage" field in ${result.target}`); + log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} in the absence of "packageManager" field in ${result.target}`); return fallbackDescriptor; } case `Found`: { @@ -23070,6 +23074,10 @@ var DisableCommand = class extends Command { async removePosixLink(installDirectory, binName) { const file = import_path10.default.join(installDirectory, binName); try { + if (binName.includes(`yarn`) && isYarnSwitchPath(await import_fs11.default.promises.realpath(file))) { + console.warn(`${binName} is already installed in ${file} and points to a Yarn Switch install - skipping`); + return; + } await import_fs11.default.promises.unlink(file); } catch (err) { if (err.code !== `ENOENT`) { @@ -23147,6 +23155,10 @@ var EnableCommand = class extends Command { const symlink = import_path11.default.relative(installDirectory, import_path11.default.join(distFolder, `${binName}.js`)); if (import_fs12.default.existsSync(file)) { const currentSymlink = await import_fs12.default.promises.readlink(file); + if (binName.includes(`yarn`) && isYarnSwitchPath(await import_fs12.default.promises.realpath(file))) { + console.warn(`${binName} is already installed in ${file} and points to a Yarn Switch install - skipping`); + return; + } if (currentSymlink !== symlink) { await import_fs12.default.promises.unlink(file); } else { diff --git a/deps/corepack/package.json b/deps/corepack/package.json index 75f5725328a..7bf3d9e6604 100644 --- a/deps/corepack/package.json +++ b/deps/corepack/package.json @@ -1,6 +1,6 @@ { "name": "corepack", - "version": "0.32.0", + "version": "0.33.0", "homepage": "https://github.com/nodejs/corepack#readme", "bugs": { "url": "https://github.com/nodejs/corepack/issues" @@ -16,21 +16,21 @@ "./package.json": "./package.json" }, "license": "MIT", - "packageManager": "yarn@4.6.0+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728", + "packageManager": "yarn@4.9.0+sha224.dce6c5df199861784bd9b0eecb2a228df97e3f18a02b1bb75ff98383", "devDependencies": { "@types/debug": "^4.1.5", "@types/node": "^20.4.6", "@types/proxy-from-env": "^1", "@types/semver": "^7.1.0", "@types/which": "^3.0.0", - "@yarnpkg/eslint-config": "^2.0.0", + "@yarnpkg/eslint-config": "^3.0.0", "@yarnpkg/fslib": "^3.0.0-rc.48", "@zkochan/cmd-shim": "^6.0.0", "better-sqlite3": "^11.7.2", "clipanion": "patch:clipanion@npm%3A3.2.1#~/.yarn/patches/clipanion-npm-3.2.1-fc9187f56c.patch", "debug": "^4.1.1", "esbuild": "^0.25.0", - "eslint": "^8.57.0", + "eslint": "^9.22.0", "proxy-from-env": "^1.1.0", "semver": "^7.6.3", "supports-color": "^10.0.0",