From f5a4de742839ea3a8e74bc565d0b3ef7e3e1d437 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 8 Jan 2020 12:48:25 +0000 Subject: [PATCH] test(docs-infra): compile only app for examples with no e2e (#33717) With TS 3.7, these examples were running into the error below (e.g. on https://circleci.com/gh/angular/angular/574906#tests/containers/0): ``` ============== AIO example output for: /home/circleci/ng/aio/content/examples/observables/ running: yarn tsc --project ./ $ /home/circleci/ng/aio/content/examples/observables/node_modules/.bin/tsc --project ./ ../../../tools/examples/shared/node_modules/protractor/built/index.d.ts(5,10): error TS2440: Import declaration conflicts with local declaration of 'PluginConfig'. ../../../tools/examples/shared/node_modules/protractor/built/index.d.ts(5,24): error TS2440: Import declaration conflicts with local declaration of 'ProtractorPlugin'. error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. completed: yarn tsc --project ./ ``` This happened because of https://github.com/angular/protractor/issues/5348. It's unclear why this typings problem does not affect `ng e2e` runs, and only affects `tsc` runs. For now it seems sensible to alter the tests to compile only the app and not the e2e, since the intent of https://github.com/angular/angular/commit/2cc954d5a54b2d9a0bee3679f6d4f9473389f32e was never to verify the correctness of the e2e in the first place. We still need a release of protractor that supports TS 3.7 though, but at least it doesn't seem to block our update proper. PR Close #33717 --- aio/content/examples/observables-in-angular/example-config.json | 2 +- aio/content/examples/observables/example-config.json | 2 +- .../examples/practical-observable-usage/example-config.json | 2 +- aio/content/examples/rx-library/example-config.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aio/content/examples/observables-in-angular/example-config.json b/aio/content/examples/observables-in-angular/example-config.json index 548e66ce80..f2b127257b 100644 --- a/aio/content/examples/observables-in-angular/example-config.json +++ b/aio/content/examples/observables-in-angular/example-config.json @@ -2,7 +2,7 @@ "e2e": [ { "cmd": "yarn", - "args": [ "tsc", "--project", "./" ] + "args": [ "tsc", "--project", "./tsconfig.app.json" ] } ] } diff --git a/aio/content/examples/observables/example-config.json b/aio/content/examples/observables/example-config.json index 548e66ce80..f2b127257b 100644 --- a/aio/content/examples/observables/example-config.json +++ b/aio/content/examples/observables/example-config.json @@ -2,7 +2,7 @@ "e2e": [ { "cmd": "yarn", - "args": [ "tsc", "--project", "./" ] + "args": [ "tsc", "--project", "./tsconfig.app.json" ] } ] } diff --git a/aio/content/examples/practical-observable-usage/example-config.json b/aio/content/examples/practical-observable-usage/example-config.json index 548e66ce80..f2b127257b 100644 --- a/aio/content/examples/practical-observable-usage/example-config.json +++ b/aio/content/examples/practical-observable-usage/example-config.json @@ -2,7 +2,7 @@ "e2e": [ { "cmd": "yarn", - "args": [ "tsc", "--project", "./" ] + "args": [ "tsc", "--project", "./tsconfig.app.json" ] } ] } diff --git a/aio/content/examples/rx-library/example-config.json b/aio/content/examples/rx-library/example-config.json index 548e66ce80..f2b127257b 100644 --- a/aio/content/examples/rx-library/example-config.json +++ b/aio/content/examples/rx-library/example-config.json @@ -2,7 +2,7 @@ "e2e": [ { "cmd": "yarn", - "args": [ "tsc", "--project", "./" ] + "args": [ "tsc", "--project", "./tsconfig.app.json" ] } ] }