Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap-ux/yaml

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/yaml - npm Package Compare versions

Comparing version 0.11.3 to 0.11.4

38

dist/yaml-document.js

@@ -51,3 +51,3 @@ "use strict";

if (((_a = this.document.errors) === null || _a === void 0 ? void 0 : _a.length) > 0) {
throw new Error((0, i18n_1.t)('error.yamlParsing') + '\n' + this.document.errors.map((e) => e.message).join(''));
throw new Error(i18n_1.t('error.yamlParsing') + '\n' + this.document.errors.map((e) => e.message).join(''));
}

@@ -65,3 +65,3 @@ }

return __awaiter(this, void 0, void 0, function* () {
yield (0, i18n_1.initI18n)();
yield i18n_1.initI18n();
return new YamlDocument(serializedYaml);

@@ -131,3 +131,3 @@ });

// Not at root and we're not asked to create the intermediate keys
throw new Error((0, i18n_1.t)('error.pathDoesNotExist', { path: parentPath }));
throw new Error(i18n_1.t('error.pathDoesNotExist', { path: parentPath }));
}

@@ -159,3 +159,3 @@ }

if (!createIntermediateKeys) {
throw new Error((0, i18n_1.t)('error.seqDoesNotExist', { path }));
throw new Error(i18n_1.t('error.seqDoesNotExist', { path }));
}

@@ -165,4 +165,4 @@ seq = new yaml_1.YAMLSeq();

}
else if (!(0, yaml_1.isSeq)(seq)) {
throw new Error((0, i18n_1.t)('error.tryingToAppendToNonSequence', { path }));
else if (!yaml_1.isSeq(seq)) {
throw new Error(i18n_1.t('error.tryingToAppendToNonSequence', { path }));
}

@@ -176,3 +176,3 @@ const newNode = this.document.createNode(value);

if (typeof value !== 'object') {
throw new Error((0, i18n_1.t)('error.scalarValuesDoNotHaveProperties'));
throw new Error(i18n_1.t('error.scalarValuesDoNotHaveProperties'));
}

@@ -184,3 +184,3 @@ const index = seq.items.length - 1;

if (!n) {
throw new Error((0, i18n_1.t)('error.propertyNotFound', { path: c.path }));
throw new Error(i18n_1.t('error.propertyNotFound', { path: c.path }));
}

@@ -208,3 +208,3 @@ n.comment = c.comment;

if (!seq) {
throw new Error((0, i18n_1.t)('error.seqDoesNotExist', { path }));
throw new Error(i18n_1.t('error.seqDoesNotExist', { path }));
}

@@ -231,3 +231,3 @@ const node = seq.items.find((nodeInput) => nodeInput.toJSON()[matcher.key] === matcher.value);

if (!seq || !seq.items) {
throw new Error((0, i18n_1.t)('error.seqDoesNotExist', { path }));
throw new Error(i18n_1.t('error.seqDoesNotExist', { path }));
}

@@ -244,3 +244,3 @@ const deletedNode = seq.items.find((node, index) => {

if (!deletedNode) {
throw new Error((0, i18n_1.t)('error.propertyNotFound', { path }));
throw new Error(i18n_1.t('error.propertyNotFound', { path }));
}

@@ -257,4 +257,4 @@ return this;

if (start) {
if (!((0, yaml_1.isSeq)(start) || (0, yaml_1.isMap)(start))) {
throw new Error((0, i18n_1.t)('error.startNodeMustBeCollection'));
if (!(yaml_1.isSeq(start) || yaml_1.isMap(start))) {
throw new Error(i18n_1.t('error.startNodeMustBeCollection'));
}

@@ -266,3 +266,3 @@ }

if (!targetNode) {
throw new Error((0, i18n_1.t)('error.nodeNotFound', { path }));
throw new Error(i18n_1.t('error.nodeNotFound', { path }));
}

@@ -281,4 +281,4 @@ else {

const a = this.getNode({ start, path });
if (!(0, yaml_1.isSeq)(a)) {
throw new Error((0, i18n_1.t)('error.seqDoesNotExist', { path }));
if (!yaml_1.isSeq(a)) {
throw new Error(i18n_1.t('error.seqDoesNotExist', { path }));
}

@@ -297,4 +297,4 @@ else {

const a = this.getNode({ start, path });
if (!(0, yaml_1.isMap)(a)) {
throw new Error((0, i18n_1.t)('error.nodeNotAMap', { path }));
if (!yaml_1.isMap(a)) {
throw new Error(i18n_1.t('error.nodeNotAMap', { path }));
}

@@ -327,3 +327,3 @@ else {

if (!result || result.length === 0) {
throw new Error((0, i18n_1.t)('error.pathCannotBeEmpty'));
throw new Error(i18n_1.t('error.pathCannotBeEmpty'));
}

@@ -330,0 +330,0 @@ return result;

@@ -12,3 +12,3 @@ {

},
"version": "0.11.3",
"version": "0.11.4",
"main": "dist/index.js",

@@ -15,0 +15,0 @@ "files": [

Sorry, the diff of this file is not supported yet

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