rules_js icon indicating copy to clipboard operation
rules_js copied to clipboard

Add .publish run target to npm_package

Open alexeagle opened this issue 2 years ago • 5 comments

Should be able to build a package and publish it to some registry

alexeagle avatar Jun 03 '22 15:06 alexeagle

Should be fairly easy to add a .publish run target to npm_package (same as pkg_npm has in rules_nodejs).

To make it more useful it should come with stamping support. The shape of stamping in npm_package needs a little thought

gregmagolan avatar Aug 08 '22 16:08 gregmagolan

yeah I keep wanting to do something with stamping - but really the minimum necessary thing is just a jq filter to replace the version in package.json, so maybe we want to add stamping support to the jq rule in aspect_bazel_lib and then at most we'd need to make npm_package macro expand to include one of those

alexeagle avatar Aug 08 '22 16:08 alexeagle

https://github.com/aspect-build/bazel-lib/issues/223 for that jq prereq

alexeagle avatar Aug 22 '22 14:08 alexeagle

Stamping of package.json is done so this is unblocked for someone

alexeagle avatar Aug 24 '22 19:08 alexeagle

FYI, https://github.com/aspect-build/rules_js/pull/498 will add the option to have npm on the PATH which will make implementing this feature much easier than in rules_nodejs.

gregmagolan avatar Oct 06 '22 15:10 gregmagolan