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: allow tags in npm:x-deps #194

Merged
merged 8 commits into from
Jan 14, 2024
Merged

Conversation

KATT
Copy link
Contributor

@KATT KATT commented Jan 12, 2024

Closes #193

Copy link

changeset-bot bot commented Jan 12, 2024

🦋 Changeset detected

Latest commit: 958f750

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@manypkg/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@KATT KATT marked this pull request as ready for review January 12, 2024 10:37
Comment on lines 28 to 29
!semver.satisfies(dependencyWorkspace.packageJson.version, range) &&
!range.startsWith("npm:")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
!semver.satisfies(dependencyWorkspace.packageJson.version, range) &&
!range.startsWith("npm:")
!range.startsWith("npm:") &&
!semver.satisfies(dependencyWorkspace.packageJson.version, range)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I know about the existence of npm: ranges and used them a couple of times... but damn, I can't find any docs that would mention them 😅

In general, we likely should relax this check more and always allow things like file:, link:, etc. We don't necessarily have to do it here but maybe a simple regex that would allow any protocol would do the job here? cc @emmatown do you have any opinions about this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did the change you requested here

Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant that I can't find this in the npm/yarn/pnpm docs. pnpm has a mention of this in one of examples but it doesn't even explain what it does 😅

Copy link
Member

Choose a reason for hiding this comment

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

In general, we likely should relax this check more and always allow things like file:, link:, etc. We don't necessarily have to do it here but maybe a simple regex that would allow any protocol would do the job here?

This sounds good to me

KATT and others added 2 commits January 12, 2024 13:42
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
@emmatown emmatown merged commit 56a64c5 into Thinkmill:main Jan 14, 2024
2 checks passed
@github-actions github-actions bot mentioned this pull request Jan 14, 2024
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: npm:x@y doesn't work for tags
3 participants