Skip to content

Commit

Permalink
Reset target for less baseline change
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Jun 26, 2023
1 parent 77a931b commit 081a381
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 89 deletions.
4 changes: 2 additions & 2 deletions src/testRunner/unittests/tscWatch/moduleResolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
{
path: `/user/username/projects/myproject/tsconfig.json`,
content: JSON.stringify({
compilerOptions: { module: "node16", moduleResolution: "node16" },
compilerOptions: { target: "es5", module: "node16", moduleResolution: "node16" },
})
},
{
Expand Down Expand Up @@ -354,7 +354,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
{
path: `/user/username/projects/myproject/tsconfig.json`,
content: JSON.stringify({
compilerOptions: { module: "node16", moduleResolution: "node16" },
compilerOptions: { target: "es5", module: "node16", moduleResolution: "node16" },
})
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false
Input::
//// [/user/username/projects/myproject/tsconfig.json]
{"compilerOptions":{"module":"node16","moduleResolution":"node16"}}
{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16"}}

//// [/user/username/projects/myproject/index.ts]
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
Expand Down Expand Up @@ -131,48 +131,37 @@ File '/user/username/projects/myproject/node_modules/pkg/package.json' exists ac
File '/a/lib/package.json' does not exist.
File '/a/package.json' does not exist.
File '/package.json' does not exist according to earlier cached lookups.
[91merror[0m[90m TS2318: [0mCannot find global type 'Array'.
[96mindex.ts[0m:[93m2[0m:[93m39[0m - [91merror[0m[90m TS2307: [0mCannot find module 'pkg1' or its corresponding type declarations.

error TS2318: Cannot find global type 'Boolean'.
2 import type { RequireInterface } from "pkg1" assert { "resolution-mode": "require" };
   ~~~~~~

error TS2318: Cannot find global type 'Function'.

error TS2318: Cannot find global type 'IArguments'.

error TS2318: Cannot find global type 'Number'.

error TS2318: Cannot find global type 'Object'.

error TS2318: Cannot find global type 'RegExp'.

error TS2318: Cannot find global type 'String'.

error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found.
The file is in the program because:
Default library for target 'es2022'

[12:00:44 AM] Found 9 errors. Watching for file changes.
[12:00:44 AM] Found 1 error. Watching for file changes.



Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"]
Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: Not
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/a.ts
/user/username/projects/myproject/node_modules/pkg/import.d.ts
/user/username/projects/myproject/index.ts

No cached semantic diagnostics in the builder::
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/user/username/projects/myproject/a.ts
/user/username/projects/myproject/node_modules/pkg/import.d.ts
/user/username/projects/myproject/index.ts

Shape signatures in builder refreshed for::
/a/lib/lib.d.ts (used version)
/user/username/projects/myproject/a.ts (used version)
/user/username/projects/myproject/index.ts (used version)
/user/username/projects/myproject/node_modules/pkg/import.d.ts (used version)
/user/username/projects/myproject/index.ts (used version)

PolledWatches::
/a/lib/lib.es2022.full.d.ts: *new*
{"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types: *new*
{"pollingInterval":500}
/user/username/projects/myproject/package.json: *new*
Expand All @@ -185,6 +174,8 @@ PolledWatches::
{"pollingInterval":2000}

FsWatches::
/a/lib/lib.d.ts: *new*
{}
/user/username/projects: *new*
{}
/user/username/projects/myproject: *new*
Expand Down Expand Up @@ -238,6 +229,9 @@ Output::
>> Screen clear
[12:00:47 AM] File change detected. Starting incremental compilation...
File '/a/lib/package.json' does not exist according to earlier cached lookups.
File '/a/package.json' does not exist according to earlier cached lookups.
File '/package.json' does not exist according to earlier cached lookups.
File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups.
File '/user/username/projects/package.json' does not exist according to earlier cached lookups.
File '/user/username/package.json' does not exist according to earlier cached lookups.
Expand Down Expand Up @@ -288,39 +282,27 @@ Reusing resolution of module 'pkg1' from '/user/username/projects/myproject/inde
File '/a/lib/package.json' does not exist according to earlier cached lookups.
File '/a/package.json' does not exist according to earlier cached lookups.
File '/package.json' does not exist according to earlier cached lookups.
error TS2318: Cannot find global type 'Array'.
error TS2318: Cannot find global type 'Boolean'.
error TS2318: Cannot find global type 'Function'.
error TS2318: Cannot find global type 'IArguments'.
index.ts:2:39 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations.
error TS2318: Cannot find global type 'Number'.
2 import type { RequireInterface } from "pkg1" assert { "resolution-mode": "require" };
   ~~~~~~
error TS2318: Cannot find global type 'Object'.
error TS2318: Cannot find global type 'RegExp'.
error TS2318: Cannot find global type 'String'.
error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found.
The file is in the program because:
Default library for target 'es2022'
[12:00:54 AM] Found 9 errors. Watching for file changes.
[12:00:54 AM] Found 1 error. Watching for file changes.
Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"]
Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: SafeModules
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/node_modules/pkg/import.d.ts
/user/username/projects/myproject/a.ts
/user/username/projects/myproject/index.ts

No cached semantic diagnostics in the builder::
Semantic diagnostics in builder refreshed for::
/user/username/projects/myproject/a.ts
/user/username/projects/myproject/index.ts

Shape signatures in builder refreshed for::
/user/username/projects/myproject/a.ts (computed .d.ts)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false
Input::
//// [/user/username/projects/myproject/tsconfig.json]
{"compilerOptions":{"module":"node16","moduleResolution":"node16"}}
{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16"}}

//// [/user/username/projects/myproject/index.ts]
/// <reference types="pkg" resolution-mode="import"/>
Expand Down Expand Up @@ -131,50 +131,45 @@ File '/package.json' does not exist according to earlier cached lookups.
File '/a/lib/package.json' does not exist.
File '/a/package.json' does not exist.
File '/package.json' does not exist according to earlier cached lookups.
[91merror[0m[90m TS2318: [0mCannot find global type 'Array'.
[96mindex.ts[0m:[93m2[0m:[93m23[0m - [91merror[0m[90m TS2688: [0mCannot find type definition file for 'pkg1'.

error TS2318: Cannot find global type 'Boolean'.
2 /// <reference types="pkg1" resolution-mode="require"/>
   ~~~~

[91merror[0m[90m TS2318: [0mCannot find global type 'Function'.
[96mindex.ts[0m:[93m3[0m:[93m41[0m - [91merror[0m[90m TS2304: [0mCannot find name 'RequireInterface'.

error TS2318: Cannot find global type 'IArguments'.
3 export interface LocalInterface extends RequireInterface {}
   ~~~~~~~~~~~~~~~~

error TS2318: Cannot find global type 'Number'.

error TS2318: Cannot find global type 'Object'.

error TS2318: Cannot find global type 'RegExp'.

error TS2318: Cannot find global type 'String'.

error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found.
The file is in the program because:
Default library for target 'es2022'

[12:00:50 AM] Found 9 errors. Watching for file changes.
[12:00:50 AM] Found 2 errors. Watching for file changes.



Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"]
Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: Not
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/a.ts
/user/username/projects/myproject/node_modules/pkg/import.d.ts
/user/username/projects/myproject/index.ts
/user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts

No cached semantic diagnostics in the builder::
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/user/username/projects/myproject/a.ts
/user/username/projects/myproject/node_modules/pkg/import.d.ts
/user/username/projects/myproject/index.ts
/user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts

Shape signatures in builder refreshed for::
/a/lib/lib.d.ts (used version)
/user/username/projects/myproject/a.ts (used version)
/user/username/projects/myproject/node_modules/pkg/import.d.ts (used version)
/user/username/projects/myproject/index.ts (used version)
/user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts (used version)

PolledWatches::
/a/lib/lib.es2022.full.d.ts: *new*
{"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types/package.json: *new*
{"pollingInterval":2000}
/user/username/projects/myproject/node_modules/@types/pkg2/package.json: *new*
Expand All @@ -191,6 +186,8 @@ PolledWatches::
{"pollingInterval":2000}

FsWatches::
/a/lib/lib.d.ts: *new*
{}
/user/username/projects/myproject/a.ts: *new*
{}
/user/username/projects/myproject/index.ts: *new*
Expand Down Expand Up @@ -247,6 +244,9 @@ Output::
>> Screen clear
[12:00:53 AM] File change detected. Starting incremental compilation...

File '/a/lib/package.json' does not exist according to earlier cached lookups.
File '/a/package.json' does not exist according to earlier cached lookups.
File '/package.json' does not exist according to earlier cached lookups.
File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups.
File '/user/username/projects/package.json' does not exist according to earlier cached lookups.
File '/user/username/package.json' does not exist according to earlier cached lookups.
Expand Down Expand Up @@ -309,40 +309,32 @@ File '/package.json' does not exist according to earlier cached lookups.
File '/a/lib/package.json' does not exist according to earlier cached lookups.
File '/a/package.json' does not exist according to earlier cached lookups.
File '/package.json' does not exist according to earlier cached lookups.
error TS2318: Cannot find global type 'Array'.

error TS2318: Cannot find global type 'Boolean'.
index.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg1'.

error TS2318: Cannot find global type 'Function'.
2 /// <reference types="pkg1" resolution-mode="require"/>
   ~~~~

[91merror[0m[90m TS2318: [0mCannot find global type 'IArguments'.
[96mindex.ts[0m:[93m3[0m:[93m41[0m - [91merror[0m[90m TS2304: [0mCannot find name 'RequireInterface'.

error TS2318: Cannot find global type 'Number'.
3 export interface LocalInterface extends RequireInterface {}
   ~~~~~~~~~~~~~~~~

error TS2318: Cannot find global type 'Object'.

error TS2318: Cannot find global type 'RegExp'.

error TS2318: Cannot find global type 'String'.

error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found.
The file is in the program because:
Default library for target 'es2022'

[12:00:57 AM] Found 9 errors. Watching for file changes.
[12:00:57 AM] Found 2 errors. Watching for file changes.



Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"]
Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: SafeModules
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/node_modules/pkg/import.d.ts
/user/username/projects/myproject/a.ts
/user/username/projects/myproject/index.ts
/user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts

No cached semantic diagnostics in the builder::
Semantic diagnostics in builder refreshed for::
/user/username/projects/myproject/a.ts

Shape signatures in builder refreshed for::
/user/username/projects/myproject/a.ts (computed .d.ts)
Expand Down

0 comments on commit 081a381

Please sign in to comment.