Unverified Commit d13adce3 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Fix Yarn berry tests (#93962)

4.15 made [npmMinimalAgeGate: 1d the
default](https://github.com/yarnpkg/berry/pull/7135)

1. Pin yarn version to prevent random breakages in the future
2. Add trusted packages to ignore npmMinimalAgeGate for them

https://github.com/yarnpkg/berry/releases/tag/%40yarnpkg%2Fcli%2F4.15.0
parent 797d0060
...@@ -55,9 +55,29 @@ export function runTests( ...@@ -55,9 +55,29 @@ export function runTests(
prev.push(`${cur}@${dependencies[cur]}`) prev.push(`${cur}@${dependencies[cur]}`)
return prev return prev
}, [] as string[]) }, [] as string[])
return `yarn set version berry && yarn config set enableGlobalCache true && yarn config set compressionLevel 0 && yarn add ${pkgs.join( const minimumReleaseAgeExclude = JSON.stringify(
' ' JSON.stringify([
)}` '@next/*',
'@turbo/*',
'@vercel/*',
'@workflow/*',
'babel-plugin-react-compiler',
'next',
'react',
'react-dom',
'react-is',
'react-server-dom-*',
'scheduler',
'turbo',
])
)
return [
`yarn set version 4.15.0`,
`yarn config set enableGlobalCache true`,
`yarn config set compressionLevel 0`,
`yarn config set npmPreapprovedPackages --json ${minimumReleaseAgeExclude}`,
`yarn add ${pkgs.join(' ')}`,
].join(' && ')
}, },
buildCommand: `yarn next build`, buildCommand: `yarn next build`,
startCommand: (global as any).isNextDev ? `yarn next` : `yarn next start`, startCommand: (global as any).isNextDev ? `yarn next` : `yarn next start`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment