Skip to content

Commit c1d487f

Browse files
committed
More traces
1 parent 9ec13ae commit c1d487f

8 files changed

Lines changed: 2672 additions & 585 deletions

tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport3.js

Lines changed: 729 additions & 472 deletions
Large diffs are not rendered by default.

tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js

Lines changed: 174 additions & 15 deletions
Large diffs are not rendered by default.

tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js

Lines changed: 377 additions & 15 deletions
Large diffs are not rendered by default.

tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js

Lines changed: 251 additions & 12 deletions
Large diffs are not rendered by default.

tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js

Lines changed: 146 additions & 13 deletions
Large diffs are not rendered by default.

tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js

Lines changed: 907 additions & 19 deletions
Large diffs are not rendered by default.

tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js

Lines changed: 69 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ readF
1919
{
2020
"compilerOptions": {
2121
"module": "commonjs",
22+
"types": ["*"]
2223
},
2324
}
2425

@@ -57,6 +58,9 @@ Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/jsconfig.json : {
5758
"skipLibCheck": true,
5859
"noEmit": true,
5960
"module": 1,
61+
"types": [
62+
"*"
63+
],
6064
"configFilePath": "/home/src/workspaces/project/jsconfig.json"
6165
}
6266
}
@@ -74,20 +78,24 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspa
7478
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/jsconfig.json WatchType: Wild card directory
7579
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.js 500 undefined WatchType: Closed Script info
7680
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/jsconfig.json
81+
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: Failed Lookup Locations
82+
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: Failed Lookup Locations
83+
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types/node/index.d.ts 500 undefined WatchType: Closed Script info
7784
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
7885
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
7986
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
80-
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: Type roots
81-
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: Type roots
82-
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: Type roots
83-
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: Type roots
87+
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types/node/package.json 2000 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: File location affecting resolution
88+
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types/package.json 2000 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: File location affecting resolution
89+
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/package.json 2000 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: File location affecting resolution
90+
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/jsconfig.json WatchType: File location affecting resolution
8491
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/jsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
8592
Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/jsconfig.json' (Configured)
86-
Info seq [hh:mm:ss:mss] Files (4)
93+
Info seq [hh:mm:ss:mss] Files (5)
8794
/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
8895
/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
8996
/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
9097
/home/src/workspaces/project/a.js Text-1 "\nreadF"
98+
/home/src/workspaces/project/node_modules/@types/node/index.d.ts Text-1 "declare module 'fs' {\n export function readFile(): void;\n}\ndeclare module 'util' {\n export function promisify(): void;\n}"
9199

92100

93101
../../tslibs/TS/Lib/lib.d.ts
@@ -98,6 +106,8 @@ Info seq [hh:mm:ss:mss] Files (4)
98106
Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
99107
a.js
100108
Matched by default include pattern '**/*'
109+
node_modules/@types/node/index.d.ts
110+
Entry point for implicit type library 'node'
101111

102112
Info seq [hh:mm:ss:mss] -----------------------------------------------
103113
Info seq [hh:mm:ss:mss] event:
@@ -134,7 +144,7 @@ Info seq [hh:mm:ss:mss] Files (4)
134144
/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
135145
/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
136146
/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
137-
/home/src/workspaces/project/jsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n },\n}"
147+
/home/src/workspaces/project/jsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"types\": [\"*\"]\n },\n}"
138148

139149

140150
../../tslibs/TS/Lib/lib.d.ts
@@ -149,7 +159,7 @@ Info seq [hh:mm:ss:mss] Files (4)
149159
Info seq [hh:mm:ss:mss] -----------------------------------------------
150160
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
151161
Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/jsconfig.json' (Configured)
152-
Info seq [hh:mm:ss:mss] Files (4)
162+
Info seq [hh:mm:ss:mss] Files (5)
153163

154164
Info seq [hh:mm:ss:mss] -----------------------------------------------
155165
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
@@ -182,19 +192,28 @@ watchedFiles::
182192
{"pollingInterval":500}
183193
/home/src/workspaces/project/jsconfig.json: *new*
184194
{"pollingInterval":2000}
195+
/home/src/workspaces/project/node_modules/@types/node/index.d.ts: *new*
196+
{"pollingInterval":500}
197+
/home/src/workspaces/project/node_modules/@types/node/package.json: *new*
198+
{"pollingInterval":2000}
199+
/home/src/workspaces/project/node_modules/@types/package.json: *new*
200+
{"pollingInterval":2000}
201+
/home/src/workspaces/project/node_modules/package.json: *new*
202+
{"pollingInterval":2000}
185203
/home/src/workspaces/project/package.json: *new*
204+
{"pollingInterval":2000}
186205
{"pollingInterval":250}
187206
/home/src/workspaces/project/tsconfig.json: *new*
188207
{"pollingInterval":2000}
189208

190209
watchedDirectoriesRecursive::
191210
/home/src/workspaces/node_modules/@types: *new*
192211
{}
193-
{}
194212
/home/src/workspaces/project: *new*
195213
{}
196-
/home/src/workspaces/project/node_modules/@types: *new*
214+
/home/src/workspaces/project/node_modules: *new*
197215
{}
216+
/home/src/workspaces/project/node_modules/@types: *new*
198217
{}
199218

200219
Projects::
@@ -231,6 +250,10 @@ ScriptInfos::
231250
version: SVC-1-0
232251
containingProjects: 1
233252
/dev/null/inferredProject1* *default*
253+
/home/src/workspaces/project/node_modules/@types/node/index.d.ts *new*
254+
version: Text-1
255+
containingProjects: 1
256+
/home/src/workspaces/project/jsconfig.json
234257

235258
Info seq [hh:mm:ss:mss] request:
236259
{
@@ -244,7 +267,7 @@ Info seq [hh:mm:ss:mss] request:
244267
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/a.js 500 undefined WatchType: Closed Script info
245268
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/a.js ProjectRootPath: undefined:: Result: /home/src/workspaces/project/jsconfig.json
246269
Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/jsconfig.json' (Configured)
247-
Info seq [hh:mm:ss:mss] Files (4)
270+
Info seq [hh:mm:ss:mss] Files (5)
248271

249272
Info seq [hh:mm:ss:mss] -----------------------------------------------
250273
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
@@ -274,7 +297,16 @@ watchedFiles::
274297
{"pollingInterval":500}
275298
/home/src/workspaces/project/jsconfig.json:
276299
{"pollingInterval":2000}
300+
/home/src/workspaces/project/node_modules/@types/node/index.d.ts:
301+
{"pollingInterval":500}
302+
/home/src/workspaces/project/node_modules/@types/node/package.json:
303+
{"pollingInterval":2000}
304+
/home/src/workspaces/project/node_modules/@types/package.json:
305+
{"pollingInterval":2000}
306+
/home/src/workspaces/project/node_modules/package.json:
307+
{"pollingInterval":2000}
277308
/home/src/workspaces/project/package.json:
309+
{"pollingInterval":2000}
278310
{"pollingInterval":250}
279311
/home/src/workspaces/project/tsconfig.json:
280312
{"pollingInterval":2000}
@@ -286,11 +318,11 @@ watchedFiles *deleted*::
286318
watchedDirectoriesRecursive::
287319
/home/src/workspaces/node_modules/@types:
288320
{}
289-
{}
290321
/home/src/workspaces/project:
291322
{}
292-
/home/src/workspaces/project/node_modules/@types:
323+
/home/src/workspaces/project/node_modules:
293324
{}
325+
/home/src/workspaces/project/node_modules/@types:
294326
{}
295327

296328
Projects::
@@ -328,6 +360,10 @@ ScriptInfos::
328360
version: SVC-1-0
329361
containingProjects: 1
330362
/dev/null/inferredProject1* *default*
363+
/home/src/workspaces/project/node_modules/@types/node/index.d.ts
364+
version: Text-1
365+
containingProjects: 1
366+
/home/src/workspaces/project/jsconfig.json
331367

332368
Info seq [hh:mm:ss:mss] request:
333369
{
@@ -375,7 +411,7 @@ Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: *
375411
Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: *
376412
Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results
377413
Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms
378-
Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 0 from cache
414+
Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 1 ambient and 0 from cache
379415
Info seq [hh:mm:ss:mss] collectAutoImports: response is complete
380416
Info seq [hh:mm:ss:mss] collectAutoImports: *
381417
Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: *
@@ -919,6 +955,26 @@ Info seq [hh:mm:ss:mss] response:
919955
"kindModifiers": "",
920956
"sortText": "15"
921957
},
958+
{
959+
"name": "readFile",
960+
"kind": "function",
961+
"kindModifiers": "export,declare",
962+
"sortText": "16",
963+
"source": "fs",
964+
"hasAction": true,
965+
"sourceDisplay": [
966+
{
967+
"text": "fs",
968+
"kind": "text"
969+
}
970+
],
971+
"data": {
972+
"exportName": "readFile",
973+
"exportMapKey": "8 * readFile fs",
974+
"moduleSpecifier": "fs",
975+
"ambientModuleName": "fs"
976+
}
977+
},
922978
{
923979
"name": "escape",
924980
"kind": "function",

tests/baselines/reference/tsserver/typingsInstaller/external-projects-duplicate-package.js

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ Info seq [hh:mm:ss:mss] request:
2929
"command": "openExternalProject",
3030
"arguments": {
3131
"projectFileName": "/home/src/projects/project/a/app/test.csproj",
32-
"options": {},
32+
"options": {
33+
"types": [
34+
"*"
35+
]
36+
},
3337
"rootFiles": [
3438
{
3539
"fileName": "/home/src/projects/project/a/b/app.js"
@@ -62,14 +66,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/pro
6266
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/package.json 2000 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: File location affecting resolution
6367
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/package.json 2000 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: File location affecting resolution
6468
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/package.json 2000 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: File location affecting resolution
65-
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/app/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots
66-
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/app/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots
67-
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots
68-
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots
69-
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots
70-
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots
71-
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots
72-
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots
7369
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/a/app/test.csproj projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
7470
Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/a/app/test.csproj' (External)
7571
Info seq [hh:mm:ss:mss] Files (3)
@@ -89,18 +85,12 @@ Info seq [hh:mm:ss:mss] -----------------------------------------------
8985
TI:: Creating typing installer
9086

9187
PolledWatches::
92-
/home/src/projects/node_modules/@types: *new*
93-
{"pollingInterval":500}
9488
/home/src/projects/package.json: *new*
9589
{"pollingInterval":2000}
9690
/home/src/projects/project/a/app/node_modules: *new*
9791
{"pollingInterval":500}
98-
/home/src/projects/project/a/app/node_modules/@types: *new*
99-
{"pollingInterval":500}
10092
/home/src/projects/project/a/node_modules: *new*
10193
{"pollingInterval":500}
102-
/home/src/projects/project/a/node_modules/@types: *new*
103-
{"pollingInterval":500}
10494
/home/src/projects/project/node_modules/@types/node/package.json: *new*
10595
{"pollingInterval":2000}
10696
/home/src/projects/project/node_modules/@types/package.json: *new*
@@ -119,8 +109,6 @@ FsWatches::
119109
FsWatchesRecursive::
120110
/home/src/projects/project/node_modules: *new*
121111
{}
122-
/home/src/projects/project/node_modules/@types: *new*
123-
{}
124112

125113
Projects::
126114
/home/src/projects/project/a/app/test.csproj (External) *new*
@@ -180,6 +168,9 @@ TI:: [hh:mm:ss:mss] Got install request
180168
"/home/src/projects/project/a/b/app.js"
181169
],
182170
"compilerOptions": {
171+
"types": [
172+
"*"
173+
],
183174
"allowNonTsExtensions": true,
184175
"noEmitForJsFiles": true
185176
},
@@ -234,6 +225,9 @@ TI:: [hh:mm:ss:mss] Sending response:
234225
"exclude": []
235226
},
236227
"compilerOptions": {
228+
"types": [
229+
"*"
230+
],
237231
"allowNonTsExtensions": true,
238232
"noEmitForJsFiles": true
239233
},
@@ -254,6 +248,9 @@ Info seq [hh:mm:ss:mss] event:
254248
"exclude": []
255249
},
256250
"compilerOptions": {
251+
"types": [
252+
"*"
253+
],
257254
"allowNonTsExtensions": true,
258255
"noEmitForJsFiles": true
259256
},
@@ -286,7 +283,11 @@ Info seq [hh:mm:ss:mss] event:
286283
"deferred": 0,
287284
"deferredSize": 0
288285
},
289-
"compilerOptions": {},
286+
"compilerOptions": {
287+
"types": [
288+
""
289+
]
290+
},
290291
"typeAcquisition": {
291292
"enable": true,
292293
"include": false,
@@ -316,24 +317,18 @@ Info seq [hh:mm:ss:mss] response:
316317
After request
317318

318319
PolledWatches::
319-
/home/src/projects/node_modules/@types:
320-
{"pollingInterval":500}
321320
/home/src/projects/package.json:
322321
{"pollingInterval":2000}
323322
/home/src/projects/project/a/app/bower_components: *new*
324323
{"pollingInterval":500}
325324
/home/src/projects/project/a/app/node_modules:
326325
{"pollingInterval":500}
327-
/home/src/projects/project/a/app/node_modules/@types:
328-
{"pollingInterval":500}
329326
/home/src/projects/project/a/b/bower_components: *new*
330327
{"pollingInterval":500}
331328
/home/src/projects/project/a/b/node_modules: *new*
332329
{"pollingInterval":500}
333330
/home/src/projects/project/a/node_modules:
334331
{"pollingInterval":500}
335-
/home/src/projects/project/a/node_modules/@types:
336-
{"pollingInterval":500}
337332
/home/src/projects/project/node_modules/@types/node/package.json:
338333
{"pollingInterval":2000}
339334
/home/src/projects/project/node_modules/@types/package.json:
@@ -352,8 +347,6 @@ FsWatches::
352347
FsWatchesRecursive::
353348
/home/src/projects/project/node_modules:
354349
{}
355-
/home/src/projects/project/node_modules/@types:
356-
{}
357350

358351
Projects::
359352
/home/src/projects/project/a/app/test.csproj (External) *changed*

0 commit comments

Comments
 (0)