Skip to content

Avoiding version skew

Alex Eagle edited this page Apr 7, 2020 · 2 revisions

Most of the rules_nodejs code is distributed in npm packages, so you use your standard package.json and lockfile mechanisms to get the right versions of the packages.

As is typical for packages authored together in a monorepo, we version everything together (even packages whose contents are unchanged). So you should always update the @bazel-scoped packages from this repo together.

Secondly, there is a bit of bazel bootstrap code distributed outside of npm, which we call the "built-ins". This must be outside of npm because it includes the bootstrapping of Bazel being able to call node and npm. This version should also match the packages above.

in your WORKSPACE file or a .bzl file load()ed from it, you'll find "build_bazel_rules_nodejs" with a version - this should match the version of the npm packages in your package.json file.

Currently we check that at least the major versions match (the number before the first dot in the version) because we assume that breaking changes will break you.

Clone this wiki locally