Commit 59c8c3f
authored
chore: add corepack enable to JSII packaging publish jobs (#1379)
Fixes the release workflow failure where downstream per-package publish
jobs (maven, pypi, nuget, golang) fail with:
`error This project's package.json defines "packageManager":
"yarn@4.13.0".`
However the current global version of Yarn is 1.22.22.
### Problem
The main `release` job has a `corepack enable` step (added automatically
by Projen's `NodeProject` for Yarn Berry). However, the JSII packaging
publish jobs are generated by custom code in `projenrc/jsii.ts`. The
`pacmakForLanguage` method builds its own `bootstrapSteps` and handles
pnpm and bun setup, but had no equivalent for Yarn Berry. When those
jobs check out `.repo` and run `yarn install --immutable`, they hit the
runner's global Yarn 1.x instead of the Corepack-managed Yarn 4.13.0.
### Fix
Added a `corepack enable` bootstrap step for `YARN_BERRY` / `YARN2`
package managers in `pacmakForLanguage()`, matching the existing pattern
for pnpm and bun. After regeneration, `release.yml` now has `corepack
enable` in all affected publish jobs.
### Checklist
- [ ] This change contains a major version upgrade for a dependency and
I confirm all breaking changes are addressed
- Release notes for the new version:
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license1 parent 7176bba commit 59c8c3f
2 files changed
Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
491 | 497 | | |
492 | 498 | | |
493 | 499 | | |
| |||
0 commit comments