Merged
Conversation
Before this, we were executing npm / pnpm / ... multiple times, ones per dependency.
| ].map(async (dependency) => { | ||
| if (dependency === 'tailwindcss') { | ||
| return dependency | ||
| } else if (await pkg(base).has(dependency)) { |
Contributor
There was a problem hiding this comment.
could you hoist await pkg(base) outside of this call? Then you don't need the promise.all and things get simpler again?
Member Author
There was a problem hiding this comment.
Only if we change how pkg works. Right now pkg(base) itself just returns an object with async add(), async has() and async remove() methods.
Member Author
There was a problem hiding this comment.
We could also make it sync
+ use a default map as a cache for reading the package.json file
thecrypticace approved these changes May 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where the upgrade tests were taking too long. This PR fixes that.
Essentially when updating dependencies we did this:
But this is not ideal, because we are calling out to
npmand run each dependency in isolation.With this PR, we essentially do it all in one go:
npm install tailwindcss@latest @tailwindcss/postcss@latest prettier-plugin-tailwindcss@latestTest plan
Testing this locally, the results look like this:
In CI:
[ci-all]