Skip to content

Commit 33fb32c

Browse files
committed
Merge branch 'master' into 'master_060'
2 parents 812d9a2 + 31fa64f commit 33fb32c

File tree

7 files changed

+264
-94
lines changed

7 files changed

+264
-94
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pids
1010
# Directory for instrumented libs generated by jscoverage/JSCover
1111
lib-cov
1212

13-
# Coverage directory used by tools like istanbul
13+
# Coverage directory used by tools like istanbul/nyc
1414
coverage
1515

1616
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)

.istanbul.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

linker.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
var assert = require('assert');
12
var keccak256 = require('js-sha3').keccak256;
23

34
function libraryHashPlaceholder (input) {
45
return '$' + keccak256(input).slice(0, 34) + '$';
56
}
67

78
var linkBytecode = function (bytecode, libraries) {
9+
assert(typeof bytecode === 'string');
10+
assert(typeof libraries === 'object');
811
// NOTE: for backwards compatibility support old compiler which didn't use file names
912
var librariesComplete = {};
1013
for (var libraryName in libraries) {
@@ -52,6 +55,7 @@ var linkBytecode = function (bytecode, libraries) {
5255
};
5356

5457
var findLinkReferences = function (bytecode) {
58+
assert(typeof bytecode === 'string');
5559
// find 40 bytes in the pattern of __...<36 digits>...__
5660
// e.g. __Lib.sol:L_____________________________
5761
var linkReferences = {};

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"prepublish": "node downloadCurrentVersion.js && node verifyVersion.js",
1212
"pretest": "npm run lint",
1313
"test": "tape ./test/index.js",
14-
"coverage": "node ./node_modules/istanbul/lib/cli.js cover ./node_modules/tape/bin/tape ./test/index.js",
14+
"coverage": "node ./node_modules/nyc/bin/nyc.js --reporter=lcov --reporter=text-summary ./node_modules/tape/bin/tape ./test/index.js",
1515
"coveralls": "npm run coverage && node ./node_modules/coveralls/bin/coveralls.js <coverage/lcov.info"
1616
},
1717
"repository": {
@@ -52,7 +52,7 @@
5252
},
5353
"devDependencies": {
5454
"coveralls": "^3.0.0",
55-
"istanbul": "^0.4.5",
55+
"nyc": "^14.1.0",
5656
"semistandard": "^12.0.0",
5757
"tape": "^4.11.0",
5858
"tape-spawn": "^1.4.2"
@@ -61,5 +61,10 @@
6161
"ignore": [
6262
"soljson.js"
6363
]
64+
},
65+
"nyc": {
66+
"exclude": [
67+
"soljson.js"
68+
]
6469
}
6570
}

0 commit comments

Comments
 (0)