Skip to content

Commit

Permalink
Cherry-pick PR #45642 into release-4.4 (#45644)
Browse files Browse the repository at this point in the history
Component commits:
58e56ed Close package json watches in watch mode on close

Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
  • Loading branch information
typescript-bot and weswigham committed Aug 30, 2021
1 parent a10409c commit 9eb689e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
4 changes: 4 additions & 0 deletions src/compiler/watchPublic.ts
Expand Up @@ -404,6 +404,10 @@ namespace ts {
});
parsedConfigs = undefined;
}
if (packageJsonMap) {
clearMap(packageJsonMap, closeFileWatcher);
packageJsonMap = undefined!;
}
}

function getCurrentBuilderProgram() {
Expand Down
Expand Up @@ -203,9 +203,6 @@ Shape signatures in builder refreshed for::
/users/username/projects/project/src/index.ts (computed .d.ts)

WatchedFiles::
/users/username/projects/project/node_modules/classnames/package.json:
{"fileName":"/users/username/projects/project/node_modules/classnames/package.json","pollingInterval":250}
{"fileName":"/users/username/projects/project/node_modules/classnames/package.json","pollingInterval":250}
/users/username/projects/project/tsconfig.json:
{"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250}
/users/username/projects/project/src/index.ts:
Expand All @@ -216,6 +213,8 @@ WatchedFiles::
{"fileName":"/users/username/projects/project/src/types/classnames.d.ts","pollingInterval":250}
/a/lib/lib.d.ts:
{"fileName":"/a/lib/lib.d.ts","pollingInterval":250}
/users/username/projects/project/node_modules/classnames/package.json:
{"fileName":"/users/username/projects/project/node_modules/classnames/package.json","pollingInterval":250}

FsWatches::

Expand Down
Expand Up @@ -122,15 +122,14 @@ Shape signatures in builder refreshed for::
/users/username/projects/project/index.tsx (used version)

WatchedFiles::
/users/username/projects/project/node_modules/tslib/package.json:
{"fileName":"/users/username/projects/project/node_modules/tslib/package.json","pollingInterval":250}
{"fileName":"/users/username/projects/project/node_modules/tslib/package.json","pollingInterval":250}
/users/username/projects/project/tsconfig.json:
{"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250}
/users/username/projects/project/index.tsx:
{"fileName":"/users/username/projects/project/index.tsx","pollingInterval":250}
/a/lib/lib.d.ts:
{"fileName":"/a/lib/lib.d.ts","pollingInterval":250}
/users/username/projects/project/node_modules/tslib/package.json:
{"fileName":"/users/username/projects/project/node_modules/tslib/package.json","pollingInterval":250}

FsWatches::

Expand Down
Expand Up @@ -190,18 +190,16 @@ Shape signatures in builder refreshed for::
/users/username/projects/project/index.tsx (computed .d.ts)

WatchedFiles::
/users/username/projects/project/node_modules/react/jsx-runtime/package.json:
{"fileName":"/users/username/projects/project/node_modules/react/jsx-runtime/package.json","pollingInterval":250}
{"fileName":"/users/username/projects/project/node_modules/react/jsx-runtime/package.json","pollingInterval":250}
/users/username/projects/project/node_modules/react/package.json:
{"fileName":"/users/username/projects/project/node_modules/react/package.json","pollingInterval":250}
{"fileName":"/users/username/projects/project/node_modules/react/package.json","pollingInterval":250}
/users/username/projects/project/tsconfig.json:
{"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250}
/users/username/projects/project/index.tsx:
{"fileName":"/users/username/projects/project/index.tsx","pollingInterval":250}
/a/lib/lib.d.ts:
{"fileName":"/a/lib/lib.d.ts","pollingInterval":250}
/users/username/projects/project/node_modules/react/jsx-runtime/package.json:
{"fileName":"/users/username/projects/project/node_modules/react/jsx-runtime/package.json","pollingInterval":250}
/users/username/projects/project/node_modules/react/package.json:
{"fileName":"/users/username/projects/project/node_modules/react/package.json","pollingInterval":250}

FsWatches::

Expand Down
Expand Up @@ -225,10 +225,6 @@ Shape signatures in builder refreshed for::
/users/username/projects/project/index.tsx (computed .d.ts)
WatchedFiles::
/users/username/projects/project/node_modules/react/jsx-runtime/package.json:
{"fileName":"/users/username/projects/project/node_modules/react/jsx-runtime/package.json","pollingInterval":250}
/users/username/projects/project/node_modules/react/package.json:
{"fileName":"/users/username/projects/project/node_modules/react/package.json","pollingInterval":250}
/users/username/projects/project/tsconfig.json:
{"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250}
/users/username/projects/project/index.tsx:
Expand Down

0 comments on commit 9eb689e

Please sign in to comment.