Giter Club home page Giter Club logo

Comments (19)

geekguy avatar geekguy commented on May 21, 2024 4

@zkochan : Interestingly it worked after I removed .git from the link. It's not happening any more (even with .git). I ll update if I am able to reproduce it.

Thanks.

from pnpm.

zkochan avatar zkochan commented on May 21, 2024 1

@dbkaplun are the packages you need not on GitHub? For GitHub-hosted packages pnpm install was implemented.

It is a pretty tough task to make it work in all the possible scenarios. npm's code for installing packages from git has almost 500 lines https://github.com/npm/npm/blob/9e03561547ec5830c5f61caa4e6221d4d3b813aa/lib/cache/add-remote-git.js

from pnpm.

rstacruz avatar rstacruz commented on May 21, 2024

Also, github modules should not be stored in the modulename@version format. they should have their own id's based on the unambiguous reference, eg:

node_modules/.store/git!!!github.com!rstacruz!scour.git#dff12e44b155613e000f1200f5069bfead7d459d

also keep note that some modules have a different github name than the module name. (eg, pnpm.js is in rstacruz/pnpm instead of rstacruz/pnpm.js), so that'd have to be accounted for, too:

node_modules/pnpm.js ->
node_modules/.store/git!!!github.com!rstacruz!pnpm.git#fc20f75c9e6e7e551dd00018f27eea1b17b3c3bf

from pnpm.

halhenke avatar halhenke commented on May 21, 2024

I might take a shot at this. Was taking a look at how npm does git repos earlier. Things seem to be progressing super quickly though so half expect to see a PR from someone by the time I get started 😃

from pnpm.

rstacruz avatar rstacruz commented on May 21, 2024

It's complicated but try!

On Monday, February 1, 2016, Hal Henke [email protected] wrote:

I might take a shot at this. Was taking a look at how npm does git repos
earlier. Things seem to be progressing super quickly though so half expect
to see a PR from someone by the time I get started [image: 😃]


Reply to this email directly or view it on GitHub
#20 (comment).

from pnpm.

halhenke avatar halhenke commented on May 21, 2024

Heh :-)

OK - I'm committed now. Will work on it over next couple of days.

from pnpm.

rstacruz avatar rstacruz commented on May 21, 2024

btw, have a look at lib/resolve/tarball.js to see how its handled for http://site.com/foo.tgz tarballs. it saves to the format of:

node_modules/.store/in-array-1.0.1#fc20f75c9e6e7e551dd00018f27

where the hex number is a hash of the URL it was fetched from. I'm guessing git urls should be handled similarly, ie:

node_modules/.store/halhenke-jade-react-loader#fc20f75c9e6e7e551dd00018f27

where the hex number is a hash of the git URL.

from pnpm.

halhenke avatar halhenke commented on May 21, 2024

OK. I was thinking of doing a bare/mirror clone - just getting the git repository first - and then doing one or more clones from that local version of the repository to get the actual code - mostly in case there were dependencies on different tags/commits from the same repository. However since there are no longer plans to link everything from a global node_modules folder this seems a lot less likely.

from pnpm.

defunctzombie avatar defunctzombie commented on May 21, 2024

Just wanted to add the lesser known syntax(es) also supported by npm:

npm install github:user/repo
npm install github:user/repo#30a8274b

from pnpm.

rstacruz avatar rstacruz commented on May 21, 2024

and bitbucket:a/b! btw, npm-package-arg will take care of these for you

from pnpm.

thangngoc89 avatar thangngoc89 commented on May 21, 2024

I suggest we resolve the commit hash via Github API and download tarball. This would be better, involving with git is complicated.

from pnpm.

rstacruz avatar rstacruz commented on May 21, 2024

Is it possible? Last I checked you can't download a tar ball of a commit Id

On Tuesday, February 23, 2016, Khoa Nguyen [email protected] wrote:

I suggest we resolve the commit hash via Github API and download tarball.
This would be better, involving with git is complicated.


Reply to this email directly or view it on GitHub
#20 (comment).

from pnpm.

thangngoc89 avatar thangngoc89 commented on May 21, 2024

Your master branch
https://github.com/rstacruz/pnpm/archive/21e71acf598bdf78eaf9d5915e0f5d2fceb8acb8.tar.gz

We can replace commit hash with brach name

from pnpm.

halhenke avatar halhenke commented on May 21, 2024

Hey, sorry for the lateness in getting back to you on this - had to take a bit of a break on other stuff.

I was reluctant to do anything that relied on GitHub's API because that wouldnt cover other valid npm cases that involve non-Github git repos. Tarballs would be nice because they fit into the existing design which, from memory. is based around streaming files whereas, from what I've seen, git clone involves a fair bit of handshake logic etc that would suck to reproduce (and I haven't seen in any library).

So where this is at, at the moment was using the shell version of git and trying to extract progress information (doable but a bit ugly) and hopefully slot it into the rest of the workflow as seamlessly as I could. Not sure if that sounds sensible or not.

At any rate will try to finish this week though am happy to hand over to anyone who might have a better handle on the issues.

from pnpm.

dbkaplun avatar dbkaplun commented on May 21, 2024

Just ran into this issue. It seems I can't use pnpm to install these dependencies so I think this is a blocker. Should pass through to npm, at least until native git support is added.

from pnpm.

zkochan avatar zkochan commented on May 21, 2024

@dbkaplun you can try to install the latest pnpm. Native GIT support was added in v0.35.0

(NOTE: currently your package has to be in the root of the GIT repo that you require)

from pnpm.

geekguy avatar geekguy commented on May 21, 2024

@zkochan If we point to some to some github commit hash, pnpm doesn't work properly.

Example:

{
"somepackage": "git://github.com/geekguy/somepackage.git#133a02",
}

When we do pnpm install, it throws following error.

 ! failed to clone repository from git+ssh://git://github.com/geekguy/somepackage.git
        Cloning into '/tmp/deploy/test/node_modules/.store/git+ssh:..
warning: Could not find remote branch 133a02 to clone.
fatal: Remote branch 133a02 not found in upstream origin

Is there any workaround for this?

from pnpm.

zkochan avatar zkochan commented on May 21, 2024

@geekguy are you sure the commit hash that you used exists?

I've tried with "applyq": "git://github.com/zkochan/applyq#ff931e" and it worked fine

from pnpm.

loeffel-io avatar loeffel-io commented on May 21, 2024
"termynal": "git://github.com/ines/termynal#9b30189",

isn't working

from pnpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.