From 6790e02a130963855efc76e927206c3c86d76231 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Tue, 5 Dec 2017 11:36:08 -0800 Subject: [PATCH] ci: upgrade to node 8 and Bazel 0.8 (#20807) Closes #19648 PR Close #20807 --- .circleci/config.yml | 4 ++-- .travis.yml | 2 +- aio/package.json | 2 +- integration/bazel/WORKSPACE | 2 +- integration/bazel/package.json | 2 +- package.json | 3 +-- packages/compiler-cli/test/ngc_spec.ts | 2 +- scripts/ci/env.sh | 4 ++-- scripts/ci/offline_compiler_test.sh | 13 ++++++------- 9 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 28a661dafe..e3dfaef0e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ anchor_1: &job_defaults working_directory: ~/ng docker: - - image: angular/ngcontainer:0.0.2 + - image: angular/ngcontainer:0.0.6 # After checkout, rebase on top of master. # Similar to travis behavior, but not quite the same. @@ -39,7 +39,7 @@ jobs: <<: *post_checkout - restore_cache: key: angular-{{ .Branch }}-{{ checksum "yarn.lock" }} - + - run: bazel info release - run: bazel run @yarn//:yarn - run: bazel build packages/... - run: bazel test @angular//... diff --git a/.travis.yml b/.travis.yml index db8f23b5af..c37e98a11a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: node_js sudo: false dist: trusty node_js: - - '6.9.5' + - '8.9.1' addons: # firefox: "38.0" diff --git a/aio/package.json b/aio/package.json index c76c0951a7..1e8d6b4cdb 100644 --- a/aio/package.json +++ b/aio/package.json @@ -59,7 +59,7 @@ "~~update-webdriver": "webdriver-manager update --standalone false --gecko false" }, "engines": { - "node": ">=6.9.5 <7.0.0", + "node": ">=8.9.1 <9.0.0", "yarn": ">=1.0.2 <2.0.0" }, "private": true, diff --git a/integration/bazel/WORKSPACE b/integration/bazel/WORKSPACE index 0809e8a6a5..a25d7475b5 100644 --- a/integration/bazel/WORKSPACE +++ b/integration/bazel/WORKSPACE @@ -22,7 +22,7 @@ local_repository( git_repository( name = "io_bazel_rules_sass", remote = "https://github.com/bazelbuild/rules_sass.git", - tag = "0.0.2", + tag = "0.0.3", ) load("@io_bazel_rules_sass//sass:sass.bzl", "sass_repositories") diff --git a/integration/bazel/package.json b/integration/bazel/package.json index 0e27c74f79..c0fb1ee1d0 100644 --- a/integration/bazel/package.json +++ b/integration/bazel/package.json @@ -20,6 +20,6 @@ }, "scripts": { "postinstall": "ngc -p angular.tsconfig.json", - "test": "bazel build ..." + "test": "bazel build ... --noshow_progress" } } \ No newline at end of file diff --git a/package.json b/package.json index d83d021aab..5f813c3d24 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,7 @@ "bugs": "https://github.com/angular/angular/issues", "license": "MIT", "engines": { - "node": ">=6.9.5 <7.0.0", - "npm": ">=3.10.7 <4.0.0", + "node": ">=8.9.1 <9.0.0", "yarn": ">=1.0.2 <2.0.0" }, "repository": { diff --git a/packages/compiler-cli/test/ngc_spec.ts b/packages/compiler-cli/test/ngc_spec.ts index 07afa4e23c..f9da91cbbc 100644 --- a/packages/compiler-cli/test/ngc_spec.ts +++ b/packages/compiler-cli/test/ngc_spec.ts @@ -163,7 +163,7 @@ describe('ngc transformer command-line', () => { const exitCode = main(['-p', 'not-exist'], errorSpy); expect(errorSpy).toHaveBeenCalledTimes(1); expect(errorSpy.calls.mostRecent().args[0]).toContain('no such file or directory'); - expect(errorSpy.calls.mostRecent().args[0]).toContain('at Error (native)'); + expect(errorSpy.calls.mostRecent().args[0]).toContain('at Object.fs.lstatSync'); expect(exitCode).toEqual(2); }); diff --git a/scripts/ci/env.sh b/scripts/ci/env.sh index b2ad2649a0..4c0a98b78e 100755 --- a/scripts/ci/env.sh +++ b/scripts/ci/env.sh @@ -34,10 +34,10 @@ fi # CUSTOM GLOBALS # ####################### -setEnvVar NODE_VERSION 6.9.5 +setEnvVar NODE_VERSION 8.9.1 setEnvVar YARN_VERSION 1.0.2 setEnvVar CHROMIUM_VERSION 499098 # Chrome 62 linux stable, see https://www.chromium.org/developers/calendar -setEnvVar BAZEL_VERSION 0.5.4 +setEnvVar BAZEL_VERSION 0.8.1 setEnvVar SAUCE_CONNECT_VERSION 4.4.9 setEnvVar ANGULAR_CLI_VERSION 1.5.0-rc.2 setEnvVar PROJECT_ROOT $(cd ${thisDir}/../..; pwd) diff --git a/scripts/ci/offline_compiler_test.sh b/scripts/ci/offline_compiler_test.sh index 74832f5eac..f0be24490f 100755 --- a/scripts/ci/offline_compiler_test.sh +++ b/scripts/ci/offline_compiler_test.sh @@ -2,11 +2,11 @@ set -u -e -o pipefail - -# These ones can be `npm link`ed for fast development -LINKABLE_PKGS=( - $(pwd)/dist/packages-dist/{common,forms,core,compiler,compiler-cli,platform-{browser,server},platform-browser-dynamic,router,http,animations} -) +# npm 5 symlinks from local file installations rather than copying files, but +# webpack will not follow the symlinks. +# We prefer to emulate how a user will install angular, so we `npm pack` the +# packages, then install them from the resulting .tgz files later. +ANGULAR_PKGS=$(npm pack dist/packages-dist/{common,forms,core,compiler,compiler-cli,platform-{browser,server},platform-browser-dynamic,router,http,animations} | awk "{ printf \"$PWD/\"; print }") TYPESCRIPT_2_4=typescript@2.4.x PKGS=( @@ -34,8 +34,7 @@ cp -v package.json $TMP cd $TMP set -ex -o pipefail npm install ${PKGS[*]} $TYPESCRIPT_2_4 - # TODO(alexeagle): allow this to be npm link instead - npm install ${LINKABLE_PKGS[*]} + npm install ${ANGULAR_PKGS[*]} ./node_modules/.bin/tsc --version # Compile the compiler-cli third_party simulation.