Skip to content

Commit

Permalink
Upgrade rules_nodejs to 4.6.2, node version to 16.14.0
Browse files Browse the repository at this point in the history
Also change the example to print `process.version`.

The current output is:
```
$ ./node_modules/@bazel/bazelisk/bazelisk-darwin_amd64 run :bin
INFO: Analyzed target //:bin (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:bin up-to-date:
  bazel-bin/bin.sh
  bazel-bin/bin_loader.js
  bazel-bin/bin_require_patch.js
INFO: Elapsed time: 0.368s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
v14.17.5
```

Notice that it prints 14.17.5 while node version defined in WORKSPACE is
16.14.0.
  • Loading branch information
mitul45 committed Feb 24, 2022
1 parent f990805 commit 949c9ca
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_library")
ts_library(
name = "sources",
srcs = ["//:index.ts"],
deps = ["@npm//tslib"],
deps = ["@npm//tslib", "@npm//@types/node"],
tsconfig = "//:tsconfig.json",
)

Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ workspace(
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "55a25a762fcf9c9b88ab54436581e671bc9f4f523cb5a1bd32459ebec7be68a8",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.2.2/rules_nodejs-3.2.2.tar.gz"],
sha256 = "2644a66772938db8d8c760334a252f1687455daa7e188073f2d46283f2f6fbb7",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.6.2/rules_nodejs-4.6.2.tar.gz"],
)

# http_archive(
Expand All @@ -18,7 +18,7 @@ http_archive(

load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories")
node_repositories(
node_version = "14.13.0",
node_version = "16.14.0",
yarn_version = "1.22.4",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
throw new Error("here");
console.log(process.version)
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "MIT",
"dependencies": {
"@bazel/bazelisk": "^1.7.5",
"@bazel/typescript": "^3.2.2",
"@bazel/typescript": "^4.6.2",
"@types/node": "^17.0.21",
"tslib": "^2.1.0",
"typescript": "^4.2.3"
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"importsNotUsedAsValues": "error",
"jsx": "react",
"jsxFactory": "Saba.JSX",
"lib": ["es2018"],
"lib": ["es2018", "dom"],
"module": "commonjs",
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
Expand Down
36 changes: 27 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,23 @@
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.7.5.tgz#dd1a52e3d23464f72de55aa3dc4777847fa85373"
integrity sha512-JHwP9JhfZUSoj4sku471Bjw4uE773U2Agujnx0CdPkeRk25khy1l3VyjaPaHB+z1fmMnM6ED3M7tetQUsovUQg==

"@bazel/typescript@^3.2.2":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.2.2.tgz#b53ee35dee68952abd711a2d472485748c7521c1"
integrity sha512-fTPtX3kZAQ50fWJaBvHtHf4w0fqMCrOhK9A8c5GgbqRrIWF8GG/+Tbt4OPwsG0N3+JDYOsHATacJI0qkjIeG1g==
"@bazel/typescript@^4.6.2":
version "4.6.2"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-4.6.2.tgz#9f07b6f8cfb6b0a0e228e5971de412911c910a90"
integrity sha512-AUF7kq82bP6DX9Brihr/eQqvNccxVfSXosFxt80h94og5cmMyoc/euXha6rxlOBP3yWXmSo+/qjzO7o8PWJduQ==
dependencies:
"@bazel/worker" "4.6.2"
protobufjs "6.8.8"
semver "5.6.0"
source-map-support "0.5.9"
tsutils "2.27.2"
tsutils "3.21.0"

"@bazel/worker@4.6.2":
version "4.6.2"
resolved "https://registry.yarnpkg.com/@bazel/worker/-/worker-4.6.2.tgz#0bd105344533335327c2edfa3fc65b04c39cdea8"
integrity sha512-DLpN6iQAH6uiUraAs4CESyqs60u55fcKmYgOOVObGuLSQQuX49Lw7XRIN90NibRPwpbBDQichWE3zfra0yKTTw==
dependencies:
google-protobuf "^3.6.1"

"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
version "1.1.2"
Expand Down Expand Up @@ -80,11 +88,21 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.55.tgz#a147f282edec679b894d4694edb5abeb595fecbd"
integrity sha512-koZJ89uLZufDvToeWO5BrC4CR4OUfHnUz2qoPs/daQH6qq3IN62QFxCTZ+bKaCE0xaoCAJYE4AXre8AbghCrhg==

"@types/node@^17.0.21":
version "17.0.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644"
integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==

buffer-from@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==

google-protobuf@^3.6.1:
version "3.19.4"
resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.19.4.tgz#8d32c3e34be9250956f28c0fb90955d13f311888"
integrity sha512-OIPNCxsG2lkIvf+P5FNfJ/Km95CsXOBecS9ZcAU6m2Rq3svc0Apl9nB3GMDNKfQ9asNv4KjyAqGwPQFrVle3Yg==

long@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
Expand Down Expand Up @@ -137,10 +155,10 @@ tslib@^2.1.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==

tsutils@2.27.2:
version "2.27.2"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.2.tgz#60ba88a23d6f785ec4b89c6e8179cac9b431f1c7"
integrity sha512-qf6rmT84TFMuxAKez2pIfR8UCai49iQsfB7YWVjV1bKpy/d0PWT5rEOSM6La9PiHZ0k1RRZQiwVdVJfQ3BPHgg==
tsutils@3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
dependencies:
tslib "^1.8.1"

Expand Down

0 comments on commit 949c9ca

Please sign in to comment.