hunk.code_window:     "lint:ts": "eslint \"**/src/**/*.ts\" \"**/test/**/*.ts\"",
       "test-main": "pnpm pretest && pnpm lint --quiet && concurrently --raw --success=first --kill-others \"pnpm run verdaccio\" \"pnpm run test-pkgs-main\"",
       "remove-temp-dir": "shx rm -rf ../pnpm_tmp",
       "test-pkgs-main": "pnpm remove-temp-dir && cross-env PNPM_REGISTRY_MOCK_UPLINK=http://localhost:7348 pnpm run --no-sort --workspace-concurrency=2 -r _test",
       "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\"",
  
hunk.labels: keep keep keep replace keep
hunk.after_edit:     "test-pkgs-main": "pnpm remove-temp-dir && cross-env PNPM_REGISTRY_MOCK_UPLINK=http://localhost:7348 pnpm run --no-sort --workspace-concurrency=1 -r _test",
  
hunk.file_path: package.json
hunk.type: replace
file: import path from 'path'
  import { normalizeRegistries, DEFAULT_REGISTRIES } from '@pnpm/normalize-registries'
  import { type Registries } from '@pnpm/types'
  import { type ReporterFunction } from '../types'
  
  export interface StrictStoreStatusOptions {
    autoInstallPeers: boolean
    excludeLinksFromLockfile: boolean
    lockfileDir: string
    dir: string
    storeDir: string
    force: boolean
    forceSharedLockfile: boolean
    nodeLinker: 'isolated' | 'hoisted' | 'pnp'
    useLockfile: boolean
    registries: Registries
    shamefullyHoist: boolean
  
    reporter: ReporterFunction
    production: boolean
    development: boolean
    optional: boolean
    binsDir: string
  }
  
  export type StoreStatusOptions = Partial<StrictStoreStatusOptions> &
  Pick<StrictStoreStatusOptions, 'storeDir'>
  
  const defaults = async (opts: StoreStatusOptions) => {
    const dir = opts.dir ?? process.cwd()
    const lockfileDir = opts.lockfileDir ?? dir
    return {
      binsDir: path.join(dir, 'node_modules', '.bin'),
      dir,
      force: false,
      forceSharedLockfile: false,
      lockfileDir,
      nodeLinker: 'isolated',
      registries: DEFAULT_REGISTRIES,
      shamefullyHoist: false,
      storeDir: opts.storeDir,
      useLockfile: true,
    } as StrictStoreStatusOptions
  }
  
  export async function extendStoreStatusOptions (
    opts: StoreStatusOptions
  ): Promise<StrictStoreStatusOptions> {
    if (opts) {
      for (const key in opts) {
        if (opts[key as keyof StoreStatusOptions] === undefined) {
          delete opts[key as keyof StoreStatusOptions]
        }
      }
    }
    const defaultOpts = await defaults(opts)
    const extendedOpts = { ...defaultOpts, ...opts, storeDir: defaultOpts.storeDir }
    extendedOpts.registries = normalizeRegistries(extendedOpts.registries)
    return extendedOpts
  }
  