Socket
Socket
Sign inDemoInstall

pkg-conf

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pkg-conf - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

6

index.js
'use strict';
var findUp = require('find-up');
var readPkg = require('read-pkg');
var loadJsonFile = require('load-json-file');
var objectAssign = require('object-assign');

@@ -31,3 +31,3 @@ var Symbol = require('symbol');

return readPkg(fp, {normalize: false}).then(function (pkg) {
return loadJsonFile(fp).then(function (pkg) {
return addFp(objectAssign({}, opts.defaults, pkg[namespace]), fp);

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

var pkg = readPkg.sync(fp, {normalize: false});
var pkg = loadJsonFile.sync(fp);

@@ -59,0 +59,0 @@ return addFp(objectAssign({}, opts.defaults, pkg[namespace]), fp);

{
"name": "pkg-conf",
"version": "1.1.1",
"version": "1.1.2",
"description": "Get namespaced config from the closest package.json",

@@ -40,4 +40,4 @@ "license": "MIT",

"find-up": "^1.0.0",
"load-json-file": "^1.1.0",
"object-assign": "^4.0.1",
"read-pkg": "^1.0.0",
"symbol": "^0.2.1"

@@ -44,0 +44,0 @@ },

@@ -5,3 +5,3 @@ # pkg-conf [![Build Status](https://travis-ci.org/sindresorhus/pkg-conf.svg?branch=master)](https://travis-ci.org/sindresorhus/pkg-conf)

For example, [XO](https://github.com/sindresorhus/xo) uses the `xo` namespace in package.json and [ESLint](http://eslint.org) uses `eslintConfig`.
Having tool specific config in package.json reduces the amount of metafiles in your repo (there are usually a lot!) and makes the config obvious compared to hidden dotfiles like `.jshintrc`, which can end up causing confusion. [XO](https://github.com/sindresorhus/xo), for example, use the `xo` namespace in package.json, and [ESLint](http://eslint.org) uses `eslintConfig`. Many more tools supports this, like [AVA](https://github.com/sindresorhus/ava), [Babel](https://babeljs.io), [nyc](https://github.com/bcoe/nyc), etc.

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

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