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

feat: support non-semver versions in the yarn packager, for example 'github:' references #478

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

flipscholtz
Copy link

@flipscholtz flipscholtz commented Jul 26, 2023

feat: support non-semver versions in the yarn packager, for example 'github:' references, when their parent package is marked 'external'.

Issue here

  • Don't assume the format <name>@<semver> . Use a regex that also returns the correct package name for this format:
@org/package@git+ssh://[email protected]/org/package#tag

(The last @ in this case is part of the URL and does not denote the boundary between package name and version).

  • If the version is not valid semver, optimistically include the package in the yarn packager results, as it may be a github reference for e.g. where semver doesn't always apply.

I verified this fixes the problem in my minimal test repo here, but I'm not sure if this will have unintended side effects. Needs further testing.

@flipscholtz flipscholtz changed the title feat: support non-semver versions in the yarn packager, for example 'github:' references WIP: feat: support non-semver versions in the yarn packager, for example 'github:' references Jul 26, 2023
@flipscholtz flipscholtz marked this pull request as draft July 26, 2023 13:07
@flipscholtz flipscholtz marked this pull request as ready for review July 26, 2023 13:28
@flipscholtz flipscholtz changed the title WIP: feat: support non-semver versions in the yarn packager, for example 'github:' references feat: support non-semver versions in the yarn packager, for example 'github:' references Jul 26, 2023
@floydspace
Copy link
Owner

Hi @flipscholtz . I run the tests for the feature, and they failed, could have a look
and is it applyed only for yarn? should it also be implemented for npm and pnpm?

@flipscholtz
Copy link
Author

Hi @flipscholtz . I run the tests for the feature, and they failed, could have a look and is it applyed only for yarn? should it also be implemented for npm and pnpm?

Hi @floydspace
I pushed a fix for the tests, they are passing for me now.
I am looking at npm and pnpm, will update asap.

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.

None yet

2 participants