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

@putout/processor-yaml

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/processor-yaml - npm Package Compare versions

Comparing version 6.0.0 to 7.0.0

15

lib/yaml.js
import tryCatch from 'try-catch';
import justKebabCase from 'just-kebab-case';
import yaml from 'yaml';
import * as jsonProcessor from '@putout/processor-json';
import {
__yaml,
__yaml_name,
toJS,
fromJS,
} from '@putout/operator-json';
const isYaml = (a) => !a.indexOf(__yaml_name);
const parseRule = (a) => justKebabCase(a.replace('YAML', 'Yaml'));

@@ -22,3 +28,3 @@ const {stringify, parse} = JSON;

const stringified = stringify(value, null, 2);
const [{source}] = jsonProcessor.branch(stringified, null, 2);
const source = toJS(stringified, __yaml);

@@ -44,4 +50,6 @@ list.push({

export const merge = (rawSource, list) => {
const source = jsonProcessor.merge(rawSource, list);
const [first] = list.filter(isYaml);
const source = fromJS(first, __yaml);
return yaml.stringify(parse(source));

@@ -60,3 +68,2 @@ };

const {message, linePos} = error;
const [rule] = String(error).split(':');

@@ -63,0 +70,0 @@

{
"name": "@putout/processor-yaml",
"version": "6.0.0",
"version": "7.0.0",
"type": "module",

@@ -27,2 +27,3 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

"dependencies": {
"@putout/operator-json": "^1.3.0",
"@putout/processor-json": "^7.0.1",

@@ -43,5 +44,6 @@ "just-kebab-case": "^4.0.2",

"eslint-plugin-n": "^16.0.0",
"eslint-plugin-putout": "^19.0.0",
"eslint-plugin-putout": "^21.0.0",
"lerna": "^6.0.1",
"madrun": "^9.0.0",
"montag": "^1.2.1",
"nodemon": "^3.0.1",

@@ -48,0 +50,0 @@ "putout": "*"

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