Skip to content

Conversation

@mcenkar
Copy link

@mcenkar mcenkar commented Jan 23, 2023

What's the problem this PR addresses?
When migrating from yarn@1 to yarn@3 some of scoped packages hosted in private repository weren't migrated properly.

Fixes #5156 (bug description in issue)

...

How did you fix it?
This PR removes __archiveUrl for them which solves problem.

...

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.

When migrating from yarn@1 to yarn@3 some of scoped packages hosted in private
repository weren't migrated properly.

This PR removes __archiveUrl for them which solves problem.
@mcenkar mcenkar marked this pull request as ready for review January 23, 2023 08:13
@merceyz merceyz changed the title fixed #5156 - <package> isn't supported by any available resolver fix(core): improve LegacyMigrationResolver pattern for artifactory registries Jan 23, 2023
{
version: `1.0.0`,
resolved: `https://company.jfrog.io/company/api/npm/registry-name/@scope/package-name/-/@scope/package-name-1.0.0.tgz#eeeec1e4e8850bed0468f938292b06cda793bf34`,
expected: `npm:1.0.0::__archiveUrl=https%3A%2F%2Fcompany.jfrog.io%2Fcompany%2Fapi%2Fnpm%2Fregistry-name%2F%40scope%2Fpackage-name%2F-%2F%40scope%2Fpackage-name-1.0.0.tgz%23`,
Copy link
Member

Choose a reason for hiding this comment

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

That doesn't seem correct - we kept __archiveUrl because iirc Artifactory didn't support the "standard url patterns" (ie you can see here the tarball is inside https://<registry>/@scope/package-name/-/@scope/package-name-1.0.0.tgz, instead of https://<registry>/@scope/package-name/-/package-name-1.0.0.tgz).

Do they now support the standard url?

Copy link
Author

Choose a reason for hiding this comment

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

I will need more info how to test this :) But for me this was problem with locally published scoped packages that were:
@scope/package-name/-/@scope/package-name and not
@scope/package-name/-/package-name

Currently on yarn@1 in yarn.lock we have:
resolved "https://artifactory.corp/artifactory/api/npm/virtual-node/@achrinza/node-ipc/-/node-ipc-9.2.6.tgz#75c89e95fe38ff9e3dd33a0d2681dc28f1c31f33"

for package from public and for internal:

resolved "https://artifactory.corp/artifactory/api/npm/virtual-node/@corp/package-name/-/@corp/package-name-48.0.14.tgz#708e2351f00fb5415c90fadc8e685d743be06595"

Other fix for me would be also to publish it under @scope/package-name/-/package-name but I'm not sure why npm does repeat @scope.

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