Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Don't mark peerDependencies as extraneous. Closes #5. #6

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Member

domenic commented Nov 6, 2012

While I was waiting for my laundry to finish drying I went ahead and implemented the naive strategy mentioned in #5.

Member

domenic commented Nov 14, 2012

How's this look, @isaacs?

@isaacs isaacs commented on the diff Nov 25, 2012

read-installed.js
@@ -293,6 +293,14 @@ function findUnmet (obj) {
}
})
+
+ var peerDeps = obj.peerDependencies = obj.peerDependencies || {}
+ Object.keys(peerDeps).forEach(function (d) {
+ var dependency = obj.parent && obj.parent.dependencies &&
+ obj.parent.dependencies[d]
+ dependency.extraneous = false
@isaacs

isaacs Nov 25, 2012

Owner

It should probably check to make sure that the peerDep requirement will actually be met. Something like:

if (!semver.satisfies(dependency.version, peerDeps[d])) {
  // set some flag that it's invalid, but probably need a new flag, like `peerValid` so
  // since the `valid` flag already is used for regular dependency validity.
}
@domenic

domenic Dec 3, 2012

Member

Done in a new commit.

@domenic

domenic Dec 3, 2012

Member

Looking at npm itself, it seems that the existing invalid flag is only used in ls to print out "INVALID". Is that correct?

@domenic domenic referenced this pull request in npm/npm Nov 29, 2012

Closed

peerDependencies (plugins) #1400

Member

domenic commented Dec 7, 2012

@isaacs ping

@isaacs Any update on this?

Owner

isaacs commented Dec 15, 2012

Sorry for the delay. Landed in 0.0.4, updated in npm master. Thanks!

@isaacs isaacs closed this Dec 15, 2012

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