balena-settings-client
Advanced tools
Comparing version 4.0.3 to 4.0.4-lazy-load-js-yaml-45df10847d49e5d89e9414e5d401114245c5e6ee
@@ -18,4 +18,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var jsYaml = require("js-yaml"); | ||
var _ = require("lodash"); | ||
/** | ||
@@ -37,4 +35,5 @@ * @summary Parse a YAML string | ||
exports.parse = function (yaml) { | ||
var jsYaml = require('js-yaml'); | ||
var result = jsYaml.safeLoad(yaml); | ||
if (_.isString(result) || !result) { | ||
if (typeof result === 'string' || !result) { | ||
throw new Error("Invalid YAML: " + yaml); | ||
@@ -41,0 +40,0 @@ } |
@@ -7,2 +7,6 @@ # Change Log | ||
## 4.0.4 - 2020-03-02 | ||
* Lazy-load js-yaml [Pagan Gazzard] | ||
## 4.0.3 - 2020-02-28 | ||
@@ -9,0 +13,0 @@ |
@@ -17,5 +17,2 @@ /* | ||
import * as jsYaml from 'js-yaml'; | ||
import * as _ from 'lodash'; | ||
/** | ||
@@ -37,4 +34,5 @@ * @summary Parse a YAML string | ||
export const parse = (yaml: string): object => { | ||
const jsYaml = require('js-yaml') as typeof import('js-yaml'); | ||
const result = jsYaml.safeLoad(yaml); | ||
if (_.isString(result) || !result) { | ||
if (typeof result === 'string' || !result) { | ||
throw new Error(`Invalid YAML: ${yaml}`); | ||
@@ -41,0 +39,0 @@ } |
{ | ||
"name": "balena-settings-client", | ||
"version": "4.0.3", | ||
"version": "4.0.4-lazy-load-js-yaml-45df10847d49e5d89e9414e5d401114245c5e6ee", | ||
"description": "Balena client application shared settings", | ||
@@ -5,0 +5,0 @@ "main": "build/settings.js", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
85948
1982
1