Skip to content

Commit 1689fa1

Browse files
author
Alex Eagle
committed
chore(release): 3.0.0
1 parent 0bacdc5 commit 1689fa1

File tree

34 files changed

+155
-65
lines changed

34 files changed

+155
-65
lines changed

CHANGELOG.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,93 @@
1+
# [3.0.0](https://github.com/bazelbuild/rules_nodejs/compare/3.0.0-rc.1...3.0.0) (2020-12-22)
2+
3+
4+
### Bug Fixes
5+
6+
* **builtin:** only pass kwargs to the test, not the .update binary ([#2361](https://github.com/bazelbuild/rules_nodejs/issues/2361)) ([afa095b](https://github.com/bazelbuild/rules_nodejs/commit/afa095b))
7+
8+
9+
### Code Refactoring
10+
11+
* **builtin:** remove node_modules attribute from nodejs_binary, nodejs_test & ts_library ([c2927af](https://github.com/bazelbuild/rules_nodejs/commit/c2927af))
12+
13+
14+
### BREAKING CHANGES
15+
16+
* **builtin:** We removed the node_modules attribute from `nodejs_binary`, `nodejs_test`, `jasmine_node_test` & `ts_library`.
17+
18+
If you are using the `node_modules` attribute, you can simply add the target specified there to the `data` or `deps` attribute of the rule instead.
19+
20+
For example,
21+
22+
```
23+
nodejs_test(
24+
name = "test",
25+
data = [
26+
"test.js",
27+
"@npm//:node_modules",
28+
],
29+
entry_point = "test.js",
30+
)
31+
```
32+
33+
or
34+
35+
```
36+
ts_library(
37+
name = "lib",
38+
srcs = glob(["*.ts"]),
39+
tsconfig = ":tsconfig.json",
40+
deps = ["@npm//:node_modules"],
41+
)
42+
```
43+
44+
We also dropped support for filegroup based node_modules target and removed `node_modules_filegroup` from `index.bzl`.
45+
46+
If you are using this feature for user-managed deps, you must now a `js_library` target
47+
with `external_npm_package` set to `True` instead.
48+
49+
For example,
50+
51+
```
52+
js_library(
53+
name = "node_modules",
54+
srcs = glob(
55+
include = [
56+
"node_modules/**/*.js",
57+
"node_modules/**/*.d.ts",
58+
"node_modules/**/*.json",
59+
"node_modules/.bin/*",
60+
],
61+
exclude = [
62+
# Files under test & docs may contain file names that
63+
# are not legal Bazel labels (e.g.,
64+
# node_modules/ecstatic/test/public/中文/檔案.html)
65+
"node_modules/**/test/**",
66+
"node_modules/**/docs/**",
67+
# Files with spaces in the name are not legal Bazel labels
68+
"node_modules/**/* */**",
69+
"node_modules/**/* *",
70+
],
71+
),
72+
# Provide ExternalNpmPackageInfo which is used by downstream rules
73+
# that use these npm dependencies
74+
external_npm_package = True,
75+
)
76+
77+
nodejs_test(
78+
name = "test",
79+
data = [
80+
"test.js",
81+
":node_modules",
82+
],
83+
entry_point = "test.js",
84+
)
85+
```
86+
87+
See `examples/user_managed_deps` for a working example of user-managed npm dependencies.
88+
89+
90+
191
# [3.0.0-rc.1](https://github.com/bazelbuild/rules_nodejs/compare/3.0.0-rc.0...3.0.0-rc.1) (2020-12-18)
292

393

docs/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ containing:
3131
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3232
http_archive(
3333
name = "build_bazel_rules_nodejs",
34-
sha256 = "84b1d11b1f3bda68c24d992dc6e830bca9db8fa12276f2ca7fcb7761c893976b",
35-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0-rc.1/rules_nodejs-3.0.0-rc.1.tar.gz"],
34+
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
35+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
3636
)
3737

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

e2e/bazel_managed_deps/WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2121

2222
http_archive(
2323
name = "build_bazel_rules_nodejs",
24-
sha256 = "84b1d11b1f3bda68c24d992dc6e830bca9db8fa12276f2ca7fcb7761c893976b",
25-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0-rc.1/rules_nodejs-3.0.0-rc.1.tar.gz"],
24+
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
25+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
2626
)
2727

2828
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

e2e/concatjs_devserver/WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2121

2222
http_archive(
2323
name = "build_bazel_rules_nodejs",
24-
sha256 = "84b1d11b1f3bda68c24d992dc6e830bca9db8fa12276f2ca7fcb7761c893976b",
25-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0-rc.1/rules_nodejs-3.0.0-rc.1.tar.gz"],
24+
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
25+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
2626
)
2727

2828
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

e2e/coverage/WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2121

2222
http_archive(
2323
name = "build_bazel_rules_nodejs",
24-
sha256 = "84b1d11b1f3bda68c24d992dc6e830bca9db8fa12276f2ca7fcb7761c893976b",
25-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0-rc.1/rules_nodejs-3.0.0-rc.1.tar.gz"],
24+
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
25+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
2626
)
2727

2828
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

e2e/fine_grained_symlinks/WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
77

88
http_archive(
99
name = "build_bazel_rules_nodejs",
10-
sha256 = "84b1d11b1f3bda68c24d992dc6e830bca9db8fa12276f2ca7fcb7761c893976b",
11-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0-rc.1/rules_nodejs-3.0.0-rc.1.tar.gz"],
10+
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
11+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
1212
)
1313

1414
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")

e2e/jasmine/WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2121

2222
http_archive(
2323
name = "build_bazel_rules_nodejs",
24-
sha256 = "84b1d11b1f3bda68c24d992dc6e830bca9db8fa12276f2ca7fcb7761c893976b",
25-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0-rc.1/rules_nodejs-3.0.0-rc.1.tar.gz"],
24+
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
25+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
2626
)
2727

2828
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

e2e/node_loader_no_preserve_symlinks/WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
99

1010
http_archive(
1111
name = "build_bazel_rules_nodejs",
12-
sha256 = "84b1d11b1f3bda68c24d992dc6e830bca9db8fa12276f2ca7fcb7761c893976b",
13-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0-rc.1/rules_nodejs-3.0.0-rc.1.tar.gz"],
12+
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
13+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
1414
)
1515

1616
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")

e2e/node_loader_preserve_symlinks/WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
99

1010
http_archive(
1111
name = "build_bazel_rules_nodejs",
12-
sha256 = "84b1d11b1f3bda68c24d992dc6e830bca9db8fa12276f2ca7fcb7761c893976b",
13-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0-rc.1/rules_nodejs-3.0.0-rc.1.tar.gz"],
12+
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
13+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
1414
)
1515

1616
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

e2e/nodejs_image/WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2121

2222
http_archive(
2323
name = "build_bazel_rules_nodejs",
24-
sha256 = "84b1d11b1f3bda68c24d992dc6e830bca9db8fa12276f2ca7fcb7761c893976b",
25-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0-rc.1/rules_nodejs-3.0.0-rc.1.tar.gz"],
24+
sha256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d",
25+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.0.0/rules_nodejs-3.0.0.tar.gz"],
2626
)
2727

2828
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

0 commit comments

Comments
 (0)