Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ ignoredBuiltDependencies:
- ssh2
- unrs-resolver
- wasm-pack
# Keep security related settings in sync with pnpm-workspace.yaml written to
# temporary fixture dirs in file://./test/lib/create-next-install.js
blockExoticSubdeps: true
minimumReleaseAge: 2880 # 48 hrs
minimumReleaseAgeExclude:
Expand Down
25 changes: 25 additions & 0 deletions test/lib/create-next-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const os = require('os')
const path = require('path')
const execa = require('execa')
const fs = require('fs-extra')
const outdent = require('outdent')
const childProcess = require('child_process')
const { randomBytes } = require('crypto')
const { linkPackages } =
Expand Down Expand Up @@ -190,6 +191,30 @@ async function createNextInstall({
)
)

// Propagate security relate settings from file://./../../pnpm-workspace.yaml
// TODO: Ensure tests with custom installCommand also include necessary pnpm
// configs for security related settings, and remove this workaround.
await fs.writeFile(
path.join(installDir, 'pnpm-workspace.yaml'),
outdent`
blockExoticSubdeps: true
minimumReleaseAge: 2880 # 48 hrs
minimumReleaseAgeExclude:
- '@next/*'
- '@turbo/*'
- '@vercel/*'
- '@workflow/*'
- babel-plugin-react-compiler
- next
- react
- react-dom
- react-is
- react-server-dom-*
- scheduler
- turbo
`
)

if (beforeInstall !== undefined) {
await rootSpan
.traceChild('beforeInstall')
Expand Down
Loading