Socket
Socket
Sign inDemoInstall

cosmiconfig

Package Overview
Dependencies
15
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.7 to 5.1.0

4

CHANGELOG.md
# Changelog
## 5.1.0
- Added: `packageProp` values can include periods to describe paths to nested objects within `package.json`.
## 5.0.7

@@ -4,0 +8,0 @@

3

dist/createExplorer.js

@@ -5,2 +5,3 @@ //

const path = require('path');
const get = require('lodash.get');
const loaders = require('./loaders');

@@ -177,3 +178,3 @@ const readFile = require('./readFile');

const parsedContent = loaders.loadJson(filepath, content);
const packagePropValue = parsedContent[this.config.packageProp];
const packagePropValue = get(parsedContent, this.config.packageProp);
return packagePropValue || null;

@@ -180,0 +181,0 @@ }

{
"name": "cosmiconfig",
"version": "5.0.7",
"version": "5.1.0",
"description": "Find and load configuration from a package.json property, rc file, or CommonJS module",

@@ -89,2 +89,3 @@ "main": "dist/index.js",

"js-yaml": "^3.9.0",
"lodash.get": "^4.4.2",
"parse-json": "^4.0.0"

@@ -91,0 +92,0 @@ },

@@ -216,2 +216,6 @@ # cosmiconfig

Type: `Object`.
Possible options are documented below.
### searchPlaces

@@ -410,2 +414,12 @@

Use periods to describe a path to nested properties. For example, the value `'configs.myPackage'` will get you the `"myPackage"` value in a `package.json` like this:
```json
{
"configs": {
"myPackage": {..}
}
}
```
### stopDir

@@ -412,0 +426,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc