{"name":"@parcel/fs-write-stream-atomic","version":"2.5.1-nightly.2719","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":"8981c8896566ce0e52205707d7a443fddac09bd3","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.2719","_nodeVersion":"16.15.0","_npmVersion":"lerna/3.22.1/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-Bpfd5f0mkegEWOE+AKSq/GG159gYLl3Lx2ljZGk4dCLBtkQ9G93GzqkSO8KYDmcJzyTpykvvzZ644PM/MYIrqA==","shasum":"baa0ace7068a81e59036a123796039b6a3ca13b0","tarball":"http://registry-npm.ywwl.com/@parcel/fs-write-stream-atomic/download/@parcel/fs-write-stream-atomic-2.5.1-nightly.2719.tgz","fileCount":14,"unpackedSize":20231,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEdTnoXwcShpzWh4zxJOntQK0B4mdxrfPnQdZYw/bkcJAiEAtMKzkHbUhiCWlsE7KFBo3MizA6BlR5PFcaqPu7+ydFE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihEBQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoA3A//d1o+qm5MqfOvK1Vkm/bGblsHrddMm2APGkA7mker679fQcUS\r\nM+orI7Jb25FVko9VFAuwMkfoMt7mz9HOY+d+xT/XlqqZmlPs2+spWQ9PwAaL\r\ntlfzWyFyu79a9ebh+ZCpfKPVtljSPO/pLX9fBv2Pvz4s75ZwCk/EJxuGgdGO\r\nZMbYQpXfTIS/m7mxzuDgn9XZ2x8aN6ahENEe1nEc5vnkHQhanLit/K30NFxU\r\nLtKtQu0mPn/++okWuVKaOG9Uez+Ev1SMbGNLOcpHkjTmJNd/9dVGibIoZXEN\r\nEcqz3Ej+v7o6Uciz7L4M+drqLSnE1ubC2tYIE4znIj4Pr3OIZ0mgbIEQWO1K\r\n1a1iTnHO/7J+sZR4PwPs9JivvDo8mllltbcklP2TU21kZH3C9e8NdTzkGEm2\r\ngCwoLBVFRFesnSYrIDAkH8DK+0065PXoMccX1YZwW9SxuXNMPixE2UGBJsdG\r\nRBD1ZAwsa/XX1JnJEPXb3YdG2L04gkAqjYb+UYI5XvzbVLjeH+wBG4Li43UY\r\nyu3xFzT4MCXUJG3ji7BjI7gKeIu8s1V/X1mvZgCKXdtqjznNO/kHVDexgIW8\r\noRxZvtAyPBvvS27TKgR/x4k2WmKeu/o/9+7hj+4Q4b2nNRTZBw7kVJLxgRx0\r\nUHCun+J7AFCTivYjGpfSkDswMIuRq48ffwI=\r\n=miAs\r\n-----END PGP SIGNATURE-----\r\n","size":6057,"noattachment":false,"key":"/@parcel/fs-write-stream-atomic/-/@parcel/fs-write-stream-atomic-2.5.1-nightly.2719.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.2719_1652834384785_0.19017859995804076"},"_hasShrinkwrap":false,"publish_time":1652834384889,"_cnpm_publish_time":1652834384889,"dist-tags":{"latest":"2.6.0","next":"2.0.0-rc.0","nightly":"2.6.1-nightly.2740"}}