Socket
Socket
Sign inDemoInstall

@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.12.2 to 0.12.3

36

dist/yaml-document.d.ts

@@ -105,4 +105,4 @@ import type { YAMLMap } from 'yaml';

* @param {object} path.value - the path object's value
* @param path.matcher.key
* @param path.matcher.value
* @param path.matcher.key - name of the key
* @param path.matcher.value - value of the key
* @returns {YamlDocument} the YamlDocument instance

@@ -138,6 +138,6 @@ * @memberof YamlDocument

/**
* @param root0
* @param root0.start
* @param root0.path
* @returns {unknown}
* @param options - Options
* @param options.start - Optional collection type to start looking from
* @param options.path - String path of the node
* @returns {unknown} - Node, if found. Will throw an error if not
*/

@@ -149,6 +149,6 @@ getNode({ start, path }: {

/**
* @param root0
* @param root0.start
* @param root0.path
* @returns {unknown}
* @param options - Options
* @param options.start - Optional collection type to start looking from
* @param options.path - String path of the sequence
* @returns {YAMLSeq} - Sequence, if found. Will throw an error if not
*/

@@ -160,6 +160,6 @@ getSequence({ start, path }: {

/**
* @param root0
* @param root0.start
* @param root0.path
* @returns {YAMLMap}
* @param options - Options
* @param options.start - Optional collection type to start looking from
* @param options.path - String path of the map
* @returns {YAMLMap} - Map, if found. Will throw an error if not
*/

@@ -171,5 +171,5 @@ getMap({ start, path }: {

/**
* @param sequence
* @param predicate
* @returns {unknown}
* @param sequence - Sequence to find the item in
* @param predicate - predicate function to determine the match
* @returns {unknown} - Item node if found. Or undefined if not
*/

@@ -182,3 +182,3 @@ findItem(sequence: YAMLSeq, predicate: (o: any) => boolean): unknown;

* @template T
* @param {Path<T>} path - the path object
* @param {string} path - string path
* @returns {string[]} - the path array

@@ -185,0 +185,0 @@ * @memberof YamlDocument

@@ -192,4 +192,4 @@ "use strict";

* @param {object} path.value - the path object's value
* @param path.matcher.key
* @param path.matcher.value
* @param path.matcher.key - name of the key
* @param path.matcher.value - value of the key
* @returns {YamlDocument} the YamlDocument instance

@@ -205,2 +205,5 @@ * @memberof YamlDocument

const node = seq.items.find((nodeInput) => nodeInput.toJSON()[matcher.key] === matcher.value);
if (!node) {
throw new Error(i18n_1.t('error.nodeNotFoundMatching', { path, key: matcher.key, value: matcher.value }));
}
const newNode = this.document.createNode(merge(node.toJSON(), value));

@@ -242,6 +245,6 @@ seq.items.splice(seq.items.indexOf(node), 1, newNode);

/**
* @param root0
* @param root0.start
* @param root0.path
* @returns {unknown}
* @param options - Options
* @param options.start - Optional collection type to start looking from
* @param options.path - String path of the node
* @returns {unknown} - Node, if found. Will throw an error if not
*/

@@ -265,6 +268,6 @@ getNode({ start, path }) {

/**
* @param root0
* @param root0.start
* @param root0.path
* @returns {unknown}
* @param options - Options
* @param options.start - Optional collection type to start looking from
* @param options.path - String path of the sequence
* @returns {YAMLSeq} - Sequence, if found. Will throw an error if not
*/

@@ -281,6 +284,6 @@ getSequence({ start, path }) {

/**
* @param root0
* @param root0.start
* @param root0.path
* @returns {YAMLMap}
* @param options - Options
* @param options.start - Optional collection type to start looking from
* @param options.path - String path of the map
* @returns {YAMLMap} - Map, if found. Will throw an error if not
*/

@@ -297,5 +300,5 @@ getMap({ start, path }) {

/**
* @param sequence
* @param predicate
* @returns {unknown}
* @param sequence - Sequence to find the item in
* @param predicate - predicate function to determine the match
* @returns {unknown} - Item node if found. Or undefined if not
*/

@@ -311,7 +314,6 @@ findItem(sequence, predicate) {

* @template T
* @param {Path<T>} path - the path object
* @param {string} path - string path
* @returns {string[]} - the path array
* @memberof YamlDocument
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
toPathArray(path) {

@@ -318,0 +320,0 @@ const result = path === null || path === void 0 ? void 0 : path.toString().split('.').filter((p) => p !== '');

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

},
"version": "0.12.2",
"version": "0.12.3",
"main": "dist/index.js",

@@ -36,3 +36,3 @@ "files": [

"scripts": {
"build": "pnpm clean && tsc",
"build": "pnpm clean && tsc -p tsconfig-build.json",
"clean": "rimraf dist test/test-output coverage",

@@ -39,0 +39,0 @@ "format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore",

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