-
Notifications
You must be signed in to change notification settings - Fork 52
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
PackageToWrapperCacheResolver refactor and resolver tests #1586
Merged
Conversation
This file contains 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
… WrapperCacheResolver
This reverts commit c5138ab.
nerfZael
changed the title
PackageToWrapperCacheResolver refactor and tests
PackageToWrapperCacheResolver refactor and resolver tests
Feb 27, 2023
dOrgJelli
force-pushed
the
origin-dev
branch
from
February 28, 2023 20:15
c5138ab
to
9385f88
Compare
pileks
suggested changes
Mar 7, 2023
dOrgJelli
previously approved these changes
Mar 8, 2023
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.
Very minor NITs, everything looks great 👏
packages/js/uri-resolvers/src/helpers/PackageToWrapperResolver.ts
Outdated
Show resolved
Hide resolved
packages/js/uri-resolvers/src/helpers/PackageToWrapperResolver.ts
Outdated
Show resolved
Hide resolved
packages/js/uri-resolvers/src/helpers/PackageToWrapperResolver.ts
Outdated
Show resolved
Hide resolved
packages/js/uri-resolvers/src/__tests__/wrapper-resolver/histories/can-resolve-a-wrapper.json
Show resolved
Hide resolved
dOrgJelli
previously approved these changes
Mar 16, 2023
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.
This PR separates the PackageToWrapperCacheResolver into two resolvers:
This accomplishes the separation of concerns between turning packages into wrappers and actually caching the wrappers. With this PR the resolvers can be used separately and combined with other resolvers.
In addition to the refactor, this PR removes all except a couple of tests from the client URI resolution set.
The remaining tests are:
sanity
(which serves to confirm that the default PolywrapClient configuration resolves URIs as expected)can resolve uri with custom resolver
(which serves to confirm that the default PolywrapClient configuration works with custom resolvers)Other tests have been either removed, since they're no longer applicable (such as
can resolve uri with custom resolver at invoke-time
) or moved into unit tests in theuri-resolvers-js
anduri-resolver-extensions-js
repo.Additional unit tests have also been added to those repos.
The tests also exposed an issue with the WrapperCacheResolver (as well as the previous PackageToWrapperCacheResolver) not caching the final resolved URI, since it only cached the resolution path which does not contain it.
This issue has also been fixed in this PR.