Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

update lockfile

  • Loading branch information...
commit 7e7e54cd1330e892642dc0b0310d7ba79430ac32 1 parent 3d139b2
@isaacs isaacs authored
2  node_modules/lockfile/lockfile.js
@@ -194,7 +194,7 @@ function notStale (er, path, opts, cb) {
var timer = setTimeout(function () {
- watcher.close()
+ try { watcher.close() } catch (e) {}
}, opts.wait)
} else {
9 node_modules/lockfile/package.json
@@ -1,6 +1,6 @@
"name": "lockfile",
- "version": "0.2.0",
+ "version": "0.2.1",
"main": "lockfile.js",
"directories": {
"test": "test"
@@ -31,9 +31,6 @@
"license": "BSD",
"description": "A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.",
"readme": "# lockfile\n\nA very polite lock file utility, which endeavors to not litter, and to\nwait patiently for others.\n\n## Usage\n\n```javascript\nvar lockFile = require('lockfile')\n\n// opts is optional, and defaults to {}\nlockFile.lock('some-file.lock', opts, function (er, fd) {\n // if the er happens, then it failed to acquire a lock.\n // if there was not an error, then the fd is opened in\n // wx mode. If you want to write something to it, go ahead.\n\n // do my stuff, free of interruptions\n // then, some time later, do:\n lockFile.unlock('some-file.lock', function (er) {\n // er means that an error happened, and is probably bad.\n })\n})\n```\n\n## Methods\n\nSync methods return the value/throw the error, others don't. Standard\nnode fs stuff.\n\nAll known locks are removed when the process exits. Of course, it's\npossible for certain types of failures to cause this to fail, but a best\neffort is made to not be a litterbug.\n\n### lockFile.lock(path, [opts], cb)\n\nAcquire a file lock on the specified path. Returns the FD.\n\n### lockFile.lockSync(path, [opts])\n\nAcquire a file lock on the specified path\n\n### lockFile.unlock(path, cb)\n\nClose and unlink the lockfile.\n\n### lockFile.unlockSync(path)\n\nClose and unlink the lockfile.\n\n### lockFile.check(path, [opts], cb)\n\nCheck if the lockfile is locked and not stale.\n\nReturns boolean.\n\n### lockFile.checkSync(path, [opts], cb)\n\nCheck if the lockfile is locked and not stale.\n\nCallback is called with `cb(error, isLocked)`.\n\n## Options\n\n### opts.wait\n\nA number of milliseconds to wait for locks to expire before giving up.\nOnly used by lockFile.lock. Relies on If the lock is not\ncleared by the time the wait expires, then it returns with the original\nerror.\n\n### opts.stale\n\nA number of milliseconds before locks are considered to have expired.\n\n### opts.retries\n\nUsed by lock and lockSync. Retry `n` number of times before giving up.\n\n### opts.retryWait\n\nUsed by lock. Wait `n` milliseconds before retrying.\n",
- "_id": "lockfile@0.2.0",
- "dist": {
- "shasum": "1c4090b1c45ac45ed6898025c9e5d1e53fa93813"
- },
- "_from": "../lockfile"
+ "_id": "lockfile@0.2.1",
+ "_from": "lockfile@>=0.2"
Please sign in to comment.
Something went wrong with that request. Please try again.