-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add dependency validation script #6155
base: v2
Are you sure you want to change the base?
Conversation
|
Just a heads up: I've tried to resolve this in the past, but they behave slightly differently: #5483 (comment) and I couldn't find a micromatch option to achieve the correct behaviour (And I also ran into this in #5900 (comment)) |
Benchmark ResultsKitchen Sink 🚨
Timings
Cold BundlesNo bundles found, this is probably a failed build... Cached BundlesNo bundles found, this is probably a failed build... React HackerNews ✅
Timings
Cold BundlesNo bundle changes detected. Cached Bundles
AtlasKit Editor 🚨
Timings
Cold BundlesNo bundles found, this is probably a failed build... Cached BundlesNo bundles found, this is probably a failed build... Three.js ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. |
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.
What's the state of this PR?
Ah, I lost track of this one! Last I remember, the outstanding work was:
I will get back to this ASAP, thanks for the reminder! |
9eb5524
to
2ea235a
Compare
2ea235a
to
2688295
Compare
Checks for the following: - That packages in the monorepo have compatible semver expressions - That dependencies of packages have compatible semver expressions
2688295
to
f63e0cb
Compare
↪️ Pull Request
This PR adds a script (
yarn lint:dependencies
) that checks for the following:That packages have compatible semver expressions (see Version mismatch example below)
That dependencies of packages have compatible semver expressions (see Dependency mismatch example below)
The intent of these checks is to avoid unintentionally installing duplicate incompatible versions of packages or dependencies (both in the repository and in Parcel projects).
💻 Examples
Version mismatch:
This error is meant to catch the case where a Parcel package lists another Parcel package dependency with a semver expression that doesn't match the current version.
Dependency mismatch:
This error is meant to catch the case where a package lists a dependency with a semver expression that does not overlap with one or more other packages' semver expressions for the same dependency.
Ignoring errors via excludes
Packages can be ignored by adding their names to the PACKAGE_EXCLUDES set.
Dependencies can be ignored by adding their names to the DEPENDENCY_EXCLUDES set.
🚨 Test instructions
Script can be run via
yarn lint:dependencies
✔️ PR Todo
Resolve current errors
Found 39 errors.
questions
PackageMismatchError
s are fromparcelDependencies
mismatches with current package versions. Does it make sense to validate these?DependencyMismatchError
s appear to be false positives?