@rushstack/node-core-library
Advanced tools
Comparing version 5.4.1 to 5.5.0
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.46.1" | ||
"packageVersion": "7.46.2" | ||
} | ||
] | ||
} |
@@ -115,3 +115,3 @@ import type { JsonSchema, IJsonSchemaErrorInfo, IJsonSchemaValidateOptions } from './JsonSchema'; | ||
*/ | ||
export interface IJsonFileStringifyOptions { | ||
export interface IJsonFileStringifyOptions extends IJsonFileParseOptions { | ||
/** | ||
@@ -118,0 +118,0 @@ * If provided, the specified newline type will be used instead of the default `\r\n`. |
@@ -200,2 +200,14 @@ "use strict"; | ||
} | ||
let explicitMode = undefined; | ||
switch (options.jsonSyntax) { | ||
case JsonSyntax.Strict: | ||
explicitMode = 'json'; | ||
break; | ||
case JsonSyntax.JsonWithComments: | ||
explicitMode = 'cjson'; | ||
break; | ||
case JsonSyntax.Json5: | ||
explicitMode = 'json5'; | ||
break; | ||
} | ||
let stringified; | ||
@@ -205,3 +217,3 @@ if (previousJson !== '') { | ||
stringified = jju.update(previousJson, newJsonObject, { | ||
mode: JsonSyntax.Json5, | ||
mode: explicitMode !== null && explicitMode !== void 0 ? explicitMode : JsonSyntax.Json5, | ||
indent: 2 | ||
@@ -212,3 +224,3 @@ }); | ||
stringified = jju.stringify(newJsonObject, { | ||
mode: 'json', | ||
mode: explicitMode !== null && explicitMode !== void 0 ? explicitMode : 'json', | ||
indent: 2 | ||
@@ -215,0 +227,0 @@ }); |
{ | ||
"name": "@rushstack/node-core-library", | ||
"version": "5.4.1", | ||
"version": "5.5.0", | ||
"description": "Core libraries that every NodeJS toolchain project should use", | ||
@@ -24,4 +24,4 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@rushstack/heft": "0.66.16", | ||
"@rushstack/heft-node-rig": "2.6.14", | ||
"@rushstack/heft": "0.66.17", | ||
"@rushstack/heft-node-rig": "2.6.15", | ||
"@types/fs-extra": "7.0.0", | ||
@@ -28,0 +28,0 @@ "@types/heft-jest": "1.0.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
1071584
13850