turbo
db8427ba - fix(pnpm): read linkWorkspacePackages from pnpm-workspace.yaml (#10391)

Commit
295 days ago
fix(pnpm): read linkWorkspacePackages from pnpm-workspace.yaml (#10391) ### Description Fixes #10387 by adding partial support for the new configuration location added in https://github.com/pnpm/pnpm/pull/9121. There will be future work to add additional configuration options that lived in `.npmrc` and `package.json` to the YAML definition. I highly suggest reviewing the first 2 commits on their own as they are prefactors. They both get a slightly smaller to slimming down the `impl PackageManager` so we can move to an interface instead of a single struct with `match`s for every package manager x version. ### Testing Instructions Added new unit tests for this behavior, also manually verified behavior change in repro provided in #10387. Note that after this PR the topological `^lint` dependency is correctly applied so the application lints to not start until `@repo/lint` completes. Before ``` [0 olszewski@macbookpro] /tmp/turbo-respect-pnpm-configs $ turbo lint turbo 2.5.2 • Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web • Running lint in 5 packages • Remote caching disabled ┌ web#lint > cache miss, executing b9dab19525365b14 │ │ │ > web@0.1.0 lint /private/tmp/turbo-respect-pnpm-configs/apps/web │ > next lint --max-warnings 0 └────> ┌ docs#lint > cache miss, executing 72e63e1338f32778 │ │ │ > docs@0.1.0 lint /private/tmp/turbo-respect-pnpm-configs/apps/docs │ > next lint --max-warnings 0 └────> ┌ @repo/ui#lint > cache miss, executing 1e7e4e418db8cf29 │ │ │ > @repo/ui@0.0.0 lint /private/tmp/turbo-respect-pnpm-configs/packages/ui │ > echo 'failing lint' && exit 1 │ │ failing lint │  ELIFECYCLE  Command failed with exit code 1. │ command finished with error: command (/private/tmp/turbo-respect-pnpm-configs/packages/ui) /User │ s/olszewski/.nvm/versions/node/v22.13.0/bin/pnpm run lint exited (1) └────> @repo/ui#lint: command (/private/tmp/turbo-respect-pnpm-configs/packages/ui) /Users/olszewski/.nvm/versions/node/v22.13.0/bin/pnpm run lint exited (1) Tasks: 0 successful, 3 total Cached: 0 cached, 3 total Time: 1.096s Failed: @repo/ui#lint ERROR run failed: command exited (1) ``` After ``` [1 olszewski@macbookpro] /tmp/turbo-respect-pnpm-configs $ turbo_dev --skip-infer lint turbo 2.5.2 • Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web • Running lint in 5 packages • Remote caching disabled ┌ @repo/ui#lint > cache miss, executing 5e80cac629794173 │ │ │ > @repo/ui@0.0.0 lint /private/tmp/turbo-respect-pnpm-configs/packages/ui │ > echo 'failing lint' && exit 1 │ │ failing lint │  ELIFECYCLE  Command failed with exit code 1. │ command finished with error: command (/private/tmp/turbo-respect-pnpm-configs/packages/ui) /User │ s/olszewski/.nvm/versions/node/v22.13.0/bin/pnpm run lint exited (1) └────> @repo/ui#lint: command (/private/tmp/turbo-respect-pnpm-configs/packages/ui) /Users/olszewski/.nvm/versions/node/v22.13.0/bin/pnpm run lint exited (1) Tasks: 0 successful, 1 total Cached: 0 cached, 1 total Time: 363ms Failed: @repo/ui#lint ERROR run failed: command exited (1) ```
Parents
Loading