Avoid turbo cache miss on root package change (#43309)
Since the `next-swc` package doesn't rely on any of the root dependencies this normalizes the `package.json` to avoid cache misses when the file changes. x-ref: https://github.com/vercel/next.js/actions/runs/3535337836/jobs/5933336967 x-ref: https://github.com/vercel/next.js/actions/runs/3535337836/jobs/5933338363 x-ref: [slack thread](https://vercel.slack.com/archives/C02HEJASXGD/p1669236151437999)
This commit is contained in:
parent
538c11021b
commit
ec7609e288
2 changed files with 10 additions and 1 deletions
|
@ -63,4 +63,13 @@ const writeJson = async (filePath, data) =>
|
|||
await normalizeVersions(path.join(cwd, 'lerna.json'))
|
||||
await fs.unlink(path.join(cwd, 'pnpm-lock.yaml'))
|
||||
await fs.writeFile(path.join(cwd, 'pnpm-lock.yaml'), '')
|
||||
|
||||
const rootPkgJsonPath = path.join(cwd, 'package.json')
|
||||
await writeJson(rootPkgJsonPath, {
|
||||
name: 'nextjs-project',
|
||||
version: '0.0.0',
|
||||
private: true,
|
||||
workspaces: ['packages/*'],
|
||||
scripts: {},
|
||||
})
|
||||
})()
|
||||
|
|
|
@ -15,7 +15,7 @@ const CHANGE_ITEM_GROUPS = {
|
|||
'CODE_OF_CONDUCT.md',
|
||||
'readme.md',
|
||||
],
|
||||
'next-swc': ['packages/next-swc'],
|
||||
'next-swc': ['packages/next-swc', 'scripts/normalize-version-bump.js'],
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
|
Loading…
Reference in a new issue