Skip to content

Commit 6f33965

Browse files
author
Keen Yee Liau
committed
Revert "perf: prevent requests from being sent to the server when outside Angular context"
This reverts commit fcbdf93.
1 parent 983c6b9 commit 6f33965

File tree

9 files changed

+18
-321
lines changed

9 files changed

+18
-321
lines changed

.vscode/launch.json

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@
77
"request": "launch",
88
"name": "Launch Client",
99
"runtimeExecutable": "${execPath}",
10-
"args": [
11-
"--extensionDevelopmentPath=${workspaceFolder}"
12-
],
13-
"outFiles": [
14-
"${workspaceFolder}/dist/client/*.js"
15-
],
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
11+
"outFiles": ["${workspaceRoot}/dist/client/*.js"],
1612
"preLaunchTask": {
1713
"type": "npm",
1814
"script": "watch"
@@ -24,19 +20,7 @@
2420
"name": "Attach to Server",
2521
"port": 6009,
2622
"restart": true,
27-
"outFiles": [
28-
"${workspaceFolder}/dist/server/*.js"
29-
]
30-
},
31-
{
32-
"type": "node",
33-
"request": "attach",
34-
"name": "Attach to Jasmine",
35-
"port": 9229,
36-
"restart": true,
37-
"outFiles": [
38-
"${workspaceFolder}/dist/**/*.js"
39-
],
23+
"outFiles": ["${workspaceRoot}/dist/server/*.js"]
4024
},
4125
{
4226
"name": "Integration test: Attach to server",
@@ -45,9 +29,7 @@
4529
"skipFiles": [
4630
"<node_internals>/**"
4731
],
48-
"outFiles": [
49-
"${workspaceFolder}/dist/integration/lsp/*.js"
50-
],
32+
"outFiles": ["${workspaceRoot}/dist/integration/lsp/*.js"],
5133
"type": "node"
5234
},
5335
{
@@ -56,13 +38,11 @@
5638
"request": "launch",
5739
"runtimeExecutable": "${execPath}",
5840
"args": [
59-
"--extensionDevelopmentPath=${workspaceFolder}",
60-
"--extensionTestsPath=${workspaceFolder}/dist/integration/e2e",
61-
"${workspaceFolder}/integration/project"
62-
],
63-
"outFiles": [
64-
"${workspaceFolder}/dist/integration/e2e/*.js"
41+
"--extensionDevelopmentPath=${workspaceRoot}",
42+
"--extensionTestsPath=${workspaceRoot}/dist/integration/e2e",
43+
"${workspaceRoot}/integration/project"
6544
],
45+
"outFiles": ["${workspaceRoot}/dist/integration/e2e/*.js"],
6646
"preLaunchTask": {
6747
"type": "npm",
6848
"script": "compile:integration"
@@ -72,10 +52,7 @@
7252
"compounds": [
7353
{
7454
"name": "Client + Server",
75-
"configurations": [
76-
"Launch Client",
77-
"Attach to Server"
78-
]
55+
"configurations": ["Launch Client", "Attach to Server"]
7956
}
8057
]
81-
}
58+
}

client/src/client.ts

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {ProjectLoadingFinish, ProjectLoadingStart, SuggestIvyLanguageService, Su
1515
import {NgccProgress, NgccProgressToken, NgccProgressType} from '../common/progress';
1616
import {GetTcbRequest} from '../common/requests';
1717

18-
import {isInsideComponentDecorator, isInsideInlineTemplateRegion} from './embedded_support';
1918
import {ProgressReporter} from './progress-reporter';
2019

2120
interface GetTcbResponse {
@@ -51,37 +50,6 @@ export class AngularLanguageClient implements vscode.Disposable {
5150
// Don't let our output console pop open
5251
revealOutputChannelOn: lsp.RevealOutputChannelOn.Never,
5352
outputChannel: this.outputChannel,
54-
middleware: {
55-
provideDefinition: async (
56-
document: vscode.TextDocument, position: vscode.Position,
57-
token: vscode.CancellationToken, next: lsp.ProvideDefinitionSignature) => {
58-
if (isInsideComponentDecorator(document, position)) {
59-
return next(document, position, token);
60-
}
61-
},
62-
provideTypeDefinition: async (
63-
document: vscode.TextDocument, position: vscode.Position,
64-
token: vscode.CancellationToken, next) => {
65-
if (isInsideInlineTemplateRegion(document, position)) {
66-
return next(document, position, token);
67-
}
68-
},
69-
provideHover: async (
70-
document: vscode.TextDocument, position: vscode.Position,
71-
token: vscode.CancellationToken, next: lsp.ProvideHoverSignature) => {
72-
if (isInsideInlineTemplateRegion(document, position)) {
73-
return next(document, position, token);
74-
}
75-
},
76-
provideCompletionItem: async (
77-
document: vscode.TextDocument, position: vscode.Position,
78-
context: vscode.CompletionContext, token: vscode.CancellationToken,
79-
next: lsp.ProvideCompletionItemsSignature) => {
80-
if (isInsideInlineTemplateRegion(document, position)) {
81-
return next(document, position, context, token);
82-
}
83-
}
84-
}
8553
};
8654
}
8755

@@ -345,4 +313,4 @@ function getServerOptions(ctx: vscode.ExtensionContext, debug: boolean): lsp.Nod
345313
execArgv: debug ? devExecArgv : prodExecArgv,
346314
},
347315
};
348-
}
316+
}

client/src/embedded_support.ts

Lines changed: 0 additions & 94 deletions
This file was deleted.

client/src/tests/embedded_support_spec.ts

Lines changed: 0 additions & 115 deletions
This file was deleted.

client/src/tests/tsconfig.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

client/tsconfig.json

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
{
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
4-
"composite": true,
54
"outDir": "../dist/client",
6-
"rootDir": "src",
7-
"rootDirs": [
8-
".",
9-
"../dist"
10-
]
5+
"rootDirs": [".", "../dist"]
116
},
127
"references": [
13-
{
14-
"path": "../common"
15-
}
8+
{"path": "../common"}
169
],
17-
"include": [
18-
"src"
19-
],
20-
"exclude": [
21-
"node_modules"
22-
]
23-
}
10+
"include": ["src"],
11+
"exclude": ["node_modules"]
12+
}

jasmine.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)