Unverified Commit f1285cec authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

Use default pnpm package import method (#98703)

### What?

Use pnpm's default package import method in the two hoisted
isolated-test configurations added by #98425.

### Why?

`package-import-method` controls how regular package files are
materialized from pnpm's store: by reflink, hardlink, or copy. Those
choices do not affect `realpath`, so forcing copies is unrelated to the
Node.js symlink-resolution workaround and unnecessarily disables pnpm's
more efficient defaults.

### How?

Keep `node-linker=hoisted`, which is the setting responsible for
producing npm-style real package directories, while removing the
independent copy policy. The Node-version gate, local-tarball
validation, release-age policy, and fixture behavior remain unchanged.

### Verification

- Hoisted-only scratch install produced real package directories, no
package symlinks outside `.bin`, and a metadata-only `.pnpm`
- Production Turbopack: non-hoisted SWC helper and warm-restart task
stats passed (2/2)
- `pnpm build`
- `pnpm types`
- Prettier, ESLint, and `git diff --check`

Follow-up to #98425 and
https://github.com/vercel/next.js/pull/98425#discussion_r4020168942.

<!-- NEXT_JS_LLM -->


<!-- fleet 81cd457d-6956-4cf9-b6f6-9ebf9d95f285 -->
Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
parent 69d11874
...@@ -6,7 +6,6 @@ describe('handle-non-hoisted-swc-helpers', () => { ...@@ -6,7 +6,6 @@ describe('handle-non-hoisted-swc-helpers', () => {
files: { files: {
'.npmrc': `# The helper move below needs real package directories, not pnpm symlinks. '.npmrc': `# The helper move below needs real package directories, not pnpm symlinks.
node-linker=hoisted node-linker=hoisted
package-import-method=copy
`, `,
'pages/index.js': ` 'pages/index.js': `
export default function Page() { export default function Page() {
......
const PNPM_HOISTED_CONFIG = `# Work around the Node.js realpath bug fixed in 24.21.0 and 26.8.0. const PNPM_HOISTED_CONFIG = `# Work around the Node.js realpath bug fixed in 24.21.0 and 26.8.0.
# https://github.com/nodejs/node/pull/65113 # https://github.com/nodejs/node/pull/65113
node-linker=hoisted node-linker=hoisted
package-import-method=copy
` `
function hasNodeRealpathFix(nodeVersion: string): boolean { function hasNodeRealpathFix(nodeVersion: string): boolean {
......
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