{"name":"lockfile","version":"1.0.4","main":"lockfile.js","directories":{"test":"test"},"dependencies":{"signal-exit":"^3.0.2"},"devDependencies":{"tap":"^11.1.3","touch":"0"},"scripts":{"test":"tap test/*.js --cov -J","changelog":"bash gen-changelog.sh","postversion":"npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}"},"repository":{"type":"git","url":"git+https://github.com/npm/lockfile.git"},"keywords":["lockfile","lock","file","fs","O_EXCL"],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","description":"A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.","gitHead":"94ef64505c07ec7cfb0b6860e61f1c2d820c4a06","bugs":{"url":"https://github.com/npm/lockfile/issues"},"homepage":"https://github.com/npm/lockfile#readme","_id":"lockfile@1.0.4","_npmVersion":"5.8.0","_nodeVersion":"8.9.1","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"integrity":"sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA==","shasum":"07f819d25ae48f87e538e6578b6964a4981a5609","tarball":"http://registry-npm.ywwl.com/lockfile/download/lockfile-1.0.4.tgz","fileCount":15,"unpackedSize":29104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1UF+CRA9TVsSAnZWagAAbigQAJIpJmH5cse8IJ5Ukpno\nKZt1ygZyaodmpyualwbm8qa/RlaYkIVsC8Q4NAKH8Jc8JEu9KvDNZcD8+fsV\nxelBWQhpgo6sK05LymUkp4t+toqgqqwHaL+dGag46O00hi1Z3tpg8v2brYYx\nyy3pQWo2CdKb2Wjp1AgM5CkSMbI3ijHMooxiPRWuVIVVXGVp80lU0gZPtRcU\nO47h83STX6Im8s1eOuMdW7fIuasTbEwA8EMPUYQLsA8wE4kAZSngn0al91Tw\nDcqfAbKLG6o7ShDOd0fJ2d4nNdnT8AaZ9+FlEH9tU8wwBXgm3sVpD1hDFPPC\nEb6H/LN/5jVRk97MuHpYCdkbnKCg2Occ6ticJVMJq7Sd3XlXbcjHzYWOKbf0\nuAluw5WBRAYY/TKFBnrPl3tpyASYfUA28yylWvFO7u1j8zD2wVDYP7Os+uM9\nL1Xc25ywjBVzPWMuGWaP8pA6GNIWnV4BQNsLs/mlVKxDwuSRnSKP2j6e2Xwb\npQPS74GoFfVjq1OlR4tF+40SW/hF6/c1D0VUrStl+fm7jNVuaF09N6PDnq3/\nvoLAc1B58dwgLRgTZJOY8BcpyE/HhA6yzYStIHd3TeRsQ92HMbw20YxdQNeS\ncM4Jej8hfO9fQN56g2SyzK1nwk6F1sMgnrMdPqsZvJnHpHKyqsgDs+/DtUL4\nrWkP\r\n=12Fh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCS+nHCHi6zC6Zph1R0bOEOPWv8ZZsd/ziqNV5jK4/a4wIhAI9aD4rrcIQIED2g2BkWCsxa7/8FrlB/JdCbzARoc0/j"}],"size":9621,"noattachment":false,"key":"/lockfile/-/lockfile-1.0.4.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"trevorburnham","email":"trevorburnham@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lockfile_1.0.4_1523925372487_0.4260562345616645"},"_hasShrinkwrap":false,"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) {\n  // if the er happens, then it failed to acquire a lock.\n  // if there was not an error, then the file was created,\n  // and won't be deleted until we unlock it.\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\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\nCallback is called with `cb(error, isLocked)`.\n\n### lockFile.checkSync(path, [opts])\n\nCheck if the lockfile is locked and not stale.\n\nReturns boolean.\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.  Poll for `opts.wait` ms.  If the lock is\nnot cleared by the time the wait expires, then it returns with the\noriginal error.\n\n### opts.pollPeriod\n\nWhen using `opts.wait`, this is the period in ms in which it polls to\ncheck if the lock has expired.  Defaults to `100`.\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","publish_time":1523925372565,"_cnpm_publish_time":1523925372565,"dist-tags":{"latest":"1.0.4"}}