-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[build-utils] Fix corepack
packageManager
detection on mono…
…repos" (#12242) Reverts #12219 because it caused an issue with corepack versions being set to `latest`. https://vercel.slack.com/archives/C07R9QVM5L1
- Loading branch information
1 parent
fd9a850
commit 226028a
Showing
16 changed files
with
57 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@vercel/build-utils": patch | ||
"@vercel/hydrogen": patch | ||
"@vercel/next": patch | ||
"@vercel/redwood": patch | ||
"@vercel/remix-builder": patch | ||
"@vercel/static-build": patch | ||
--- | ||
|
||
Revert "[build-utils] Fix corepack `packageManager` detection on monorepos" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
packages/build-utils/test/fixtures/41-npm-workspaces-corepack/a/package.json
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
packages/build-utils/test/fixtures/41-npm-workspaces-corepack/b/package.json
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
packages/build-utils/test/fixtures/41-npm-workspaces-corepack/package.json
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
packages/build-utils/test/fixtures/42-pnpm-workspaces-corepack/c/package.json
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
packages/build-utils/test/fixtures/42-pnpm-workspaces-corepack/d/package.json
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
packages/build-utils/test/fixtures/42-pnpm-workspaces-corepack/package.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/build-utils/test/fixtures/42-pnpm-workspaces-corepack/pnpm-workspace.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -836,41 +836,6 @@ it('should detect non-turborepo monorepo', async () => { | |
expect(result.turboSupportsCorepackHome).toEqual(undefined); | ||
}); | ||
|
||
it('should detect `packageManager` in npm monorepo', async () => { | ||
try { | ||
process.env.ENABLE_EXPERIMENTAL_COREPACK = '1'; | ||
|
||
const base = path.join(__dirname, 'fixtures', '41-npm-workspaces-corepack'); | ||
const fixture = path.join(base, 'a'); | ||
const result = await scanParentDirs(fixture, false, base); | ||
expect(result.cliType).toEqual('npm'); | ||
expect(result.packageJsonPackageManager).toEqual('[email protected]'); | ||
expect(result.lockfileVersion).toEqual(undefined); | ||
expect(result.packageJsonPath).toEqual(path.join(fixture, 'package.json')); | ||
} finally { | ||
delete process.env.ENABLE_EXPERIMENTAL_COREPACK; | ||
} | ||
}); | ||
|
||
it('should detect `packageManager` in pnpm monorepo', async () => { | ||
try { | ||
process.env.ENABLE_EXPERIMENTAL_COREPACK = '1'; | ||
const base = path.join( | ||
__dirname, | ||
'fixtures', | ||
'42-pnpm-workspaces-corepack' | ||
); | ||
const fixture = path.join(base, 'c'); | ||
const result = await scanParentDirs(fixture, false, base); | ||
expect(result.cliType).toEqual('pnpm'); | ||
expect(result.packageJsonPackageManager).toEqual('[email protected]'); | ||
expect(result.lockfileVersion).toEqual(undefined); | ||
expect(result.packageJsonPath).toEqual(path.join(fixture, 'package.json')); | ||
} finally { | ||
delete process.env.ENABLE_EXPERIMENTAL_COREPACK; | ||
} | ||
}); | ||
|
||
it('should retry npm install when peer deps invalid and npm@8 on node@16', async () => { | ||
const nodeMajor = Number(process.versions.node.split('.')[0]); | ||
if (nodeMajor !== 16) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.