hunk.code_window:     "test-branch": "pnpm pretest && pnpm lint --quiet && git remote set-branches --add origin main && git fetch && concurrently --raw --success=first --kill-others \"pnpm run verdaccio\" \"pnpm run test-pkgs-branch\"",
       "test-pkgs-branch": "pnpm remove-temp-dir && cross-env PNPM_REGISTRY_MOCK_UPLINK=http://localhost:7348 pnpm --workspace-concurrency=2 --filter=...[origin/main] run --no-sort _test",
       "verdaccio": "verdaccio --config=./verdaccio.yaml --listen=7348",
       "compile-only": "pnpm --workspace-concurrency=1 --filter=pnpm --filter=@pnpm/make-dedicated-lockfile --filter=@pnpm/mount-modules run compile",
       "compile": "pnpm compile-only && pnpm run update-manifests",
       "watch": "pnpm --filter=@pnpm/fetch run compile && pnpm --filter=pnpm run compile --watch",
  
hunk.labels: keep replace keep keep keep keep
hunk.after_edit:     "test-pkgs-branch": "pnpm remove-temp-dir && cross-env PNPM_REGISTRY_MOCK_UPLINK=http://localhost:7348 pnpm --workspace-concurrency=1 --filter=...[origin/main] run --no-sort _test",
  
hunk.file_path: package.json
hunk.type: replace
file: import { getPeerDependencyIssues } from '@pnpm/core'
  import { prepareEmpty } from '@pnpm/prepare'
  import { testDefaults } from './utils'
  
  afterEach(async () => {
    // @ts-expect-error
    await global.finishWorkers?.()
  })
  
  test('cannot resolve peer dependency for top-level dependency', async () => {
    prepareEmpty()
  
    const peerDependencyIssues = await getPeerDependencyIssues([
      {
        buildIndex: 0,
        manifest: {
          dependencies: {
            'ajv-keywords': '1.5.0',
          },
        },
        rootDir: process.cwd(),
      },
    ], await testDefaults())
  
    expect(peerDependencyIssues['.'].missing).toHaveProperty('ajv')
  })
  
  test('a conflict is detected when the same peer is required with ranges that do not overlap', async () => {
    prepareEmpty()
  
    const peerDependencyIssues = await getPeerDependencyIssues([
      {
        buildIndex: 0,
        manifest: {
          dependencies: {
            '@pnpm.e2e/has-foo100-peer': '1.0.0',
            '@pnpm.e2e/has-foo101-peer': '1.0.0',
          },
        },
        rootDir: process.cwd(),
      },
    ], await testDefaults())
  
    expect(peerDependencyIssues['.'].conflicts.length).toBe(1)
  })
  