-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: Support pnpm patches in prune #1967
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
fix: Support pnpm patches in prune #1967
Conversation
We extend the lockfile abstraction to now take a list of workspace package paths in addition to a list of packages. This is slightly leaky as pnpm is the only package manager where this is strictly necessary although it will help when implementing prune for npm. Without the explicit information about which workspace dependencies to include we are unable to differentiate between workspace projects where one project has a subset of dependencies of the other.
It should be noted this isn't a perfect implementation as we copy all patches in the monorepo. This will cause unnecessary Docker layer cache busts for unrelated patch updates, but it will allow monorepos with patches to be pruned.
@chris-olszewski is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
} | ||
|
||
for _, workspacePath := range workspacePackages { | ||
workspace := workspacePath.ToUnixPath().ToString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm encodes workspace paths using /
as a separator regardless of the separator the OS uses
} | ||
|
||
return &lockfile, nil | ||
} | ||
|
||
// Prune imports to only those have all of their dependencies in the packages list | ||
func pruneImporters(importers *map[string]ProjectSnapshot, workspacePackages []turbopath.AnchoredSystemPath) (map[string]ProjectSnapshot, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think importers
needs to be passed via pointer, maps are already references under the hood.
Map types are reference types, like pointers or slices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an approval contingent on the patch location within workspaces. If that comes up as "not root every time" then I'd like another look.
@@ -180,20 +181,52 @@ func (p *PnpmLockfile) Subgraph(packages []string) (Lockfile, error) { | |||
} | |||
} | |||
|
|||
importers, err := pruneImporters(&p.Importers, workspacePackages) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -209,9 +242,23 @@ func (p *PnpmLockfile) Encode(w io.Writer) error { | |||
return nil | |||
} | |||
|
|||
// Patches return a list of patches used in the lockfile | |||
func (p *PnpmLockfile) Patches() []string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(change requested: constrain path type)
I only quickly checked, but PatchedDependencies
is probably an AnchoredUnixPath
from the lockfile? This will help us guarantee correctness downstream.
func (p *PnpmLockfile) Patches() []string { | |
func (p *PnpmLockfile) Patches() []turbopath.AnchoredUnixPath { |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [turbo](https://turborepo.org) ([source](https://togithub.com/vercel/turborepo)) | [`^1.4.6` -> `^1.4.7`](https://renovatebot.com/diffs/npm/turbo/1.4.6/1.4.7) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vercel/turborepo</summary> ### [`v1.4.7`](https://togithub.com/vercel/turborepo/releases/tag/v1.4.7) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.4.6...v1.4.7) #### What's Changed - Add degit instructions for all examples by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1884](https://togithub.com/vercel/turborepo/pull/1884) - chore(turbo-ignore): add console message of an unfriendly error by [@​t-i-0414](https://togithub.com/t-i-0414) in [https://github.com/vercel/turborepo/pull/1871](https://togithub.com/vercel/turborepo/pull/1871) - Rewrote filtering workspaces docs by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1879](https://togithub.com/vercel/turborepo/pull/1879) - fix(deps): update dependency swr to v1.3.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1876](https://togithub.com/vercel/turborepo/pull/1876) - Rewrote pipelines, caching and remote caching docs by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1758](https://togithub.com/vercel/turborepo/pull/1758) - Reorganised pipeline docs with clearer headings, groupings and content by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1866](https://togithub.com/vercel/turborepo/pull/1866) - feat(ignore): check for turbo force by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/1886](https://togithub.com/vercel/turborepo/pull/1886) - Fixed typo on remote caching page by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1889](https://togithub.com/vercel/turborepo/pull/1889) - Fixed redirect by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1888](https://togithub.com/vercel/turborepo/pull/1888) - Try out cram/prysk for CLI integration testing by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1829](https://togithub.com/vercel/turborepo/pull/1829) - (Controversial) Removed glossary and mentions of topological from the docs by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1868](https://togithub.com/vercel/turborepo/pull/1868) - feat: Add pnpm support for turbo prune by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/1819](https://togithub.com/vercel/turborepo/pull/1819) - Always include package.json in hash by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1832](https://togithub.com/vercel/turborepo/pull/1832) - chore(deps): update dependency [@​babel/core](https://togithub.com/babel/core) to v7.19.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1905](https://togithub.com/vercel/turborepo/pull/1905) - added code-shaper to code generation tools by [@​nareshbhatia](https://togithub.com/nareshbhatia) in [https://github.com/vercel/turborepo/pull/1909](https://togithub.com/vercel/turborepo/pull/1909) - added code-shaper to the code generation intro line by [@​nareshbhatia](https://togithub.com/nareshbhatia) in [https://github.com/vercel/turborepo/pull/1915](https://togithub.com/vercel/turborepo/pull/1915) - docs(examples/design-system): update readme by [@​theurgi](https://togithub.com/theurgi) in [https://github.com/vercel/turborepo/pull/1910](https://togithub.com/vercel/turborepo/pull/1910) - Finish port to cobra by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1792](https://togithub.com/vercel/turborepo/pull/1792) - chore(examples): clean with-next list by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/1923](https://togithub.com/vercel/turborepo/pull/1923) - chore(examples): add comment for maintainability by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/1927](https://togithub.com/vercel/turborepo/pull/1927) - Refactor reading turbo.json and add test cases by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1929](https://togithub.com/vercel/turborepo/pull/1929) - Re-jigged the landing and getting started pages by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1901](https://togithub.com/vercel/turborepo/pull/1901) - Upgrade Nextra by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/turborepo/pull/1942](https://togithub.com/vercel/turborepo/pull/1942) - Enable inputs to be relative again. by [@​nathanhammond](https://togithub.com/nathanhammond) in [https://github.com/vercel/turborepo/pull/1937](https://togithub.com/vercel/turborepo/pull/1937) - chore(deps): update dependency typescript to v4.8.3 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1934](https://togithub.com/vercel/turborepo/pull/1934) - fix(deps): update dependency eslint-plugin-react to v7.31.8 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1935](https://togithub.com/vercel/turborepo/pull/1935) - Removed bg circles to improve Safari perf by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1944](https://togithub.com/vercel/turborepo/pull/1944) - Made front-page title pink by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1945](https://togithub.com/vercel/turborepo/pull/1945) - chore(example): upgrade kitchen sink example by [@​ruisaraiva19](https://togithub.com/ruisaraiva19) in [https://github.com/vercel/turborepo/pull/1076](https://togithub.com/vercel/turborepo/pull/1076) - Import goreleaser cross by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1925](https://togithub.com/vercel/turborepo/pull/1925) - Turbo has more help text now, update test by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1931](https://togithub.com/vercel/turborepo/pull/1931) - fix(with-tailwind): dev script fails to build tailwindcss by [@​yanmao-cc](https://togithub.com/yanmao-cc) in [https://github.com/vercel/turborepo/pull/1898](https://togithub.com/vercel/turborepo/pull/1898) - fix(docs): update nextra by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/1948](https://togithub.com/vercel/turborepo/pull/1948) - Use correct flag for graphviz version by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1954](https://togithub.com/vercel/turborepo/pull/1954) - Add mutex around helper cleanups by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1947](https://togithub.com/vercel/turborepo/pull/1947) - docs(running tasks): explicit instruction for workspace tasks by [@​mauricekleine](https://togithub.com/mauricekleine) in [https://github.com/vercel/turborepo/pull/1922](https://togithub.com/vercel/turborepo/pull/1922) - Reconcile cram tests and help text by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1956](https://togithub.com/vercel/turborepo/pull/1956) - chore(deps): update nextjs monorepo to v12.3.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1960](https://togithub.com/vercel/turborepo/pull/1960) - switch over to use go-yarnlock for yarn.lock parsing by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/1893](https://togithub.com/vercel/turborepo/pull/1893) - Improve CI setup by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1904](https://togithub.com/vercel/turborepo/pull/1904) - No shallow checkout for linting. by [@​nathanhammond](https://togithub.com/nathanhammond) in [https://github.com/vercel/turborepo/pull/1972](https://togithub.com/vercel/turborepo/pull/1972) - Add ability to declare a env key in each pipeline task by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1970](https://togithub.com/vercel/turborepo/pull/1970) - Add ability to define a globalEnv key in turbo.json by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1950](https://togithub.com/vercel/turborepo/pull/1950) - Show outputModeTable in CLI and config docs by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1949](https://togithub.com/vercel/turborepo/pull/1949) - fix: Support pnpm patches in prune by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/1967](https://togithub.com/vercel/turborepo/pull/1967) - Update showcase images by [@​jaredpalmer](https://togithub.com/jaredpalmer) in [https://github.com/vercel/turborepo/pull/1986](https://togithub.com/vercel/turborepo/pull/1986) - Add vimeo to showcase by [@​jaredpalmer](https://togithub.com/jaredpalmer) in [https://github.com/vercel/turborepo/pull/1987](https://togithub.com/vercel/turborepo/pull/1987) #### New Contributors - [@​t-i-0414](https://togithub.com/t-i-0414) made their first contribution in [https://github.com/vercel/turborepo/pull/1871](https://togithub.com/vercel/turborepo/pull/1871) - [@​nareshbhatia](https://togithub.com/nareshbhatia) made their first contribution in [https://github.com/vercel/turborepo/pull/1909](https://togithub.com/vercel/turborepo/pull/1909) - [@​theurgi](https://togithub.com/theurgi) made their first contribution in [https://github.com/vercel/turborepo/pull/1910](https://togithub.com/vercel/turborepo/pull/1910) - [@​ruisaraiva19](https://togithub.com/ruisaraiva19) made their first contribution in [https://github.com/vercel/turborepo/pull/1076](https://togithub.com/vercel/turborepo/pull/1076) - [@​yanmao-cc](https://togithub.com/yanmao-cc) made their first contribution in [https://github.com/vercel/turborepo/pull/1898](https://togithub.com/vercel/turborepo/pull/1898) - [@​mauricekleine](https://togithub.com/mauricekleine) made their first contribution in [https://github.com/vercel/turborepo/pull/1922](https://togithub.com/vercel/turborepo/pull/1922) **Full Changelog**: vercel/turborepo@v1.4.6...v1.4.7 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/BirthdayResearch/contented). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTUuNSIsInVwZGF0ZWRJblZlciI6IjMyLjE5NS41In0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [turbo](https://turborepo.org) ([source](https://togithub.com/vercel/turborepo)) | [`^1.4.6` -> `^1.5.6`](https://renovatebot.com/diffs/npm/turbo/1.4.6/1.5.6) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vercel/turborepo</summary> ### [`v1.5.6`](https://togithub.com/vercel/turborepo/releases/tag/v1.5.6) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.5.5...v1.5.6) Note that this release enables `CGO` for all targets #### What's Changed - seo: Add script to generate RSS feed.xml to docs site by [@​jaredpalmer](https://togithub.com/jaredpalmer) in [https://github.com/vercel/turborepo/pull/2132](https://togithub.com/vercel/turborepo/pull/2132) - Turbo-specific changes to build containers by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1930](https://togithub.com/vercel/turborepo/pull/1930) - docs: Tweak tracking in card headers by [@​jaredpalmer](https://togithub.com/jaredpalmer) in [https://github.com/vercel/turborepo/pull/2133](https://togithub.com/vercel/turborepo/pull/2133) - Change some variable names by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/2136](https://togithub.com/vercel/turborepo/pull/2136) - chore(deps): update dependency [@​babel/core](https://togithub.com/babel/core) to v7.19.3 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/2127](https://togithub.com/vercel/turborepo/pull/2127) - fix: Glob negation in outputs by [@​NicholasLYang](https://togithub.com/NicholasLYang) in [https://github.com/vercel/turborepo/pull/2031](https://togithub.com/vercel/turborepo/pull/2031) - Use unix:path to address unix socket by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2137](https://togithub.com/vercel/turborepo/pull/2137) - Fix broken links on "Workspace" Doc by [@​pakaponk](https://togithub.com/pakaponk) in [https://github.com/vercel/turborepo/pull/2141](https://togithub.com/vercel/turborepo/pull/2141) - Use Warn method for logWarning by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/2135](https://togithub.com/vercel/turborepo/pull/2135) - chore(deps): update dependency postcss to v8.4.17 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/2144](https://togithub.com/vercel/turborepo/pull/2144) - chore(deps): update dependency typescript to v4.8.4 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/2128](https://togithub.com/vercel/turborepo/pull/2128) - fix(deps): update dependency ts-json-schema-generator to v1.1.2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/2139](https://togithub.com/vercel/turborepo/pull/2139) - fix(packages): add repo, directory, and bugs fields by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/2161](https://togithub.com/vercel/turborepo/pull/2161) - feat: prune support for lockfiles containing patches by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/2151](https://togithub.com/vercel/turborepo/pull/2151) - Remove prefixes from stored logs by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/2126](https://togithub.com/vercel/turborepo/pull/2126) - fix: filename for web depending on ui by [@​evliu](https://togithub.com/evliu) in [https://github.com/vercel/turborepo/pull/2164](https://togithub.com/vercel/turborepo/pull/2164) - seo: Fix 404s from search console by [@​jaredpalmer](https://togithub.com/jaredpalmer) in [https://github.com/vercel/turborepo/pull/2166](https://togithub.com/vercel/turborepo/pull/2166) - seo: set canonical urls by [@​jaredpalmer](https://togithub.com/jaredpalmer) in [https://github.com/vercel/turborepo/pull/2168](https://togithub.com/vercel/turborepo/pull/2168) - Turn off golang dependency auto updates by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/2156](https://togithub.com/vercel/turborepo/pull/2156) - feat: Avoid panic from lockfile issues by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/2163](https://togithub.com/vercel/turborepo/pull/2163) - feat(docs): add sentry by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/2169](https://togithub.com/vercel/turborepo/pull/2169) - Caching, but to tar files. by [@​nathanhammond](https://togithub.com/nathanhammond) in [https://github.com/vercel/turborepo/pull/1991](https://togithub.com/vercel/turborepo/pull/1991) - fix handling of injected dependencies for pnpm prune by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/2121](https://togithub.com/vercel/turborepo/pull/2121) - Remove INFO prefix from log line by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2171](https://togithub.com/vercel/turborepo/pull/2171) - Update examples to always quote the ESLint glob. by [@​nathanhammond](https://togithub.com/nathanhammond) in [https://github.com/vercel/turborepo/pull/2130](https://togithub.com/vercel/turborepo/pull/2130) - chore(examples): migrate svelte to latest by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/2173](https://togithub.com/vercel/turborepo/pull/2173) - Fix usage of uninitialized Ui instance by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2172](https://togithub.com/vercel/turborepo/pull/2172) - fix(examples): correct turbo caching for storybook by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/2176](https://togithub.com/vercel/turborepo/pull/2176) - Revert "Caching, but to tar files." by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2178](https://togithub.com/vercel/turborepo/pull/2178) - support new paused status by [@​blake-mealey](https://togithub.com/blake-mealey) in [https://github.com/vercel/turborepo/pull/2179](https://togithub.com/vercel/turborepo/pull/2179) - docs: Fix Pipeline API design link by [@​brunojppb](https://togithub.com/brunojppb) in [https://github.com/vercel/turborepo/pull/2153](https://togithub.com/vercel/turborepo/pull/2153) - Use two stage release process, plus diamond workflow for cross-compiling by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2051](https://togithub.com/vercel/turborepo/pull/2051) - fix(examples): correct react-native ui output by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/2181](https://togithub.com/vercel/turborepo/pull/2181) - Add back bin/ directory by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2184](https://togithub.com/vercel/turborepo/pull/2184) - feat(examples): add custom ignore script by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/2183](https://togithub.com/vercel/turborepo/pull/2183) - Added explainer on environment variables by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/2115](https://togithub.com/vercel/turborepo/pull/2115) #### New Contributors - [@​evliu](https://togithub.com/evliu) made their first contribution in [https://github.com/vercel/turborepo/pull/2164](https://togithub.com/vercel/turborepo/pull/2164) - [@​blake-mealey](https://togithub.com/blake-mealey) made their first contribution in [https://github.com/vercel/turborepo/pull/2179](https://togithub.com/vercel/turborepo/pull/2179) **Full Changelog**: vercel/turborepo@v1.5.5...v1.5.6 ### [`v1.5.5`](https://togithub.com/vercel/turborepo/releases/tag/v1.5.5) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.5.4...v1.5.5) #### What's Changed - fix(fs): overwrite symlink in restore cache by [@​AielloChan](https://togithub.com/AielloChan) in [https://github.com/vercel/turborepo/pull/2016](https://togithub.com/vercel/turborepo/pull/2016) - seo: Add rewrite to turbo sitemap crawler by [@​jaredpalmer](https://togithub.com/jaredpalmer) in [https://github.com/vercel/turborepo/pull/2106](https://togithub.com/vercel/turborepo/pull/2106) - Change Berry's `cacheKey` to be a string by [@​amitdahan](https://togithub.com/amitdahan) in [https://github.com/vercel/turborepo/pull/2102](https://togithub.com/vercel/turborepo/pull/2102) - Fix small typo by [@​arturcarvalho](https://togithub.com/arturcarvalho) in [https://github.com/vercel/turborepo/pull/2108](https://togithub.com/vercel/turborepo/pull/2108) - Add React Flow to showcase by [@​moklick](https://togithub.com/moklick) in [https://github.com/vercel/turborepo/pull/2107](https://togithub.com/vercel/turborepo/pull/2107) - Test that env vars dependencies are sorted consistently by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/2111](https://togithub.com/vercel/turborepo/pull/2111) - Extract the patch for `tar` by [@​nathanhammond](https://togithub.com/nathanhammond) in [https://github.com/vercel/turborepo/pull/2116](https://togithub.com/vercel/turborepo/pull/2116) - Re-add log message about remote caching by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/2122](https://togithub.com/vercel/turborepo/pull/2122) - Temporarily disable daemon on windows by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2124](https://togithub.com/vercel/turborepo/pull/2124) #### New Contributors - [@​AielloChan](https://togithub.com/AielloChan) made their first contribution in [https://github.com/vercel/turborepo/pull/2016](https://togithub.com/vercel/turborepo/pull/2016) - [@​amitdahan](https://togithub.com/amitdahan) made their first contribution in [https://github.com/vercel/turborepo/pull/2102](https://togithub.com/vercel/turborepo/pull/2102) - [@​arturcarvalho](https://togithub.com/arturcarvalho) made their first contribution in [https://github.com/vercel/turborepo/pull/2108](https://togithub.com/vercel/turborepo/pull/2108) - [@​moklick](https://togithub.com/moklick) made their first contribution in [https://github.com/vercel/turborepo/pull/2107](https://togithub.com/vercel/turborepo/pull/2107) **Full Changelog**: vercel/turborepo@v1.5.4...v1.5.5 ### [`v1.5.4`](https://togithub.com/vercel/turborepo/compare/v1.5.3...v1.5.4) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.5.3...v1.5.4) ### [`v1.5.3`](https://togithub.com/vercel/turborepo/compare/v1.5.2...v1.5.3) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.5.2...v1.5.3) ### [`v1.5.2`](https://togithub.com/vercel/turborepo/compare/v1.5.1...v1.5.2) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.5.1...v1.5.2) ### [`v1.5.1`](https://togithub.com/vercel/turborepo/releases/tag/v1.5.1) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.5.0...v1.5.1) #### What's Changed - Drop no-longer-supported platform references by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2033](https://togithub.com/vercel/turborepo/pull/2033) - We can infer identifer, we don't need to specify it by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2032](https://togithub.com/vercel/turborepo/pull/2032) **Full Changelog**: vercel/turborepo@v1.5.0...v1.5.1 ### [`v1.5.0`](https://togithub.com/vercel/turborepo/releases/tag/v1.5.0) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.4.7...v1.5.0) #### What's Changed - Document inclusion of package.json in workspace task cache keys by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1955](https://togithub.com/vercel/turborepo/pull/1955) - Make run the default command by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1821](https://togithub.com/vercel/turborepo/pull/1821) - chore(deps): update dependency [@​types/react](https://togithub.com/types/react) to v17.0.50 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1980](https://togithub.com/vercel/turborepo/pull/1980) - chore(deps): update dependency [@​babel/core](https://togithub.com/babel/core) to v7.19.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1989](https://togithub.com/vercel/turborepo/pull/1989) - chore(deps): update dependency csstype to v3.1.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1981](https://togithub.com/vercel/turborepo/pull/1981) - fix(deps): update dependency react-hot-toast to v2.4.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1992](https://togithub.com/vercel/turborepo/pull/1992) - Drop unsupported platforms by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1903](https://togithub.com/vercel/turborepo/pull/1903) - fix(deps): update dependency classnames to v2.3.2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1990](https://togithub.com/vercel/turborepo/pull/1990) - Wire up prysk and fix help flag by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2000](https://togithub.com/vercel/turborepo/pull/2000) - Enable turbod by default by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2001](https://togithub.com/vercel/turborepo/pull/2001) - Built monorepo handbook by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1881](https://togithub.com/vercel/turborepo/pull/1881) - Why turborepo images POC by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/2012](https://togithub.com/vercel/turborepo/pull/2012) - Added link to package installation by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/2009](https://togithub.com/vercel/turborepo/pull/2009) - Drop macos run of large benchmark on github actions. by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/2003](https://togithub.com/vercel/turborepo/pull/2003) - Typo fix by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/2017](https://togithub.com/vercel/turborepo/pull/2017) - feat(types): add turbo types package by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/2024](https://togithub.com/vercel/turborepo/pull/2024) - fix(deps): update dependency nextra to v2.0.0-beta.29 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/2008](https://togithub.com/vercel/turborepo/pull/2008) - chore(core): deprecation messages for legacy env keys by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1959](https://togithub.com/vercel/turborepo/pull/1959) - feat(codemod): migrate turbo.json dependsOn by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/2022](https://togithub.com/vercel/turborepo/pull/2022) - feat: Add prune support for Yarn 3 by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/2019](https://togithub.com/vercel/turborepo/pull/2019) **Full Changelog**: vercel/turborepo@v1.4.7...v1.5.0 ### [`v1.4.7`](https://togithub.com/vercel/turborepo/releases/tag/v1.4.7) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.4.6...v1.4.7) #### What's Changed - Add degit instructions for all examples by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1884](https://togithub.com/vercel/turborepo/pull/1884) - chore(turbo-ignore): add console message of an unfriendly error by [@​t-i-0414](https://togithub.com/t-i-0414) in [https://github.com/vercel/turborepo/pull/1871](https://togithub.com/vercel/turborepo/pull/1871) - Rewrote filtering workspaces docs by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1879](https://togithub.com/vercel/turborepo/pull/1879) - fix(deps): update dependency swr to v1.3.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1876](https://togithub.com/vercel/turborepo/pull/1876) - Rewrote pipelines, caching and remote caching docs by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1758](https://togithub.com/vercel/turborepo/pull/1758) - Reorganised pipeline docs with clearer headings, groupings and content by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1866](https://togithub.com/vercel/turborepo/pull/1866) - feat(ignore): check for turbo force by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/1886](https://togithub.com/vercel/turborepo/pull/1886) - Fixed typo on remote caching page by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1889](https://togithub.com/vercel/turborepo/pull/1889) - Fixed redirect by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1888](https://togithub.com/vercel/turborepo/pull/1888) - Try out cram/prysk for CLI integration testing by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1829](https://togithub.com/vercel/turborepo/pull/1829) - (Controversial) Removed glossary and mentions of topological from the docs by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1868](https://togithub.com/vercel/turborepo/pull/1868) - feat: Add pnpm support for turbo prune by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/1819](https://togithub.com/vercel/turborepo/pull/1819) - Always include package.json in hash by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1832](https://togithub.com/vercel/turborepo/pull/1832) - chore(deps): update dependency [@​babel/core](https://togithub.com/babel/core) to v7.19.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1905](https://togithub.com/vercel/turborepo/pull/1905) - added code-shaper to code generation tools by [@​nareshbhatia](https://togithub.com/nareshbhatia) in [https://github.com/vercel/turborepo/pull/1909](https://togithub.com/vercel/turborepo/pull/1909) - added code-shaper to the code generation intro line by [@​nareshbhatia](https://togithub.com/nareshbhatia) in [https://github.com/vercel/turborepo/pull/1915](https://togithub.com/vercel/turborepo/pull/1915) - docs(examples/design-system): update readme by [@​theurgi](https://togithub.com/theurgi) in [https://github.com/vercel/turborepo/pull/1910](https://togithub.com/vercel/turborepo/pull/1910) - Finish port to cobra by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1792](https://togithub.com/vercel/turborepo/pull/1792) - chore(examples): clean with-next list by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/1923](https://togithub.com/vercel/turborepo/pull/1923) - chore(examples): add comment for maintainability by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/1927](https://togithub.com/vercel/turborepo/pull/1927) - Refactor reading turbo.json and add test cases by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1929](https://togithub.com/vercel/turborepo/pull/1929) - Re-jigged the landing and getting started pages by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1901](https://togithub.com/vercel/turborepo/pull/1901) - Upgrade Nextra by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/turborepo/pull/1942](https://togithub.com/vercel/turborepo/pull/1942) - Enable inputs to be relative again. by [@​nathanhammond](https://togithub.com/nathanhammond) in [https://github.com/vercel/turborepo/pull/1937](https://togithub.com/vercel/turborepo/pull/1937) - chore(deps): update dependency typescript to v4.8.3 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1934](https://togithub.com/vercel/turborepo/pull/1934) - fix(deps): update dependency eslint-plugin-react to v7.31.8 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1935](https://togithub.com/vercel/turborepo/pull/1935) - Removed bg circles to improve Safari perf by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1944](https://togithub.com/vercel/turborepo/pull/1944) - Made front-page title pink by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1945](https://togithub.com/vercel/turborepo/pull/1945) - chore(example): upgrade kitchen sink example by [@​ruisaraiva19](https://togithub.com/ruisaraiva19) in [https://github.com/vercel/turborepo/pull/1076](https://togithub.com/vercel/turborepo/pull/1076) - Import goreleaser cross by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1925](https://togithub.com/vercel/turborepo/pull/1925) - Turbo has more help text now, update test by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1931](https://togithub.com/vercel/turborepo/pull/1931) - fix(with-tailwind): dev script fails to build tailwindcss by [@​yanmao-cc](https://togithub.com/yanmao-cc) in [https://github.com/vercel/turborepo/pull/1898](https://togithub.com/vercel/turborepo/pull/1898) - fix(docs): update nextra by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/1948](https://togithub.com/vercel/turborepo/pull/1948) - Use correct flag for graphviz version by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1954](https://togithub.com/vercel/turborepo/pull/1954) - Add mutex around helper cleanups by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1947](https://togithub.com/vercel/turborepo/pull/1947) - docs(running tasks): explicit instruction for workspace tasks by [@​mauricekleine](https://togithub.com/mauricekleine) in [https://github.com/vercel/turborepo/pull/1922](https://togithub.com/vercel/turborepo/pull/1922) - Reconcile cram tests and help text by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1956](https://togithub.com/vercel/turborepo/pull/1956) - chore(deps): update nextjs monorepo to v12.3.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1960](https://togithub.com/vercel/turborepo/pull/1960) - switch over to use go-yarnlock for yarn.lock parsing by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/1893](https://togithub.com/vercel/turborepo/pull/1893) - Improve CI setup by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1904](https://togithub.com/vercel/turborepo/pull/1904) - No shallow checkout for linting. by [@​nathanhammond](https://togithub.com/nathanhammond) in [https://github.com/vercel/turborepo/pull/1972](https://togithub.com/vercel/turborepo/pull/1972) - Add ability to declare a env key in each pipeline task by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1970](https://togithub.com/vercel/turborepo/pull/1970) - Add ability to define a globalEnv key in turbo.json by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1950](https://togithub.com/vercel/turborepo/pull/1950) - Show outputModeTable in CLI and config docs by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1949](https://togithub.com/vercel/turborepo/pull/1949) - fix: Support pnpm patches in prune by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [https://github.com/vercel/turborepo/pull/1967](https://togithub.com/vercel/turborepo/pull/1967) - Update showcase images by [@​jaredpalmer](https://togithub.com/jaredpalmer) in [https://github.com/vercel/turborepo/pull/1986](https://togithub.com/vercel/turborepo/pull/1986) - Add vimeo to showcase by [@​jaredpalmer](https://togithub.com/jaredpalmer) in [https://github.com/vercel/turborepo/pull/1987](https://togithub.com/vercel/turborepo/pull/1987) #### New Contributors - [@​t-i-0414](https://togithub.com/t-i-0414) made their first contribution in [https://github.com/vercel/turborepo/pull/1871](https://togithub.com/vercel/turborepo/pull/1871) - [@​nareshbhatia](https://togithub.com/nareshbhatia) made their first contribution in [https://github.com/vercel/turborepo/pull/1909](https://togithub.com/vercel/turborepo/pull/1909) - [@​theurgi](https://togithub.com/theurgi) made their first contribution in [https://github.com/vercel/turborepo/pull/1910](https://togithub.com/vercel/turborepo/pull/1910) - [@​ruisaraiva19](https://togithub.com/ruisaraiva19) made their first contribution in [https://github.com/vercel/turborepo/pull/1076](https://togithub.com/vercel/turborepo/pull/1076) - [@​yanmao-cc](https://togithub.com/yanmao-cc) made their first contribution in [https://github.com/vercel/turborepo/pull/1898](https://togithub.com/vercel/turborepo/pull/1898) - [@​mauricekleine](https://togithub.com/mauricekleine) made their first contribution in [https://github.com/vercel/turborepo/pull/1922](https://togithub.com/vercel/turborepo/pull/1922) **Full Changelog**: vercel/turborepo@v1.4.6...v1.4.7 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/DeFiCh/metachain). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTYuMCIsInVwZGF0ZWRJblZlciI6IjMyLjIzMi4wIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Addresses #1963
This PR fixes two issues with the current implementation of prune for pnpm:
pnpm-lock.yaml
, previously the pruned lockfile would pickup any direct dependency changes for any project in the workspaceFixing the first issue required updating the
Lockfile
interface take a list of workspace dependencies when constructing the subgraph. This is required as workspace dependencies don't appear inpackages
in the pnpm lockfile format. Taking a quick look at the npm lockfile format, this additional information will be helpful when implementing npm prune so it seems sensible to make this addition.The current implementation of copying dependency patches copies all patches instead of those that are strictly necessary. This was done due to the fact that
pnpm
duplicates patch info inpackage.json
and in order to only copy the necessary patches we would first need to learn how to prunepackage.json
. This should be done in the future, but is outside of the scope of this fix.