Skip to content

Use watch invoked with node_modules/.staging as watch for refreshing complete node_modules, so that npm install is reflected correctly #36039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2020

Conversation

sheetalkamat
Copy link
Member

In most cases npm install triggers watches with folder additions to .staging folder which we ignore.
Afterwards it moves everything with renames from .staging to node_modules folder. Many times there is individual watches invoked with those folders which we handle correctly but in some cases it just triggers watch with node_modules/.staging which again was ignored. Now when the watch invoked is .staging (and not sub folder/file in it) we refresh everything in node_modules instead to invalidate resolutions and files accordingly.

Fixes #35966

@sheetalkamat sheetalkamat merged commit 76ee021 into master Jan 10, 2020
@sheetalkamat sheetalkamat deleted the npmInstall branch January 10, 2020 22:58
Kingwl pushed a commit to Kingwl/TypeScript that referenced this pull request Mar 4, 2020
…g complete node_modules, so that npm install is reflected correctly (microsoft#36039)

* Add test that demonstrates npm install watch behaviour some times

* Use watch invoked with `node_modules/.staging` as watch for refreshing complete node_modules, so that npm install is reflected correctly
Fixes microsoft#35966
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors from missing references to non-@types .d.ts files do not disappear after npm install
2 participants