@app-config/core
Advanced tools
Comparing version 2.8.5 to 2.8.6
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -7,3 +10,3 @@ exports.guessFileType = exports.parseRawString = exports.filePathAssumedType = exports.stringify = exports.FallbackSource = exports.CombinedSource = exports.LiteralSource = exports.ConfigSource = exports.FileType = void 0; | ||
const js_yaml_1 = require("js-yaml"); | ||
const json5_1 = require("json5"); | ||
const json5_1 = __importDefault(require("json5")); | ||
const logging_1 = require("@app-config/logging"); | ||
@@ -168,3 +171,3 @@ const parsed_value_1 = require("./parsed-value"); | ||
case FileType.JSON5: | ||
return (0, json5_1.stringify)(config, null, minimal ? 0 : 2); | ||
return json5_1.default.stringify(config, null, minimal ? 0 : 2); | ||
case FileType.TOML: | ||
@@ -220,3 +223,3 @@ return (0, toml_1.stringify)(config); | ||
case FileType.JSON5: | ||
return (0, json5_1.parse)(contents); | ||
return json5_1.default.parse(contents); | ||
default: | ||
@@ -223,0 +226,0 @@ throw new errors_1.BadFileType(`Unsupported FileType '${fileType}'`); |
import { extname } from 'path'; | ||
import { parse as parseTOML, stringify as stringifyTOML } from '@iarna/toml'; | ||
import { safeLoad as parseYAML, safeDump as stringifyYAML } from 'js-yaml'; | ||
import { parse as parseJSON5, stringify as stringifyJSON5 } from 'json5'; | ||
import JSON5 from 'json5'; | ||
import { logger } from '@app-config/logging'; | ||
@@ -160,3 +160,3 @@ import { ParsedValue } from './parsed-value'; | ||
case FileType.JSON5: | ||
return stringifyJSON5(config, null, minimal ? 0 : 2); | ||
return JSON5.stringify(config, null, minimal ? 0 : 2); | ||
case FileType.TOML: | ||
@@ -210,3 +210,3 @@ return stringifyTOML(config); | ||
case FileType.JSON5: | ||
return parseJSON5(contents); | ||
return JSON5.parse(contents); | ||
default: | ||
@@ -213,0 +213,0 @@ throw new BadFileType(`Unsupported FileType '${fileType}'`); |
{ | ||
"name": "@app-config/core", | ||
"description": "Core logic for App Config", | ||
"version": "2.8.5", | ||
"version": "2.8.6", | ||
"license": "MPL-2.0", | ||
@@ -33,4 +33,4 @@ "author": { | ||
"dependencies": { | ||
"@app-config/logging": "^2.8.5", | ||
"@app-config/utils": "^2.8.5", | ||
"@app-config/logging": "^2.8.6", | ||
"@app-config/utils": "^2.8.6", | ||
"@iarna/toml": "3", | ||
@@ -42,3 +42,3 @@ "js-yaml": "^3.13.1", | ||
"devDependencies": { | ||
"@app-config/test-utils": "^2.8.5", | ||
"@app-config/test-utils": "^2.8.6", | ||
"@types/js-yaml": "3", | ||
@@ -45,0 +45,0 @@ "@types/lodash.merge": "4" |
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
130457
1943
Updated@app-config/logging@^2.8.6
Updated@app-config/utils@^2.8.6