Skip to content

Releases: bazelbuild/rules_nodejs

0.27.0

07 Mar 20:04
Compare
Choose a tag to compare
  • yarn default is now 1.13.0

@bazel/typescript

  • Fix docs formatting issues and include some missing attributes (switched from Skydoc to Stardoc)

rollup_bundle

  • Update to latest rollup, including support for tree-shaking @__PURE__ code
  • Include the rollup-plugin-commonjs so that commonjs-format modules can be bundled
  • Update from uglify to terser, the currently supported JS minifier, which handles ES2015 inputs
  • The es2015 output is now using native ES modules, so no runtime loader is required (system.js). Note that rollup has a new polyfill, s.js which is not demonstrated here yet.
  • Output chunk directories renamed from *.cs to *_chunks and from .es6 to _es2015 (BREAKING if you depended on the names)

To use this release, update your WORKSPACE to:

http_archive(
    name = "build_bazel_rules_nodejs",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.0/rules_nodejs-0.27.0.tar.gz"],
    sha256 = "b1c8d0aeb55aced7b56c3c2a661b3df8210ac81368c39f6287052ee430450fe6",
)

and update your @bazel/typescript, @bazel/karma, and @bazel/jasmine dependencies to 0.27.0

0.26.0

26 Feb 01:49
Compare
Choose a tag to compare

See 0.26.0-beta.0 release notes.

More packages, more monorepo

22 Feb 20:12
Compare
Choose a tag to compare
Pre-release

We are moving the @bazel/typescript and @bazel/karma packages to this repo from rules_typescript.

This makes it easier for us to do maintenance work in a single monorepo. rules_typescript is now just some utility bits that are shared with google internal, and we get them as a WORKSPACE dependency here.

Note, we are burning minor revisions 19-25 because we want to catch up to the versions from the rules_typescript repo so that these two packages keep monotonic increased version numbers.

There are now several npm packages published from this repo:

@bazel/bazel
-------
latest: 0.22.0
next: 0.23.0-rc1b

@bazel/ibazel
-------
latest: 0.9.1

@bazel/buildifier
-------
latest: 0.22.0

@bazel/karma
-------
latest: 0.25.1
next: 0.26.0-beta.0

@bazel/typescript
-------
latest: 0.25.1
next: 0.26.0-beta.0

@bazel/jasmine
-------
latest: 0.18.7
next: 0.26.0-beta.0

0.18.7

20 Feb 21:40
Compare
Choose a tag to compare
  • calling node_repositories in your WORKSPACE is now optional, if you have no arguments to pass, and you call yarn_install or npm_install
  • publish the jasmine_node_test rule from an independent subpackage, at @bazel/jasmine on npm. This better models how we want third-party bazel rules to work, and allows the core build_bazel_rules_nodejs package to shed optional features

To fetch this version, use

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "build_bazel_rules_nodejs",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.18.7/rules_nodejs-0.18.7.tar.gz"],
    sha256 = "a69c5bd317beef982298ea7b5ed8b5c5275d1b55ee199e98a0ca088f8e0c6cce",
)

0.18.6

13 Feb 17:02
Compare
Choose a tag to compare
  • Adds support for es2015 package.json field to rollup_bundle (#429)
  • Fixes EACCESS: permission denied bug in web_package (#546)
  • Restores internal/node.bzl (#545)

Add the following to your WORKSPACE file to use:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "build_bazel_rules_nodejs",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.18.6/rules_nodejs-0.18.6.tar.gz"],
    sha256 = "1416d03823fed624b49a0abbd9979f7c63bbedfd37890ddecedd2fe25cccebc6",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories")
node_repositories()

See https://github.com/bazelbuild/rules_nodejs/blob/0.18.6/README.md#installation for more installation options.

0.18.5

10 Feb 18:18
Compare
Choose a tag to compare
  • Fix jasmine_runner.js so that an already initialized jasmine will be used (#539)

Add the following to your WORKSPACE file to use:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "build_bazel_rules_nodejs",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.18.5/rules_nodejs-0.18.5.tar.gz"],
    sha256 = "c8cd6a77433f7d3bb1f4ac87f15822aa102989f8e9eb1907ca0cad718573985b",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories")
node_repositories()

See https://github.com/bazelbuild/rules_nodejs/blob/0.18.5/README.md#installation for more installation options.

0.18.4

08 Feb 21:13
Compare
Choose a tag to compare

MAJOR CHANGE

This is the first rules_nodejs release that uses a distribution artifact.

You should no longer fetch the entire GitHub repository with one of

git_repository(
    name = "build_bazel_rules_nodejs",
    remote = "https://github.com/bazelbuild/rules_nodejs.git",
    tag = "0.18.0"
)
# or
http_archive(
    name = "build_bazel_rules_nodejs",
    urls = ["https://github.com/bazelbuild/rules_nodejs/archive/0.16.8.zip"],
    strip_prefix = "rules_nodejs-0.16.8",
)

Instead, fetch our distribution tar.gz file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "build_bazel_rules_nodejs",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.18.4/rules_nodejs-0.18.4.tar.gz"],
    sha256 = "23987a5cf549146742aa6a0d2536e4906906e63a608d5b9b32dd9fe5523ef51c",
)

We did this for a few reasons:

  1. It's wasteful for users to download all our tests, examples, and any large files we vendor into our repo.
  2. We cannot trust the sha256 produced by the GitHub frontend to be stable.
  3. We want to start authoring our files in TypeScript, but you should only get JavaScript files. Bazel support for transitive dependencies is weak and hard for users to manage.

Note, this is not a breaking change, you could still fetch the entire repo, emulating a monorepo scheme across multiple repositories, and building everything from source. However we discourage that since it exposes our transitive development-only dependencies like TypeScript.

Other changes

** Breaking change **: if you depended on our internal file, @build_bazel_rules_nodejs//internal:node.bzl, this has been removed. You should now depend on individual files which were re-exported from there.

We have updated our examples. There is a new example of using Parcel.js, to illustrate using an arbitrary npm library in your toolchain. There is also an example of building a web application with Rollup, and injected script and link tags in the index.html.

0.16.8

06 Feb 00:03
Compare
Choose a tag to compare
  • @bazel/bazel now checks for a local installed copy, so it's safe to install globally. It exposes an index.js so that Angular schematics and other tools can locate the binary with require.resolve('@bazel/bazel')
  • Restored earlier behavior that the yarn.lock or package-lock.json in your project is updated by Bazel when running a build.
  • Fix the npm_package rule to copy binary files correctly

0.16.7

01 Feb 16:10
Compare
Choose a tag to compare
  • Deprecate rules_nodejs_dependencies(), this now produces a warning. A later minor will remove the function.
  • Preparation work for installing "hybrid" npm packages that contain bazel workspaces
  • yarn_install and npm_install now default to quiet again, since Bazel 0.21 produces logging output as these run

0.16.5

09 Jan 18:36
Compare
Choose a tag to compare

Update CI to perform format and lint checks, and minor bugfixes