Skip to content

[FEATURE] Allow adding Git branch dependencies in a subdirectory #528

Closed
npm/pacote
#442

Description

@TomasHubelbauer

What / Why

Basically, I think it should be possible to do:

npm i https://github.com/user/repo/packages/package#master

Right now, it is only possible to install packages from Git which are at the repository root directory:

npm i https://github.com/user/repo#master

A lot of projects, including projects from big monorepo users (like Microsoft, Google) use a repo format where different packages have their own folders. But it is also common for a package to be at a subdirectory even though it is a single package in the repository, some people just like to organize their repositories so there's no "code" files at the root level (like package.json) and put it all to src or similar.

There was a discussion about this in npm/npm#2974, which was locked, because it had a lot of noise going on. As far as I can see, though, no one from NPM contributed to the discussion among the noise, so as far as I can tell, there is no official word on whether this will be supported. Since the issue was effectively killed without any response from the maintainers, I am reopening it here for renewed discussed, this time hopefully between the community and the maintainers.

When

???
On npm install, the examples displayed in the template for this section are really odd.

Where

NPM

How

Current Behavior

Is not implemented.

Expected Behavior

Is implemented.

Who

I don't care.

References

None.


Issue templates sure are useful, aren't they.

Activity

  1. prmichaelsen commented on Feb 27, 2020

    @prmichaelsen

    It appears @sspiff implemented the feature (still requires tests) and is pending RFC process. I'm interested to hear if any progress has been made.

  2. added
    Enhancement
    on Oct 30, 2020
  3. wottpal commented on Jan 28, 2021

    @wottpal

    This discussion (npm/npm#2974) had more than 100 👍's. I wonder what those people use nowadays when they are working with big monorepos :/

  4. darcyclarke commented on Jun 2, 2021

    @darcyclarke
    Contributor

    npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

    If your bug is preproducible on v7, please re-file this issue using our new issue template.

    If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

    Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions