-
Notifications
You must be signed in to change notification settings - Fork 27
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
yarn: Resolve dev dependencies #744
base: main
Are you sure you want to change the base?
yarn: Resolve dev dependencies #744
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.
Some questions and suggestions.
78c6aec
to
5f7cc8a
Compare
Add utility functions to identify runtime dependencies in Yarn Classic projects: - Implement find_runtime_deps() to identify production dependencies across workspaces - Support compound key expansion in yarn.lock files - Use BFS algorithm for efficient transitive dependency resolution This enables proper classification of runtime dependencies based on their usage in package.json files and transitive relationships. Signed-off-by: Michal Šoltis <[email protected]>
Integrate dev dependency detection into the package resolution process: - Add dev flag to YarnClassicPackageFactory - Pass non-dev dependencies set through the resolution chain - Update package creation to mark dependencies as dev/non-dev - Update tests to accommodate the new dev flag This completes the dependency classification implementation by marking each resolved package with its development status. Signed-off-by: Michal Šoltis <[email protected]>
5f7cc8a
to
6636944
Compare
"version": "2.0.0", | ||
"dependencies": {"multi-dep1": "^4.0.0", "multi-dep2": "^4.0.0"}, | ||
}, | ||
"multi-dep1@^4.0.0, multi-dep2@^4.0.0": {"version": "5.0.0", "dependencies": {}}, |
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.
Isn't _expand_yarn_lock_keys
supposed to split this key in two?
"dev-dep1@^4.0.0": {"version": "4.0.0", "dependencies": {}}, | ||
} | ||
|
||
result = find_runtime_deps(package_json, mock_yarn_lock, []) |
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.
Should there be a test for Note: If a dependency is marked as runtime dependency somewhere and as a development dependency somewhere else, it is classified as runtime
? E.g. by having a simple workspace where dev-dep1
is a runtime dependency?
Maintainers will complete the following section
Note: if the contribution is external (not from an organization member), the CI
pipeline will not run automatically. After verifying that the CI is safe to run:
/ok-to-test
(as is the standard for Pipelines as Code)