Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Update minimum engine versions for node and yarn #1329 #1340

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ version: 2
# See https://blog.daemonl.com/2016/02/yaml.html
# To validate changes, use an online parser, eg.
# https://yaml-online-parser.appspot.com/
var_1: &cache_key yarn-cache-{{ checksum "yarn.lock" }}-0.3.3
var_1: &cache_key yarn-cache-{{ checksum "yarn.lock" }}-0.6.3
var_2: &run_in_ngcontainer
docker:
- image: angular/ngcontainer:0.3.3
- image: angular/ngcontainer:0.6.0
var_3: &set_bazel_options
run:
command: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
Expand Down
105 changes: 40 additions & 65 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,80 +7,51 @@
# imports also make sense when referencing the published package.
workspace(name = "ngrx")

####################################
# Fetch and install the NodeJS rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "634206524d90dc03c52392fa3f19a16637d2bcf154910436fe1d669a0d9d7b9c",
strip_prefix = "rules_nodejs-0.10.1",
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.10.1.zip",
)

# Load NodeJS rules. Note that this is technically not needed because
# `rules_typescript_dependencies()` would also load the NodeJS rules, but we specifically need
# at least v0.14.1 which includes: https://github.com/bazelbuild/rules_nodejs/pull/341
http_archive(
name = "io_bazel_rules_webtesting",
sha256 = "4fb0dca8c9a90547891b7ef486592775a523330fc4555c88cd8f09270055c2ce",
strip_prefix = "rules_webtesting-7ffe970bbf380891754487f66c3d680c087d67f2",
url = "https://github.com/bazelbuild/rules_webtesting/archive/7ffe970bbf380891754487f66c3d680c087d67f2.zip",
name = "build_bazel_rules_nodejs",
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.14.1.zip",
strip_prefix = "rules_nodejs-0.14.1",
sha256 = "813eb51733d3632f456f3bb581d940ed64e80dab417595c93bf5ad19079898e2"
)

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

check_bazel_version("0.14.0")

node_repositories(
package_json = ["//:package.json"],
preserve_symlinks = True,
)
check_bazel_version("0.15.0")

####################################
# Fetch and install the TypeScript rules
# Add TypeScript rules
http_archive(
name = "build_bazel_rules_typescript",
sha256 = "3792cc20ef13bb1d1d8b1760894c3320f02a87843e3a04fed7e8e454a75328b6",
strip_prefix = "rules_typescript-0.15.1",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.15.1.zip",
name = "build_bazel_rules_typescript",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.18.0.zip",
strip_prefix = "rules_typescript-0.18.0",
sha256 = "4726e07a2f8d23b5e3af166f3b2a6e8aa75adad94b35ab4d959e8fe875f90272",
)

load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")

ts_setup_workspace()

####################################
# The Bazel buildtools repo contains tools like the BUILD file formatter, buildifier
# This commit matches the version of buildifier in angular/ngcontainer
# If you change this, also check if it matches the version in the angular/ngcontainer
# version in /.circleci/config.yml
BAZEL_BUILDTOOLS_VERSION = "82b21607e00913b16fe1c51bec80232d9d6de31c"
# Fetch transient dependencies of the TypeScript bazel rules.
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
rules_typescript_dependencies()

http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "edb24c2f9c55b10a820ec74db0564415c0cf553fa55e9fc709a6332fb6685eff",
strip_prefix = "buildtools-%s" % BAZEL_BUILDTOOLS_VERSION,
url = "https://github.com/bazelbuild/buildtools/archive/%s.zip" % BAZEL_BUILDTOOLS_VERSION,
)
# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
# your npm dependencies. You must still run the package manager.
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")

http_archive(
name = "io_bazel_rules_go",
sha256 = "feba3278c13cde8d67e341a837f69a029f698d7a27ddbb2a202be7a10b22142a",
url = "https://github.com/bazelbuild/rules_go/releases/download/0.10.3/rules_go-0.10.3.tar.gz",
node_repositories(
# For deterministic builds, specify explicit NodeJS and Yarn versions. Keep the Yarn version
# in sync with the version of Travis.
node_version = "10.10.0",
yarn_version = "1.9.4",
)

load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")

go_rules_dependencies()

go_register_toolchains()

load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories")

####################################
# Fetching the Bazel source allows us to compile the Skylark linter
# Fetching the Bazel source code allows us to compile the Skylark linter
http_archive(
name = "io_bazel",
sha256 = "e373d2ae24955c1254c495c9c421c009d88966565c35e4e8444c082cb1f0f48f",
strip_prefix = "bazel-968f87900dce45a7af749a965b72dbac51b176b3",
url = "https://github.com/bazelbuild/bazel/archive/968f87900dce45a7af749a965b72dbac51b176b3.zip",
# Use Bazel managed node modules. See more below:
# https://github.com/bazelbuild/rules_nodejs#bazel-managed-vs-self-managed-dependencies
yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)

####################################
Expand All @@ -97,16 +68,20 @@ http_archive(
url = "https://github.com/angular/angular-cli/archive/v6.1.0-rc.0.zip",
)

####################################
# Tell Bazel about some workspaces that were installed from npm.
# Setup TypeScript Bazel workspace
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()

# Add Angular rules
local_repository(
name = "angular",
path = "node_modules/@angular/bazel",
name = "angular",
path = "node_modules/@angular/bazel",
)

# Add rxjs
local_repository(
name = "rxjs",
path = "node_modules/rxjs/src",
name = "rxjs",
path = "node_modules/rxjs/src",
)

load("@angular//:index.bzl", "ng_setup_workspace")
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"build:stackblitz": "ts-node ./build/stackblitz.ts && git add ./stackblitz.html"
},
"engines": {
"node": ">=8.9.0",
"node": ">=10.9.0 <11.0.0",
timdeschryver marked this conversation as resolved.
Show resolved Hide resolved
"npm": ">=5.3.0",
"yarn": ">=1.3.0 <2.0.0"
"yarn": ">=1.9.2 <2.0.0"
},
"lint-staged": {
"*.{ts,json,md}": [
Expand Down Expand Up @@ -67,7 +67,7 @@
},
"dependencies": {
"@angular/animations": "^6.1.0",
"@angular/bazel": "^6.1.0",
"@angular/bazel": "^6.1.9",
"@angular/cdk": "^6.4.2",
"@angular/cli": "^6.1.2",
"@angular/common": "^6.1.0",
Expand Down Expand Up @@ -100,7 +100,7 @@
"@types/jest": "^20.0.2",
"@types/lodash": "^4.14.80",
"@types/ncp": "^2.0.1",
"@types/node": "^7.0.5",
"@types/node": "^10.9.0",
"@types/ora": "^1.3.1",
"@types/rimraf": "^0.0.28",
"chokidar": "^1.7.0",
Expand Down Expand Up @@ -152,4 +152,4 @@
"url": "https://opencollective.com/ngrx",
"logo": "https://opencollective.com/opencollective/logo.txt"
}
}
}
6 changes: 3 additions & 3 deletions projects/ngrx.io/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"post~~build": "yarn build-404-page"
},
"engines": {
"node": ">=8.9.1 <9.0.0",
"yarn": ">=1.3.2 <2.0.0"
"node": ">=10.9.0 <11.0.0",
"yarn": ">=1.9.2 <2.0.0"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -94,7 +94,7 @@
"@angular/language-service": "6.1.0-rc.3",
"@types/jasmine": "^2.5.52",
"@types/jasminewd2": "^2.0.3",
"@types/node": "~6.0.60",
"@types/node": "^10.9.0",
"archiver": "^1.3.0",
"canonical-path": "^0.0.2",
"chalk": "^2.1.0",
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@
dependencies:
tslib "^1.9.0"

"@angular/bazel@^6.1.0":
version "6.1.0"
resolved "https://registry.yarnpkg.com/@angular/bazel/-/bazel-6.1.0.tgz#a875e7c263bcc164c8a81d413053e444e4197f2c"
"@angular/bazel@^6.1.9":
version "6.1.9"
resolved "https://registry.yarnpkg.com/@angular/bazel/-/bazel-6.1.9.tgz#71a236809c8e059e09489a2f82bf7cfb51df54e8"
dependencies:
"@bazel/typescript" "^0.15.0"
"@types/node" "6.0.84"
Expand Down Expand Up @@ -332,14 +332,14 @@
version "6.0.84"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.84.tgz#193ffe5a9f42864d425ffd9739d95b753c6a1eab"

"@types/node@^10.9.0":
version "10.11.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.11.4.tgz#e8bd933c3f78795d580ae41d86590bfc1f4f389d"

"@types/node@^6.0.46":
version "6.0.109"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.109.tgz#addc070c5b0a528c286ff4188d7dcafdafbfdcce"

"@types/node@^7.0.5":
version "7.0.64"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.64.tgz#8d5fc50e0944437e48e8aef4ab09910ec8661eee"

"@types/ora@^1.3.1":
version "1.3.4"
resolved "https://registry.yarnpkg.com/@types/ora/-/ora-1.3.4.tgz#b7fbbea8dac9851eb1918a761e2f4fae4cec03f5"
Expand Down