{"name":"@parcel/fs-write-stream-atomic","version":"2.0.2-nightly.2575","description":"Like `fs.createWriteStream(...)`, but atomic.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/parcel-bundler/parcel.git","directory":"packages/utils/fs-write-stream-atomic"},"directories":{"test":"test"},"funding":{"type":"opencollective","url":"https://opencollective.com/parcel"},"publishConfig":{"access":"public"},"dependencies":{"graceful-fs":"^4.1.2","iferr":"^1.0.2","imurmurhash":"^0.1.4","readable-stream":"1 || 2"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"8823770717bf451da2667b4d0d24b8915698856d","readme":"# fs-write-stream-atomic\n\nLike `fs.createWriteStream(...)`, but atomic.\n\nWrites to a tmp file and does an atomic `fs.rename` to move it into\nplace when it's done.\n\nFirst rule of debugging: **It's always a race condition.**\n\n## USAGE\n\n```javascript\nvar fsWriteStreamAtomic = require('fs-write-stream-atomic');\n// options are optional.\nvar write = fsWriteStreamAtomic('output.txt', options);\nvar read = fs.createReadStream('input.txt');\nread.pipe(write);\n\n// When the write stream emits a 'finish' or 'close' event,\n// you can be sure that it is moved into place, and contains\n// all the bytes that were written to it, even if something else\n// was writing to `output.txt` at the same time.\n```\n\n### `fsWriteStreamAtomic(filename, [options])`\n\n- `filename` {String} The file we want to write to\n- `options` {Object}\n  - `chown` {Object} User and group to set ownership after write\n    - `uid` {Number}\n    - `gid` {Number}\n  - `encoding` {String} default = 'utf8'\n  - `mode` {Number} default = `0666`\n  - `flags` {String} default = `'w'`\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/parcel-bundler/parcel/issues"},"homepage":"https://github.com/parcel-bundler/parcel#readme","_id":"@parcel/fs-write-stream-atomic@2.0.2-nightly.2575","_nodeVersion":"16.13.1","_npmVersion":"lerna/3.20.2/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-6VAdnRNhwVp/vw9Dj4DCQQtbu5rvb1GCHxw4NQp1kDL6x1Tl/dl+HxVo/uhpkjKsJRruXCUVIia/agPiJPjU0g==","shasum":"80068138210f1e932d2db1fa76dae7c80c445eeb","tarball":"http://registry-npm.ywwl.com/@parcel/fs-write-stream-atomic/download/@parcel/fs-write-stream-atomic-2.0.2-nightly.2575.tgz","fileCount":14,"unpackedSize":20263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhv9C7CRA9TVsSAnZWagAAiGYP/j1espLGgekH6Fs3fVAf\njooTOiFTXev+4qZ5qpe2qPILJkra8+ven0JhVH+ZkRbTX3t2eYyz4gDGScl6\n9wsomrwZT9dY0xaIIA/6aE35RWC9emQr5r1+BkIA16nOAyEZU5/8O1B4I0n4\ngtavdT6fWiFttLg7iwcFaMOI6xMs0F0dm0vMPaQUM5vb7irqReqWHuxm+yeY\n+WgFGDUNFq3+nYenoMbAKyZ1mZhJFIo+H+J344Vt7JBInipqCRSFvbMK8cHt\nhCrzvsTjqe2D0NpaOgArTdSxY7n03fs4tWP2W/i0+kwn/78nuJKQcV5O3swh\nWljyxyeDJRHD4fBk2TbCS9Gl7nF6J+qM/BM16axa8YX5M1M4QawCCAPgPNmB\nt/HDo1WsaBDwiXtte2kY9ZOLKHwVi+T9gitEbEstOPJAq/1yrDxUkaEGs3Ol\nyn0UpzmkOgMtQFMUkybxPfHWZ1617o62vCWKtpj6YMrIw0ihu+03atXVEFjp\nsysK56vH4mR5FQMRGh/NkCxh/br1aTnsSEInLY1s+PSYsulJcf6z+mNnO/+J\nuUPg3CkADk6JAmnf0azAEzrcn0dFxn1aVhI1aaPNf/Fq7X+6lNl3l7nSh6Si\nxaEs01zkDI4RKC+fF091cZEK2kiABTmBaLiy3tKp/E3QZNy2SKG+nnS70TIJ\nZTJE\r\n=5QCg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN/5twxxheo3VEuD8BzSfvf2ZBP1w1Xmg8zTcnXK04qgIgJMAABdQbms0ssuBrpgDZZi5xd1rN8FHSqSo21jW7Uy8="}],"size":6079,"noattachment":false,"key":"/@parcel/fs-write-stream-atomic/-/@parcel/fs-write-stream-atomic-2.0.2-nightly.2575.tgz"},"_npmUser":{"name":"devongovett","email":"devongovett@gmail.com"},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-write-stream-atomic_2.0.2-nightly.2575_1639960763236_0.930292827746682"},"_hasShrinkwrap":false,"publish_time":1639960763400,"_cnpm_publish_time":1639960763400,"dist-tags":{"latest":"2.6.0","next":"2.0.0-rc.0","nightly":"2.6.1-nightly.2740"}}