<#18922 javascript: Add explicit `npm_distribution...
# github-notifications
c
#18922 javascript: Add explicit `npm_distribution` target Issue created by tobni Is your feature request related to a problem? Please describe. Currently,
package_json
generates a
node_package
target that implements
NodePackageTarFieldSet
. This package field set is only useful for library authors.
package_json
is also used for applications not published to an npm-like registry, and the tar-distribution build is irrelevant for these cases. Describe the solution you'd like Remove the "implicit" generation of a
package
-goal target. Introduce a
npm_distribution
target that can be used for when
npm
-like library distributions are wanted. This mirrors the python backends
python_distribution
, except that this target has a separate file to target, whilst this is will also reference the
package.json
. A synergy here is to allow omitting the
package.json#version
when parsing the
package_json
target fields, and only validating for
npm_distribution
. Describe alternatives you've considered Add a skip field to the
package_json
. Additional context Some setups outright fail due to
package_json
building the tar distribution implicitly, thanks to behaviour of other backends (in this example docker). https://github.com/theoribeiro/pants-pnpm pantsbuild/pants