aspect-build / aspect-build/rules_js

[FR]: Add support for "injected" in "dependenciesMeta"

Open
#959 2 comments 1 reaction 0 assignees View on GitHub
enhancement need: funding
Dominant language
Starlark
Stars
378
Forks
183
Avg merge
1d 9h
Merged PRs (30d)
32

Description

### What is the current behavior?

A dependency for which a `dependenciesMeta` entry exists will fail with an error like:

```
(21:34:32) ERROR: Traceback (most recent call last):
File "/Users/duarte.nunes/code/umani/BUILD.bazel", line 10, column 22, in
npm_link_all_packages(name = "node_modules")
File "/private/var/tmp/_bazel_duarte.nunes/f66c51e6a3394c97f40c1dcafe76e7fd/external/npm/defs.bzl", line 5548, column 27, in npm_link_all_packages
_npm_package_store(
Error in npm_package_store: npm_package_store rule '.aspect_rules_js/node_modules/@ui+amanara@0.0.0' in package '' conflicts with existing npm_package_store rule, defined at /Users/duarte.nunes/code/umani/BUILD.bazel:10:22
```

### Describe the feature

The motivation is to be able to correctly support peer dependencies for workspace packages: https://pnpm.io/package_json#dependenciesmetainjected.

Contributor guide

Open the contributing guide

Research direction

Start with npm_link_all_packages and _npm_package_store in external/npm/defs.bzl, especially the conflict path shown in the report. Read pnpm's dependenciesMeta documentation and trace how injected workspace dependencies are represented. Done means dependenciesMeta entries using injected no longer cause the duplicate npm_package_store conflict.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.