-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Pick PR #59215 (Fix codefix crash on circular alias...) into releas…
…e-5.5 (#59224) Co-authored-by: Andrew Branch <[email protected]>
- Loading branch information
1 parent
381e609
commit 8794318
Showing
3 changed files
with
342 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
321 changes: 321 additions & 0 deletions
321
...s/baselines/reference/tsserver/fourslashServer/importFixes_ambientCircularDefaultCrash.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,321 @@ | ||
currentDirectory:: / useCaseSensitiveFileNames: false | ||
Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist | ||
//// [/index.ts] | ||
my | ||
//// [/lib.d.ts] | ||
lib.d.ts-Text | ||
//// [/lib.decorators.d.ts] | ||
lib.decorators.d.ts-Text | ||
//// [/lib.decorators.legacy.d.ts] | ||
lib.decorators.legacy.d.ts-Text | ||
//// [/tsconfig.json] | ||
{ | ||
"compilerOptions": { | ||
"module": "preserve" | ||
} | ||
} | ||
//// [/types.d.ts] | ||
declare module "mymod" { | ||
import mymod from "mymod"; | ||
export default mymod; | ||
} | ||
Info seq [hh:mm:ss:mss] request: | ||
{ | ||
"seq": 0, | ||
"type": "request", | ||
"arguments": { | ||
"file": "/tsconfig.json" | ||
}, | ||
"command": "open" | ||
} | ||
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: /tsconfig.json | ||
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json | ||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file | ||
Info seq [hh:mm:ss:mss] event: | ||
{ | ||
"seq": 0, | ||
"type": "event", | ||
"event": "projectLoadingStart", | ||
"body": { | ||
"projectName": "/tsconfig.json", | ||
"reason": "Creating possible configured project for /tsconfig.json to open" | ||
} | ||
} | ||
Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { | ||
"rootNames": [ | ||
"/index.ts", | ||
"/lib.d.ts", | ||
"/lib.decorators.d.ts", | ||
"/lib.decorators.legacy.d.ts", | ||
"/types.d.ts" | ||
], | ||
"options": { | ||
"module": 200, | ||
"configFilePath": "/tsconfig.json" | ||
} | ||
} | ||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory | ||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory | ||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info | ||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info | ||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info | ||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info | ||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /types.d.ts 500 undefined WatchType: Closed Script info | ||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json | ||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms | ||
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) | ||
Info seq [hh:mm:ss:mss] Files (5) | ||
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text | ||
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text | ||
/index.ts Text-1 "my" | ||
/lib.d.ts Text-1 lib.d.ts-Text | ||
/types.d.ts Text-1 "declare module \"mymod\" {\n import mymod from \"mymod\";\n export default mymod;\n}" | ||
lib.decorators.d.ts | ||
Library referenced via 'decorators' from file 'lib.d.ts' | ||
Matched by default include pattern '**/*' | ||
lib.decorators.legacy.d.ts | ||
Library referenced via 'decorators.legacy' from file 'lib.d.ts' | ||
Matched by default include pattern '**/*' | ||
index.ts | ||
Matched by default include pattern '**/*' | ||
lib.d.ts | ||
Matched by default include pattern '**/*' | ||
types.d.ts | ||
Matched by default include pattern '**/*' | ||
|
||
Info seq [hh:mm:ss:mss] ----------------------------------------------- | ||
Info seq [hh:mm:ss:mss] event: | ||
{ | ||
"seq": 0, | ||
"type": "event", | ||
"event": "projectLoadingFinish", | ||
"body": { | ||
"projectName": "/tsconfig.json" | ||
} | ||
} | ||
Info seq [hh:mm:ss:mss] event: | ||
{ | ||
"seq": 0, | ||
"type": "event", | ||
"event": "configFileDiag", | ||
"body": { | ||
"triggerFile": "/tsconfig.json", | ||
"configFile": "/tsconfig.json", | ||
"diagnostics": [] | ||
} | ||
} | ||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* | ||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms | ||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) | ||
Info seq [hh:mm:ss:mss] Files (4) | ||
/lib.d.ts Text-1 lib.d.ts-Text | ||
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text | ||
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text | ||
/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"preserve\"\n }\n}" | ||
|
||
|
||
lib.d.ts | ||
Default library for target 'es5' | ||
lib.decorators.d.ts | ||
Library referenced via 'decorators' from file 'lib.d.ts' | ||
lib.decorators.legacy.d.ts | ||
Library referenced via 'decorators.legacy' from file 'lib.d.ts' | ||
tsconfig.json | ||
Root file specified for compilation | ||
Info seq [hh:mm:ss:mss] ----------------------------------------------- | ||
Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) | ||
Info seq [hh:mm:ss:mss] Files (5) | ||
Info seq [hh:mm:ss:mss] ----------------------------------------------- | ||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) | ||
Info seq [hh:mm:ss:mss] Files (4) | ||
Info seq [hh:mm:ss:mss] ----------------------------------------------- | ||
Info seq [hh:mm:ss:mss] Open files: | ||
Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined | ||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* | ||
After Request | ||
watchedFiles:: | ||
/index.ts: *new* | ||
{"pollingInterval":500} | ||
/lib.d.ts: *new* | ||
{"pollingInterval":500} | ||
/lib.decorators.d.ts: *new* | ||
{"pollingInterval":500} | ||
/lib.decorators.legacy.d.ts: *new* | ||
{"pollingInterval":500} | ||
/tsconfig.json: *new* | ||
{"pollingInterval":2000} | ||
/types.d.ts: *new* | ||
{"pollingInterval":500} | ||
watchedDirectoriesRecursive:: | ||
: *new* | ||
{} | ||
Projects:: | ||
/dev/null/inferredProject1* (Inferred) *new* | ||
projectStateVersion: 1 | ||
projectProgramVersion: 1 | ||
/tsconfig.json (Configured) *new* | ||
projectStateVersion: 1 | ||
projectProgramVersion: 1 | ||
noOpenRef: true | ||
ScriptInfos:: | ||
/index.ts *new* | ||
version: Text-1 | ||
containingProjects: 1 | ||
/tsconfig.json | ||
/lib.d.ts *new* | ||
version: Text-1 | ||
containingProjects: 2 | ||
/tsconfig.json | ||
/dev/null/inferredProject1* | ||
/lib.decorators.d.ts *new* | ||
version: Text-1 | ||
containingProjects: 2 | ||
/tsconfig.json | ||
/dev/null/inferredProject1* | ||
/lib.decorators.legacy.d.ts *new* | ||
version: Text-1 | ||
containingProjects: 2 | ||
/tsconfig.json | ||
/dev/null/inferredProject1* | ||
/tsconfig.json (Open) *new* | ||
version: SVC-1-0 | ||
containingProjects: 1 | ||
/dev/null/inferredProject1* *default* | ||
/types.d.ts *new* | ||
version: Text-1 | ||
containingProjects: 1 | ||
/tsconfig.json | ||
Info seq [hh:mm:ss:mss] request: | ||
{ | ||
"seq": 1, | ||
"type": "request", | ||
"arguments": { | ||
"preferences": { | ||
"includeCompletionsForModuleExports": true, | ||
"includeCompletionsWithInsertText": true | ||
} | ||
}, | ||
"command": "configure" | ||
} | ||
Info seq [hh:mm:ss:mss] response: | ||
{ | ||
"seq": 0, | ||
"type": "response", | ||
"command": "configure", | ||
"request_seq": 1, | ||
"success": true | ||
} | ||
Info seq [hh:mm:ss:mss] request: | ||
{ | ||
"seq": 2, | ||
"type": "request", | ||
"arguments": { | ||
"file": "/index.ts", | ||
"includeLinePosition": true | ||
}, | ||
"command": "syntacticDiagnosticsSync" | ||
} | ||
Info seq [hh:mm:ss:mss] response: | ||
{ | ||
"seq": 0, | ||
"type": "response", | ||
"command": "syntacticDiagnosticsSync", | ||
"request_seq": 2, | ||
"success": true, | ||
"body": [] | ||
} | ||
Info seq [hh:mm:ss:mss] request: | ||
{ | ||
"seq": 3, | ||
"type": "request", | ||
"arguments": { | ||
"file": "/index.ts", | ||
"includeLinePosition": true | ||
}, | ||
"command": "semanticDiagnosticsSync" | ||
} | ||
Info seq [hh:mm:ss:mss] response: | ||
{ | ||
"seq": 0, | ||
"type": "response", | ||
"command": "semanticDiagnosticsSync", | ||
"request_seq": 3, | ||
"success": true, | ||
"body": [ | ||
{ | ||
"message": "Cannot find name 'my'.", | ||
"start": 0, | ||
"length": 2, | ||
"category": "error", | ||
"code": 2304, | ||
"startLocation": { | ||
"line": 1, | ||
"offset": 1 | ||
}, | ||
"endLocation": { | ||
"line": 1, | ||
"offset": 3 | ||
} | ||
} | ||
] | ||
} | ||
Info seq [hh:mm:ss:mss] request: | ||
{ | ||
"seq": 4, | ||
"type": "request", | ||
"arguments": { | ||
"file": "/index.ts", | ||
"includeLinePosition": true | ||
}, | ||
"command": "suggestionDiagnosticsSync" | ||
} | ||
Info seq [hh:mm:ss:mss] response: | ||
{ | ||
"seq": 0, | ||
"type": "response", | ||
"command": "suggestionDiagnosticsSync", | ||
"request_seq": 4, | ||
"success": true, | ||
"body": [] | ||
} | ||
Info seq [hh:mm:ss:mss] request: | ||
{ | ||
"seq": 5, | ||
"type": "request", | ||
"arguments": { | ||
"file": "/index.ts", | ||
"startLine": 1, | ||
"startOffset": 1, | ||
"endLine": 1, | ||
"endOffset": 3, | ||
"errorCodes": [ | ||
2304 | ||
] | ||
}, | ||
"command": "getCodeFixes" | ||
} | ||
Info seq [hh:mm:ss:mss] response: | ||
{ | ||
"seq": 0, | ||
"type": "response", | ||
"command": "getCodeFixes", | ||
"request_seq": 5, | ||
"success": true, | ||
"body": [] | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/cases/fourslash/server/importFixes_ambientCircularDefaultCrash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// <reference path="../fourslash.ts" /> | ||
|
||
// @Filename: /tsconfig.json | ||
//// { | ||
//// "compilerOptions": { | ||
//// "module": "preserve" | ||
//// } | ||
//// } | ||
|
||
// @Filename: /types.d.ts | ||
//// declare module "mymod" { | ||
//// import mymod from "mymod"; | ||
//// export default mymod; | ||
//// } | ||
|
||
// @Filename: /index.ts | ||
//// my/**/ | ||
|
||
verify.importFixModuleSpecifiers("", []); |