-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix: properly reprint resolver errors in watch mode #6407
Conversation
You can do Enjoy your vacation! |
Haha! We could potentially do |
Codecov Report
@@ Coverage Diff @@
## master #6407 +/- ##
==========================================
- Coverage 63.48% 63.47% -0.01%
==========================================
Files 227 227
Lines 8697 8699 +2
Branches 4 4
==========================================
+ Hits 5521 5522 +1
- Misses 3175 3176 +1
Partials 1 1
Continue to review full report at Codecov.
|
21c82ed
to
e631fb9
Compare
CI is unhappy |
e9efb20
to
085c1fd
Compare
updated snapshot, should be green now |
This Pull Request updates dependency [jest](https://github.com/facebook/jest) from `v23.3.0` to `v23.4.0` <details> <summary>Release Notes</summary> ### [`v23.4.0`](https://github.com/facebook/jest/blob/master/CHANGELOG.md#​2340) [Compare Source](jestjs/jest@v23.3.0...v23.4.0) ##### Features - `[jest-haste-map]` Add `computeDependencies` flag to avoid opening files if not needed ([#​6667](`https://github.com/facebook/jest/pull/6667`)) - `[jest-runtime]` Support `require.resolve.paths` ([#​6471](`https://github.com/facebook/jest/pull/6471`)) - `[jest-runtime]` Support `paths` option for `require.resolve` ([#​6471](`https://github.com/facebook/jest/pull/6471`)) ##### Fixes - `[jest-runner]` Force parallel runs for watch mode, to avoid TTY freeze ([#​6647](`https://github.com/facebook/jest/pull/6647`)) - `[jest-cli]` properly reprint resolver errors in watch mode ([#​6407](`https://github.com/facebook/jest/pull/6407`)) - `[jest-cli]` Write configuration to stdout when the option was explicitly passed to Jest ([#​6447](`https://github.com/facebook/jest/pull/6447`)) - `[jest-cli]` Fix regression on non-matching suites ([6657](`https://github.com/facebook/jest/pull/6657`)) - `[jest-runtime]` Roll back `micromatch` version to prevent regression when matching files ([#​6661](`https://github.com/facebook/jest/pull/6661`)) --- </details> --- This PR has been generated by [Renovate Bot](https://renovatebot.com).
- Updated Jest dep to `^23.4.0`, fixing jestjs/jest#6407 which caused our `test:dev` script to appear to hang when files were modified and Jest cache was absent. The original behavior froze at this message: Determining test suites to run... The new version of Jest properly prints the error message: Determining test suites to run... Configuration error: Could not locate module src/store/reducers/navigation mapped as: /Users/jzetlen/gits/pwa/pwa-studio/packages/venia-concept/src/store/reducers/navigation. Please check your configuration for these entries: { "moduleNameMapper": { "/^src\/(.+)/": "/Users/jzetlen/gits/pwa/pwa-studio/packages/venia-concept/src/$1" }, "resolver": null } - Removed the `App` component, which is now unused due to the `MagentoResolver` calling `RootComponents` directly, and was the source of the mapping error above. Future errors of this kind will appear early and should be easier to diagnose and fix.
- Updated Jest dep to `^23.4.0`, fixing jestjs/jest#6407 which caused our `test:dev` script to appear to hang when files were modified and Jest cache was absent. The original behavior froze at this message: Determining test suites to run... The new version of Jest properly prints the error message: Determining test suites to run... Configuration error: Could not locate module src/store/reducers/navigation mapped as: /Users/jzetlen/gits/pwa/pwa-studio/packages/venia-concept/src/store/reducers/navigation. Please check your configuration for these entries: { "moduleNameMapper": { "/^src\/(.+)/": "/Users/jzetlen/gits/pwa/pwa-studio/packages/venia-concept/src/$1" }, "resolver": null } - Removed the `App` component, which is now unused due to the `MagentoResolver` calling `RootComponents` directly, and was the source of the mapping error above. Future errors of this kind will appear early and should be easier to diagnose and fix.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
We've reprinted only
error.stack
while being in watch mode, which caused "Could not locate module" errors to vanish, because they had their stack cleared (for reasons known to me at the time of writing, which are not relevant now).Also improved the resolver error message just a bit.
Fixes #4524
Test plan
No time for tests because I'm heading off on vacation 😎🌴, but hey, I have screenshots!
Before:
After (watch mode resolver errors now shine as never before):
]
To get rid of this extra "Error: " I'd need to only print
error.message
which I think is safer not to do, as proven byerror.stack
version, but maybe I worry to much (just no time for thorough testing).The regular run is unaffected: