Comparing version 1.1.1 to 1.1.2
'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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5374
+ Addedload-json-file@^1.1.0
- Removedread-pkg@^1.0.0
- Removedfunction-bind@1.1.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhosted-git-info@2.8.9(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removednormalize-package-data@2.5.0(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-type@1.1.0(transitive)
- Removedread-pkg@1.1.0(transitive)
- Removedresolve@1.22.8(transitive)
- Removedsemver@5.7.2(transitive)
- Removedspdx-correct@3.2.0(transitive)
- Removedspdx-exceptions@2.5.0(transitive)
- Removedspdx-expression-parse@3.0.1(transitive)
- Removedspdx-license-ids@3.0.20(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedvalidate-npm-package-license@3.0.4(transitive)