Comparing version 1.0.0-beta.1 to 1.0.0-beta.2
{ | ||
"name": "geotiff", | ||
"version": "1.0.0-beta.1", | ||
"version": "1.0.0-beta.2", | ||
"description": "GeoTIFF image decoding in JavaScript", | ||
@@ -12,3 +12,3 @@ "repository": "https://github.com/geotiffjs/geotiff.js", | ||
], | ||
"main": "src/main.js", | ||
"main": "dist/main.js", | ||
"dependencies": { | ||
@@ -50,5 +50,6 @@ "pako": "^1.0.3", | ||
"build:clean": "rm -rf dist/*", | ||
"build:dev": "webpack -d ", | ||
"build:prod": "NODE_ENV=production webpack -p", | ||
"build": "npm run build:clean ; npm run build:dev ; npm run build:prod", | ||
"bundle:dev": "webpack -d ", | ||
"bundle:prod": "NODE_ENV=production webpack -p", | ||
"build:babel": "babel src/ -d dist", | ||
"build": "npm run build:clean ; npm run bundle:dev ; npm run bundle:prod ; npm run build:babel", | ||
"test": "mocha --compilers js:babel-core/register --require babel-polyfill", | ||
@@ -55,0 +56,0 @@ "lint": "eslint src", |
@@ -1,3 +0,5 @@ | ||
const { open, read } = require('fs'); | ||
import { Buffer } from 'buffer'; | ||
import { open, read } from 'fs'; | ||
function readRangeFromBlocks(blocks, rangeOffset, rangeLength) { | ||
@@ -361,5 +363,5 @@ const rangeTop = rangeOffset + rangeLength; | ||
function readAsync(fd, readBuffer, offset, length, position) { | ||
function readAsync(...args) { | ||
return new Promise((resolve, reject) => { | ||
read(fd, readBuffer, offset, length, position, (err, bytesRead, buffer) => { | ||
read(...args, (err, bytesRead, buffer) => { | ||
if (err) { | ||
@@ -385,3 +387,3 @@ reject(err); | ||
const fd = await fileOpen; | ||
const { buffer } = await readAsync(fd, new Uint8Array(length), 0, length, offset); | ||
const { buffer } = await readAsync(fd, Buffer.alloc(length), 0, length, offset); | ||
return buffer.buffer; | ||
@@ -388,0 +390,0 @@ }, |
@@ -37,2 +37,3 @@ const path = require('path'); | ||
fs: 'empty', | ||
buffer: 'empty', | ||
}, | ||
@@ -39,0 +40,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
78310089
108
22247
5
10