Socket
Socket
Sign inDemoInstall

write-json-file

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

write-json-file - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

6

index.d.ts
export type Replacer = (this: unknown, key: string, value: unknown) => unknown;
export type SortKeys = (a: string, b: string) => number;
export interface Options {
export type Options = {
/**

@@ -10,2 +10,4 @@ Indentation as a string or number of spaces.

If you set both this and `detectIndent`, this value will be used when the indentation cannot be detected.
@default '\t'

@@ -42,3 +44,3 @@ */

readonly mode?: number;
}
};

@@ -45,0 +47,0 @@ /**

{
"name": "write-json-file",
"version": "5.0.0",
"version": "6.0.0",
"description": "Stringify and write JSON to a file atomically",

@@ -14,5 +14,9 @@ "license": "MIT",

"type": "module",
"exports": "./index.js",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"sideEffects": false,
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": ">=18"
},

@@ -41,13 +45,13 @@ "scripts": {

"dependencies": {
"detect-indent": "^7.0.0",
"is-plain-obj": "^4.0.0",
"detect-indent": "^7.0.1",
"is-plain-obj": "^4.1.0",
"sort-keys": "^5.0.0",
"write-file-atomic": "^3.0.3"
"write-file-atomic": "^5.0.1"
},
"devDependencies": {
"ava": "^3.15.0",
"tempy": "^1.0.1",
"tsd": "^0.17.0",
"xo": "^0.44.0"
"ava": "^6.1.3",
"tempy": "^2.0.0",
"tsd": "^0.31.1",
"xo": "^0.59.2"
}
}

@@ -9,5 +9,5 @@ # write-json-file

```sh
npm install write-json-file
```
$ npm install write-json-file
```

@@ -28,3 +28,3 @@ ## Usage

### writeJsonFile.sync(filePath, data, options?)
### writeJsonFileSync(filePath, data, options?)

@@ -37,3 +37,3 @@ #### options

Type: `string | number`\
Type: `string | number | undefined`\
Default: `'\t'`

@@ -45,2 +45,4 @@

If you set both this and `detectIndent`, this value will be used when the indentation cannot be detected.
##### detectIndent

@@ -75,8 +77,2 @@

## write-json-file for enterprise
Available as part of the Tidelift Subscription.
The maintainers of write-json-file and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-write-json-file?utm_source=npm-write-json-file&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## Related

@@ -86,2 +82,1 @@

- [make-dir](https://github.com/sindresorhus/make-dir) - Make a directory and its parents if needed
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc