{"name":"@parcel/fs-write-stream-atomic","version":"2.1.2-nightly.2600","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":"f53ffe772a8259d94ca2937d02fde149454112f3","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.1.2-nightly.2600","_nodeVersion":"16.13.1","_npmVersion":"lerna/3.20.2/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-bY01gy5fVlq/wA/7/gj7I72PpYyXajyR43rI5Nc+4UEXBND3VwEq/dFzg6Q+jBftZmeaBPStQL7VdYVsOEjsEw==","shasum":"1682ad6859ad8d3fdaba4bd3bd5ab98df92120e3","tarball":"http://registry-npm.ywwl.com/@parcel/fs-write-stream-atomic/download/@parcel/fs-write-stream-atomic-2.1.2-nightly.2600.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\nwsFcBAEBCAAQBQJh2N3BCRA9TVsSAnZWagAAxRIQAKGenuZJy76tePPC+e5u\nML+IlTkpjAI5yqEWRzEvuSMwfW1LlqQetfoKcKth5izMB7RroMwCT+14KVZB\n71ZPxznjgC8Z7YKY4P+EqJdPV4eGzPVu5wj8m7lhJXpro2xVXXNah3uIuYpb\nA3fqTsARsdG/fLrpS4XKFeEehnvWf87PbK2C3HOPHDFyQdE6GfaSdqsZNg/v\nIxVOnjSc+Q2ISYtuPeGUdwozmPWEBevFMyuhnf28rzQwRn//cq7qBHYSphvc\nzJL4flSRMaGwo4FJyYsTeMt4cTjVBDK7iNDC4+Oz7ax4ADwzJ6W6coft4IYA\n3BEEiCfNpu6qDCV306Ja8QSJCOMRh2yhQBtfQKI9i+QNvdo19+IwZk+MB23u\nfOghCsnS/n+TVVVISarrbUmGnLW+1frQJpCCoG91h/MQ95jR6eVxr4JcJFEb\nITCnb7S81NN51PI0B8jc7tBvAzBcBEwsQeXcLPQ1yJC5idw0PRmN81PmVXr0\nQwni4bjjW0CRtDDN7NqAFPEmgedC5VaMic0zaaWtZ40vgRYtiCTVqVJuiuEf\n3lQPcBuj13nRPkL9Q9V7M0lAKgJWePA/eW+ItmW0YU1aGTzO27v3iK7eYq8y\n4ux7gsaD582vUz4awk6U2od9AYzUP/jNWr2/10R1BLJx463qtpOuZJhE1KeE\nFSC+\r\n=ZZcw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiQjq21yn+6wYu8uDjH88ZAe90OEzhzVL/e9bcBxB3vwIgToF1gCXeFFs1PZdLoleTvSL9Pau6obkiNkeEBZ9iGl0="}],"size":6076,"noattachment":false,"key":"/@parcel/fs-write-stream-atomic/-/@parcel/fs-write-stream-atomic-2.1.2-nightly.2600.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.1.2-nightly.2600_1641602496864_0.7036631243094766"},"_hasShrinkwrap":false,"publish_time":1641602497021,"_cnpm_publish_time":1641602497021,"dist-tags":{"latest":"2.6.0","next":"2.0.0-rc.0","nightly":"2.6.1-nightly.2740"}}