Skip to content

Commit

Permalink
chore: update NodeJS to LTS 12.13.0 and yarn to 1.19.1 version (bazel…
Browse files Browse the repository at this point in the history
…-contrib#1313)

* fix(jasmine): fix dynamic import test

for extensionless imports nearest parent package.json should contain a
top-level field "type":
https://nodejs.org/docs/latest-v12.x/api/esm.html#esm_enabling

* fix(examples): loosen node version requirement to include 12 LTS

* fix(labs): bump dependency versions

jsdoc peer dependency `requizzle` is failing due to this:
hegemonic/requizzle#6

* fix(labs): unpin protobufjs dependency version from commit sha to latest

* fix(labs): match @bazel/labs protobufjs dependencies with protobuf.js 6.8.8 deps

in other case protobuf.js will try to npm install mismatched dependency
versions programmatically and fail due to read-only sandbox fs:

https://github.com/protobufjs/protobuf.js/blob/69623a91c1e4a99d5210b5295a9e5b39d9517554/cli/util.js#L129
https://github.com/protobufjs/protobuf.js/blob/69623a91c1e4a99d5210b5295a9e5b39d9517554/package.json

* fix(labs): freeze protobufjs version in place

other dependencies here should have the same major version as in protobufjs package.json
  • Loading branch information
siberex authored and alexeagle committed Oct 30, 2019
1 parent 0005b7a commit c0fdb96
Show file tree
Hide file tree
Showing 6 changed files with 257 additions and 213 deletions.
2 changes: 1 addition & 1 deletion examples/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Demo of building Angular apps with Bazel",
"license": "Apache-2.0",
"engines": {
"node": ">=10.9.0 <11.0.0",
"node": ">=10.9.0 <13.0.0",
"yarn": ">=1.9.2 <2.0.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/angular_view_engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Demo of building Angular apps with Bazel",
"license": "Apache-2.0",
"engines": {
"node": ">=10.9.0 <11.0.0",
"node": ">=10.9.0 <13.0.0",
"yarn": ">=1.9.2 <2.0.0"
},
"dependencies": {
Expand Down
9 changes: 7 additions & 2 deletions internal/node/node_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ _ATTRS = {
"10.9.0-darwin_amd64": ("node-v10.9.0-darwin-x64.tar.gz", "node-v10.9.0-darwin-x64", "3c4fe75dacfcc495a432a7ba2dec9045cff359af2a5d7d0429c84a424ef686fc"),
"10.9.0-linux_amd64": ("node-v10.9.0-linux-x64.tar.xz", "node-v10.9.0-linux-x64", "c5acb8b7055ee0b6ac653dc4e458c5db45348cecc564b388f4ed1def84a329ff"),
"10.9.0-windows_amd64": ("node-v10.9.0-win-x64.zip", "node-v10.9.0-win-x64", "6a75cdbb69d62ed242d6cbf0238a470bcbf628567ee339d4d098a5efcda2401e"),
# 12.13.0
"12.13.0-darwin_amd64": ("node-v12.13.0-darwin-x64.tar.gz", "node-v12.13.0-darwin-x64", "49a7374670a111b033ce16611b20fd1aafd3296bbc662b184fe8fb26a29c22cc"),
"12.13.0-linux_amd64": ("node-v12.13.0-linux-x64.tar.xz", "node-v12.13.0-linux-x64", "7a57ef2cb3036d7eacd50ae7ba07245a28336a93652641c065f747adb2a356d9"),
"12.13.0-windows_amd64": ("node-v12.13.0-win-x64.zip", "node-v12.13.0-win-x64", "6f920cebeecb4957b4ef0def6d9b04c49d4582864f8d1a207ce8d0665865781a"),
# 8.11.1
"8.11.1-darwin_amd64": ("node-v8.11.1-darwin-x64.tar.gz", "node-v8.11.1-darwin-x64", "5c7b05899ff56910a2b8180f139d48612f349ac2c5d20f08dbbeffbed9e3a089"),
"8.11.1-linux_amd64": ("node-v8.11.1-linux-x64.tar.xz", "node-v8.11.1-linux-x64", "6617e245fa0f7fbe0e373e71d543fea878315324ab31dc64b4eba10e42d04c11"),
Expand Down Expand Up @@ -148,7 +152,7 @@ and expect that file to have sha256sum `00b7a8426e076e9bf9d12ba2d571312e833fe962
""",
),
"node_version": attr.string(
default = "10.16.0",
default = "12.13.0",
doc = "the specific version of NodeJS to install or, if vendored_node is specified, the vendored version of node",
),
"package_json": attr.label_list(
Expand Down Expand Up @@ -186,6 +190,7 @@ are supported by the node version being used.""",
"1.12.1": ("yarn-v1.12.1.tar.gz", "yarn-v1.12.1", "09bea8f4ec41e9079fa03093d3b2db7ac5c5331852236d63815f8df42b3ba88d"),
"1.12.3": ("yarn-v1.12.3.tar.gz", "yarn-v1.12.3", "02cd4b589ec22c4bdbd2bc5ebbfd99c5e99b07242ad68a539cb37896b93a24f2"),
"1.13.0": ("yarn-v1.13.0.tar.gz", "yarn-v1.13.0", "125d40ebf621ebb08e3f66a618bd2cc5cd77fa317a312900a1ab4360ed38bf14"),
"1.19.1": ("yarn-v1.19.1.tar.gz", "yarn-v1.19.1", "34293da6266f2aae9690d59c2d764056053ff7eebc56b80b8df05010c3da9343"),
"1.3.2": ("yarn-v1.3.2.tar.gz", "yarn-v1.3.2", "6cfe82e530ef0837212f13e45c1565ba53f5199eec2527b85ecbcd88bf26821d"),
"1.5.1": ("yarn-v1.5.1.tar.gz", "yarn-v1.5.1", "cd31657232cf48d57fdbff55f38bfa058d2fb4950450bd34af72dac796af4de1"),
"1.6.0": ("yarn-v1.6.0.tar.gz", "yarn-v1.6.0", "a57b2fdb2bfeeb083d45a883bc29af94d5e83a21c25f3fc001c295938e988509"),
Expand Down Expand Up @@ -234,7 +239,7 @@ and expect the file to have sha256sum `09bea8f4ec41e9079fa03093d3b2db7ac5c533185
),
"yarn_version": attr.string(
doc = "the specific version of Yarn to install",
default = "1.13.0",
default = "1.19.1",
),
}

Expand Down
2 changes: 1 addition & 1 deletion packages/jasmine/test/templated_args_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('args', () => {
it('should pass through templated_args', async () => {
// without --node_options=--experimental-modules this will fail
const dynamicImport = await import('./dynamic_import');
const dynamicImport = await import('./dynamic_import.js');
dynamicImport.default.hello();
});
});
12 changes: 6 additions & 6 deletions packages/labs/src/protobufjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"main": "index.js",
"license": "MIT",
"devDependencies": {
"chalk": "^1.1.3",
"escodegen": "^1.9.0",
"espree": "^3.5.3",
"chalk": "^2.4.1",
"escodegen": "^1.9.1",
"espree": "^3.5.4",
"estraverse": "^4.2.0",
"glob": "^7.1.2",
"jsdoc": "^3.5.5",
"minimist": "^1.2.0",
"protobufjs": "Use HEAD to pick up fix for https://github.com/dcodeIO/protobuf.js/pull/1018",
"protobufjs": "github:dcodeIO/protobuf.js#65d113b0079fa2570837f3cf95268ce24714a248",
"protobufjs": "On update, other dependencies here to be updated to the same versions as in protobufjs package.json",
"protobufjs": "=6.8.8",
"semver": "^5.5.0",
"tmp": "0.0.33",
"uglify-js": "^2.8.29"
"uglify-js": "^3.3.25"
}
}
Loading

0 comments on commit c0fdb96

Please sign in to comment.