{"name":"@parcel/fs-write-stream-atomic","version":"2.0.2-nightly.2584","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":"5746ab1b59bc90230435b78679326b3e5ef0a5a7","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.2584","_nodeVersion":"16.13.1","_npmVersion":"lerna/3.20.2/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-pVHVIbAS1rjrJgNn8OYmDvhzQ0z72rILJ/g0mMi29rU/VNjBm/d7Bg6zfn0zCVZH/Xd6cGKd6WN2OJe2C8fXBw==","shasum":"a11caa3385bced33b8e02a79bce8f8929ffe59af","tarball":"http://registry-npm.ywwl.com/@parcel/fs-write-stream-atomic/download/@parcel/fs-write-stream-atomic-2.0.2-nightly.2584.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\nwsFcBAEBCAAQBQJh0POsCRA9TVsSAnZWagAA7b4P/iwB2NqAHV7KzoONcIOz\njfZXAOQwYi6MjNeJJM7IGQNiOdH1oF3X+fqJYxEmW+wzMVybZFfkJFJJPbci\nwnvV2cz8vFMrR6Q16TmIUQUd/k+uMDl1P2L0QvTR4c7l/3LLPW8Ta0dUTz5b\n4gX8p+5w45GLyIlxQPdQfnUnn+fYtD4Nqa+4oPTqkRYxa05jnWIts2Gjl+5D\noKTOyuTsPtlKedqw4RaYDjByJnPpYCGTo2lq4G7i1KuQob2woHgX24V/X/W4\nVaJc1tvUGLhuEqd83gHVP/HyAwVS0oFa7IfvWP44vfTbS70sAvvvF3Zl+oVC\niXHcmyms6RIeErAsZAgB77wMgtX/VQUg3k8G4DiIlQgSjjAmo6JqieTkhulL\nRTaHhxay2XCRe+PkdKLvLtDdFCboTUto3GqYEUh6o9eIHqKfGEOt5m5jE4fF\nAQN/kmkUpCyxF6RQm86hp7bLNS0CaEvSeca9ckSWb3WusD/MriM9ftjzDJp4\nTxbHdBKRLXvMBmdDJQdoupg6ISpUs9TDzUprNKckNVZeF8N0GppB51iIiXr2\nAcukcuJ6aIr8Z+JJMQg2v7N1UCHv9LhDgPk3WejcHCvvTiumhM8cJLNFqOq/\nSqApEnTdtQyjznx4pD2bClmPd66zSacqsLeSlXm0/apBi61IOKBvKPLyDJxJ\nzhIA\r\n=SXLe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIENhWAVDbpaExyLJ0Yd/zFPZkcNSIobLCLV70rSCVkDwAiEAgp2kAklvjs2UKQAorZVs0gyOoOhdwB1ODdin2+MThaM="}],"size":6079,"noattachment":false,"key":"/@parcel/fs-write-stream-atomic/-/@parcel/fs-write-stream-atomic-2.0.2-nightly.2584.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.2584_1641083820387_0.08765198722559342"},"_hasShrinkwrap":false,"publish_time":1641083820531,"_cnpm_publish_time":1641083820531,"dist-tags":{"latest":"2.6.0","next":"2.0.0-rc.0","nightly":"2.6.1-nightly.2740"}}