Skip to content
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
merged 48 commits into from
Mar 16, 2023

Conversation

nerfZael
Copy link
Contributor

@nerfZael nerfZael commented Feb 27, 2023

This PR separates the PackageToWrapperCacheResolver into two resolvers:

  • PackageToWrapperResolver
  • WrapperCacheResolver
    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 the uri-resolvers-js and uri-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.

@nerfZael nerfZael changed the title PackageToWrapperCacheResolver refactor and tests PackageToWrapperCacheResolver refactor and resolver tests Feb 27, 2023
dOrgJelli
dOrgJelli previously approved these changes Mar 8, 2023
Copy link
Contributor

@dOrgJelli dOrgJelli left a 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 👏

dOrgJelli
dOrgJelli previously approved these changes Mar 16, 2023
@nerfZael nerfZael requested a review from pileks March 16, 2023 11:22
@nerfZael nerfZael merged commit 155f1d7 into origin-dev Mar 16, 2023
@dOrgJelli dOrgJelli deleted the nefzael-resolver-and-tests-refactor branch April 10, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants