Skip to content

Commit

Permalink
Remove setPnpmResolutionMode as default is highest
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Oct 31, 2023
1 parent 7951131 commit d9a57c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
23 changes: 0 additions & 23 deletions test/lib/create-next-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@ const { randomBytes } = require('crypto')
const { linkPackages } =
require('../../.github/actions/next-stats-action/src/prepare/repo-setup')()

/**
* Sets the `resolution-mode` for pnpm in the specified directory.
*
* See [pnpm/.npmrc#resolution-mode]{@link https://pnpm.io/npmrc#resolution-mode} and
* [GitHub Issue]{@link https://github.com/pnpm/pnpm/issues/6463}
*
* @param {string} cwd - The project directory where pnpm configuration is set.
* @returns {Promise<void>}
*/
function setPnpmResolutionMode(cwd) {
return execa(
'pnpm',
['config', 'set', '--location=project', 'resolution-mode', 'highest'],
{
cwd: cwd,
stdio: ['ignore', 'inherit', 'inherit'],
env: process.env,
}
)
}

async function createNextInstall({
parentSpan = null,
dependencies = null,
Expand Down Expand Up @@ -156,7 +135,6 @@ async function createNextInstall({
2
)
)
await setPnpmResolutionMode(installDir)

if (installCommand) {
const installString =
Expand Down Expand Up @@ -211,7 +189,6 @@ async function createNextInstall({
}

module.exports = {
setPnpmResolutionMode,
createNextInstall,
getPkgPaths: linkPackages,
}
6 changes: 1 addition & 5 deletions test/lib/next-modes/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import treeKill from 'tree-kill'
import type { NextConfig } from 'next'
import { FileRef } from '../e2e-utils'
import { ChildProcess } from 'child_process'
import {
createNextInstall,
setPnpmResolutionMode,
} from '../create-next-install'
import { createNextInstall } from '../create-next-install'
import { Span } from 'next/src/trace'
import webdriver from '../next-webdriver'
import { renderViaHTTP, fetchViaHTTP } from 'next-test-utils'
Expand Down Expand Up @@ -187,7 +184,6 @@ export class NextInstance {
2
)
)
await setPnpmResolutionMode(this.testDir)
} else {
if (
process.env.NEXT_TEST_STARTER &&
Expand Down

0 comments on commit d9a57c2

Please sign in to comment.