{"name":"@parcel/fs-write-stream-atomic","version":"2.5.1-nightly.2709","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"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"b833a5f52387bf25cfa60a5555dd4e9a399b906d","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.5.1-nightly.2709","_nodeVersion":"16.15.0","_npmVersion":"lerna/3.22.1/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-L7N7rk7sRND8+ti9Wga3R0e+npODF9gz9qi505V0W2ddkcTp2cuaVApmMfzJlFTXzhRRVanBjofQdsn7+HIbaQ==","shasum":"17eb13c9bde59edadfc7de0e6356d0ae62a917a1","tarball":"http://registry-npm.ywwl.com/@parcel/fs-write-stream-atomic/download/@parcel/fs-write-stream-atomic-2.5.1-nightly.2709.tgz","fileCount":14,"unpackedSize":20222,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIrL0DNLe3uks6kk74Fao3AjVEtHqMZ5NDEDgpOGPqQAIgHUcEqJHgHPon/6Kowt7nN9fxLqHdpOzJ+PBY/tDpuE4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidxK6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1PQ/+OmdQz9r2V8/EXjkzZRA0lbAIa8gS4/Uc7Wm3jJEmNqVKJ0MM\r\nKi3HbXj2KGbiB5qGWxPHuzPTCfDfSSP6f94BPoA+LkoWo/NI+S783XCTzfG+\r\nElzR4TNlazo6rgxy3Chv5lu4ZeFlesWwE0Z1WSNIoUaSZGfKMMPLGxH5n3vk\r\nFDNnFxYBCKU1fO7usjMZXK/Zi7diGxyaKciPEDlg/wt1YN7kyCzfqX+xhIvo\r\n/x1D4mhqgT3+PYeMynCYq8/O0RF1pNf40EuPMBb0ypNhCETBBVKeBB6bOYr6\r\nox2wDHcLBMU5NuShQ47BzRvSmQj8ye0KP2VOUvBaTLdpcnPTr6fJqYr0PKHZ\r\nUb+dwDvXzhg0if9T2vGNVjlFyVtFMn0aqVWYO58S5ftZYG3iozEhIYla3EuO\r\nQvV/YXHv8FjxwCtXpcYpDRvutwlH0D70pcEPTMFYOnX2Z9HxIF0Iti0hOexu\r\nAeyGQsZWlNWJj2H1h9IuffLkRHqf6xYXuP9lkVbhF96fb8MDuh5ipxzCYgB3\r\negzsTgx6SGpD56G/Yh7Uo8pjIagiRXsj9ons9kMih3SKF9R1q11wDi47t0Qz\r\nzMR6ZQSCYSMigu/U3M13MWQoclcMfb/t78NuXS9ZCjCHBrD60LxJP6mZAEdB\r\nxM65fjHkTvfwBw5dWnPBG6YS+794ogfHkbk=\r\n=kh3G\r\n-----END PGP SIGNATURE-----\r\n","size":6060,"noattachment":false,"key":"/@parcel/fs-write-stream-atomic/-/@parcel/fs-write-stream-atomic-2.5.1-nightly.2709.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.5.1-nightly.2709_1651970745891_0.3022017866353528"},"_hasShrinkwrap":false,"publish_time":1651970746095,"_cnpm_publish_time":1651970746095,"dist-tags":{"latest":"2.6.0","next":"2.0.0-rc.0","nightly":"2.6.1-nightly.2740"}}