refactor(language-service): remove some old ivy/pre-apf things (#64157)

This removes the pre_apf test project, which is far out of support as well as some references to ivy

PR Close #64157
This commit is contained in:
Andrew Scott
2025-09-30 09:52:05 -07:00
committed by kirjs
parent 05d57e0a9b
commit 0b0bd8e12c
21 changed files with 11 additions and 126 deletions
-1
View File
@@ -74,5 +74,4 @@ vscode-ng-language-service/node_modules
vscode-ng-language-service/server/node_modules
vscode-ng-language-service/integration/pre_standalone_project/node_modules
vscode-ng-language-service/integration/workspace/node_modules
vscode-ng-language-service/integration/pre_apf_project/node_modules
vscode-ng-language-service/integration/project/node_modules
-1
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_apf_project:package.json",
"//vscode-ng-language-service/integration/pre_standalone_project:package.json",
"//vscode-ng-language-service/integration/project:package.json",
"//vscode-ng-language-service/integration/workspace:package.json",
+1 -20
View File
@@ -1366,26 +1366,7 @@ importers:
specifier: 3.1.0
version: 3.1.0
vscode-ng-language-service/integration/pre_apf_project:
dependencies:
'@angular/common':
specifier: 12.2.16
version: 12.2.16(@angular/core@12.2.16(rxjs@6.6.7)(zone.js@0.11.5))(rxjs@6.6.7)
'@angular/compiler':
specifier: 12.2.16
version: 12.2.16
'@angular/compiler-cli':
specifier: 12.2.16
version: 12.2.16(@angular/compiler@12.2.16)
'@angular/core':
specifier: 12.2.16
version: 12.2.16(rxjs@6.6.7)(zone.js@0.11.5)
rxjs:
specifier: 6.6.7
version: 6.6.7
zone.js:
specifier: 0.11.5
version: 0.11.5
vscode-ng-language-service/integration/pre_standalone_project:
dependencies:
-1
View File
@@ -30,7 +30,6 @@ packages:
- vscode-ng-language-service/server
- vscode-ng-language-service/integration/pre_standalone_project
- vscode-ng-language-service/integration/workspace
- vscode-ng-language-service/integration/pre_apf_project
- vscode-ng-language-service/integration/project
allowedDeprecatedVersions:
-1
View File
@@ -24,7 +24,6 @@
{
"matchFileNames": [
"modules/ssr-benchmarks/package.json",
"vscode-ng-language-service/integration/pre_apf_project/package.json",
"vscode-ng-language-service/integration/pre_standalone_project/package.json"
],
"enabled": false
@@ -2,7 +2,7 @@ import * as vscode from 'vscode';
import {activate, COMPLETION_COMMAND, FOO_TEMPLATE_URI} from './helper';
describe('Angular Ivy LS completions', () => {
describe('Angular LS completions', () => {
beforeAll(async () => {
await activate(FOO_TEMPLATE_URI);
});
@@ -7,7 +7,7 @@ import {activate} from './helper';
const DEFINITION_COMMAND = 'vscode.executeDefinitionProvider';
const APP_COMPONENT_URI = vscode.Uri.file(APP_COMPONENT);
describe('Angular Ivy LS', () => {
describe('Angular LS', () => {
beforeAll(async () => {
await activate(APP_COMPONENT_URI);
}, 25000 /* 25 seconds */);
@@ -4,7 +4,7 @@ import {activate, FOO_TEMPLATE_URI, HOVER_COMMAND} from './helper';
// This hover tests appear to be the only flaky ones in the suite. Disable until they can
// consistently pass.
xdescribe('Angular Ivy LS quick info', () => {
xdescribe('Angular LS quick info', () => {
beforeAll(async () => {
await activate(FOO_TEMPLATE_URI);
});
@@ -1,15 +1,11 @@
import {join} from 'path';
import {runTests} from 'vscode-test';
import {IS_BAZEL, PACKAGE_ROOT, PROJECT_PATH} from '../test_constants';
import {PACKAGE_ROOT, PROJECT_PATH} from '../test_constants';
async function main() {
const EXT_DEVELOPMENT_PATH = IS_BAZEL
? join(PACKAGE_ROOT, 'npm')
: join(PACKAGE_ROOT, 'dist', 'npm');
const EXT_TESTS_PATH = IS_BAZEL
? join(PACKAGE_ROOT, 'integration', 'e2e', 'jasmine')
: join(PACKAGE_ROOT, 'dist', 'integration', 'e2e', 'jasmine');
const EXT_DEVELOPMENT_PATH = join(PACKAGE_ROOT, 'npm');
const EXT_TESTS_PATH = join(PACKAGE_ROOT, 'integration', 'e2e', 'jasmine');
try {
await runTests({
@@ -45,7 +45,7 @@ import {
ServerOptions,
} from './test_utils';
describe('Angular Ivy language server', () => {
describe('Angular language server', () => {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; /* 10 seconds */
let client: MessageConnection;
@@ -60,7 +60,6 @@ describe('Angular Ivy language server', () => {
async function initServer(options: Partial<ServerOptions>) {
client = createConnection({
ivy: true,
...options,
});
// If debugging, set to
@@ -720,7 +719,6 @@ describe('auto-apply optional chaining', () => {
let client: MessageConnection;
beforeEach(async () => {
client = createConnection({
ivy: true,
includeAutomaticOptionalChainCompletions: true,
});
// If debugging, set to
@@ -781,7 +779,6 @@ describe('insert snippet text', () => {
let client: MessageConnection;
beforeEach(async () => {
client = createConnection({
ivy: true,
includeCompletionsWithSnippetText: true,
});
// If debugging, set to
@@ -831,7 +828,6 @@ describe('code fixes', () => {
let client: MessageConnection;
beforeEach(async () => {
client = createConnection({
ivy: true,
includeCompletionsWithSnippetText: true,
});
// If debugging, set to
@@ -20,7 +20,6 @@ import {URI} from 'vscode-uri';
import {PROJECT_PATH, SERVER_PATH} from '../test_constants';
export interface ServerOptions {
ivy: boolean;
includeAutomaticOptionalChainCompletions?: boolean;
includeCompletionsWithSnippetText?: boolean;
angularCoreVersion?: string;
@@ -34,9 +33,6 @@ export function createConnection(serverOptions: ServerOptions): MessageConnectio
'--ngProbeLocations',
[SERVER_PATH, PROJECT_PATH].join(','),
];
if (!serverOptions.ivy) {
argv.push('--viewEngine');
}
if (serverOptions.includeAutomaticOptionalChainCompletions) {
argv.push('--includeAutomaticOptionalChainCompletions');
}
@@ -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_apf_project",
srcs = glob(["**"]),
visibility = [
"//vscode-ng-language-service/server/src/tests:__pkg__",
],
)
@@ -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>();
}
@@ -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 {}
@@ -1,4 +0,0 @@
{{title | uppercase}}
<span class="subtitle">
subtitle
</span>
@@ -1,8 +0,0 @@
import {Component} from '@angular/core';
@Component({
templateUrl: 'foo.component.html',
})
export class FooComponent {
title = 'Foo Component';
}
@@ -1,12 +0,0 @@
{
"name": "angular-ls-integration-test-project",
"private": true,
"dependencies": {
"@angular/common": "12.2.16",
"@angular/compiler": "12.2.16",
"@angular/compiler-cli": "12.2.16",
"@angular/core": "12.2.16",
"rxjs": "6.6.7",
"zone.js": "0.11.5"
}
}
@@ -1,15 +0,0 @@
{
"compilerOptions": {
"moduleResolution": "node",
"experimentalDecorators": true,
"target": "es2015",
"strict": true,
"typeRoots": [
"node_modules/@types"
]
},
"angularCompilerOptions": {
"strictTemplates": true,
"strictInjectionParameters": true
}
}
@@ -8,11 +8,8 @@ export function makeTempDir(): string {
return mkdtempSync(tmpDir);
}
export const IS_BAZEL = !!process.env['TEST_TARGET'];
export const PACKAGE_ROOT = IS_BAZEL ? resolve(__dirname, '..') : resolve(__dirname, '../..');
export const SERVER_PATH = IS_BAZEL
? join(PACKAGE_ROOT, 'server', 'index.js')
: join(PACKAGE_ROOT, 'dist', 'npm', 'server', 'index.js');
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,
+1 -1
View File
@@ -115,7 +115,7 @@
"angular.enable-strict-mode-prompt": {
"type": "boolean",
"default": true,
"markdownDescription": "Prompt to enable the [strictTemplates](https://angular.dev/reference/configs/angular-compiler-options#stricttemplates) flag in [angularCompilerOptions](https://angular.dev/reference/configs/angular-compiler-options). Note that strict mode is only available when using Ivy."
"markdownDescription": "Prompt to enable the [strictTemplates](https://angular.dev/reference/configs/angular-compiler-options#stricttemplates) flag in [angularCompilerOptions](https://angular.dev/reference/configs/angular-compiler-options)."
},
"angular.trace.server": {
"type": "string",
@@ -28,9 +28,6 @@ jasmine_test(
chdir = package_name(),
data = [
":tests",
"//vscode-ng-language-service/integration/pre_apf_project",
"//vscode-ng-language-service/integration/pre_apf_project:node_modules/@angular/compiler",
"//vscode-ng-language-service/integration/pre_apf_project:node_modules/@angular/compiler-cli",
"//vscode-ng-language-service/integration/workspace",
"//vscode-ng-language-service/integration/workspace:node_modules/@angular/compiler",
"//vscode-ng-language-service/integration/workspace:node_modules/@angular/compiler-cli",