Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: bump lockfile to v7 #7666

Merged
merged 7 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test: fix
  • Loading branch information
zkochan committed Feb 17, 2024
commit f099b896b5dfb9a6dc45271cbe16d3c2cb619a8a

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`pnpm dedupe updates old resolutions from importers block and removes ol
},
@@ -20,18 +20,6 @@
},
"lockfileVersion": "6.1",
"lockfileVersion": "7.0",
"packages": Object {
- "/ajv@6.10.2": Object {
- "dependencies": Object {
Expand Down Expand Up @@ -98,7 +98,7 @@ exports[`pnpm dedupe updates old resolutions from package block 1`] = `

@@ -20,15 +20,6 @@
},
"lockfileVersion": "6.1",
"lockfileVersion": "7.0",
"packages": Object {
- "/punycode@2.1.1": Object {
- "dev": false,
Expand Down
12 changes: 6 additions & 6 deletions pkg-manager/plugin-commands-installation/test/dedupe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { prepare } from '@pnpm/prepare'
import { fixtures } from '@pnpm/test-fixtures'
import { createTestIpcServer } from '@pnpm/test-ipc-server'
import { diff } from 'jest-diff'
import readYamlFile from 'read-yaml-file'
import { sync as readYamlFile } from 'read-yaml-file'
import { DEFAULT_OPTS } from './utils'

const f = fixtures(__dirname)
Expand Down Expand Up @@ -159,12 +159,12 @@ async function testFixture (fixtureName: string) {

const readProjectLockfile = () => readYamlFile<Lockfile>(path.join(project.dir(), './pnpm-lock.yaml'))

const originalLockfile = await readProjectLockfile()
const originalLockfile = readProjectLockfile()

// Sanity check that this test is set up correctly by ensuring the lockfile is
// unmodified after a regular install.
await install.handler(opts)
expect(await readProjectLockfile()).toEqual(originalLockfile)
expect(readProjectLockfile()).toEqual(originalLockfile)

let dedupeCheckError: DedupeCheckIssuesError | undefined
try {
Expand All @@ -174,7 +174,7 @@ async function testFixture (fixtureName: string) {
dedupeCheckError = err as DedupeCheckIssuesError
} finally {
// The dedupe check option should never change the lockfile.
expect(await readProjectLockfile()).toEqual(originalLockfile)
expect(readProjectLockfile()).toEqual(originalLockfile)
}

if (dedupeCheckError == null) {
Expand All @@ -185,7 +185,7 @@ async function testFixture (fixtureName: string) {
// re-resolving versions.
await dedupe.handler(opts)

const dedupedLockfile = await readProjectLockfile()
const dedupedLockfile = readProjectLockfile()

// It should be possible to remove packages from the fixture lockfile.
const originalLockfilePackageNames = Object.keys(originalLockfile.packages ?? {})
Expand All @@ -200,7 +200,7 @@ async function testFixture (fixtureName: string) {
// state. If so, the "pnpm install" command should pass successfully and not
// make any further edits to the lockfile.
await install.handler(opts)
expect(await readProjectLockfile()).toEqual(dedupedLockfile)
expect(readProjectLockfile()).toEqual(dedupedLockfile)

return { originalLockfile, dedupedLockfile, dedupeCheckError }
}
Loading