aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/write-file-atomic
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2015-09-18 14:41:44 -0700
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2015-09-20 10:15:03 -0700
commit57c44324c19119de7c4bb714eae955654bbcc324 (patch)
treed4b23205f2f269f8e0d16822c2462c58bef7b34d /deps/npm/node_modules/write-file-atomic
parent61d48b45b5bf49e618afe9b933716af41476ad37 (diff)
downloadandroid-node-v8-57c44324c19119de7c4bb714eae955654bbcc324.tar.gz
android-node-v8-57c44324c19119de7c4bb714eae955654bbcc324.tar.bz2
android-node-v8-57c44324c19119de7c4bb714eae955654bbcc324.zip
deps: upgrade to npm 2.14.4
PR-URL: https://github.com/nodejs/node/pull/2958 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules/write-file-atomic')
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/.npmignore1
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/LICENSE15
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/README.md36
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/fs.js11
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/graceful-fs.js158
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/package.json96
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/polyfills.js254
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/max-open.js69
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/open.js39
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/readdir-sort.js20
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/write-then-read.js47
-rw-r--r--deps/npm/node_modules/write-file-atomic/package.json24
12 files changed, 12 insertions, 758 deletions
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/.npmignore b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/.npmignore
deleted file mode 100644
index c2658d7d1b..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/LICENSE b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/LICENSE
deleted file mode 100644
index 19129e315f..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/README.md b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/README.md
deleted file mode 100644
index 13a2e86050..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# graceful-fs
-
-graceful-fs functions as a drop-in replacement for the fs module,
-making various improvements.
-
-The improvements are meant to normalize behavior across different
-platforms and environments, and to make filesystem access more
-resilient to errors.
-
-## Improvements over [fs module](http://api.nodejs.org/fs.html)
-
-graceful-fs:
-
-* Queues up `open` and `readdir` calls, and retries them once
- something closes if there is an EMFILE error from too many file
- descriptors.
-* fixes `lchmod` for Node versions prior to 0.6.2.
-* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
-* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
- `lchown` if the user isn't root.
-* makes `lchmod` and `lchown` become noops, if not available.
-* retries reading a file if `read` results in EAGAIN error.
-
-On Windows, it retries renaming a file for up to one second if `EACCESS`
-or `EPERM` error occurs, likely because antivirus software has locked
-the directory.
-
-## USAGE
-
-```javascript
-// use just like fs
-var fs = require('graceful-fs')
-
-// now go and do stuff with it...
-fs.readFileSync('some-file-or-whatever')
-```
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/fs.js b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/fs.js
deleted file mode 100644
index 64ad980232..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/fs.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// eeeeeevvvvviiiiiiillllll
-// more evil than monkey-patching the native builtin?
-// Not sure.
-
-var mod = require("module")
-var pre = '(function (exports, require, module, __filename, __dirname) { '
-var post = '});'
-var src = pre + process.binding('natives').fs + post
-var vm = require('vm')
-var fn = vm.runInThisContext(src)
-fn(exports, require, module, __filename, __dirname)
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/graceful-fs.js b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/graceful-fs.js
deleted file mode 100644
index fb206b8385..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/graceful-fs.js
+++ /dev/null
@@ -1,158 +0,0 @@
-// Monkey-patching the fs module.
-// It's ugly, but there is simply no other way to do this.
-var fs = module.exports = require('./fs.js')
-
-var assert = require('assert')
-
-// fix up some busted stuff, mostly on windows and old nodes
-require('./polyfills.js')
-
-var util = require('util')
-
-function noop () {}
-
-var debug = noop
-if (util.debuglog)
- debug = util.debuglog('gfs')
-else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
- debug = function() {
- var m = util.format.apply(util, arguments)
- m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
- console.error(m)
- }
-
-if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
- process.on('exit', function() {
- debug('fds', fds)
- debug(queue)
- assert.equal(queue.length, 0)
- })
-}
-
-
-var originalOpen = fs.open
-fs.open = open
-
-function open(path, flags, mode, cb) {
- if (typeof mode === "function") cb = mode, mode = null
- if (typeof cb !== "function") cb = noop
- new OpenReq(path, flags, mode, cb)
-}
-
-function OpenReq(path, flags, mode, cb) {
- this.path = path
- this.flags = flags
- this.mode = mode
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(OpenReq, Req)
-
-OpenReq.prototype.process = function() {
- originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
-}
-
-var fds = {}
-OpenReq.prototype.done = function(er, fd) {
- debug('open done', er, fd)
- if (fd)
- fds['fd' + fd] = this.path
- Req.prototype.done.call(this, er, fd)
-}
-
-
-var originalReaddir = fs.readdir
-fs.readdir = readdir
-
-function readdir(path, cb) {
- if (typeof cb !== "function") cb = noop
- new ReaddirReq(path, cb)
-}
-
-function ReaddirReq(path, cb) {
- this.path = path
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(ReaddirReq, Req)
-
-ReaddirReq.prototype.process = function() {
- originalReaddir.call(fs, this.path, this.done)
-}
-
-ReaddirReq.prototype.done = function(er, files) {
- if (files && files.sort)
- files = files.sort()
- Req.prototype.done.call(this, er, files)
- onclose()
-}
-
-
-var originalClose = fs.close
-fs.close = close
-
-function close (fd, cb) {
- debug('close', fd)
- if (typeof cb !== "function") cb = noop
- delete fds['fd' + fd]
- originalClose.call(fs, fd, function(er) {
- onclose()
- cb(er)
- })
-}
-
-
-var originalCloseSync = fs.closeSync
-fs.closeSync = closeSync
-
-function closeSync (fd) {
- try {
- return originalCloseSync(fd)
- } finally {
- onclose()
- }
-}
-
-
-// Req class
-function Req () {
- // start processing
- this.done = this.done.bind(this)
- this.failures = 0
- this.process()
-}
-
-Req.prototype.done = function (er, result) {
- var tryAgain = false
- if (er) {
- var code = er.code
- var tryAgain = code === "EMFILE" || code === "ENFILE"
- if (process.platform === "win32")
- tryAgain = tryAgain || code === "OK"
- }
-
- if (tryAgain) {
- this.failures ++
- enqueue(this)
- } else {
- var cb = this.cb
- cb(er, result)
- }
-}
-
-var queue = []
-
-function enqueue(req) {
- queue.push(req)
- debug('enqueue %d %s', queue.length, req.constructor.name, req)
-}
-
-function onclose() {
- var req = queue.shift()
- if (req) {
- debug('process', req.constructor.name, req)
- req.process()
- }
-}
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/package.json b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/package.json
deleted file mode 100644
index 974aa95169..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/package.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "_args": [
- [
- "graceful-fs@^3.0.2",
- "/Users/isaacs/dev/npm/npm/node_modules/write-file-atomic"
- ]
- ],
- "_from": "graceful-fs@>=3.0.2 <4.0.0",
- "_id": "graceful-fs@3.0.8",
- "_inCache": true,
- "_location": "/write-file-atomic/graceful-fs",
- "_nodeVersion": "2.0.1",
- "_npmUser": {
- "email": "isaacs@npmjs.com",
- "name": "isaacs"
- },
- "_npmVersion": "2.10.1",
- "_phantomChildren": {},
- "_requested": {
- "name": "graceful-fs",
- "raw": "graceful-fs@^3.0.2",
- "rawSpec": "^3.0.2",
- "scope": null,
- "spec": ">=3.0.2 <4.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/write-file-atomic"
- ],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz",
- "_shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "_shrinkwrap": null,
- "_spec": "graceful-fs@^3.0.2",
- "_where": "/Users/isaacs/dev/npm/npm/node_modules/write-file-atomic",
- "author": {
- "email": "i@izs.me",
- "name": "Isaac Z. Schlueter",
- "url": "http://blog.izs.me"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-graceful-fs/issues"
- },
- "dependencies": {},
- "description": "A drop-in replacement for fs, making various improvements.",
- "devDependencies": {
- "mkdirp": "^0.5.0",
- "rimraf": "^2.2.8",
- "tap": "^1.2.0"
- },
- "directories": {
- "test": "test"
- },
- "dist": {
- "shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "45c57aa5e323c35a985a525de6f0c9a6ef59e1f8",
- "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
- "keywords": [
- "EACCESS",
- "EAGAIN",
- "EINVAL",
- "EMFILE",
- "EPERM",
- "error",
- "errors",
- "fs",
- "handling",
- "module",
- "queue",
- "reading",
- "retries",
- "retry"
- ],
- "license": "ISC",
- "main": "graceful-fs.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "name": "graceful-fs",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-graceful-fs.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "3.0.8"
-}
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/polyfills.js b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/polyfills.js
deleted file mode 100644
index 8ac5006e2d..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/polyfills.js
+++ /dev/null
@@ -1,254 +0,0 @@
-var fs = require('./fs.js')
-var constants = require('constants')
-
-var origCwd = process.cwd
-var cwd = null
-process.cwd = function() {
- if (!cwd)
- cwd = origCwd.call(process)
- return cwd
-}
-var chdir = process.chdir
-process.chdir = function(d) {
- cwd = null
- chdir.call(process, d)
-}
-
-// (re-)implement some things that are known busted or missing.
-
-// lchmod, broken prior to 0.6.2
-// back-port the fix here.
-if (constants.hasOwnProperty('O_SYMLINK') &&
- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
- fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
- fs.open( path
- , constants.O_WRONLY | constants.O_SYMLINK
- , mode
- , function (err, fd) {
- if (err) {
- callback(err)
- return
- }
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- fs.fchmod(fd, mode, function (err) {
- fs.close(fd, function(err2) {
- callback(err || err2)
- })
- })
- })
- }
-
- fs.lchmodSync = function (path, mode) {
- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
-
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- var err, err2
- try {
- var ret = fs.fchmodSync(fd, mode)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-}
-
-
-// lutimes implementation, or no-op
-if (!fs.lutimes) {
- if (constants.hasOwnProperty("O_SYMLINK")) {
- fs.lutimes = function (path, at, mt, cb) {
- fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
- fs.futimes(fd, at, mt, function (er) {
- fs.close(fd, function (er2) {
- return cb(er || er2)
- })
- })
- })
- }
-
- fs.lutimesSync = function (path, at, mt) {
- var fd = fs.openSync(path, constants.O_SYMLINK)
- , err
- , err2
- , ret
-
- try {
- var ret = fs.futimesSync(fd, at, mt)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-
- } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
- // maybe utimensat will be bound soonish?
- fs.lutimes = function (path, at, mt, cb) {
- fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
- }
-
- fs.lutimesSync = function (path, at, mt) {
- return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
- }
-
- } else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
- fs.lutimesSync = function () {}
- }
-}
-
-
-// https://github.com/isaacs/node-graceful-fs/issues/4
-// Chown should not fail on einval or eperm if non-root.
-// It should not fail on enosys ever, as this just indicates
-// that a fs doesn't support the intended operation.
-
-fs.chown = chownFix(fs.chown)
-fs.fchown = chownFix(fs.fchown)
-fs.lchown = chownFix(fs.lchown)
-
-fs.chmod = chownFix(fs.chmod)
-fs.fchmod = chownFix(fs.fchmod)
-fs.lchmod = chownFix(fs.lchmod)
-
-fs.chownSync = chownFixSync(fs.chownSync)
-fs.fchownSync = chownFixSync(fs.fchownSync)
-fs.lchownSync = chownFixSync(fs.lchownSync)
-
-fs.chmodSync = chownFix(fs.chmodSync)
-fs.fchmodSync = chownFix(fs.fchmodSync)
-fs.lchmodSync = chownFix(fs.lchmodSync)
-
-function chownFix (orig) {
- if (!orig) return orig
- return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
- if (chownErOk(er)) er = null
- cb(er, res)
- })
- }
-}
-
-function chownFixSync (orig) {
- if (!orig) return orig
- return function (target, uid, gid) {
- try {
- return orig.call(fs, target, uid, gid)
- } catch (er) {
- if (!chownErOk(er)) throw er
- }
- }
-}
-
-// ENOSYS means that the fs doesn't support the op. Just ignore
-// that, because it doesn't matter.
-//
-// if there's no getuid, or if getuid() is something other
-// than 0, and the error is EINVAL or EPERM, then just ignore
-// it.
-//
-// This specific case is a silent failure in cp, install, tar,
-// and most other unix tools that manage permissions.
-//
-// When running as root, or if other types of errors are
-// encountered, then it's strict.
-function chownErOk (er) {
- if (!er)
- return true
-
- if (er.code === "ENOSYS")
- return true
-
- var nonroot = !process.getuid || process.getuid() !== 0
- if (nonroot) {
- if (er.code === "EINVAL" || er.code === "EPERM")
- return true
- }
-
- return false
-}
-
-
-// if lchmod/lchown do not exist, then make them no-ops
-if (!fs.lchmod) {
- fs.lchmod = function (path, mode, cb) {
- process.nextTick(cb)
- }
- fs.lchmodSync = function () {}
-}
-if (!fs.lchown) {
- fs.lchown = function (path, uid, gid, cb) {
- process.nextTick(cb)
- }
- fs.lchownSync = function () {}
-}
-
-
-
-// on Windows, A/V software can lock the directory, causing this
-// to fail with an EACCES or EPERM if the directory contains newly
-// created files. Try again on failure, for up to 1 second.
-if (process.platform === "win32") {
- var rename_ = fs.rename
- fs.rename = function rename (from, to, cb) {
- var start = Date.now()
- rename_(from, to, function CB (er) {
- if (er
- && (er.code === "EACCES" || er.code === "EPERM")
- && Date.now() - start < 1000) {
- return rename_(from, to, CB)
- }
- if(cb) cb(er)
- })
- }
-}
-
-
-// if read() returns EAGAIN, then just try it again.
-var read = fs.read
-fs.read = function (fd, buffer, offset, length, position, callback_) {
- var callback
- if (callback_ && typeof callback_ === 'function') {
- var eagCounter = 0
- callback = function (er, _, __) {
- if (er && er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- return read.call(fs, fd, buffer, offset, length, position, callback)
- }
- callback_.apply(this, arguments)
- }
- }
- return read.call(fs, fd, buffer, offset, length, position, callback)
-}
-
-var readSync = fs.readSync
-fs.readSync = function (fd, buffer, offset, length, position) {
- var eagCounter = 0
- while (true) {
- try {
- return readSync.call(fs, fd, buffer, offset, length, position)
- } catch (er) {
- if (er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- continue
- }
- throw er
- }
- }
-}
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/max-open.js b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/max-open.js
deleted file mode 100644
index a6b9ba43d3..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/max-open.js
+++ /dev/null
@@ -1,69 +0,0 @@
-var test = require('tap').test
-var fs = require('../')
-
-test('open lots of stuff', function (t) {
- // Get around EBADF from libuv by making sure that stderr is opened
- // Otherwise Darwin will refuse to give us a FD for stderr!
- process.stderr.write('')
-
- // How many parallel open()'s to do
- var n = 1024
- var opens = 0
- var fds = []
- var going = true
- var closing = false
- var doneCalled = 0
-
- for (var i = 0; i < n; i++) {
- go()
- }
-
- function go() {
- opens++
- fs.open(__filename, 'r', function (er, fd) {
- if (er) throw er
- fds.push(fd)
- if (going) go()
- })
- }
-
- // should hit ulimit pretty fast
- setTimeout(function () {
- going = false
- t.equal(opens - fds.length, n)
- done()
- }, 100)
-
-
- function done () {
- if (closing) return
- doneCalled++
-
- if (fds.length === 0) {
- console.error('done called %d times', doneCalled)
- // First because of the timeout
- // Then to close the fd's opened afterwards
- // Then this time, to complete.
- // Might take multiple passes, depending on CPU speed
- // and ulimit, but at least 3 in every case.
- t.ok(doneCalled >= 2)
- return t.end()
- }
-
- closing = true
- setTimeout(function () {
- // console.error('do closing again')
- closing = false
- done()
- }, 100)
-
- // console.error('closing time')
- var closes = fds.slice(0)
- fds.length = 0
- closes.forEach(function (fd) {
- fs.close(fd, function (er) {
- if (er) throw er
- })
- })
- }
-})
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/open.js b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/open.js
deleted file mode 100644
index 85732f236b..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/open.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var test = require('tap').test
-var fs = require('../graceful-fs.js')
-
-test('graceful fs is monkeypatched fs', function (t) {
- t.equal(fs, require('../fs.js'))
- t.end()
-})
-
-test('open an existing file works', function (t) {
- var fd = fs.openSync(__filename, 'r')
- fs.closeSync(fd)
- fs.open(__filename, 'r', function (er, fd) {
- if (er) throw er
- fs.close(fd, function (er) {
- if (er) throw er
- t.pass('works')
- t.end()
- })
- })
-})
-
-test('open a non-existing file throws', function (t) {
- var er
- try {
- var fd = fs.openSync('this file does not exist', 'r')
- } catch (x) {
- er = x
- }
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
-
- fs.open('neither does this file', 'r', function (er, fd) {
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/readdir-sort.js b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/readdir-sort.js
deleted file mode 100644
index cb63a6846e..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/readdir-sort.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var test = require("tap").test
-var fs = require("../fs.js")
-
-var readdir = fs.readdir
-fs.readdir = function(path, cb) {
- process.nextTick(function() {
- cb(null, ["b", "z", "a"])
- })
-}
-
-var g = require("../")
-
-test("readdir reorder", function (t) {
- g.readdir("whatevers", function (er, files) {
- if (er)
- throw er
- t.same(files, [ "a", "b", "z" ])
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/write-then-read.js b/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/write-then-read.js
deleted file mode 100644
index 21e4c26bf6..0000000000
--- a/deps/npm/node_modules/write-file-atomic/node_modules/graceful-fs/test/write-then-read.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var fs = require('../');
-var rimraf = require('rimraf');
-var mkdirp = require('mkdirp');
-var test = require('tap').test;
-var p = require('path').resolve(__dirname, 'files');
-
-process.chdir(__dirname)
-
-// Make sure to reserve the stderr fd
-process.stderr.write('');
-
-var num = 4097;
-var paths = new Array(num);
-
-test('make files', function (t) {
- rimraf.sync(p);
- mkdirp.sync(p);
-
- for (var i = 0; i < num; ++i) {
- paths[i] = 'files/file-' + i;
- fs.writeFileSync(paths[i], 'content');
- }
-
- t.end();
-})
-
-test('read files', function (t) {
- // now read them
- var done = 0;
- for (var i = 0; i < num; ++i) {
- fs.readFile(paths[i], function(err, data) {
- if (err)
- throw err;
-
- ++done;
- if (done === num) {
- t.pass('success');
- t.end()
- }
- });
- }
-});
-
-test('cleanup', function (t) {
- rimraf.sync(p);
- t.end();
-});
diff --git a/deps/npm/node_modules/write-file-atomic/package.json b/deps/npm/node_modules/write-file-atomic/package.json
index 27f6694b7c..4fad94d3dd 100644
--- a/deps/npm/node_modules/write-file-atomic/package.json
+++ b/deps/npm/node_modules/write-file-atomic/package.json
@@ -1,6 +1,6 @@
{
"name": "write-file-atomic",
- "version": "1.1.2",
+ "version": "1.1.3",
"description": "Write files in an atomic fashion w/configurable ownership",
"main": "index.js",
"scripts": {
@@ -8,7 +8,7 @@
},
"repository": {
"type": "git",
- "url": "git@github.com:iarna/write-file-atomic.git"
+ "url": "git+ssh://git@github.com/iarna/write-file-atomic.git"
},
"keywords": [
"writeFile",
@@ -25,26 +25,26 @@
},
"homepage": "https://github.com/iarna/write-file-atomic",
"dependencies": {
- "graceful-fs": "^3.0.2",
+ "graceful-fs": "^4.1.2",
"slide": "^1.1.5"
},
"devDependencies": {
"require-inject": "^1.1.0",
"tap": "^0.4.12"
},
- "gitHead": "b721f8a71223bcf162f1ee4ff4677f31de1c061f",
- "_id": "write-file-atomic@1.1.2",
- "_shasum": "ff3d61f1c2f5bb71e8ebe491a7157bf7d60435a4",
- "_from": "write-file-atomic@>=1.1.2 <1.2.0",
- "_npmVersion": "2.7.6",
- "_nodeVersion": "1.6.2",
+ "gitHead": "65a1e2e156c0d0bfb7acac2e039b943d6ec9876d",
+ "_id": "write-file-atomic@1.1.3",
+ "_shasum": "60eaca258a0b559b37aca82b21d64a293b4b90d0",
+ "_from": "write-file-atomic@1.1.3",
+ "_npmVersion": "3.3.0",
+ "_nodeVersion": "3.1.0",
"_npmUser": {
"name": "iarna",
"email": "me@re-becca.org"
},
"dist": {
- "shasum": "ff3d61f1c2f5bb71e8ebe491a7157bf7d60435a4",
- "tarball": "http://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.2.tgz"
+ "shasum": "60eaca258a0b559b37aca82b21d64a293b4b90d0",
+ "tarball": "http://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.3.tgz"
},
"maintainers": [
{
@@ -53,5 +53,5 @@
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.2.tgz"
+ "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.3.tgz"
}