Comparing version 2.0.3 to 3.0.0
#! /usr/bin/env node | ||
var fs = require('fs'); | ||
var BufferStreams = require('bufferstreams'); | ||
@@ -8,3 +7,3 @@ var ttf2woff2 = require('../src'); | ||
process.stdin.pipe(new BufferStreams(function(err, buf, cb) { | ||
if(err) { | ||
if (err) { | ||
throw err; | ||
@@ -11,0 +10,0 @@ } |
@@ -9,3 +9,3 @@ 'use strict'; | ||
var inputBuffer = theTTFToWOFF2Module._malloc(inputContent.length + 1); | ||
var outputSizePtr = theTTFToWOFF2Module._malloc(4); | ||
var outputSizePtr = theTTFToWOFF2Module._malloc(4); // eslint-disable-line | ||
var outputBufferPtr; | ||
@@ -25,5 +25,5 @@ var outputSize; | ||
outputSize = theTTFToWOFF2Module.getValue(outputSizePtr, 'i32'); | ||
outputContent = new Buffer(outputSize); | ||
outputContent = Buffer.alloc(outputSize); | ||
for(i = 0; i < outputSize; i++) { | ||
for (i = 0; i < outputSize; i++) { | ||
outputContent[i] = theTTFToWOFF2Module.getValue(outputBufferPtr + i, 'i8'); | ||
@@ -30,0 +30,0 @@ } |
{ | ||
"name": "ttf2woff2", | ||
"version": "2.0.3", | ||
"version": "3.0.0", | ||
"description": "Convert TTF files to WOFF2 ones.", | ||
@@ -8,3 +8,3 @@ "main": "src/index.js", | ||
"engines": { | ||
"node": ">=0.12" | ||
"node": ">= 4.0.0" | ||
}, | ||
@@ -25,3 +25,3 @@ "directories": { | ||
"emcc-debug": "miniquery -p \"targets.#.sources.#\" ./binding.gyp | grep -v \"csrc/addon.cc\" | xargs emcc --bind -o jssrc/ttf2woff2.js -s \"ALLOW_MEMORY_GROWTH=1\" -s \"ASSERTIONS=1\" --post-js jssrc/post.js csrc/fallback.cc", | ||
"install": "(node-gyp rebuild > builderror.log) || (exit 0)" | ||
"install": "((node-gyp configure && node-gyp build) > builderror.log) || (exit 0)" | ||
}, | ||
@@ -44,17 +44,16 @@ "repository": { | ||
"dependencies": { | ||
"bindings": "^1.2.1", | ||
"bufferstreams": "^1.1.0", | ||
"nan": "^2.1.0", | ||
"node-gyp": "^3.0.3" | ||
"bindings": "^1.3.0", | ||
"bufferstreams": "^2.0.1", | ||
"nan": "^2.10.0", | ||
"node-gyp": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"coveralls": "^2.11.4", | ||
"eslint": "^1.4.1", | ||
"eslint-config-simplifield": "^1.1.0", | ||
"istanbul": "^0.3.19", | ||
"miniquery": "^1.1.1", | ||
"mocha": "^2.3.2", | ||
"mocha-lcov-reporter": "^0.0.2" | ||
"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" | ||
}, | ||
"preferGlobal": "true", | ||
"bin": { | ||
@@ -61,0 +60,0 @@ "ttf2woff2": "bin/ttf2woff2.js" |
@@ -5,4 +5,4 @@ 'use strict'; | ||
module.exports = require('bindings')('addon.node').convert; | ||
} catch(err) { | ||
} catch (err) { | ||
module.exports = require('../jssrc/index.js'); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
2
6
5558351
77
6639
+ Addedbufferstreams@2.0.1(transitive)
+ Addedchownr@1.1.4(transitive)
+ Addedfs-minipass@1.2.7(transitive)
+ Addedminipass@2.9.0(transitive)
+ Addedminizlib@1.3.3(transitive)
+ Addednode-gyp@4.0.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedtar@4.4.19(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedblock-stream@0.0.9(transitive)
- Removedbufferstreams@1.1.3(transitive)
- Removedfstream@1.0.12(transitive)
- Removednode-gyp@3.8.0(transitive)
- Removedtar@2.2.2(transitive)
Updatedbindings@^1.3.0
Updatedbufferstreams@^2.0.1
Updatednan@^2.10.0
Updatednode-gyp@^4.0.0