Files
Igor Minar 612950bdb2 test: pin down @types/* dependencies in typings test (#14569)
This is needed because the latest versions are no longer compatible with typescript 1.8 which results in build errors:
https://travis-ci.org/angular/angular/jobs/202752040#L3863
2017-02-17 14:35:56 -08:00

26 lines
854 B
Bash
Executable File

#!/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[*]}
npm install @types/es6-promise@0.0.32 @types/es6-collections@0.5.29 @types/jasmine@2.5.41 rxjs@5.0.0-beta.11
npm install typescript@1.8.10
$(npm bin)/tsc --version
$(npm bin)/tsc -p tsconfig.json
)