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

fix(core): support migrating resolutions from JFrog Artifactory registries regardless of the domain #4702

Merged
merged 4 commits into from
Aug 4, 2022

Conversation

sargunv
Copy link
Contributor

@sargunv sargunv commented Aug 2, 2022

What's the problem this PR addresses?

It's common for companies to host their packages at an Artifactory deployment on their own domain, like packages.mycompany.com. This has the same URL pattern as any other JFrog repository, but on a non-JFrog domain.

Currently, migrating a Yarn v1 project that uses such packages fails due to the package URLs in the lockfile not being recognized, blocking easy migration at my company.

Example URL:

https://packages.example.com/artifactory/api/npm/npm/@convoy/code-style/-/@convoy/code-style-19.0.0.tgz#b89d83150ba80ec03dffb6c025ceeb00a2443697

We currently work around this with sed -i 's|/-/@convoy/|/-/|' yarn.lock to essentially fake the standard URL format right before migration.

...

How did you fix it?

Update the regex for the JFrog URL format to allow arbitrary domain names.

Updated the relevant test case with such a URL.

...

Checklist

  • I have set the packages that need to be released for my changes to be effective.

(I think I set this correctly, reviewers please verify. I'm not 100% sure if any other packages need to be released vs declined)

  • I will check that all automated PR checks pass before the PR gets reviewed.

@sargunv sargunv requested a review from arcanis as a code owner August 2, 2022 22:40
@sargunv sargunv changed the title Update JFrog regex to support JFrog Artifactory deployments at other domains Support v1 -> Berry migrations for lockfiles that refer to JFrog Artifactory deployments at non-JFrog domains Aug 2, 2022
@merceyz merceyz changed the title Support v1 -> Berry migrations for lockfiles that refer to JFrog Artifactory deployments at non-JFrog domains fix(core): support migrating resolutions from JFrog Artifactory registries regardless of the domain Aug 2, 2022
@arcanis arcanis merged commit 5505ce5 into yarnpkg:master Aug 4, 2022
@sargunv sargunv deleted the sargunv-08-02-artifactory branch August 4, 2022 21:09
@sargunv
Copy link
Contributor Author

sargunv commented Aug 5, 2022

Thanks for merging!

merceyz added a commit that referenced this pull request Aug 19, 2022
…tries regardless of the domain (#4702)

* artifactory

* release workflow

* PR url comment

* chore: unmark `plugin-essentials` for release

Co-authored-by: merceyz <[email protected]>
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