Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
b5001ae0
Commit
b5001ae0
authored
Jun 30, 2016
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test and implementation for unmet dependencies
parent
1ecc9dcb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
0 deletions
+32
-0
compile
bin/compile
+1
-0
failure.sh
lib/failure.sh
+7
-0
package.json
test/fixtures/unmet-dep/package.json
+15
-0
run
test/run
+9
-0
No files found.
bin/compile
View file @
b5001ae0
...
...
@@ -162,3 +162,4 @@ header "Build succeeded!"
summarize_build | output
"
$LOG_FILE
"
warn_no_start
"
$LOG_FILE
"
warn_unmet_dep
"
$LOG_FILE
"
lib/failure.sh
View file @
b5001ae0
...
...
@@ -128,3 +128,10 @@ warn_econnreset() {
warning
"ECONNRESET issues may be related to npm versions"
"https://github.com/npm/registry/issues/10#issuecomment-217141066"
fi
}
warn_unmet_dep
()
{
local
log_file
=
"
$1
"
if
grep
-qi
'unmet dependency'
"
$log_file
"
||
grep
-qi
'unmet peer dependency'
"
$log_file
"
;
then
warn
"Unmet dependencies don't fail npm install but may cause runtime issues"
"https://github.com/npm/npm/issues/7494"
fi
}
test/fixtures/unmet-dep/package.json
0 → 100644
View file @
b5001ae0
{
"name"
:
"unmet-dep"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
"start"
:
"node server.js"
},
"keywords"
:
[],
"author"
:
""
,
"license"
:
"ISC"
,
"dependencies"
:
{
"grunt-steroids"
:
"0.2.3"
}
}
test/run
View file @
b5001ae0
#!/usr/bin/env bash
# See README.md for info on running these tests.
testWarnUnmetDep
()
{
compile
"unmet-dep"
assertCaptured
"may cause runtime issues"
assertCapturedSuccess
compile
"no-version"
assertNotCaptured
"may cause runtime issues"
assertCapturedSuccess
}
testWarnEconnreset
()
{
compile
"econnreset-mock"
assertCaptured
"may be related to npm versions"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment