{"bugs":{"url":"https://github.com/parcel-bundler/parcel/issues"},"dist":{"shasum":"2b4b74062be1232d858780e3ad340ee22e0949e0","tarball":"https://registry.npmjs.org/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.1-nightly.2520.tgz","fileCount":14,"integrity":"sha512-LQVdh3zK6AM8D3xuHd5pzODJmd8lp4vYFRgyx/t5C2m5qg8gzr7JGu0BdvDzZMGpLJt+kuy9gi8ytK/03ByvEQ==","signatures":[{"sig":"MEQCIFERLAJHrKTTcCtnjYM+l02THHhAfFp1lfof5r0Vp3jrAiAD7femNizIvm8f7Vp87xz3VLi8JrEfOIqJrSWNauz0XA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20188},"main":"index.js","name":"@parcel/fs-write-stream-atomic","author":{"url":"http://blog.izs.me/","name":"Isaac Z. Schlueter","email":"i@izs.me"},"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","funding":{"url":"https://opencollective.com/parcel","type":"opencollective"},"gitHead":"c8a64c9a533072c12681ca0805d1e4d7481ee53d","license":"ISC","_npmUser":{"name":"devongovett","email":"devongovett@gmail.com"},"homepage":"https://github.com/parcel-bundler/parcel#readme","repository":{"url":"git+https://github.com/parcel-bundler/parcel.git","type":"git","directory":"packages/utils/fs-write-stream-atomic"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"Like `fs.createWriteStream(...)`, but atomic.","directories":{"test":"test"},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"}],"_nodeVersion":"14.18.1","dependencies":{"iferr":"^1.0.2","graceful-fs":"^4.1.2","imurmurhash":"^0.1.4","readable-stream":"1 || 2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/fs-write-stream-atomic_2.0.1-nightly.2520_1635727230038_0.7714899453318784","host":"s3://npm-registry-packages"},"_id":"@parcel/fs-write-stream-atomic@2.0.1-nightly.2520","version":"2.0.1-nightly.2520"}