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

Added proposal for package version link#[version](comment) syntax #121

Closed
wants to merge 3 commits into from
Closed

Added proposal for package version link#[version](comment) syntax #121

wants to merge 3 commits into from

Conversation

kael-shipman
Copy link

@kael-shipman kael-shipman commented Mar 28, 2020

What / Why

Submitting an RFC through the standard process outlined in the readme. All details explained in RFC document.

Probably obvious, but much easier to view in markdown format

Summary

Allow package versions like link#[semver](comment) (comment is optional) to indicate that npm should npm link the given package AND that the version in package.json of the linked repo must fulfill the given semver. If the package is not found among existing npm links, or if the linked package doesn't match the given semver, npm should throw an exception and output the comment. >
For example:

{
  "dependencies": {
    "my-dep": "link#^3.0.0",
    "nother-dep": "link#^5.15.0(clone github.com:cool-producer/nother-dep.git and check out branch great-improvements)"
  }
}

References

  • n/a

@kael-shipman
Copy link
Author

@ljharb did I miss something in the process? It looks like someone submitted a PR above mine that got immediate attention. Not sure how to kick start this conversation :).

@ljharb
Copy link
Contributor

ljharb commented Apr 8, 2020

@kael-shipman i'm not sure about that; i'm not a maintainer here, but in my experience in open source in general, PRs aren't addressed in the order they come in. There could be any number of reasons why npm folks haven't had the time to respond to this one.

@kael-shipman
Copy link
Author

@ljharb Oh, my bad, I saw you active in the other PRs and assumed you were one of the people in charge of leading the conversations. Sorry bout that! I'll continue to wait around.

@ruyadorno
Copy link
Contributor

Putting this back into the agenda since now that npm7 is out, powered by @npmcli/arborist and with support to workspaces and more, we might want to revisit the idea and maybe come out of the discussion with some sort of action items and/or decision?

@ruyadorno
Copy link
Contributor

ruyadorno commented Oct 21, 2020

Feedback from the last OpenRFC call:

  • Adding new syntax to package.json is something we rather avoid since it creates all sorts of incompatibility problems among different package managers and also even among legacy versions of npm
  • workspaces are now supported in npm7! They are a possible very good solution to the problems you described in the Motivation section of the RFC, since they will symlink things into place (just like npm link) but also enforce version conformance.
  • In case workspaces aren't enough, a possible better solution to the set of problems that might better align with the goal of ecosystem compatibility is to implement new features in the form of a subcommand rather than new package.json syntax.
  • Maybe we could add a subcommand/workflow in which users could npm eject <pkg> and have it be automatically copied from the node_modules into ./<pkg> and automatically added to your package.json workspaces so that we could better cater to the hacking dependencies from your working tree scenario (which sounds more like a completely diff RFC)

@ruyadorno
Copy link
Contributor

Thanks @kael-shipman for bringing this one up 😊 we'll probably continue the conversation next week in the next OpenRFC call.

@kael-shipman
Copy link
Author

I so appreciate you all following up on this! It's been very hard for me to get out from under my work to join these meetings, especially since they coincide with a standing meeting that I already have in place every other Wednesday. I'm used to people taking an attitude of "if you can't make the meetings, you don't get a say," and it's really refreshing to see you all making such an effort to keep me in the loop, so thank you for that :).

As for your comments it does sound like there's quite a bit of momentum behind workspaces as a solution to many of the problems I've presented. I haven't felt very eager about the concept in the past, but I recognize that this may just be the way the community has gone, and as part of the community I think it makes sense to lean into that decision for now and try to improve what's there, rather than continue to advocate for potentially conflicting and certainly at least overlapping functionality.

Given that, I'm fine with yall closing this PR if you're satisfied that it has been sufficiently discussed.

Thanks again for the consideration!

@ruyadorno ruyadorno removed the Agenda will be discussed at the Open RFC call label Oct 28, 2020
@settings settings bot removed the Proposal label Sep 21, 2021
@kael-shipman kael-shipman closed this by deleting the head repository Dec 29, 2023
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.

5 participants