Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Lint, build and tests passed

1. Update dependencies
1. Fix almost all vulnerabilities warnings (except node-gyp, see nodejs/node-gyp#1471)
1. Fix eslint errors
  • Loading branch information
L2jLiga committed Jun 17, 2018
1 parent 81dcfe7 commit c812cbb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Expand Up @@ -16,6 +16,7 @@
"module": false
},
"rules": {
"global-require": [0],
"strict": [2, "global"]
}
}
6 changes: 3 additions & 3 deletions jssrc/index.js
Expand Up @@ -6,7 +6,7 @@ module.exports = function ttf2woff2(inputContent) {

// Prepare input
var inputBuffer = theTTFToWOFF2Module._malloc(inputContent.length + 1);
var outputSizePtr = theTTFToWOFF2Module._malloc(4);
var outputSizePtr = theTTFToWOFF2Module._malloc(4); // eslint-disable-line
var outputBufferPtr;
var outputSize;
var outputContent;
Expand All @@ -21,9 +21,9 @@ module.exports = function ttf2woff2(inputContent) {

// Retrieve output
outputSize = theTTFToWOFF2Module.getValue(outputSizePtr, 'i32');
outputContent = new Buffer(outputSize);
outputContent = Buffer.from(outputSize);

for(i = 0; i < outputSize; i++) {
for (i = 0; i < outputSize; i++) {
outputContent[i] = theTTFToWOFF2Module.getValue(outputBufferPtr + i, 'i8');
}

Expand Down
22 changes: 11 additions & 11 deletions package.json
Expand Up @@ -39,19 +39,19 @@
},
"homepage": "https://github.com/nfroidure/ttf2woff2",
"dependencies": {
"bindings": "^1.2.1",
"bufferstreams": "^1.1.0",
"nan": "^2.1.0",
"node-gyp": "^3.1.0"
"bindings": "^1.3.0",
"bufferstreams": "^2.0.1",
"nan": "^2.10.0",
"node-gyp": "^3.7.0"
},
"devDependencies": {
"coveralls": "^2.11.4",
"eslint": "^1.10.1",
"eslint-config-simplifield": "^1.1.0",
"istanbul": "^0.4.0",
"miniquery": "^1.1.1",
"mocha": "^2.3.4",
"mocha-lcov-reporter": "^1.0.0"
"coveralls": "^3.0.1",
"eslint": "^4.19.1",
"eslint-config-simplifield": "^7.1.0",
"istanbul": "^0.4.5",
"miniquery": "^1.1.2",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.3.0"
},
"bin": {
"ttf2woff2": "bin/ttf2woff2.js"
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -2,6 +2,6 @@

try {
module.exports = require('bindings')('addon.node').convert;
} catch(err) {
} catch (err) {
module.exports = require('../jssrc/index.js');
}

0 comments on commit c812cbb

Please sign in to comment.