refactor(vscode-extension): Remove pre-19 integration project

This updates the pre-v19 integration test to use the regular integration
project but pass a specific version and update file contents as
necessary to excersise the code path that uses the default standalone
value. This allows us to remove the old project from the workspace,
allowing the language service to use more recent versions when working
with the adev project, for example.
This commit is contained in:
Andrew Scott 2025-12-17 10:02:30 -08:00 committed by Kirill Cherkashin
parent 1532be9d00
commit 2ff718869f
15 changed files with 44 additions and 259 deletions

View file

@ -96,7 +96,6 @@ npm.npm_translate_lock(
"//packages/service-worker:package.json",
"//packages/upgrade:package.json",
"//tools/bazel/rules_angular_store:package.json",
"//vscode-ng-language-service/integration/pre_standalone_project:package.json",
"//vscode-ng-language-service/integration/project:package.json",
],
npmrc = "//:.npmrc",

View file

@ -1386,39 +1386,27 @@ importers:
specifier: ^0.4.0
version: 0.4.0
vscode-ng-language-service/integration/pre_standalone_project:
dependencies:
'@angular/common':
specifier: 18.2.10
version: 18.2.10(@angular/core@18.2.10(zone.js@0.15.0))
'@angular/core':
specifier: 18.2.10
version: 18.2.10(zone.js@0.15.0)
zone.js:
specifier: 0.15.0
version: 0.15.0
vscode-ng-language-service/integration/project:
dependencies:
'@angular/common':
specifier: 21.1.0-next.4
version: 21.1.0-next.4(@angular/core@21.1.0-next.4(@angular/compiler@21.1.0-next.4)(rxjs@7.8.2))(rxjs@7.8.2)
specifier: workspace:*
version: link:../../../packages/common
'@angular/compiler':
specifier: 21.1.0-next.4
version: 21.1.0-next.4
specifier: workspace:*
version: link:../../../packages/compiler
'@angular/compiler-cli':
specifier: 21.1.0-next.4
version: 21.1.0-next.4(@angular/compiler@21.1.0-next.4)(typescript@5.9.3)
specifier: workspace:*
version: link:../../../packages/compiler-cli
'@angular/core':
specifier: 21.1.0-next.4
version: 21.1.0-next.4(@angular/compiler@21.1.0-next.4)(rxjs@7.8.2)
specifier: workspace:*
version: link:../../../packages/core
rxjs:
specifier: 7.8.2
version: 7.8.2
devDependencies:
ng-packagr:
specifier: 21.1.0-next.0
version: 21.1.0-next.0(@angular/compiler-cli@21.1.0-next.4(@angular/compiler@21.1.0-next.4)(typescript@5.9.3))(tailwindcss@3.4.19(tsx@4.21.0)(yaml@2.8.2))(tslib@2.8.1)(typescript@5.9.3)
version: 21.1.0-next.0(@angular/compiler-cli@packages+compiler-cli)(tailwindcss@3.4.19(tsx@4.21.0)(yaml@2.8.2))(tslib@2.8.1)(typescript@5.9.3)
typescript:
specifier: 5.9.3
version: 5.9.3
@ -1748,40 +1736,6 @@ packages:
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'}
hasBin: true
'@angular/common@18.2.10':
resolution: {integrity: sha512-YzTCmuqLiOuT+Yv07vuKymDWiebOVZ8BuXakJiz4EM7FMoOw5gICHJ04jepZSjDNWpA16e7kJSdt5ucnmvCFDQ==}
engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0}
peerDependencies:
'@angular/core': 18.2.10
'@angular/common@21.1.0-next.4':
resolution: {integrity: sha512-HNM0eaZ86pXQZnmI6MlVj0FvvI3wF5mBkGyMN8Ktuswf9DUq04xBkliLiMwkb5UFmeSibxE3mUaMymw92Nn4fA==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
peerDependencies:
'@angular/core': 21.1.0-next.4
rxjs: ^6.5.3 || ^7.4.0
'@angular/compiler-cli@21.1.0-next.4':
resolution: {integrity: sha512-iW+8gnGSUqCv4WdN3LMv9ikh9vHfKnbfaG01Hvzxs+q4tL3xVRDezeL+EnpaIdmKsCOIfsYrWwAXNfMd48S4Lw==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
hasBin: true
peerDependencies:
'@angular/compiler': 21.1.0-next.4
typescript: '>=5.9 <6.0'
peerDependenciesMeta:
typescript:
optional: true
'@angular/compiler@21.1.0-next.4':
resolution: {integrity: sha512-uY4Yg3OJ/DL6AlqMjO8VXgKiFHJK3QspFJzslkJKys2d8I7a7YIoWxYRJ9ZUfWW++8Swig17pL9NOrRLXx+iQg==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
'@angular/core@18.2.10':
resolution: {integrity: sha512-EfxVz0pLaxnOppOYkdhnaUkk8HZT+uxaAGpJD3ppAa7YAWTE9xIGoNJmtS33cZNNOnvriMkdv7yn6pDtV4ct+Q==}
engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0}
peerDependencies:
zone.js: ~0.14.10
'@angular/core@21.1.0-next.0':
resolution: {integrity: sha512-dhAp5/QFwbtZC5ie8BGbLMkXeRu81WDdWPuNNBxq5qGRGixNsLQSO0fXDT5X1JK31mGbS+HEjxkv/BrLI7YH7w==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
@ -1791,16 +1745,6 @@ packages:
'@angular/compiler':
optional: true
'@angular/core@21.1.0-next.4':
resolution: {integrity: sha512-aJAGd+8o/8vle68hAJGah/DMQVD4/vFf/lDhnqe69sFLY7HLeq5UdBjIu00nZ1DUVeL0n/QOA97bLRICINhVrg==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
peerDependencies:
'@angular/compiler': 21.1.0-next.4
rxjs: ^6.5.3 || ^7.4.0
peerDependenciesMeta:
'@angular/compiler':
optional: true
'@angular/domino@https://codeload.github.com/angular/domino/tar.gz/93e720f143d0296dd2726ffbcf4fc12283363a7b':
resolution: {tarball: https://codeload.github.com/angular/domino/tar.gz/93e720f143d0296dd2726ffbcf4fc12283363a7b}
version: 2.1.6
@ -13805,9 +13749,6 @@ packages:
zod@4.2.1:
resolution: {integrity: sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==}
zone.js@0.15.0:
resolution: {integrity: sha512-9oxn0IIjbCZkJ67L+LkhYWRyAy7axphb3VgE2MBDlOqnmHMPWGYMxJxBYFueFq/JGY2GMwS0rU+UCLunEmy5UA==}
zone.js@0.15.1:
resolution: {integrity: sha512-XE96n56IQpJM7NAoXswY3XRLcWFW83xe0BiAOeMD7K5k5xecOeul3Qcpx6GqEeeHNkW5DWL5zOyTbEfB4eti8w==}
@ -14429,44 +14370,6 @@ snapshots:
- hono
- supports-color
'@angular/common@18.2.10(@angular/core@18.2.10(zone.js@0.15.0))':
dependencies:
'@angular/core': 18.2.10(zone.js@0.15.0)
rxjs: 7.8.2
tslib: 2.8.1
'@angular/common@21.1.0-next.4(@angular/core@21.1.0-next.4(@angular/compiler@21.1.0-next.4)(rxjs@7.8.2))(rxjs@7.8.2)':
dependencies:
'@angular/core': 21.1.0-next.4(@angular/compiler@21.1.0-next.4)(rxjs@7.8.2)
rxjs: 7.8.2
tslib: 2.8.1
'@angular/compiler-cli@21.1.0-next.4(@angular/compiler@21.1.0-next.4)(typescript@5.9.3)':
dependencies:
'@angular/compiler': 21.1.0-next.4
'@babel/core': 7.28.5
'@jridgewell/sourcemap-codec': 1.5.5
chokidar: 5.0.0
convert-source-map: 1.9.0
reflect-metadata: 0.2.2
semver: 7.7.3
tslib: 2.8.1
yargs: 18.0.0
optionalDependencies:
typescript: 5.9.3
transitivePeerDependencies:
- supports-color
'@angular/compiler@21.1.0-next.4':
dependencies:
tslib: 2.8.1
'@angular/core@18.2.10(zone.js@0.15.0)':
dependencies:
rxjs: 7.8.2
tslib: 2.8.1
zone.js: 0.15.0
'@angular/core@21.1.0-next.0(@angular/compiler@packages+compiler)':
dependencies:
rxjs: 7.8.2
@ -14475,14 +14378,6 @@ snapshots:
optionalDependencies:
'@angular/compiler': link:packages/compiler
'@angular/core@21.1.0-next.4(@angular/compiler@21.1.0-next.4)(rxjs@7.8.2)':
dependencies:
rxjs: 7.8.2
tslib: 2.8.1
zone.js: 0.16.0
optionalDependencies:
'@angular/compiler': 21.1.0-next.4
'@angular/domino@https://codeload.github.com/angular/domino/tar.gz/93e720f143d0296dd2726ffbcf4fc12283363a7b': {}
'@angular/material@21.1.0-next.3(@angular/cdk@21.1.0-next.3(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-browser@packages+platform-browser)(rxjs@7.8.2))(@angular/common@packages+common)(@angular/core@packages+core)(@angular/forms@packages+forms)(@angular/platform-browser@packages+platform-browser)(rxjs@7.8.2)':
@ -25068,36 +24963,6 @@ snapshots:
netmask@2.0.2: {}
ng-packagr@21.1.0-next.0(@angular/compiler-cli@21.1.0-next.4(@angular/compiler@21.1.0-next.4)(typescript@5.9.3))(tailwindcss@3.4.19(tsx@4.21.0)(yaml@2.8.2))(tslib@2.8.1)(typescript@5.9.3):
dependencies:
'@ampproject/remapping': 2.3.0
'@angular/compiler-cli': 21.1.0-next.4(@angular/compiler@21.1.0-next.4)(typescript@5.9.3)
'@rollup/plugin-json': 6.1.0(rollup@4.53.2)
'@rollup/wasm-node': 4.53.3
ajv: 8.17.1
ansi-colors: 4.1.3
browserslist: 4.28.0
chokidar: 4.0.3
commander: 14.0.2
dependency-graph: 1.0.0
esbuild: 0.27.0
find-cache-directory: 6.0.0
injection-js: 2.6.1
jsonc-parser: 3.3.1
less: 4.4.2
ora: 9.0.0
piscina: 5.1.4
postcss: 8.5.6
rollup-plugin-dts: 6.2.3(rollup@4.53.2)(typescript@5.9.3)
rxjs: 7.8.2
sass: 1.94.2
tinyglobby: 0.2.15
tslib: 2.8.1
typescript: 5.9.3
optionalDependencies:
rollup: 4.53.2
tailwindcss: 3.4.19(tsx@4.21.0)(yaml@2.8.2)
ng-packagr@21.1.0-next.0(@angular/compiler-cli@packages+compiler-cli)(tailwindcss@3.4.19(tsx@4.20.6)(yaml@2.8.2))(tslib@2.8.1)(typescript@5.9.3):
dependencies:
'@ampproject/remapping': 2.3.0
@ -25158,7 +25023,6 @@ snapshots:
optionalDependencies:
rollup: 4.53.2
tailwindcss: 3.4.19(tsx@4.21.0)(yaml@2.8.2)
optional: true
ngx-flamegraph@0.1.1(@angular/common@packages+common)(@angular/core@packages+core):
dependencies:
@ -29147,8 +29011,6 @@ snapshots:
zod@4.2.1: {}
zone.js@0.15.0: {}
zone.js@0.15.1: {}
zone.js@0.16.0: {}

View file

@ -29,7 +29,6 @@ packages:
- tools/bazel/rules_angular_store/
- vscode-ng-language-service
- vscode-ng-language-service/server
- vscode-ng-language-service/integration/pre_standalone_project
- vscode-ng-language-service/integration/project
allowedDeprecatedVersions:

View file

@ -1,12 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>angular/dev-infra//renovate-presets/default.json5"
],
"baseBranchPatterns": [
"main",
"21.0.x"
],
"extends": ["github>angular/dev-infra//renovate-presets/default.json5"],
"baseBranchPatterns": ["main", "21.0.x"],
"ignoreDeps": [
"@types/selenium-webdriver",
"angular-1.5",
@ -27,19 +22,11 @@
],
"packageRules": [
{
"matchFileNames": [
"modules/ssr-benchmarks/package.json",
"vscode-ng-language-service/integration/pre_standalone_project/package.json"
],
"matchFileNames": ["modules/ssr-benchmarks/package.json"],
"enabled": false
},
{
"matchManagers": [
"bazel",
"bazel-module",
"bazelisk",
"npm"
],
"matchManagers": ["bazel", "bazel-module", "bazelisk", "npm"],
"postUpgradeTasks": {
"commands": [
"git restore .npmrc",
@ -60,12 +47,8 @@
},
{
"enabled": false,
"matchDepNames": [
"tailwindcss"
],
"matchUpdateTypes": [
"major"
]
"matchDepNames": ["tailwindcss"],
"matchUpdateTypes": ["major"]
}
]
}
}

View file

@ -7,9 +7,6 @@ ts_project(
"test_constants.ts",
],
data = [
"//vscode-ng-language-service/integration/pre_standalone_project",
"//vscode-ng-language-service/integration/pre_standalone_project:node_modules/@angular/common",
"//vscode-ng-language-service/integration/pre_standalone_project:node_modules/@angular/core",
"//vscode-ng-language-service/integration/project",
"//vscode-ng-language-service/integration/project:node_modules/@angular/common",
"//vscode-ng-language-service/integration/project:node_modules/@angular/core",

View file

@ -23,6 +23,7 @@ import {
} from '../../common/requests';
import {
APP_COMPONENT,
APP_COMPONENT_MODULE,
APP_COMPONENT_MODULE_URI,
APP_COMPONENT_URI,
BAR_COMPONENT,
@ -32,7 +33,6 @@ import {
FOO_TEMPLATE,
FOO_TEMPLATE_URI,
makeTempDir,
PRE_STANDALONE_PROJECT_PATH,
PROJECT_PATH,
TSCONFIG,
} from '../test_constants';
@ -614,9 +614,30 @@ export class AppComponent {
it('should handle apps where standalone is not enabled by default (pre v19)', async () => {
await initServer({angularCoreVersion: '18.0.0'});
const moduleFile = join(PRE_STANDALONE_PROJECT_PATH, 'app/app.module.ts');
const moduleFile = join(PROJECT_PATH, 'app/app.module.ts');
openTextDocument(client, moduleFile);
// Update component to not specify standalone explicitly. This should be interpreted as
// false in pre-v19 projects. The component is already declared in AppModule, and there should
// be no diagnostics.
openTextDocument(
client,
APP_COMPONENT,
`
import {Component, EventEmitter, Input, Output} from '@angular/core';
@Component({
selector: 'my-app',
template: '<h1>Hello {{name}}</h1>',
// standalone: false, // standalone is implicitly false
})
export class AppComponent {
name = 'Angular';
@Input() appInput = '';
@Output() appOutput = new EventEmitter<string>();
}
`,
);
openTextDocument(client, APP_COMPONENT_MODULE);
const diagnostics = await getDiagnosticsForFile(client, moduleFile);
expect(diagnostics.length).toBe(0);
});

View file

@ -1,12 +0,0 @@
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@npm//:defs.bzl", "npm_link_all_packages")
npm_link_all_packages(name = "node_modules")
copy_to_bin(
name = "pre_standalone_project",
srcs = glob(["**"]),
visibility = [
"//vscode-ng-language-service/integration:__pkg__",
],
)

View file

@ -1,11 +0,0 @@
import {Component, EventEmitter, Input, Output} from '@angular/core';
@Component({
selector: 'my-app',
template: `<h1>Hello {{ name }}</h1>`,
})
export class AppComponent {
name = 'Angular';
@Input() appInput = '';
@Output() appOutput = new EventEmitter<string>();
}

View file

@ -1,12 +0,0 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {AppComponent} from './app.component';
import {FooComponent} from './foo.component';
@NgModule({
imports: [CommonModule],
declarations: [AppComponent, FooComponent],
bootstrap: [AppComponent],
})
export class AppModule {}

View file

@ -1,4 +0,0 @@
{{title | uppercase}}
<span class="subtitle">
subtitle
</span>

View file

@ -1,8 +0,0 @@
import {Component} from '@angular/core';
@Component({
templateUrl: 'foo.component.html',
})
export class FooComponent {
title = 'Foo Component';
}

View file

@ -1,9 +0,0 @@
{
"name": "angular-ls-integration-test-project",
"private": true,
"dependencies": {
"@angular/common": "18.2.10",
"@angular/core": "18.2.10",
"zone.js": "0.15.0"
}
}

View file

@ -1,15 +0,0 @@
{
"compilerOptions": {
"moduleResolution": "node",
"experimentalDecorators": true,
"target": "es2015",
"strict": true,
"typeRoots": [
"node_modules/@types"
]
},
"angularCompilerOptions": {
"strictTemplates": true,
"strictInjectionParameters": true
}
}

View file

@ -2,10 +2,10 @@
"name": "angular-ls-integration-test-project",
"private": true,
"dependencies": {
"@angular/common": "21.1.0-next.4",
"@angular/compiler": "21.1.0-next.4",
"@angular/compiler-cli": "21.1.0-next.4",
"@angular/core": "21.1.0-next.4",
"@angular/common": "workspace:*",
"@angular/compiler": "workspace:*",
"@angular/compiler-cli": "workspace:*",
"@angular/core": "workspace:*",
"rxjs": "7.8.2"
},
"devDependencies": {

View file

@ -11,11 +11,6 @@ export function makeTempDir(): string {
export const PACKAGE_ROOT = resolve(__dirname, '..');
export const SERVER_PATH = join(PACKAGE_ROOT, 'server', 'index.js');
export const PROJECT_PATH = join(PACKAGE_ROOT, 'integration', 'project');
export const PRE_STANDALONE_PROJECT_PATH = join(
PACKAGE_ROOT,
'integration',
'pre_standalone_project',
);
export const APP_COMPONENT = join(PROJECT_PATH, 'app', 'app.component.ts');
export const APP_COMPONENT_URI = pathToFileURL(APP_COMPONENT).href;