cosmiconfig
10.0.1 · 30 Aug 2026MIT172.2M / weekRepositoryHomepagenpmAtom feed
Upgrading cosmiconfig From 5.0.0 to 5.2.1
10 releases in betweenevery note read
Reading releases, release notes and advisories…
- 2
- changes to make
- 0
- advisories fixed
- 1
- new
- 0
- fixes
Before you upgrade
Tick each one off as you go- breaking5.0.1
- breaking5.0.1
Release by release
5.0.3 – 5.2.18 releases, nothing new or fixed in the notes
- new
Fixed: Allow
searchSyncandloadSyncto load JS configuration files whose export is a Promise.
- new
- breaking
packagePropno longer acceptsfalse. If you don't want to look inpackage.json, write asearchPlacesarray that does not include it. - breaking
Removed the
formatoption. Formats are now all handled via the file extensions specified inloaders.
- breaking
18 other lines we could not sort, mostly version bumps
- 5.2.0
Added:
packagePropvalues can be arrays of strings, to allow for property names that include periods. (This was possible before, but not documented or deliberately supported.) - 5.1.0
Added:
packagePropvalues can include periods to describe paths to nested objects withinpackage.json. - 5.0.7
Fixed: JS loader bypasses Node's
requirecache, fixing a bug where updates to.jsconfig files would not load even when Cosmiconfig was told not to cache. - 5.0.6
Fixed: Better error message if the end user tries an extension Cosmiconfig is not configured to understand.
- 5.0.5
Fixed:
loadandloadSyncwork with paths relative toprocess.cwd(). - 5.0.4
Fixed:
rcfiles with.jsextensions included in defaultsearchPlaces. - 5.0.1
The
loadersoption allows you specify custom functions to derive config objects from files. Your loader functions could parse ES2015 modules or TypeScript, JSON5, even INI or XML. Whatever suits you. - 5.0.1
The
searchPlacesoption allows you to specify exactly where cosmiconfig looks within each directory it searches. - 5.0.1
The combination of
loadersandsearchPlacesmeans that you should be able to load pretty much any kind of configuration file you want, from wherever you want it to look. - 5.0.1
search()now searches up the directory tree, andload()loads a configuration file that you don't need to search for.
4 internal lines (docs, tests, tooling) left out.