{"name":"@parcel/fs-write-stream-atomic","version":"2.3.3-nightly.2637","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":"ef16fad82001dd112c4dd46d79dce47968bb10b8","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.3.3-nightly.2637","_nodeVersion":"16.14.0","_npmVersion":"lerna/3.22.1/node@v16.14.0+x64 (linux)","dist":{"integrity":"sha512-yhl266PSZf+a4GDXqXtp19/qN+iEGt+atUFbHEsgvzzooLjabipyeJTXt84+XF5HbaGkkNbfdJIZhxYAitXY8Q==","shasum":"701a67953a1837c956c22983837efb4f0a73b4e6","tarball":"http://registry-npm.ywwl.com/@parcel/fs-write-stream-atomic/download/@parcel/fs-write-stream-atomic-2.3.3-nightly.2637.tgz","fileCount":14,"unpackedSize":20231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiK+wpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohYA//asVCwzee2jE0VjJar/yX6DRMeLnVTpvkEQ2YojpwipteZW4u\r\nd+a/m9vOMp4A4nm2K4D+3M5CqgbzEevjQlVtx1fTEvDgMHgXB8ygvSBRxJ30\r\nkdHiHgSiqjzQOJ+kJUx4T3Oxva4OdyeE6kBhm4iYbFZx7tV+rehqYt1Rx29H\r\nyLypgJwmy7gC/1saJhB7auY6o3OKVFdpuiO8CNQBK7YcTBNtMO1YpCDrt2RE\r\nXJ2Sm5zDG4yO2QB7xzfh+kgH29CKf6DaGHz1jdvFPSN/xgEGEg7IWSkTXtGA\r\nAmT+moSNzV1lxxeN/pmES3bnKXYX+7uKbThbUCewGrpRtHk0ML0cSyjjlmgk\r\nbvVwKjDnPeVHozWAMK91RkSN31+eQFki7DFBrIPvWIC2DFyDFzcf4VHpvIky\r\nB1r+QysgY48pDb2qaVJsr+c33OQh2UE1h465D22UPu56nEuxEhsh33yV10nX\r\n2WrSYvJ0FBTEdE1yFXHsFcI3E+HFfYtIzRYIQEIMaQDBOXnFuIRclsryUp1Z\r\nlboGegIie7ivB+UXNbZSbPkRT5+R/XiL/txgZujO3NgNURcYlFgZbRWaCTgI\r\np+enbyezNJ9MyNSZTj5969DXl8KhRWkim4tpFZKQtb6DitAPxX1bR50jQILO\r\nOhkmXirMVIZJ3NRkgwM7xD6NaWrLpyEv5Es=\r\n=3slw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC242HvFtV0Y4z6V23p8gd4uYwvhIMgu2xABeuaT/dKjAiBQpqPYsHCtjbP7h0CHJyNR6BiUNc2LyYTdsY8Ub7/+9A=="}],"size":6054,"noattachment":false,"key":"/@parcel/fs-write-stream-atomic/-/@parcel/fs-write-stream-atomic-2.3.3-nightly.2637.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.3.3-nightly.2637_1647045673339_0.7864642684520848"},"_hasShrinkwrap":false,"publish_time":1647045673540,"_cnpm_publish_time":1647045673540,"dist-tags":{"latest":"2.6.0","next":"2.0.0-rc.0","nightly":"2.6.1-nightly.2740"}}