diff options
author | Rebecca Turner <me@re-becca.org> | 2016-12-15 03:38:55 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2016-12-15 03:55:35 +0300 |
commit | 54d949b05adefffeb7b5b10229c5fe0ccb929ac3 (patch) | |
tree | c4256d5cc8ec28e0fd77a2d54fcb8db165514a33 /node_modules/lockfile | |
parent | c2d22faf916e8260136a1cc95913ca474421c0d3 (diff) |
lockfile@1.0.3
Handled case where callback was not passed in by the user.
Credit: @ORESoftware
PR-URL: https://github.com/npm/lockfile/pull/24
Diffstat (limited to 'node_modules/lockfile')
-rw-r--r-- | node_modules/lockfile/CHANGELOG.md | 5 | ||||
-rw-r--r-- | node_modules/lockfile/lockfile.js | 2 | ||||
-rw-r--r-- | node_modules/lockfile/package.json | 46 | ||||
-rw-r--r-- | node_modules/lockfile/test/unlock-no-cb.js | 10 |
4 files changed, 39 insertions, 24 deletions
diff --git a/node_modules/lockfile/CHANGELOG.md b/node_modules/lockfile/CHANGELOG.md index 6d9005b1d..38f44af04 100644 --- a/node_modules/lockfile/CHANGELOG.md +++ b/node_modules/lockfile/CHANGELOG.md @@ -1,11 +1,16 @@ # Changes +## v1.0.3 + +* handle the case where callback is not passed by user + ## v1.0.2 * git ignore coverage and node_modules * update tap to v7 * build a changelog +* package: fix repository link * pass tests on 0.8 * before_script needs to be before_install * tap 1.2.0 and travis diff --git a/node_modules/lockfile/lockfile.js b/node_modules/lockfile/lockfile.js index 0c2c6f597..fd49717b8 100644 --- a/node_modules/lockfile/lockfile.js +++ b/node_modules/lockfile/lockfile.js @@ -58,7 +58,7 @@ exports.unlock = function (path, cb) { debug('unlock', path) // best-effort. unlocking an already-unlocked lock is a noop delete locks[path] - fs.unlink(path, function (unlinkEr) { cb() }) + fs.unlink(path, function (unlinkEr) { cb && cb() }) } exports.unlockSync = function (path) { diff --git a/node_modules/lockfile/package.json b/node_modules/lockfile/package.json index 0fa61f34b..e559a8216 100644 --- a/node_modules/lockfile/package.json +++ b/node_modules/lockfile/package.json @@ -2,49 +2,49 @@ "_args": [ [ { - "raw": "lockfile@1.0.2", + "raw": "lockfile@^1.0.3", "scope": null, "escapedName": "lockfile", "name": "lockfile", - "rawSpec": "1.0.2", - "spec": "1.0.2", - "type": "version" + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" }, "/Users/rebecca/code/npm" ] ], - "_from": "lockfile@1.0.2", - "_id": "lockfile@1.0.2", + "_from": "lockfile@>=1.0.3 <2.0.0", + "_id": "lockfile@1.0.3", "_inCache": true, "_location": "/lockfile", "_nodeVersion": "6.5.0", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lockfile-1.0.2.tgz_1474488698320_0.008735276060178876" + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/lockfile-1.0.3.tgz_1481132515120_0.9350064944010228" }, "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, - "_npmVersion": "3.10.7", + "_npmVersion": "3.10.9", "_phantomChildren": {}, "_requested": { - "raw": "lockfile@1.0.2", + "raw": "lockfile@^1.0.3", "scope": null, "escapedName": "lockfile", "name": "lockfile", - "rawSpec": "1.0.2", - "spec": "1.0.2", - "type": "version" + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.2.tgz", - "_shasum": "97e1990174f696cbe0a3acd58a43b84aa30c7c83", + "_resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.3.tgz", + "_shasum": "2638fc39a0331e9cac1a04b71799931c9c50df79", "_shrinkwrap": null, - "_spec": "lockfile@1.0.2", + "_spec": "lockfile@^1.0.3", "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", @@ -52,7 +52,7 @@ "url": "http://blog.izs.me/" }, "bugs": { - "url": "https://github.com/isaacs/lockfile/issues" + "url": "https://github.com/npm/lockfile/issues" }, "dependencies": {}, "description": "A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.", @@ -64,11 +64,11 @@ "test": "test" }, "dist": { - "shasum": "97e1990174f696cbe0a3acd58a43b84aa30c7c83", - "tarball": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.2.tgz" + "shasum": "2638fc39a0331e9cac1a04b71799931c9c50df79", + "tarball": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.3.tgz" }, - "gitHead": "a25076ca142a08951a9265bc1091e715e9bc7f05", - "homepage": "https://github.com/isaacs/lockfile#readme", + "gitHead": "96549505fcca4b8b0ff0e833719720bd463306d7", + "homepage": "https://github.com/npm/lockfile#readme", "keywords": [ "lockfile", "lock", @@ -93,12 +93,12 @@ "readme": "ERROR: No README data found!", "repository": { "type": "git", - "url": "git://github.com/isaacs/lockfile.git" + "url": "git+https://github.com/npm/lockfile.git" }, "scripts": { "changelog": "bash gen-changelog.sh", "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", "test": "tap test/*.js --cov" }, - "version": "1.0.2" + "version": "1.0.3" } diff --git a/node_modules/lockfile/test/unlock-no-cb.js b/node_modules/lockfile/test/unlock-no-cb.js new file mode 100644 index 000000000..df160923e --- /dev/null +++ b/node_modules/lockfile/test/unlock-no-cb.js @@ -0,0 +1,10 @@ +var t = require('tap') +if (/0\.(10|8)/.test(process.version)) { + t.pass('just a dummy test, no beforeExit in this node version') +} else { + process.on('beforeExit', function (code) { + t.equal(code, 0, 'did not throw') + }) +} +var lf = require('lockfile') +lf.unlock('no-file-no-cb') |