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

Doesn't handle git dependencies very well #13

Closed
fivetanley opened this issue Jan 4, 2016 · 8 comments
Closed

Doesn't handle git dependencies very well #13

fivetanley opened this issue Jan 4, 2016 · 8 comments

Comments

@fivetanley
Copy link

In npm itself, a git specified version can satisfy a dependency if the checked out repository has a package.json with a version that matches the dependency's version.

For example, I would expect the following to work:

// app's package.json
{
  "name": "myapp",
  "dependencies": {
    "ember-pouch": "^1.x",
    "ember-data": "git+https://github.com/emberjs/ember-data#release/2.4.0"
  }
}
// ember-pouch's version checking code
var VersionChecker = require('ember-cli-version-checker');
var checker = new VersionChecker(this)
checker.for('ember-data', 'npm').assertAbove('2.4.0'); // should not throw exception
// ember-data's package.json from https://github.com/emberjs/ember-data#release/2.4.0
{
  "name": "ember-data",
  "version": "2.4.0"
}

I'm happy to implement a pull request for this feature if you agree this feature should be supported.

@rwjblue
Copy link
Member

rwjblue commented Jan 4, 2016

@fivetanley - Ya, I'm happy to follow NPM's lead here. If a dep is specified with a non-semver range (like git+https in the example) then checking the node_modules/<package-name>/package.json's version value seems like the right choice.

@rwjblue
Copy link
Member

rwjblue commented Jan 4, 2016

Would love a PR if you have time, I'm unsure if/when I'll have time to tackle myself.

@jamesarosen
Copy link

Similarly, there's no way to know what version of ember beta or release or canary is.

@Turbo87
Copy link
Member

Turbo87 commented Dec 5, 2016

@rwjblue aren't we doing this already? is this issue obsolete?

@rwjblue
Copy link
Member

rwjblue commented Dec 5, 2016

I haven't been able to identify exactly what is the issue here, I believe that in general we do the right thing?

@Turbo87
Copy link
Member

Turbo87 commented Dec 5, 2016

well looking at https://github.com/ember-cli/ember-cli-version-checker/blob/master/index.js#L63-L74 we seem to already read the version from the package.json file inside the dependency, so I'm not sure if this issue is still relevant.

@gokatz
Copy link
Member

gokatz commented Dec 27, 2017

@rwjblue, We inject ember source file through ember-cli-build file by including in vendor folder. This would be the case if the ember version is below 2.12 (before ember-source). In that case, dependency checker will fail to fetch the version. Any recommendation for this?

Also, Why can't we use Ember's Ember.VERSION ?

@rwjblue
Copy link
Member

rwjblue commented Jan 9, 2019

@Turbo87 - you are correct, this issue is already resolved

@rwjblue rwjblue closed this as completed Jan 9, 2019
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

5 participants