-
-
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
chore: migrate jest-resolve-dependencies to TypeScript #7922
Conversation
packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.ts
Outdated
Show resolved
Hide resolved
packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.ts
Outdated
Show resolved
Hide resolved
Built diff: diff --git a/packages/jest-resolve-dependencies/build/index.js b/packages/jest-resolve-dependencies/build/index.js
index 86a547274..a402abe28 100644
--- a/packages/jest-resolve-dependencies/build/index.js
+++ b/packages/jest-resolve-dependencies/build/index.js
@@ -15,8 +15,6 @@ function _jestSnapshot() {
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- *
- *
*/
/**
@@ -76,7 +74,7 @@ class DependencyResolver {
moduleMap.reduce((acc, module) => {
if (
visitedModules.has(module.file) ||
- !module.dependencies.some(dep => dep && changed.has(dep))
+ !module.dependencies.some(dep => changed.has(dep))
) {
return acc;
}
@@ -97,6 +95,7 @@ class DependencyResolver {
return result.concat(
Array.from(related).map(file => ({
+ dependencies: [],
file
}))
); |
Codecov Report
@@ Coverage Diff @@
## master #7922 +/- ##
==========================================
- Coverage 65.37% 65.32% -0.05%
==========================================
Files 255 255
Lines 9940 9938 -2
Branches 1030 1039 +9
==========================================
- Hits 6498 6492 -6
- Misses 3194 3195 +1
- Partials 248 251 +3
Continue to review full report at Codecov.
|
packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.ts
Outdated
Show resolved
Hide resolved
0c16175
to
b60516f
Compare
packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.ts
Show resolved
Hide resolved
packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just a couple of nits and I think this is good to go :)
}); | ||
return Runtime.createContext(config, {maxWorkers, watchman: false}).then( | ||
(hasteMap: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could type as HasteMap
, but doesn't matter in a test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's what I meant in #7922 (comment), would prefer to do it in another PR though since I expect it to become rather big
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good!
95553b0
to
bc96e8b
Compare
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
migrate
jest-resolve-dependencies
to TypeScriptTest plan