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

It should be possible to do Npm.depends with a url ({"module": "https://......tar.gz"}) #9236

Closed
edi9999 opened this Issue Oct 16, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@edi9999
Contributor

edi9999 commented Oct 16, 2017

meteor version : 1.5.2.2

Create a package with following package.js file :

Npm.depends({
	async: "https://github.com/caolan/async/archive/v2.3.0.tar.gz",
});

Actual behavior :

The code is failing with :

package.js:1:-26: must declare valid version of dependency: async@https://github.com/caolan/async/archive/v2.3.0.tar.gz

Expected behavior.

It should install the module

npm install https://github.com/caolan/async/archive/v2.3.0.tar.gz works as expected.

I have found the source of the problem and will do a small Merge request.

@hwillson

This comment has been minimized.

Member

hwillson commented Oct 17, 2017

Thanks for reporting this @edi9999. I wouldn't necessarily call this a bug; Npm.depends was designed to meet NPM's original dependency requirements, which at the time didn't include supporting any type of http/https URL. Adjusting Npm.depends to line up with https://docs.npmjs.com/files/package.json#urls-as-dependencies is more of a feature request. That being said, since you're already submitted a PR to address this, we'll leave this issue open here (instead of migrating it to http://github.com/meteor/meteor-feature-requests). Thanks for your work on this!

@bmanturner

This comment has been minimized.

bmanturner commented Oct 24, 2017

I actually do this already... The following works for me.

Npm.depends({
  'ionic-sdk': 'https://github.com/driftyco/ionic-v1/tarball/298ad4b6451defcfbd3cd34da1533826d5731c42',
});
@hwillson

This comment has been minimized.

Member

hwillson commented Oct 24, 2017

@bmanturner That works, but the submitted PR (#9237) is interested in opening things up further. The current implementation supports tarball links in the format you mentioned, with a commit hash. The PR opens this up to any http/https based link.

@benjamn benjamn closed this in 16b74e5 Nov 22, 2017

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