cosmiconfig
Advanced tools
Comparing version 5.0.6 to 5.0.7
# Changelog | ||
## 5.0.7 | ||
- Fixed: JS loader bypasses Node's `require` cache, fixing a bug where updates to `.js` config files would not load even when Cosmiconfig was told not to cache. | ||
## 5.0.6 | ||
@@ -4,0 +8,0 @@ |
@@ -6,5 +6,6 @@ // | ||
const yaml = require('js-yaml'); | ||
const importFresh = require('import-fresh'); | ||
function loadJs(filepath ) { | ||
const result = require(filepath); | ||
const result = importFresh(filepath); | ||
return result; | ||
@@ -11,0 +12,0 @@ } |
{ | ||
"name": "cosmiconfig", | ||
"version": "5.0.6", | ||
"version": "5.0.7", | ||
"description": "Find and load configuration from a package.json property, rc file, or CommonJS module", | ||
@@ -86,2 +86,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"import-fresh": "^2.0.0", | ||
"is-directory": "^0.3.1", | ||
@@ -88,0 +89,0 @@ "js-yaml": "^3.9.0", |
@@ -332,4 +332,8 @@ # cosmiconfig | ||
If you want to load files that are not handled by the loader functions Cosmiconfig exposes, you can write a custom loader function. | ||
If you want to load files that are not handled by the loader functions Cosmiconfig exposes, you can write a custom loader function or use one from NPM if it exists. | ||
**Third-party loaders:** | ||
- [@endemolshinegroup/cosmiconfig-typescript-loader](https://github.com/EndemolShineGroup/cosmiconfig-typescript-loader) | ||
**Use cases for custom loader function:** | ||
@@ -336,0 +340,0 @@ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
41071
428
499
1
4
+ Addedimport-fresh@^2.0.0
+ Addedcaller-callsite@2.0.0(transitive)
+ Addedcaller-path@2.0.0(transitive)
+ Addedcallsites@2.0.0(transitive)
+ Addedimport-fresh@2.0.0(transitive)
+ Addedresolve-from@3.0.0(transitive)