{"name":"@parcel/fs-write-stream-atomic","version":"2.0.2-nightly.2571","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":"588bf4c0d6d9dac65a9bf89bf734d7684b523ca2","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.2571","_nodeVersion":"16.13.1","_npmVersion":"lerna/3.20.2/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-InkfwJUjCosyhlVi9FPvnDGiXVeMbs8QXIvXf5usXe4BY6Pho3zREn6wzmBeiay3F7wbD4CgajhsPQyIEBkNTA==","shasum":"54337be2febfe5e968f065388287e93a43c92a4d","tarball":"http://registry-npm.ywwl.com/@parcel/fs-write-stream-atomic/download/@parcel/fs-write-stream-atomic-2.0.2-nightly.2571.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\nwsFcBAEBCAAQBQJhu4+ICRA9TVsSAnZWagAAD8UP/0yNTSufVO7bwVSgjSwE\nipfKusJM8O5RRyb495L4YwTZ5Wh08rSo5EqMb/6MJcRhy/+xqGjxmve++3zp\nkQt6w0t3nEATgNAek7UhglX80QKcAcBEU5q3e6qppzTzRCZdsV4i6H4TlU5l\naTiH0dXJbq5VmSspMK0EpbwjvlA3bviaQ00uIV96W/hyNx6TaroQUoAFtXKj\nSz4eP4PASHxEo63OxjGsZbzjMUlmKjtrrOxGXkVvn40wyCkwwrygdTRaM8pH\n8RwtfxNK4DpIC53kIk3OL6EhyJxXfaBjZPXBhM4K0iFPYfqEbwKTzOPib/Xo\nMEQ3qQOwh3cdg9a3x0UpIaKirNhdkF6OYlI3uhY31OTo27DyAaRXaSJvHU7v\ndetvtKyCfc715JSlbO3ELc3YRhm/LX2xqkHUKAFFVVNFTdI3uznLcmZDFZNv\nk8LAzzwTp8AwA/4YefXpqe+PoK0HKpfE5V9CDfuEV4aUX4Wi8BLL8fKR1jdI\nRdlPKITbZDNxcLVTRMjVDf1mbk3Jar/woNZEW+SpMJS9+kFdsVBJv48pPnGL\n9FmTHk1SEjKGdh3RSbBLkm9lYDNisPmnVjp5JPXKJm2WrMEt/k+dyLV8xMem\nc23ZwwuBB4XpqINPMG/h64BzeC2ie5Gz+0/yy4USB0r5KlVo/bwozv7FqWFU\nYOpF\r\n=qdvm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLE28JmbH7HtcEoE+hYpQKrblY61ZFk0HCGYnY2pgLnQIhAJgEReahYCekmGnV0zyMMx4H3gr+xf6sCB71DfH6TuT3"}],"size":6078,"noattachment":false,"key":"/@parcel/fs-write-stream-atomic/-/@parcel/fs-write-stream-atomic-2.0.2-nightly.2571.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.2571_1639681927975_0.08060349033486824"},"_hasShrinkwrap":false,"publish_time":1639681928161,"_cnpm_publish_time":1639681928161,"dist-tags":{"latest":"2.6.0","next":"2.0.0-rc.0","nightly":"2.6.1-nightly.2740"}}