Commit 268214f
authored
<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:
* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
Are there any issues or other links reviewers should consult to
understand this pull request better? For instance:
* Fixes #12345
* See: #67890
-->
The root `package.json` previously set `packageManager` to `yarn@4.16.0`
with no integrity hash. Corepack supports an optional `+sha256.<hash>`
suffix that pins the Yarn binary to a known checksum, ensuring that
anyone running `corepack` against this repo gets the exact same Yarn
binary that was vetted.
This PR adds the sha256 hash to the `packageManager` field. A new
`expectYarnPackageManager` constraint asserts that `packageManager`
starts with `yarn@` and includes a sha256 hash, so the hash can evolve
when Yarn is bumped without requiring a constraint change at the same
time.
## Examples
See `MetaMask/core#9122` for the equivalent change in the `core`
monorepo.
1 parent 113f33b commit 268214f
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
225 | 248 | | |
226 | 249 | | |
227 | 250 | | |
| |||
263 | 286 | | |
264 | 287 | | |
265 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
266 | 292 | | |
267 | 293 | | |
268 | 294 | | |
| |||
0 commit comments