deps: update corepack to 0.33.0

PR-URL: https://github.com/nodejs/node/pull/58566
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
Node.js GitHub Bot 2025-06-05 05:15:00 -04:00 committed by Antoine du Hamel
parent 697d258136
commit 31e592631f
No known key found for this signature in database
GPG Key ID: 21D900FFDB233756
4 changed files with 37 additions and 12 deletions

View File

@ -1,5 +1,18 @@
# Changelog # 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) ## [0.32.0](https://github.com/nodejs/corepack/compare/v0.31.0...v0.32.0) (2025-02-28)

View File

@ -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 package manager, and to not update the Last Known Good version when it
downloads a new version of the same major line. downloads a new version of the same major line.
- `COREPACK_ENABLE_AUTO_PIN` can be set to `0` to prevent Corepack from - `COREPACK_ENABLE_AUTO_PIN` can be set to `1` to instruct Corepack to
updating the `packageManager` field when it detects that the local package update the `packageManager` field when it detects that the local package
doesn't list it. In general we recommend to always list a `packageManager` 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 field (which you can easily set through `corepack use [name]@[version]`), as
it ensures that your project installs are always deterministic. it ensures that your project installs are always deterministic.

View File

@ -21683,7 +21683,7 @@ function String2(descriptor, ...args) {
} }
// package.json // package.json
var version = "0.32.0"; var version = "0.33.0";
// sources/Engine.ts // sources/Engine.ts
var import_fs9 = __toESM(require("fs")); var import_fs9 = __toESM(require("fs"));
@ -21697,7 +21697,7 @@ var import_valid4 = __toESM(require_valid2());
var config_default = { var config_default = {
definitions: { definitions: {
npm: { npm: {
default: "11.1.0+sha1.dba08f7d0f5301ebedaf968b4f74b2282f97a750", default: "11.4.1+sha1.80350af543069991de20657ebcd07d9624cfad06",
fetchLatestFrom: { fetchLatestFrom: {
type: "npm", type: "npm",
package: "npm" package: "npm"
@ -21734,7 +21734,7 @@ var config_default = {
} }
}, },
pnpm: { pnpm: {
default: "10.5.2+sha1.ca68c0441df195b7e2992f1d1cb12fb731f82d78", default: "10.11.0+sha1.4048eeefd564ff1ab248fac3e2854d38245fe2f1",
fetchLatestFrom: { fetchLatestFrom: {
type: "npm", type: "npm",
package: "pnpm" package: "pnpm"
@ -21798,7 +21798,7 @@ var config_default = {
package: "yarn" package: "yarn"
}, },
transparent: { transparent: {
default: "4.6.0+sha224.acd0786f07ffc6c933940eb65fc1d627131ddf5455bddcc295dc90fd", default: "4.9.1+sha224.4285002185abb91fe2b781f27fd1e078086c37a7b095f6ea4ee25971",
commands: [ commands: [
[ [
"yarn", "yarn",
@ -22105,6 +22105,10 @@ async function getProxyAgent(input) {
} }
// sources/corepackUtils.ts // sources/corepackUtils.ts
var YARN_SWITCH_REGEX = /[/\\]switch[/\\]bin[/\\]/;
function isYarnSwitchPath(p) {
return YARN_SWITCH_REGEX.test(p);
}
function getRegistryFromPackageManagerSpec(spec) { function getRegistryFromPackageManagerSpec(spec) {
return process.env.COREPACK_NPM_REGISTRY ? spec.npmRegistry ?? spec.registry : spec.registry; return process.env.COREPACK_NPM_REGISTRY ? spec.npmRegistry ?? spec.registry : spec.registry;
} }
@ -22896,7 +22900,7 @@ var Engine = class {
case `NoSpec`: { case `NoSpec`: {
if (typeof locator.reference === `function`) if (typeof locator.reference === `function`)
fallbackDescriptor.range = await locator.reference(); 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 }); const resolved = await this.resolveDescriptor(fallbackDescriptor, { allowTags: true });
if (resolved === null) if (resolved === null)
throw new UsageError(`Failed to successfully resolve '${fallbackDescriptor.range}' to a valid ${fallbackDescriptor.name} release`); throw new UsageError(`Failed to successfully resolve '${fallbackDescriptor.range}' to a valid ${fallbackDescriptor.name} release`);
@ -22906,7 +22910,7 @@ var Engine = class {
console.error(); console.error();
await setLocalPackageManager(import_path9.default.dirname(result.target), installSpec); 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; return fallbackDescriptor;
} }
case `Found`: { case `Found`: {
@ -23070,6 +23074,10 @@ var DisableCommand = class extends Command {
async removePosixLink(installDirectory, binName) { async removePosixLink(installDirectory, binName) {
const file = import_path10.default.join(installDirectory, binName); const file = import_path10.default.join(installDirectory, binName);
try { 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); await import_fs11.default.promises.unlink(file);
} catch (err) { } catch (err) {
if (err.code !== `ENOENT`) { 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`)); const symlink = import_path11.default.relative(installDirectory, import_path11.default.join(distFolder, `${binName}.js`));
if (import_fs12.default.existsSync(file)) { if (import_fs12.default.existsSync(file)) {
const currentSymlink = await import_fs12.default.promises.readlink(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) { if (currentSymlink !== symlink) {
await import_fs12.default.promises.unlink(file); await import_fs12.default.promises.unlink(file);
} else { } else {

View File

@ -1,6 +1,6 @@
{ {
"name": "corepack", "name": "corepack",
"version": "0.32.0", "version": "0.33.0",
"homepage": "https://github.com/nodejs/corepack#readme", "homepage": "https://github.com/nodejs/corepack#readme",
"bugs": { "bugs": {
"url": "https://github.com/nodejs/corepack/issues" "url": "https://github.com/nodejs/corepack/issues"
@ -16,21 +16,21 @@
"./package.json": "./package.json" "./package.json": "./package.json"
}, },
"license": "MIT", "license": "MIT",
"packageManager": "yarn@4.6.0+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728", "packageManager": "yarn@4.9.0+sha224.dce6c5df199861784bd9b0eecb2a228df97e3f18a02b1bb75ff98383",
"devDependencies": { "devDependencies": {
"@types/debug": "^4.1.5", "@types/debug": "^4.1.5",
"@types/node": "^20.4.6", "@types/node": "^20.4.6",
"@types/proxy-from-env": "^1", "@types/proxy-from-env": "^1",
"@types/semver": "^7.1.0", "@types/semver": "^7.1.0",
"@types/which": "^3.0.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", "@yarnpkg/fslib": "^3.0.0-rc.48",
"@zkochan/cmd-shim": "^6.0.0", "@zkochan/cmd-shim": "^6.0.0",
"better-sqlite3": "^11.7.2", "better-sqlite3": "^11.7.2",
"clipanion": "patch:clipanion@npm%3A3.2.1#~/.yarn/patches/clipanion-npm-3.2.1-fc9187f56c.patch", "clipanion": "patch:clipanion@npm%3A3.2.1#~/.yarn/patches/clipanion-npm-3.2.1-fc9187f56c.patch",
"debug": "^4.1.1", "debug": "^4.1.1",
"esbuild": "^0.25.0", "esbuild": "^0.25.0",
"eslint": "^8.57.0", "eslint": "^9.22.0",
"proxy-from-env": "^1.1.0", "proxy-from-env": "^1.1.0",
"semver": "^7.6.3", "semver": "^7.6.3",
"supports-color": "^10.0.0", "supports-color": "^10.0.0",