Skip to content

Commit

Permalink
Upgrade rc-config-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Nov 29, 2019
1 parent cbb18ba commit 0706633
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 22 deletions.
6 changes: 3 additions & 3 deletions lib/npm-check-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Table = require('cli-table');
const chalk = require('chalk');
const {promisify} = require('util');
const fs = require('fs');
const rcLoader = require('rc-config-loader');
const {rcFile} = require('rc-config-loader');
const vm = require('./versionmanager');
const packageManagers = require('./package-managers');
const versionUtil = require('./version-util');
Expand Down Expand Up @@ -456,13 +456,13 @@ async function run(options = {}) {
* @returns {PlainObject|undefined}
*/
function getNcurc({configFileName, configFilePath, packageFile} = {}) {
const rcFile = rcLoader('ncurc', {
const file = rcFile('ncurc', {
configFileName: configFileName || '.ncurc',
defaultExtension: ['.json', '.yml', '.js'],
cwd: configFilePath ||
(packageFile ? path.dirname(packageFile) : undefined)
});
return rcFile && rcFile.config;
return file && file.config;
}

module.exports = Object.assign({
Expand Down
24 changes: 6 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"pacote": "^10.2.0",
"progress": "^2.0.3",
"prompts": "^2.3.0",
"rc-config-loader": "^2.0.5",
"rc-config-loader": "^3.0.0",
"requireg": "^0.2.2",
"semver": "^6.3.0",
"semver-utils": "^1.1.4",
Expand Down

0 comments on commit 0706633

Please sign in to comment.