Commit 2f73d8c
authored
ci: upgrade yarn to 4.x.x (#1390)
This PR will update yarn 3 to yarn 4, with the following addition:
1. delegate subpackages to reference the root `package.json` for yarn
version (before, we had specified them individually)
2. combined GHA action for setting up yarn (before almost all of our
workflows will have redundant setup steps)
3. add a package minimium age gate set to 3 days (to protect against
supply-chain attacks) <-- this is the main reason this PR exists
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Touches all CI install paths and adds an npm minimum-age gate that can
fail builds on brand-new dependencies; no runtime SDK logic changes in
the diff shown.
>
> **Overview**
> Upgrades the monorepo from **Yarn 3 to Yarn 4** (`yarn@4.15.0` via
root `packageManager` and `.yarn/releases`), and centralizes how CI
installs Node/Yarn.
>
> **CI consolidation:** Dozens of workflows swap `actions/setup-node`
plus ad‑hoc `corepack enable` for the composite
**`./actions/setup-yarn`** (Node + Corepack). Release setup
(`actions/setup-release-node`) uses the same action.
**`dependency-scan.yml`** drops its standalone Corepack step.
>
> **Supply chain:** **`.yarnrc.yml`** adds **`npmMinimalAgeGate: 4320`**
(~3 days) so newly published npm packages cannot be installed
immediately.
>
> **Targeted CI fixes:** **Electron** jobs pin **Node 24.15** (matrix
and examples) because newer runner Node breaks Electron installs.
**`server-ai.yml`** tightens example builds by removing the `-A` flag
from `yarn workspaces foreach`.
>
> **Yarn 4 cleanup:** The vendored
**`.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs`** is removed
(behavior expected from Yarn 4 / repo config). Workspace packages stop
declaring their own `packageManager`; they inherit the root pin.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
9350b92. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 21961b0 commit 2f73d8c
66 files changed
Lines changed: 1015 additions & 984 deletions
File tree
- .github/workflows
- .yarn
- plugins/@yarnpkg
- releases
- actions
- ci
- setup-release-node
- setup-yarn
- packages
- sdk
- akamai-base
- akamai-edgekv
- browser
- example-fdv2
- example
- cloudflare
- example
- combined-browser
- electron
- fastly
- example
- react-native
- contract-tests/entity
- example-fdv2
- example
- react
- contract-tests
- shopify-oxygen
- example
- svelte
- vercel
- examples/route-handler
- tooling/jest
- example/react-native-example
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments