New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@alexlafroscia/yaml-merge

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alexlafroscia/yaml-merge - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [4.1.0](https://github.com/alexlafroscia/yaml-merge/compare/v4.0.0...v4.1.0) (2021-06-25)
### Features
* add glob matching ([ded7017](https://github.com/alexlafroscia/yaml-merge/commit/ded7017b74dcb65f1d59fb6a621a639cd3ecc624))
## [4.0.0](https://github.com/alexlafroscia/yaml-merge/compare/v3.0.0...v4.0.0) (2021-01-04)

@@ -7,0 +14,0 @@

6

index.js

@@ -5,2 +5,3 @@ 'use strict';

const jsYaml = require('js-yaml');
const glob = require('glob');
const _ = require('lodash');

@@ -22,3 +23,6 @@

function yamlMerge(...from) {
const files = from.map((path) => readAsJSON(path));
const files = from
.reduce((arr, el) => arr.concat(glob.sync(el)), [])
.map((path) => readAsJSON(path));
const outputJSON = _.mergeWith({}, ...files, (objValue, srcValue) => {

@@ -25,0 +29,0 @@ if (Array.isArray(objValue) && Array.isArray(srcValue)) {

16

package.json
{
"name": "@alexlafroscia/yaml-merge",
"version": "4.0.0",
"version": "4.1.0",
"description": "A super simple tool for merging YAML files",

@@ -11,3 +11,6 @@ "main": "index.js",

"test": "mocha",
"release": "standard-version"
"release": "standard-version",
"_postinstall": "husky install",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
},

@@ -19,2 +22,3 @@ "files": [

"dependencies": {
"glob": "^7.1.7",
"js-yaml": "^4.0.0",

@@ -29,12 +33,8 @@ "lodash": "^4.17.20"

"common-tags": "^1.4.0",
"husky": "^4.3.0",
"husky": "^6.0.0",
"lint-staged": "^10.4.1",
"mocha": "^8.1.3",
"pinst": "^2.1.4",
"standard-version": "^9.0.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {

@@ -41,0 +41,0 @@ "*.js": "eslint --fix",

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