Closed Ryan-Florida closed 3 years ago
Merging #161 (b32db99) into develop (155f3f5) will increase coverage by
0.14%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## develop #161 +/- ##
===========================================
+ Coverage 92.83% 92.97% +0.14%
===========================================
Files 22 22
Lines 586 598 +12
Branches 140 141 +1
===========================================
+ Hits 544 556 +12
Misses 42 42
Impacted Files | Coverage Δ | |
---|---|---|
src/index/generateTrees/toFractalTree.ts | 86.66% <100.00%> (+1.72%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 155f3f5...b32db99. Read the comment docs.
Before submitting the PR, please make sure you do the following
If this PR is related to an issue, so please reference it in your PR. This PR is related to Issue 137
Please describe clearly what this PR solves in this message body. This PR solves a problem pertaining to dependencies within shared dependencies. If we consider what is implied by the file structure provided in the issue posting ( reposted here for reference:
), then we can quickly replicate the issue using the new
shared-with-dependencies
fixture. Using theshared-with-dependencies
fixture, we get the following results:--avoid-single-file
flag:--avoid-single-file
flag:Observe that, in both cases, the
Area/
andCheckboxWithLabel/
directories remain within theSomeOtherResource
directory, whereas we would expect them to be undershared/
with their respective.js
counterparts.Note for the observant: I know in the original posting they stayed within different folders but I introduced the
SomeOtherResource
directory to share the dependencies with since one was not necessarily implied in the original posting but this is the same problem just manifesting in a different way.The underlying problem: When the method to collect shared resources runs, the paths of the sub-dependencies are not updated with the parent resource.
The solution: Recursively update sub-dependency paths.
shared-with-dependencies
test fixture and updated existing tests (namelydetect-lonely-files.test.ts
,build-graph.test.ts
, andto-fractal-tree.test.ts
to account for it).detect-lonely-files.test.ts
andto-fractal-tree.test.ts
will fail with the new fixture. The work included in this branch will cause the tests to pass.