fs-native-extensions
Advanced tools
Comparing version 1.1.0 to 1.2.0
10
index.js
@@ -1,3 +0,3 @@ | ||
const util = require('util') | ||
const binding = require('node-gyp-build')(__dirname) | ||
const errors = require('uv-errors') | ||
const binding = require('./binding') | ||
@@ -203,3 +203,3 @@ function onwork (errno) { | ||
function toError (errno) { | ||
const [code, msg] = util.getSystemErrorMap().get(errno) | ||
const [code, msg] = errors.get(errno) | ||
@@ -210,5 +210,7 @@ const err = new Error(`${code}: ${msg}`) | ||
Error.captureStackTrace(err, toError) | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(err, toError) | ||
} | ||
return err | ||
} |
{ | ||
"name": "fs-native-extensions", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Native file system extensions for advanced file operations", | ||
@@ -8,2 +8,3 @@ "main": "index.js", | ||
"index.js", | ||
"binding.js", | ||
"include", | ||
@@ -32,8 +33,9 @@ "src", | ||
"napi-macros": "^2.0.0", | ||
"node-gyp-build": "^4.2.3" | ||
"node-gyp-build": "^4.2.3", | ||
"uv-errors": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"brittle": "^2.3.1", | ||
"brittle": "^3.1.1", | ||
"minimist": "^1.2.6", | ||
"prebuildify": "^4.1.2", | ||
"prebuildify": "^5.0.1", | ||
"standard": "^17.0.0", | ||
@@ -40,0 +42,0 @@ "tempy": "^3.0.0" |
@@ -56,3 +56,3 @@ # fs-native-extensions | ||
Options are the same as `lock()`. | ||
Options are the same as `tryLock()`. | ||
@@ -91,3 +91,3 @@ #### `const granted = tryDowngradeLock(fd[, offset[, length]])` | ||
Mark a file as sparse. On Windows, this operation is required before holes can be punched in the file. On other systems, this operation has no effect. | ||
Mark a file as sparse. On Windows, this operation is required before holes can be created in the file. On other systems, this operation has no effect. | ||
@@ -94,0 +94,0 @@ #### `await swap(from, to)` |
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
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
326924
19
162
3
+ Addeduv-errors@^1.0.1
+ Addeduv-errors@1.0.4(transitive)