From c48dd76f5cbd3be2a0da4ebfaabd8d293aee2938 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 26 Jan 2017 19:49:44 -0800 Subject: [PATCH] build: move typings_test to new integration test fixture (#14149) PR Close #14149 --- build.sh | 3 +++ .../typings_test_ts20}/include-all.ts | 0 integration/typings_test_ts20/package.json | 27 +++++++++++++++++++ .../typings_test_ts20}/tsconfig.json | 3 ++- scripts/ci-lite/test_e2e.sh | 3 +-- tools/typings-test/test.sh | 23 ---------------- 6 files changed, 33 insertions(+), 26 deletions(-) rename {tools/typings-test => integration/typings_test_ts20}/include-all.ts (100%) create mode 100644 integration/typings_test_ts20/package.json rename {tools/typings-test => integration/typings_test_ts20}/tsconfig.json (91%) delete mode 100755 tools/typings-test/test.sh diff --git a/build.sh b/build.sh index d457c94d21..39cb661d5d 100755 --- a/build.sh +++ b/build.sh @@ -151,6 +151,9 @@ do if [[ -e ${SRCDIR}/tsconfig-testing.json ]]; then echo "====== COMPILING TESTING: ${TSC} -p ${SRCDIR}/tsconfig-testing.json" $TSC -p ${SRCDIR}/tsconfig-testing.json + if [[ -n "${EXPERIMENTAL_ES2015_DISTRO}" ]]; then + $TSC -p ${SRCDIR}/tsconfig-testing.json --target es2015 --outDir ${ES2015_DESTDIR} + fi fi if [[ -e ${SRCDIR}/tsconfig-2015.json ]]; then diff --git a/tools/typings-test/include-all.ts b/integration/typings_test_ts20/include-all.ts similarity index 100% rename from tools/typings-test/include-all.ts rename to integration/typings_test_ts20/include-all.ts diff --git a/integration/typings_test_ts20/package.json b/integration/typings_test_ts20/package.json new file mode 100644 index 0000000000..fa9116f512 --- /dev/null +++ b/integration/typings_test_ts20/package.json @@ -0,0 +1,27 @@ +{ + "name": "angular-integration", + "description": "Assert that users with TypeScript 2.0 can type-check an Angular application", + "version": "0.0.0", + "license": "MIT", + "dependencies": { + "@angular/common": "file:../../dist/packages-dist-es2015/common", + "@angular/compiler": "file:../../dist/packages-dist-es2015/compiler", + "@angular/compiler-cli": "file:../../dist/packages-dist-es2015/compiler-cli", + "@angular/core": "file:../../dist/packages-dist-es2015/core", + "@angular/http": "file:../../dist/packages-dist-es2015/http", + "@angular/platform-browser": "file:../../dist/packages-dist-es2015/platform-browser", + "@angular/platform-browser-dynamic": "file:../../dist/packages-dist-es2015/platform-browser-dynamic", + "@angular/platform-server": "file:../../dist/packages-dist-es2015/platform-server", + "@angular/router": "file:../../dist/packages-dist-es2015/router", + "@angular/tsc-wrapped": "file:../../dist/tools/@angular/tsc-wrapped", + "@angular/upgrade": "file:../../dist/packages-dist-es2015/upgrade", + "@types/jasmine": "^2.5.41", + "rxjs": "file:../../node_modules/rxjs", + "source-map-explorer": "^1.3.3", + "typescript": "~2.0", + "zone.js": "^0.7.6" + }, + "scripts": { + "test": "tsc" + } +} diff --git a/tools/typings-test/tsconfig.json b/integration/typings_test_ts20/tsconfig.json similarity index 91% rename from tools/typings-test/tsconfig.json rename to integration/typings_test_ts20/tsconfig.json index cd2a4b0756..171acb2444 100644 --- a/tools/typings-test/tsconfig.json +++ b/integration/typings_test_ts20/tsconfig.json @@ -7,7 +7,8 @@ "outDir": "../../dist/typing-test/", "rootDir": ".", "target": "es5", - "lib": ["es5", "dom", "es2015.collection", "es2015.iterable", "es2015.promise"] + "lib": ["es5", "dom", "es2015.collection", "es2015.iterable", "es2015.promise"], + "types": [] }, "files": [ "include-all.ts", diff --git a/scripts/ci-lite/test_e2e.sh b/scripts/ci-lite/test_e2e.sh index fe89d25a21..ce67ee16ce 100755 --- a/scripts/ci-lite/test_e2e.sh +++ b/scripts/ci-lite/test_e2e.sh @@ -23,9 +23,8 @@ echo 'travis_fold:end:test.buildPackages' ./integration/build_rxjs_es6.sh ./integration/run_tests.sh -#TODO(alexeagle): move offline_compiler_test and typings-test to integration/ +#TODO(alexeagle): move offline_compiler_test to integration/ ./scripts/ci-lite/offline_compiler_test.sh -./tools/typings-test/test.sh $(npm bin)/gulp public-api:enforce diff --git a/tools/typings-test/test.sh b/tools/typings-test/test.sh deleted file mode 100755 index aa5b3cd952..0000000000 --- a/tools/typings-test/test.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -set -ex -o pipefail - -# These ones can be `npm link`ed for fast development -# Note that compiler-cli does not support TS 1.8 because tsc-wrapped uses 1.9 features -LINKABLE_PKGS=( - $(pwd)/dist/packages-dist/{common,core,compiler,http,router,upgrade,platform-{browser,browser-dynamic,server}} -) - -TMPDIR=${TMPDIR:-/tmp/angular-build/} -readonly TMP=$TMPDIR/typings-test.$(date +%s) -mkdir -p $TMP -cp -R -v tools/typings-test/* $TMP - -# run in subshell to avoid polluting cwd -( - cd $TMP - # create package.json so that npm install doesn't pollute any parent node_modules's directory - npm init --yes - npm install ${LINKABLE_PKGS[*]} @types/jasmine rxjs@5.0 zone.js@0.7 typescript@2.0.2 - $(npm bin)/tsc --version - $(npm bin)/tsc -p tsconfig.json -)