test: ensure correct TS version before running postinstall (#29885)

The bazel-schematics test could suffer from a version skew where new CLI projects were not yet using a new TS version, but Angular packages already were.

This caused the the `ngc` call in the added `postinstall` to run and fail: https://circleci.com/gh/angular/angular/283109

PR Close #29885
This commit is contained in:
Filipe Silva 2019-04-13 15:29:48 +01:00 committed by Alex Rickabaugh
parent e2e637d70a
commit ea70d41ac2
1 changed files with 1 additions and 4 deletions

View File

@ -26,11 +26,8 @@ function testBazel() {
# Create project # Create project
ng new demo --collection=@angular/bazel --routing --skip-git --skip-install --style=scss ng new demo --collection=@angular/bazel --routing --skip-git --skip-install --style=scss
cd demo cd demo
# Do an initial install to ensure packages like node-sass are built.
yarn
# Force more recent TS version until new Angular CLI projects also use it. # Force more recent TS version until new Angular CLI projects also use it.
# --ignore-scripts is necessary because there is a postinstall script that uses ngc. yarn add typescript@3.4.2 --dev
yarn add typescript@3.4.2 --dev --ignore-scripts
installLocalPackages installLocalPackages
yarn webdriver-manager update --gecko=false --standalone=false ${CI_CHROMEDRIVER_VERSION_ARG:---versions.chrome 2.45} yarn webdriver-manager update --gecko=false --standalone=false ${CI_CHROMEDRIVER_VERSION_ARG:---versions.chrome 2.45}
ng generate component widget --style=css ng generate component widget --style=css