Skip to content
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

Be smarter about comparing lock files #912

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Feb 5, 2024

  • Don't consider lockfiles at all if there are no traced changes to package metadata
  • Otherwise, after figuring out what lockfile pairs exist, filter out the ones that don't have diffs.

In practice this makes a big difference:

  • With no changes on the Chromatic monorepo it goes from 10-12s to 0s.
  • With only ./package.json changed, it goes to 1s.
📦 Published PR as canary version: 10.10.0--canary.912.7810399533.0

✨ Test out this PR locally via:

npm install chromatic@10.10.0--canary.912.7810399533.0
# or 
yarn add chromatic@10.10.0--canary.912.7810399533.0

@tmeasday tmeasday added release Auto: Create a `latest` release when merged patch Auto: Increment the patch version when merged labels Feb 5, 2024
@tmeasday tmeasday added minor Auto: Increment the minor version when merged and removed patch Auto: Increment the patch version when merged labels Feb 5, 2024
Copy link
Member

@ghengeveld ghengeveld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the right thing to do.

node-src/lib/findChangedDependencies.ts Outdated Show resolved Hide resolved
node-src/lib/findChangedDependencies.ts Outdated Show resolved Hide resolved
node-src/lib/findChangedDependencies.ts Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
node-src/lib/findChangedDependencies.test.ts Show resolved Hide resolved
node-src/lib/findChangedDependencies.ts Outdated Show resolved Hide resolved
@tmeasday tmeasday added this pull request to the merge queue Feb 7, 2024
Merged via the queue into main with commit 36bae9b Feb 7, 2024
20 checks passed
@tmeasday tmeasday deleted the tom/ap-4194-ts-lockfile-checking-can-take-10s-even-when-no-changes-are branch February 7, 2024 05:29
@ghengeveld
Copy link
Member

🚀 PR was released in v10.9.0 🚀

@ghengeveld ghengeveld added the released Verdict: This issue/pull request has been released label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Auto: Increment the minor version when merged release Auto: Create a `latest` release when merged released Verdict: This issue/pull request has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants