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

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

@edi9999
Copy link
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
Copy link
Contributor

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!

edi9999 added a commit to edi9999/meteor that referenced this issue Oct 18, 2017
@bmanturner
Copy link

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
Copy link
Contributor

@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.

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

No branches or pull requests

3 participants