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

Add --skip-git-deps to David, fixes #58 #59

Closed
wants to merge 2 commits into from
Closed

Add --skip-git-deps to David, fixes #58 #59

wants to merge 2 commits into from

Conversation

FGRibreau
Copy link

No description provided.

@FGRibreau
Copy link
Author

@alanshaw tests work locally :

npm test

> david@5.0.0 test /www/labs/david
> jshint . && nodeunit test


cli
npm
WARN package.json test@0.0.0 No description
npm WARN package.json test@0.0.0 No repository field.
npm WARN package.json test@0.0.0 No README data
rimraf@2.2.8 node_modules/rimraf

async@0.9.0 node_modules/async
request@2.48.0 node_modules/request
├── caseless@0.7.0
├── json-stringify-safe@5.0.0
├── forever-agent@0.5.2
├── aws-sign2@0.5.0
├── stringstream@0.0.4
├── oauth-sign@0.5.0
├── tunnel-agent@0.4.0
├── node-uuid@1.4.1
├── qs@2.3.3
├── mime-types@1.0.2
├── combined-stream@0.0.7 (delayed-stream@0.0.5)
├── form-data@0.1.4 (mime@1.2.11)
├── http-signature@0.10.0 (assert-plus@0.1.2, asn1@0.1.11, ctype@0.5.2)
├── tough-cookie@0.12.1 (punycode@1.3.2)
├── bl@0.9.3 (readable-stream@1.0.33)
└── hawk@1.1.1 (cryptiles@0.2.2, sntp@0.2.4, boom@0.4.2, hoek@0.9.1)

mocha@2.0.1 node_modules/mocha
├── escape-string-regexp@1.0.2
├── diff@1.0.8
├── growl@1.8.1
├── commander@2.3.0
├── debug@2.0.0 (ms@0.6.2)
├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
├── mkdirp@0.5.0 (minimist@0.0.8)
└── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)
through@2.3.6 node_modules/through
✔ Test update and save dependencies, devDependencies & optionalDependencies
npm
WARN package.json
test@0.0.0 No description
npm WARN
package.json test@0.0.0 No repository field.
npm
WARN package.json test@0.0.0 No README data
async@0.9.0 node_modules/async
request@2.48.0 node_modules/request
├── caseless@0.7.0
├── json-stringify-safe@5.0.0
├── forever-agent@0.5.2
├── aws-sign2@0.5.0
├── stringstream@0.0.4
├── oauth-sign@0.5.0
├── tunnel-agent@0.4.0
├── node-uuid@1.4.1
├── qs@2.3.3
├── mime-types@1.0.2
├── form-data@0.1.4 (mime@1.2.11)
├── tough-cookie@0.12.1 (punycode@1.3.2)
├── hawk@1.1.1 (cryptiles@0.2.2, sntp@0.2.4, boom@0.4.2, hoek@0.9.1)
├── bl@0.9.3 (readable-stream@1.0.33)
├── http-signature@0.10.0 (assert-plus@0.1.2, asn1@0.1.11, ctype@0.5.2)
└── combined-stream@0.0.7 (delayed-stream@0.0.5)
✔ Test update & save only async and request dependencies

Outdated Dependencies

async (package: 0.1.x, latest: 0.9.0)

npm install --save async@0.9.0
Unregistered Dependencies
unregistered-- (Error: 404 Not Found: unregistered--)

Outdated Dev Dependencies
request (package: ~0.1.9, latest: 2.48.0)
npm install --save-dev request@2.48.0

Unregistered Dev Dependencies
unregistereddev-- (Error: 404 Not Found: unregistereddev--)
Outdated Optional Dependencies
through (package: ~2.2.6, latest: 2.3.6)
npm install --save-optional through@2.3.6
Unregistered Optional Dependencies

unregisteredopt-- (Error: 404 Not Found: unregisteredopt--)

✔ Test print-only output with unregistered dependency in each type

Outdated Dependencies
async (package: 0.1.x, latest: 0.9.0)

npm install --save async@0.9.0

Git Dependencies

some-dep1 (Git dependency, skipped)
other-dep2 (Git dependency, skipped)
Outdated Dev Dependencies
request (package: ~0.1.9, latest: 2.48.0)
npm install --save-dev request@2.48.0
Git Dev Dependencies
some-dep3 (Git dependency, skipped)
other-dep4 (Git dependency, skipped)
Outdated Optional Dependencies
through (package: ~2.2.6, latest: 2.3.6)

npm install --save-optional through@2.3.6
Git Optional Dependencies
some-dep5 (Git dependency, skipped)
other-dep6 (Git dependency, skipped)
✔ Test print-only output with git dependencies in each type
Failed to get updated dependencies/devDependencies { [Error: 404 Not Found: unregistered--] pkgid: 'unregistered--', statusCode: 404, code: 'E404' }
✔ Test default exit response to unregistered dependency
npm
WARN
package.json test@0.0.0 No description
npm
WARN
package.json test@0.0.0 No repository field.
npm
WARN package.json test@0.0.0 No README data
async@0.9.0 node_modules/async
request@2.48.0 node_modules/request
├── caseless@0.7.0
├── json-stringify-safe@5.0.0
├── forever-agent@0.5.2
├── aws-sign2@0.5.0
├── stringstream@0.0.4
├── oauth-sign@0.5.0
├── tunnel-agent@0.4.0
├── node-uuid@1.4.1
├── qs@2.3.3
├── mime-types@1.0.2
├── combined-stream@0.0.7 (delayed-stream@0.0.5)
├── form-data@0.1.4 (mime@1.2.11)
├── tough-cookie@0.12.1 (punycode@1.3.2)
├── http-signature@0.10.0 (assert-plus@0.1.2, asn1@0.1.11, ctype@0.5.2)
├── hawk@1.1.1 (cryptiles@0.2.2, sntp@0.2.4, boom@0.4.2, hoek@0.9.1)
└── bl@0.9.3 (readable-stream@1.0.33)
through@2.3.6 node_modules/through
Unregistered Dependencies
unregistered-- (Error: 404 Not Found: unregistered--)
Unregistered Dev Dependencies
unregistereddev-- (Error: 404 Not Found: unregistereddev--)

Unregistered Optional Dependencies

unregisteredopt-- (Error: 404 Not Found: unregisteredopt--)
✔ Test update with unregistered dependency in each type

david
Elapsed 0 ms
✔ Test getDependencies returns an empty object when passed a manifest with no dependencies
Elapsed 0 ms
✔ Test getUpdatedDependencies returns an empty object when passed a manifest with no dependencies
Elapsed 3 ms
✔ Test getDependencies returns desired result when only stable versions are available
Elapsed 4 ms
✔ Test getDependencies returns correct result when both stable and unstable versions are available
Elapsed 7 ms
✔ Test getUpdatedDependencies returns an empty object when there are no updated stable or unstable dependencies available
Elapsed 7 ms
✔ Test getUpdatedDependencies returns correct dependency updates when only stable updates are available
Elapsed 8 ms
✔ Test getUpdatedDependencies returns correct dependency updates when both unstable and stable updates are available
Elapsed 8 ms
✔ Test getUpdatedDependencies returns correct dependency updates when latest tag point to the stable version
Elapsed 8 ms
✔ Test getUpdatedDependencies returns correct dependency updates when unstable version is not the most recent version
Elapsed 10 ms
✔ Test getUpdatedDependencies returns correct dependency updates when versions is not sorted by time
Elapsed 10 ms
✔ Test getDependencies returns correct dependencies when there is no stable version
Elapsed 16 ms
✔ Positive getUpdatedDependencies onlyStable=true tests
Elapsed 19 ms
✔ Negative getUpdatedDependencies onlyStable=true tests
Elapsed 19 ms
✔ Test getDependencies will consider devDependencies
Elapsed 20 ms
✔ Test getUpdatedDependencies will consider devDependencies
Elapsed 20 ms
✔ Test getDependencies will consider optionalDependencies
Elapsed 20 ms
✔ Test getUpdatedDependencies will consider optionalDependencies
Elapsed 21 ms
✔ Test getDependencies will consider peerDependencies
Elapsed 21 ms
✔ Test getUpdatedDependencies will consider peerDependencies
Elapsed 21 ms
✔ Test support dependencies specified as an array
Elapsed 22 ms
✔ Test `npm view 0 versions` does not throw!
Elapsed 22 ms
✔ Test error whilst getting dependency status doesn't cause remaining processing to stop
Elapsed 23 ms
✔ Return dependency versions when versions option is true
Elapsed 24 ms
✔ Return dependency versions satisfying ranges when rangeVersions option is true

OK: 247 assertions (17059ms)

I don't know why travis can't run them

@FGRibreau
Copy link
Author

@alanshaw

nodeunit -t 'Test print-only output with git dependencies in each type' test/*

cli.js

Outdated Dependencies

async (package: 0.1.x, latest: 0.9.0)

npm install --save async@0.9.0


Git Dependencies

some-dep1 (Git dependency, skipped)
other-dep2 (Git dependency, skipped)


Outdated Dev Dependencies

request (package: ~0.1.9, latest: 2.48.0)

npm install --save-dev request@2.48.0


Git Dev Dependencies

some-dep3 (Git dependency, skipped)
other-dep4 (Git dependency, skipped)


Outdated Optional Dependencies

through (package: ~2.2.6, latest: 2.3.6)

npm install --save-optional through@2.3.6
Git Optional Dependencies

some-dep5 (Git dependency, skipped)
other-dep6 (Git dependency, skipped)
✔ Test print-only output with git dependencies in each type

OK: 17 assertions (1508ms)

@FGRibreau
Copy link
Author

@alanshaw any news on this? I really don't see what went wrong

@alanshaw
Copy link
Owner

If it's ok with you, I'd prefer not to introduce an each helper in favour of using Object.keys().forEach instead.

I have no idea why the test isn't working on travis.

@alanshaw
Copy link
Owner

Just realised why this wasn't passing on travis - you haven't committed your fixture.

@alanshaw
Copy link
Owner

Closing this as it has been merged in with c7c5ed6

Thank you!

@alanshaw alanshaw closed this Dec 19, 2014
@FGRibreau
Copy link
Author

@alanshaw nice ! Thanks !

@FGRibreau
Copy link
Author

@alanshaw in fact, david still return an exit != 0 when package.json contains git deps

@alanshaw
Copy link
Owner

Oh no! I've created an issue.

@alanshaw
Copy link
Owner

@FGRibreau this should be fixed in david@6.1.2 - let me know if you still have problems

@FGRibreau
Copy link
Author

Thanks for your quick response @alanshaw but still it does not work. Here is how check-build interface with David do you see anything wrong?

Tried with options with {error: {ESCM:true}} the output was:

{ [Error: SCM dependency: git+ssh://git@bitbucket.org:a/b.git] code: 'ESCM' }

and options with {error: {ESCM:false}} then the output was:

statwarn-monitoring-api Required: git+ssh://git@bitbucket.org:a/b.git Stable: None Latest: undefined

Is there something we did wrong?

@alanshaw
Copy link
Owner

That looks fine - you need to ignore dependencies with a warn property.

@FGRibreau
Copy link
Author

Fixed in Check-build v1.3.2, thanks @alanshaw !

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

Successfully merging this pull request may close these issues.

2 participants