Skip to content

Conversation

spanishpear
Copy link
Contributor

@spanishpear spanishpear commented Sep 7, 2025

What's the problem this PR addresses?

This PR extends the tarball resolver started in #6525 and adds the tests requested!

Fixes #5156 #5890 (?)

How did you fix it?

1. New NpmTarballResolver

Added packages/plugin-npm/sources/NpmTarballResolver.ts - a resolver that specifically handles npm packages with __archiveUrl parameters. Extended @BasixKOR's work from #6525 with tests

e.g. to handle

"unconventional-tarball": "npm:1.0.0::__archiveUrl=https://registry.example.org/unconventional-tarball/tralala/unconventional-tarball-1.0.0.tgz"

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@spanishpear spanishpear force-pushed the fix/spanishpear/4711-patch-commmit-approach branch 4 times, most recently from 82988fc to c02d930 Compare September 7, 2025 14:04
@spanishpear spanishpear changed the title fix(plugin-npm): add resolver for converting locators with __archiveUrl + generate correct patch urls with __archiveUrl [WIP] fix(plugin-npm): add resolver for converting locators with __archiveUrl + generate correct patch urls with __archiveUrl Sep 7, 2025
@BasixKOR
Copy link
Contributor

BasixKOR commented Sep 8, 2025

Thanks for adding tests to the PR! I'll close my previous PR as this PR solves the issues.

@spanishpear
Copy link
Contributor Author

@BasixKOR No worries! I think I tried to solve too much with this PR by also fixing patch-commit to generate valid selectors as well... big can of worms. I might try remove that second "fix" and just keep your original PR with the tests for now :D

@spanishpear spanishpear force-pushed the fix/spanishpear/4711-patch-commmit-approach branch from 2466d75 to 722e89c Compare September 28, 2025 06:36
@spanishpear spanishpear changed the title [WIP] fix(plugin-npm): add resolver for converting locators with __archiveUrl + generate correct patch urls with __archiveUrl [WIP] fix(plugin-npm): add resolver for converting locators with __archiveUrl Sep 28, 2025
@spanishpear
Copy link
Contributor Author

I've updated the PR to just add the tests, rather than try to fix the patch-package generation issue, as that's more complex.

@spanishpear spanishpear force-pushed the fix/spanishpear/4711-patch-commmit-approach branch from 722e89c to 70e7f70 Compare September 28, 2025 06:59
@spanishpear spanishpear force-pushed the fix/spanishpear/4711-patch-commmit-approach branch from 70e7f70 to 72906d6 Compare September 28, 2025 07:02
@spanishpear spanishpear changed the title [WIP] fix(plugin-npm): add resolver for converting locators with __archiveUrl fix(plugin-npm): add resolver for converting locators with __archiveUrl Sep 28, 2025
@spanishpear spanishpear marked this pull request as ready for review September 28, 2025 07:17
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is entirely from the original PR - this PR only adds tests

@spanishpear
Copy link
Contributor Author

I can't request reviewers, so just an FYI ping for @arcanis - as you had asked for tests in the previous PR #6525

Thanks! ❤️

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.

[Bug?]: <package> isn't supported by any available resolver - when migrating from yarn@1
2 participants