@quoin/node-rc
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -1,3 +0,3 @@ | ||
const debug = require('./../debug'); | ||
const debug = require('../debug'); | ||
module.exports = (path) => debug(`lib/${path}`); |
@@ -8,19 +8,23 @@ const cloneDeep = require('lodash/cloneDeep'); | ||
module.exports = (name, baseConfig, postConfig) => { | ||
if (name[0] === '@') { | ||
debug(`scoped name: ${name}`); | ||
name = name.substr(1).replace(/\//g, '-'); | ||
} | ||
debug(`name=${name}`); | ||
let cleanName = name; | ||
const config = rc(name, cloneDeep(baseConfig)); | ||
if (cleanName.startsWith('@')) { | ||
debug(`scoped name: ${cleanName}`); | ||
cleanName = cleanName.substr(1); | ||
} | ||
// Remove extra properties added by `rc` module. | ||
delete config._; | ||
delete config.config; | ||
delete config.configs; | ||
cleanName = cleanName.replace(/\//g, '-'); | ||
debug(`cleanName=${cleanName}`); | ||
if (postConfig) { | ||
return merge(config, postConfig); | ||
} | ||
return config; | ||
const config = rc(cleanName, cloneDeep(baseConfig)); | ||
// Remove extra properties added by `rc` module. | ||
delete config._; | ||
delete config.config; | ||
delete config.configs; | ||
if (postConfig) { | ||
return merge(config, postConfig); | ||
} | ||
return config; | ||
}; |
{ | ||
"name": "@quoin/node-rc", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Wrapper for rc library.", | ||
@@ -9,10 +9,17 @@ "main": "lib/index.js", | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"debug.js", | ||
"lib/**/*", | ||
"!lib/**/*.test.js", | ||
"*.md" | ||
], | ||
"scripts": { | ||
"pretest": "npm run lint", | ||
"pretest": "npm run eslint", | ||
"prepack": "npm test", | ||
"coverage": "nyc --report-dir=reports/coverage npm run -s test", | ||
"lint:node": "eslint --fix --ignore-pattern='*.test.js' 'lib/*.js'", | ||
"lint:test": "eslint --fix --config='.eslintrc.test.json' lib", | ||
"lint": "npm run -s lint:node && npm run -s lint:test", | ||
"test": "mocha 'lib/*.unit.test.js'" | ||
"eslint": "eslint --fix \"lib/**/*.js\"", | ||
"test": "mocha \"lib/*.unit.test.js\"" | ||
}, | ||
@@ -37,20 +44,53 @@ "repository": { | ||
"dependencies": { | ||
"debug": "~4.1.1", | ||
"lodash": "~4.17.14", | ||
"debug": "~4.3.1", | ||
"lodash": "~4.17.21", | ||
"rc": "~1.2.8" | ||
}, | ||
"devDependencies": { | ||
"@quoin/eslint-config-quoin": "~0.3.2", | ||
"@quoin/node-test-helpers": "~1.0.3", | ||
"eslint": "~6.0.1", | ||
"eslint-config-standard": "~13.0.1", | ||
"eslint-plugin-html": "~6.0.0", | ||
"eslint-plugin-import": "~2.18.0", | ||
"eslint-plugin-json": "~1.4.0", | ||
"eslint-plugin-node": "~9.1.0", | ||
"eslint-plugin-promise": "~4.2.1", | ||
"eslint-plugin-standard": "~4.0.0", | ||
"mocha": "~6.1.4", | ||
"nyc": "~14.1.1" | ||
"eslint": "~7.28.0", | ||
"eslint-config-airbnb-base": "~14.2.1", | ||
"eslint-config-standard": "~16.0.3", | ||
"eslint-plugin-html": "~6.1.2", | ||
"eslint-plugin-import": "~2.23.4", | ||
"eslint-plugin-json": "^2.1.2", | ||
"eslint-plugin-node": "~11.1.0", | ||
"eslint-plugin-promise": "~5.1.0", | ||
"mocha": "^8.4.0", | ||
"nyc": "~15.1.0" | ||
}, | ||
"nyc": { | ||
"all": true, | ||
"temp-dir": "./reports/nyc_output", | ||
"report-dir": "./coverage/default", | ||
"check-coverage": false, | ||
"exclude": [ | ||
"lib/**/*.test.js", | ||
"libtest.js", | ||
"reports" | ||
], | ||
"reporter": [ | ||
"cobertura", | ||
"lcov", | ||
"html" | ||
], | ||
"watermarks": { | ||
"statements": [ | ||
50, | ||
80 | ||
], | ||
"lines": [ | ||
50, | ||
80 | ||
], | ||
"functions": [ | ||
50, | ||
80 | ||
], | ||
"branches": [ | ||
50, | ||
80 | ||
] | ||
} | ||
} | ||
} |
@@ -6,3 +6,4 @@ # @quoin/node-rc | ||
This library apply the same logic as `npm pack` is doing. | ||
This library apply the same logic as `npm pack` is doing for the name of the | ||
file. | ||
@@ -9,0 +10,0 @@ ## Usage |
# Releases | ||
## 0.1.4 - 2021-06-09 | ||
- lodash CVE-2021-23337 | ||
- removed stryker | ||
- added github workflow | ||
- npm outdated | ||
## 0.1.3 - 2019-07-17 | ||
@@ -4,0 +11,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
4041
11
26
32
+ Addeddebug@4.3.7(transitive)
- Removeddebug@4.1.1(transitive)
Updateddebug@~4.3.1
Updatedlodash@~4.17.21