write-file-atomic
Advanced tools
Comparing version 3.0.3 to 4.0.0
{ | ||
"name": "write-file-atomic", | ||
"version": "3.0.3", | ||
"version": "4.0.0", | ||
"description": "Write files in an atomic fashion w/configurable ownership", | ||
"main": "index.js", | ||
"main": "./lib/index.js", | ||
"scripts": { | ||
"test": "tap", | ||
"posttest": "npm run lint", | ||
"lint": "standard", | ||
"postlint": "rimraf chowncopy good nochmod nochown nofsync nofsyncopt noopen norename \"norename nounlink\" nowrite", | ||
"lint": "eslint '**/*.js'", | ||
"postlint": "npm-template-check", | ||
"preversion": "npm test", | ||
"postversion": "npm publish", | ||
"prepublishOnly": "git push origin --follow-tags" | ||
"prepublishOnly": "git push origin --follow-tags", | ||
"lintfix": "npm run lint -- --fix", | ||
"snap": "tap" | ||
}, | ||
@@ -23,3 +25,3 @@ "repository": { | ||
], | ||
"author": "Rebecca Turner <me@re-becca.org> (http://re-becca.org)", | ||
"author": "GitHub Inc.", | ||
"license": "ISC", | ||
@@ -34,17 +36,21 @@ "bugs": { | ||
"signal-exit": "^3.0.2", | ||
"typedarray-to-buffer": "^3.1.5" | ||
"typedarray-to-buffer": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"mkdirp": "^0.5.1", | ||
"require-inject": "^1.4.4", | ||
"rimraf": "^2.6.3", | ||
"standard": "^14.3.1", | ||
"tap": "^14.10.6" | ||
"@npmcli/template-oss": "^2.5.1", | ||
"mkdirp": "^1.0.4", | ||
"rimraf": "^3.0.2", | ||
"tap": "^15.1.6" | ||
}, | ||
"files": [ | ||
"index.js" | ||
"bin", | ||
"lib" | ||
], | ||
"tap": { | ||
"100": true | ||
"engines": { | ||
"node": "^12.13.0 || ^14.15.0 || >=16" | ||
}, | ||
"templateOSS": { | ||
"windowsCI": false, | ||
"version": "2.5.1" | ||
} | ||
} |
@@ -7,4 +7,10 @@ write-file-atomic | ||
### var writeFileAtomic = require('write-file-atomic')<br>writeFileAtomic(filename, data, [options], [callback]) | ||
### `writeFileAtomic(filename, data, [options], [callback])` | ||
#### Description: | ||
Atomically and asynchronously writes data to a file, replacing the file if it already | ||
exists. data can be a string or a buffer. | ||
#### Options: | ||
* filename **String** | ||
@@ -22,5 +28,9 @@ * data **String** | **Buffer** | ||
Atomically and asynchronously writes data to a file, replacing the file if it already | ||
exists. data can be a string or a buffer. | ||
#### Usage: | ||
```js | ||
var writeFileAtomic = require('write-file-atomic') | ||
writeFileAtomic(filename, data, [options], [callback]) | ||
``` | ||
The file is initially named `filename + "." + murmurhex(__filename, process.pid, ++invocations)`. | ||
@@ -72,4 +82,13 @@ Note that `require('worker_threads').threadId` is used in addition to `process.pid` if running inside of a worker thread. | ||
### var writeFileAtomicSync = require('write-file-atomic').sync<br>writeFileAtomicSync(filename, data, [options]) | ||
### `writeFileAtomicSync(filename, data, [options])` | ||
#### Description: | ||
The synchronous version of **writeFileAtomic**. | ||
#### Usage: | ||
```js | ||
var writeFileAtomicSync = require('write-file-atomic').sync | ||
writeFileAtomicSync(filename, data, [options]) | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
236
92
12186
4
2
+ Addedtypedarray-to-buffer@4.0.0(transitive)
- Removedtypedarray-to-buffer@3.1.5(transitive)
Updatedtypedarray-to-buffer@^4.0.0