-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: implement modules and compatibility check #327
Merged
Conversation
This file contains 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
This is an option that is discouraged in most scenarios. If it is present, the language service used by e.g. vs code suggests the wrong URLs for imports.
Since a recent update chai, "includes" errors are truncated, so they sometimes to not show the relevant part. Also, using an includes check is risky, as shown in one of the tests that actually passed an empty string as the expected substring, so it did not test the message at all.
Etienne-Buschong
approved these changes
Jul 24, 2024
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.
Code looks really good 🚀
spec/model/compatibility-check/describe-module-specification.spec.ts
Outdated
Show resolved
Hide resolved
4997a21
to
bd48d4b
Compare
A project created with the withModuleDefinitions option enabled can now use the @modules directive to assign types and fields to modules. Calling withModuleSelection() on the resulting project then creates a new project where only types and fields of some of the modules are present. Project.checkCompatibility() can be used to check if the project can be used in place of an other project, i.e. if it declares all types and fields in a compatbile manner. Both features can be combined to check whether a project is compatible with a set of modules. This commit introduces the basic features. More validation logic and improvements will follow.
|
depdendency-check started to fail with an error that does not even include a stack trace. knip does a little bit more than dependency-check did. We disable some of the rules because they just generate noise for now. A note about the knip.json: every file suffixed by "!" is one that is used in prod mode (npm run knip:prod). knip found that some dependencies are not used - removed them.
I think this MR is ready 👍 |
there will be some changes to the behavior in a follow-up commit. |
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.
A project created with the withModuleDefinitions option enabled can now use the @modules directive to assign types and fields to modules. Calling withModuleSelection() on the resulting project then creates a new project where only types and fields of some of the modules are present.
Project.checkCompatibility() can be used to check if the project can be used in place of an other project, i.e. if it declares all types and fields in a compatbile manner.
Both features can be combined to check whether a project is compatible with a set of modules.
This PR introduces the basic features. More validation logic and improvements will follow.