From 6b7453c9a27485d378f710a6e28126f2c436ce36 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 19 Sep 2017 09:30:23 -0700 Subject: [PATCH 1/2] build: automatically version tsc-wrapped just like other packages This removes manual steps from the release list. I had to modify a few integration tests not to install compiler-cli dirrectly because it depends on tsc-wrapped which yarn was eager to fetch from npm rather than from the local build. --- build.sh | 4 ++++ integration/hello_world__closure/package.json | 4 ++-- integration/language_service_plugin/package.json | 1 - integration/run_tests.sh | 9 +++++++++ integration/typings_test_ts21/package.json | 1 - integration/typings_test_ts22/package.json | 1 - integration/typings_test_ts23/package.json | 1 - packages/platform-server/integrationtest/package.json | 1 + tools/@angular/tsc-wrapped/package.json | 2 +- 9 files changed, 17 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index 6e9827092c95d..d1270b9dccb51 100755 --- a/build.sh +++ b/build.sh @@ -347,6 +347,10 @@ if [[ ${BUILD_TOOLS} == true ]]; then $(npm bin)/tsc -p ${TSCONFIG} cp ./tools/@angular/tsc-wrapped/package.json ./dist/tools/@angular/tsc-wrapped + + echo "====== VERSION: Updating version references" + echo "====== EXECUTE: perl -p -i -e \"s/0\.0\.0\-PLACEHOLDER/${VERSION}/g\" $""(grep -ril 0\.0\.0\-PLACEHOLDER ./dist/tools/@angular/tsc-wrapped/package.json)" + perl -p -i -e "s/0\.0\.0\-PLACEHOLDER/${VERSION}/g" $(grep -ril 0\.0\.0\-PLACEHOLDER ./dist/tools/@angular/tsc-wrapped/package.json) < /dev/null 2> /dev/null travisFoldEnd "build tools" fi diff --git a/integration/hello_world__closure/package.json b/integration/hello_world__closure/package.json index 950b6857b2c1d..0d23cd92fcc70 100644 --- a/integration/hello_world__closure/package.json +++ b/integration/hello_world__closure/package.json @@ -6,12 +6,12 @@ "@angular/animations": "file:../../dist/packages-dist/animations", "@angular/common": "file:../../dist/packages-dist/common", "@angular/compiler": "file:../../dist/packages-dist/compiler", - "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/core": "file:../../dist/packages-dist/core", "@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", "@angular/platform-server": "file:../../dist/packages-dist/platform-server", "@angular/tsc-wrapped": "file:../../dist/tools/@angular/tsc-wrapped", "google-closure-compiler": "20170409.0.0", + "reflect-metadata": "^0.1.2", "rxjs": "5.3.1", "typescript": "2.1.6", "zone.js": "0.8.6" @@ -29,4 +29,4 @@ "preprotractor": "tsc -p e2e", "protractor": "protractor e2e/protractor.config.js" } -} \ No newline at end of file +} diff --git a/integration/language_service_plugin/package.json b/integration/language_service_plugin/package.json index 065fce7883385..9ae9a27e9fc98 100644 --- a/integration/language_service_plugin/package.json +++ b/integration/language_service_plugin/package.json @@ -7,7 +7,6 @@ "@angular/animations": "file:../../dist/packages-dist/animations", "@angular/common": "file:../../dist/packages-dist/common", "@angular/compiler": "file:../../dist/packages-dist/compiler", - "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/core": "file:../../dist/packages-dist/core", "@angular/language-service": "file:../../dist/packages-dist/language-service", "@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", diff --git a/integration/run_tests.sh b/integration/run_tests.sh index 53a64ad566672..9de146f2a4a4d 100755 --- a/integration/run_tests.sh +++ b/integration/run_tests.sh @@ -24,6 +24,15 @@ for testDir in $(ls | grep -v node_modules) ; do # Workaround for https://github.com/yarnpkg/yarn/issues/2256 rm -f yarn.lock yarn install --cache-folder ../$cache + + # this is a workaround for resolving tsc-wrapped as the local version not available on npm + # tsc-wrapped is installed as a transitive dependency of compiler-cli + if [[ $testDir == "hello_world__closure" || $$testDir == "language_service_plugin" ]]; then + # compiler-cli needs to be installed while offline so that it doesn't try to look up tsc-wrapped version on npm + # it should instead use the version that is already installed in the project via package.json + yarn add --offline ../../dist/packages-dist/compiler-cli --cache-folder ../$cache + fi + yarn test || exit 1 ) done diff --git a/integration/typings_test_ts21/package.json b/integration/typings_test_ts21/package.json index 98fabcb911942..98fed0fc3b336 100644 --- a/integration/typings_test_ts21/package.json +++ b/integration/typings_test_ts21/package.json @@ -7,7 +7,6 @@ "@angular/animations": "file:../../dist/packages-dist/animations", "@angular/common": "file:../../dist/packages-dist/common", "@angular/compiler": "file:../../dist/packages-dist/compiler", - "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/core": "file:../../dist/packages-dist/core", "@angular/forms": "file:../../dist/packages-dist/forms", "@angular/http": "file:../../dist/packages-dist/http", diff --git a/integration/typings_test_ts22/package.json b/integration/typings_test_ts22/package.json index 45092aa006e0e..9b1666afcb17c 100644 --- a/integration/typings_test_ts22/package.json +++ b/integration/typings_test_ts22/package.json @@ -7,7 +7,6 @@ "@angular/animations": "file:../../dist/packages-dist/animations", "@angular/common": "file:../../dist/packages-dist/common", "@angular/compiler": "file:../../dist/packages-dist/compiler", - "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/core": "file:../../dist/packages-dist/core", "@angular/forms": "file:../../dist/packages-dist/forms", "@angular/http": "file:../../dist/packages-dist/http", diff --git a/integration/typings_test_ts23/package.json b/integration/typings_test_ts23/package.json index 12739138bcd11..ca55d155235d4 100644 --- a/integration/typings_test_ts23/package.json +++ b/integration/typings_test_ts23/package.json @@ -7,7 +7,6 @@ "@angular/animations": "file:../../dist/packages-dist/animations", "@angular/common": "file:../../dist/packages-dist/common", "@angular/compiler": "file:../../dist/packages-dist/compiler", - "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/core": "file:../../dist/packages-dist/core", "@angular/forms": "file:../../dist/packages-dist/forms", "@angular/http": "file:../../dist/packages-dist/http", diff --git a/packages/platform-server/integrationtest/package.json b/packages/platform-server/integrationtest/package.json index 19c499fa9fcfd..c77282886281b 100644 --- a/packages/platform-server/integrationtest/package.json +++ b/packages/platform-server/integrationtest/package.json @@ -16,6 +16,7 @@ "@angular/http": "file:../../../dist/packages-dist/http", "@angular/platform-browser": "file:../../../dist/packages-dist/platform-browser", "@angular/platform-server": "file:../../../dist/packages-dist/platform-server", + "@angular/tsc-wrapped": "file:../../../dist/tools/@angular/tsc-wrapped", "express": "^4.14.1", "rxjs": "file:../../../node_modules/rxjs", "typescript": "2.1.6", diff --git a/tools/@angular/tsc-wrapped/package.json b/tools/@angular/tsc-wrapped/package.json index 787451882c66f..3e05685517c80 100644 --- a/tools/@angular/tsc-wrapped/package.json +++ b/tools/@angular/tsc-wrapped/package.json @@ -1,6 +1,6 @@ { "name": "@angular/tsc-wrapped", - "version": "4.4.2", + "version": "0.0.0-PLACEHOLDER", "description": "Wraps the tsc CLI, allowing extensions.", "homepage": "https://github.com/angular/angular/blob/master/tools/@angular/tsc-wrapped", "bugs": "https://github.com/angular/angular/issues", From ad2d6038d807bf82fc403bc20f9ed3ddfb323e3f Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 19 Sep 2017 13:00:25 -0700 Subject: [PATCH 2/2] ci: update yarn to 1.0.2 --- aio/package.json | 2 +- package.json | 2 +- scripts/ci/env.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aio/package.json b/aio/package.json index b591337987e6c..3d7cdd42e7230 100644 --- a/aio/package.json +++ b/aio/package.json @@ -45,7 +45,7 @@ }, "engines": { "node": ">=6.9.5 <7.0.0", - "yarn": ">=0.21.3 <1.0.0" + "yarn": ">=1.0.2 <2.0.0" }, "private": true, "dependencies": { diff --git a/package.json b/package.json index 22616e798f3f3..68ef70473102d 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "engines": { "node": ">=6.9.5 <7.0.0", "npm": ">=3.10.7 <4.0.0", - "yarn": ">=0.21.3 <1.0.0" + "yarn": ">=1.0.2 <2.0.0" }, "repository": { "type": "git", diff --git a/scripts/ci/env.sh b/scripts/ci/env.sh index 42b4c876f9026..18113673ba9a7 100755 --- a/scripts/ci/env.sh +++ b/scripts/ci/env.sh @@ -36,7 +36,7 @@ fi setEnvVar NODE_VERSION 6.9.5 setEnvVar NPM_VERSION 3.10.7 # do not upgrade to >3.10.8 unless https://github.com/npm/npm/issues/14042 is resolved -setEnvVar YARN_VERSION 0.24.6 +setEnvVar YARN_VERSION 1.0.2 setEnvVar SAUCE_CONNECT_VERSION 4.3.11 setEnvVar PROJECT_ROOT $(cd ${thisDir}/../..; pwd)