From c569b693529da5820443da13cb1de3575e45bb8d Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 21 Sep 2021 16:43:55 +0200 Subject: [PATCH] build: switch view engine language-service tests to v12.x packages (#43431) The view engine language-service tests currently rely on the `npm_package` output that is built locally. They rely on the package output mostly for compiling test scenarios (with dependencies on e.g. forms), and for the testing the metadata extraction (testing proper suggestions for VE). The reliance on these packages becomes problematic with the new Angular Package Format v13 where no metadata files are shipped. To continue being able to test View Engine language-service compatibility, we will use the v12.x framework packages for some of the test scenarios. PR Close #43431 --- packages/compiler-cli/test/test_support.ts | 1 + packages/language-service/test/BUILD.bazel | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/compiler-cli/test/test_support.ts b/packages/compiler-cli/test/test_support.ts index 1bc7fe7d0d6..c3b73b5a228 100644 --- a/packages/compiler-cli/test/test_support.ts +++ b/packages/compiler-cli/test/test_support.ts @@ -147,6 +147,7 @@ export function setupBazelTo(tmpDirPath: string) { linkNpmArtifact('@angular/core-12', '@angular/core'); linkNpmArtifact('@angular/common-12', '@angular/common'); linkNpmArtifact('@angular/router-12', '@angular/router'); + linkNpmArtifact('@angular/forms-12', '@angular/forms'); linkNpmArtifact('@angular/platform-browser-12', '@angular/platform-browser'); // Link typescript diff --git a/packages/language-service/test/BUILD.bazel b/packages/language-service/test/BUILD.bazel index 36bd6f7771f..6986af063d4 100644 --- a/packages/language-service/test/BUILD.bazel +++ b/packages/language-service/test/BUILD.bazel @@ -72,9 +72,9 @@ filegroup( jasmine_node_test( name = "test", data = [ - "//packages/common:npm_package", - "//packages/core:npm_package", - "//packages/forms:npm_package", + "@npm//@angular/common-12", + "@npm//@angular/core-12", + "@npm//@angular/forms-12", ], tags = [ # the language service is not yet compatible with Ivy @@ -88,9 +88,9 @@ jasmine_node_test( jasmine_node_test( name = "infra_test", data = [ - "//packages/common:npm_package", - "//packages/core:npm_package", - "//packages/forms:npm_package", + "@npm//@angular/common-12", + "@npm//@angular/core-12", + "@npm//@angular/forms-12", ], tags = [ # the language service is not yet compatible with Ivy @@ -121,9 +121,9 @@ ts_library( jasmine_node_test( name = "diagnostics", data = [ - "//packages/common:npm_package", - "//packages/core:npm_package", - "//packages/forms:npm_package", + "@npm//@angular/common-12", + "@npm//@angular/core-12", + "@npm//@angular/forms-12", ], tags = [ # Disabled as these tests pertain to diagnostics in the old ngc compiler. The Ivy ngtsc