From 481c2037ccd2c45ed7405d9e885c5f28ea292b75 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Thu, 10 Jun 2021 14:18:56 +0100 Subject: [PATCH] Re-name really long file (#44413) --- .../unittests/tsserver/projectReferences.ts | 6 +- ...ction-as-object-literal-property-types.js} | 73 ++++++++++++++++++- ...row-function-as-object-literal-property.js | 73 +------------------ 3 files changed, 77 insertions(+), 75 deletions(-) rename tests/baselines/reference/tsserver/projectReferences/{special-handling-of-localness-when-using-arrow-function-as-object-literal-property-is-loaded-through-indirect-assignment-with-original-declaration-local-to-project-is-treated-as-local.js => special-handling-of-localness-when-using-arrow-function-as-object-literal-property-types.js} (59%) diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index 2eba7833b76..fccad6ac949 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -655,7 +655,7 @@ ${usage}` ); verify( - "when using arrow function as object literal property", + "when using arrow function as object literal property types", `export const foo = { bar: () => { } };`, `shared.foo.bar();`, "bar" @@ -676,8 +676,10 @@ instance.fly();`, "fly" ); + verify( - "when using arrow function as object literal property is loaded through indirect assignment with original declaration local to project is treated as local", + // when using arrow function as object literal property is loaded through indirect assignment with original declaration local to project is treated as local + "when using arrow function as object literal property", `const local = { bar: () => { } }; export const foo = local;`, `shared.foo.bar();`, diff --git a/tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property-is-loaded-through-indirect-assignment-with-original-declaration-local-to-project-is-treated-as-local.js b/tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property-types.js similarity index 59% rename from tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property-is-loaded-through-indirect-assignment-with-original-declaration-local-to-project-is-treated-as-local.js rename to tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property-types.js index a38fee10145..4952ad577f5 100644 --- a/tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property-is-loaded-through-indirect-assignment-with-original-declaration-local-to-project-is-treated-as-local.js +++ b/tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property-types.js @@ -106,4 +106,75 @@ Project '/user/username/projects/solution/shared/tsconfig.json' (Configured) ----------------------------------------------- Search path: /user/username/projects/solution/shared/src For info: /user/username/projects/solution/shared/src/index.ts :: Config file name: /user/username/projects/solution/shared/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/solution/shared/src/index.ts","start":{"line":1,"offset":17},"end":{"line":1,"offset":20},"contextStart":{"line":1,"offset":17},"contextEnd":{"line":1,"offset":31},"lineText":"const local = { bar: () => { } };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/solution/api/src/server.ts","start":{"line":2,"offset":12},"end":{"line":2,"offset":15},"lineText":"shared.foo.bar();","isWriteAccess":false,"isDefinition":false}],"symbolName":"bar","symbolStartOffset":12,"symbolDisplayString":"(property) bar: () => void"},"responseRequired":true} \ No newline at end of file +Loading configured project /user/username/projects/solution/tsconfig.json +Config: /user/username/projects/solution/tsconfig.json : { + "rootNames": [], + "options": { + "configFilePath": "/user/username/projects/solution/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/solution/api", + "originalPath": "./api" + }, + { + "path": "/user/username/projects/solution/app", + "originalPath": "./app" + } + ] +} +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/solution/tsconfig.json +Config: /user/username/projects/solution/app/tsconfig.json : { + "rootNames": [ + "/user/username/projects/solution/app/src/app.ts" + ], + "options": { + "composite": true, + "outDir": "/user/username/projects/solution/app/dist", + "rootDir": "/user/username/projects/solution/app/src", + "configFilePath": "/user/username/projects/solution/app/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/solution/shared", + "originalPath": "../shared" + } + ] +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/tsconfig.json 2000 undefined Project: /user/username/projects/solution/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/src 1 undefined Config: /user/username/projects/solution/app/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/src 1 undefined Config: /user/username/projects/solution/app/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/node_modules/@types 1 undefined Project: /user/username/projects/solution/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/node_modules/@types 1 undefined Project: /user/username/projects/solution/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/solution/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Different program with same set of files +Creating configuration project /user/username/projects/solution/app/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +FileWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/src/app.ts 500 undefined WatchType: Closed Script info +Starting updateGraphWorker: Project: /user/username/projects/solution/app/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/shared 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/shared 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/node_modules/@types 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/node_modules/@types 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/node_modules/@types 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/node_modules/@types 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/solution/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/solution/app/tsconfig.json' (Configured) + Files (3) + /a/lib/lib.d.ts + /user/username/projects/solution/shared/src/index.ts + /user/username/projects/solution/app/src/app.ts + + + ../../../../../a/lib/lib.d.ts + Default library + ../shared/src/index.ts + Imported via "../../shared/dist" from file 'src/app.ts' + src/app.ts + Matched by include pattern 'src' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/solution/shared/src +For info: /user/username/projects/solution/shared/src/index.ts :: Config file name: /user/username/projects/solution/shared/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/solution/shared/src/index.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":25},"contextStart":{"line":1,"offset":22},"contextEnd":{"line":1,"offset":36},"lineText":"export const foo = { bar: () => { } };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/solution/api/src/server.ts","start":{"line":2,"offset":12},"end":{"line":2,"offset":15},"lineText":"shared.foo.bar();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/solution/app/src/app.ts","start":{"line":2,"offset":12},"end":{"line":2,"offset":15},"lineText":"shared.foo.bar();","isWriteAccess":false,"isDefinition":false}],"symbolName":"bar","symbolStartOffset":12,"symbolDisplayString":"(property) bar: () => void"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property.js b/tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property.js index 4952ad577f5..a38fee10145 100644 --- a/tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property.js +++ b/tests/baselines/reference/tsserver/projectReferences/special-handling-of-localness-when-using-arrow-function-as-object-literal-property.js @@ -106,75 +106,4 @@ Project '/user/username/projects/solution/shared/tsconfig.json' (Configured) ----------------------------------------------- Search path: /user/username/projects/solution/shared/src For info: /user/username/projects/solution/shared/src/index.ts :: Config file name: /user/username/projects/solution/shared/tsconfig.json -Loading configured project /user/username/projects/solution/tsconfig.json -Config: /user/username/projects/solution/tsconfig.json : { - "rootNames": [], - "options": { - "configFilePath": "/user/username/projects/solution/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/user/username/projects/solution/api", - "originalPath": "./api" - }, - { - "path": "/user/username/projects/solution/app", - "originalPath": "./app" - } - ] -} -Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded -Starting updateGraphWorker: Project: /user/username/projects/solution/tsconfig.json -Config: /user/username/projects/solution/app/tsconfig.json : { - "rootNames": [ - "/user/username/projects/solution/app/src/app.ts" - ], - "options": { - "composite": true, - "outDir": "/user/username/projects/solution/app/dist", - "rootDir": "/user/username/projects/solution/app/src", - "configFilePath": "/user/username/projects/solution/app/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/user/username/projects/solution/shared", - "originalPath": "../shared" - } - ] -} -FileWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/tsconfig.json 2000 undefined Project: /user/username/projects/solution/tsconfig.json WatchType: Config file -DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/src 1 undefined Config: /user/username/projects/solution/app/tsconfig.json WatchType: Wild card directory -Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/src 1 undefined Config: /user/username/projects/solution/app/tsconfig.json WatchType: Wild card directory -DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/node_modules/@types 1 undefined Project: /user/username/projects/solution/tsconfig.json WatchType: Type roots -Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/node_modules/@types 1 undefined Project: /user/username/projects/solution/tsconfig.json WatchType: Type roots -Finishing updateGraphWorker: Project: /user/username/projects/solution/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Different program with same set of files -Creating configuration project /user/username/projects/solution/app/tsconfig.json -Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded -FileWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/src/app.ts 500 undefined WatchType: Closed Script info -Starting updateGraphWorker: Project: /user/username/projects/solution/app/tsconfig.json -DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/shared 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Failed Lookup Locations -Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/shared 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Failed Lookup Locations -DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/node_modules/@types 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Type roots -Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/app/node_modules/@types 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Type roots -DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/node_modules/@types 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Type roots -Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/solution/node_modules/@types 1 undefined Project: /user/username/projects/solution/app/tsconfig.json WatchType: Type roots -Finishing updateGraphWorker: Project: /user/username/projects/solution/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Project '/user/username/projects/solution/app/tsconfig.json' (Configured) - Files (3) - /a/lib/lib.d.ts - /user/username/projects/solution/shared/src/index.ts - /user/username/projects/solution/app/src/app.ts - - - ../../../../../a/lib/lib.d.ts - Default library - ../shared/src/index.ts - Imported via "../../shared/dist" from file 'src/app.ts' - src/app.ts - Matched by include pattern 'src' in 'tsconfig.json' - ------------------------------------------------ -Search path: /user/username/projects/solution/shared/src -For info: /user/username/projects/solution/shared/src/index.ts :: Config file name: /user/username/projects/solution/shared/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/solution/shared/src/index.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":25},"contextStart":{"line":1,"offset":22},"contextEnd":{"line":1,"offset":36},"lineText":"export const foo = { bar: () => { } };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/solution/api/src/server.ts","start":{"line":2,"offset":12},"end":{"line":2,"offset":15},"lineText":"shared.foo.bar();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/solution/app/src/app.ts","start":{"line":2,"offset":12},"end":{"line":2,"offset":15},"lineText":"shared.foo.bar();","isWriteAccess":false,"isDefinition":false}],"symbolName":"bar","symbolStartOffset":12,"symbolDisplayString":"(property) bar: () => void"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/solution/shared/src/index.ts","start":{"line":1,"offset":17},"end":{"line":1,"offset":20},"contextStart":{"line":1,"offset":17},"contextEnd":{"line":1,"offset":31},"lineText":"const local = { bar: () => { } };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/solution/api/src/server.ts","start":{"line":2,"offset":12},"end":{"line":2,"offset":15},"lineText":"shared.foo.bar();","isWriteAccess":false,"isDefinition":false}],"symbolName":"bar","symbolStartOffset":12,"symbolDisplayString":"(property) bar: () => void"},"responseRequired":true} \ No newline at end of file