rules_nodejs icon indicating copy to clipboard operation
rules_nodejs copied to clipboard

Support bzlmod users

Open alexeagle opened this issue 2 years ago • 5 comments

When Bazel 5.0 ships, users are going to want to use rules_nodejs from their MODULE.bazel file. We should get our module registered in the bazel-central-registry and have it manage the toolchains.

alexeagle avatar Dec 11 '21 22:12 alexeagle

Closed by https://github.com/bazelbuild/rules_nodejs/pull/3146?

uhthomas avatar Jun 29 '22 16:06 uhthomas

Though, some follow up work would be documentation.

Is it possible to use npm_install with bzlmod?

uhthomas avatar Jun 29 '22 16:06 uhthomas

no, there are two Bazel modules in this repo: rules_nodejs which is on bazel-central-registry and build_bazel_rules_nodejs which isn't. I don't plan to spend any time on the latter, since all the maintainers here have moved to aspect_rules_js (which is on the bazel-central-registry)

I think the only practical path forward is to migrate to rules_js before bzlmod, unless someone else from the community wants to step forward and put build_bazel_rules_nodejs on the BCR.

alexeagle avatar Jun 29 '22 17:06 alexeagle

I see, thanks for the pointers. Is it recommended to use aspect's rules over rules_nodejs? Is there any official suggestion, plans to merge or deprecate?

uhthomas avatar Jul 01 '22 17:07 uhthomas

All the maintainers are now working on aspect rules_js so yes, over the course of the next months as it matures past 1.0 I'd recommend users migrate. It's a rewrite and so much too breaking to make it a 6.0 of rules_nodejs.

alexeagle avatar Jul 04 '22 00:07 alexeagle

build_bazel_rules_nodejs will probably never go on the BCR and is no longer in this repo at HEAD.

alexeagle avatar Apr 23 '24 22:04 alexeagle