Re:JSR first impressions: a JavaScript package manager by th...
by seniorsassycat on Sunday February 18, 2024 @02:10AM
(#39416891)
I think feature dependencies are better modeled than simple package splitting.
> For example, let’s say we have added some serialization support to our library, and it requires enabling a corresponding feature
> In this example, enabling the serde feature will enable the serde dependency. It will also enable the serde feature for the rgb dependency, but only if something else has enabled the rgb dependency.
https://doc.rust-lang.org/cargo/reference/features.html
It sounds better to install foo { features = serde } than foo, @foo/serde, and @bar/serde.
Re:JSR first impressions: a JavaScript package manager by th...
by seniorsassycat on Sunday February 18, 2024 @02:14AM
(#39416908)
Npm has optional dependencies and there are libraries that error when you use a code push that requires them. Features would formalize that pattern and improve it with clear errors, and composability.
• that’s an issue that never got solved for the same reason: “package.json is never going away so we won’t add more ways to do the same thing” — ok so node/npm is going to suck forever, fantastic.