-
Notifications
You must be signed in to change notification settings - Fork 137
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
Ensure dependencySatisfies
invalidates when installed packages change
#913
Ensure dependencySatisfies
invalidates when installed packages change
#913
Conversation
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 seems good overall, though I did leave a couple notes about sharing / reuse.
I'd also love to see a test here, the reproduction in "real world" was pretty straight forward (running npm test
which runs multiple ember-try scenarios back to back in an addon ought to have triggered this).
dependencySatisfies can become invalid if babel caches the macros plugin + the dependency that is being checked for changes its package version. This adds a cache busting plugin that tracks a hash of the contents of the apps lock file so any changes to dependencies will bust the cache. Fixes: embroider-build#906
0b0d836
to
0ea82c1
Compare
Added a test to cover this and verified that removing the cache busting plugin it fails the test |
59c554d
to
f830fe4
Compare
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.
Overall 👍, only one minor suggestion RE: babelPlugins.unshift
(made suggestion inline).
dependencySatisfies
invalidates when installed packages change
dependencySatisfies can become invalid if babel caches the macros plugin + the dependency that is being checked for changes its package version. This adds a cache busting plugin that tracks a hash of the contents of the apps lock file so any changes to dependencies will bust the cache.
Fixes: #906