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

[FR]: npm_package option to not collect transitive :node_module/pkgs #1893

Open
jbedard opened this issue Aug 16, 2024 · 0 comments
Open

[FR]: npm_package option to not collect transitive :node_module/pkgs #1893

jbedard opened this issue Aug 16, 2024 · 0 comments
Labels
discussion needed Discussion required to progress further enhancement New feature or request

Comments

@jbedard
Copy link
Member

jbedard commented Aug 16, 2024

What is the current behavior?

All transitive npm packages within npm_package(srcs) get collected and put into the .aspect_rules_js/{pkg}@0.0.0/node_modules/*. Of those transitive packages include multiple versions of a package under the same name it will fail due to conflicting versions.

When purely using package.json as the source of truth for dependencies between packages this can be confusing.

Describe the feature

Add a flag to npm_package such as collect_transitive_npm_deps = False to disable this behaviour and only include packages directly within the npm_package(data).

For example npm_package(data = [":node_modules"]) would include all direct npm dependencies of the package and no extra packages will be included no matter what is in the transitive npm_package(srcs).

@jbedard jbedard added enhancement New feature or request discussion needed Discussion required to progress further labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed Discussion required to progress further enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant