fix: don't resolve filtered files #428
Merged
Merged
Conversation
- if they're `exclude`d / not `include`d, then we shouldn't be processing them - we're already not transforming them, so this just applies the same exclusion to resolving - this is _partly_ a regression from b0e3922, as that removed the `allImportedFiles` Set that previously filtered out files not in the `tsconfig` `include` - but that _itself_ was a regression that was removed -- files that didn't pass `filter` should have _never_ been resolved - basically, the `allImportedFiles` regression was covering up this long-standing bug - also move `.d.ts` check to above the `filter` check - we shouldn't be adding declarations to the `cache`, in particular as we don't process declarations, so they'll never be marked as dirty - having this check above the `filter` should be slighltly more efficient as well (as would not having these files in the cache graph) types: be more specific with `filter`'s type - no need for this to be `any`
- patch bump with the past few fixes - bump internal rpt2 version to 0.34.0
Owner
Collaborator
Author
|
updated the release notes 👍 |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Early return after
filterin theresolveIdhook, same as we do intransformpackage.jsonbrowserfield has no effect (bundling Axios) #427Details
if they're
excluded / notincluded, then we shouldn't be processing themallImportedFilesSetthat previously filtered out files not in thetsconfigincludefiltershould have never been resolvedallImportedFilesregression was covering up this long-standing bugalso move
.d.tscheck to above thefiltercheckcache, in particular as we don't process declarations, so they'll never be marked as dirtyfiltershould be slightly more efficient as well (as would not having these files in the cache graph)types: be more specific with
filter's typeanyReview Notes
I also did a
buildand version bump in this PR as folks have been waiting for a patch for a few weeks, c.f. #422 (comment) (I also recommended a patch in that PR's opening comment)