cosmiconfig
10.0.1 · 30 Aug 2026MIT172.2M / weekRepositoryHomepagenpmAtom feed
Upgrading cosmiconfig From 0.2.0 to 10.0.1
55 releases in betweennotes for 50
Reading releases, release notes and advisories…
- 18+
- changes to make
- 0
- advisories fixed
- 14+
- new
- 13+
- fixes
Counted from 50 of 55 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- breaking10.0.0
- breaking10.0.0
- breaking10.0.0
- breaking9.0.0
- breaking9.0.0
- breaking9.0.0
- breaking8.0.0
- breaking8.0.0
- breaking7.0.0
- breaking7.0.0
Release by release
10.0.1nothing new or fixed in the note
- breaking
The required version range is now
^22.18 || >=24. - breaking
Remove
typescriptin favor of Node's own type stripping. This means that TypeScript 7 projects are supported, but non-erasable type syntax likenamespaceorenumis unsupported. - breaking
JSON parsing uses the
JSON.parsefunction directly.parse-jsonis no longer used for better error messages, since Node has improved theirs. - new
Added support for UTF-16 config files
- breaking
- fixed
Fixed a prototype chain issue that may happen when merging different config objects.
- fixed
Fixed the
projectsearch strategy not correctly stopping at the package boundary.
- fixed
- fixed
Fixed a race condition where multiple instances existing simultaneously could cause cosmiconfig to fail to load TypeScript config files.
- fixed
Fixed an issue on Windows where CWD being a short path (e.g.
C:\Users\USERNA~1) would cause cosmiconfig to fail to load ESM config files.
- fixed
- breaking
Breaking change: This is the default value if you don't pass a
stopDiroption, which means that cosmiconfig no longer traverses directories by default, and instead just looks in the current working directory. - breaking
Meta config files (i.e.
config.jsand similar) are not looked for in the current working directory anymore. Instead, it looks in the.configsubfolder. - breaking
When defining
searchPlacesin a meta config file, the tool-definedsearchPlacesare merged into this. Users may specifymergeSearchPlaces: falseto disable this. - new
The
nonevalue means that cosmiconfig does not traverse any directories upwards.
- breaking
- fixed
Ignore search place if accessing it causes ENOTDIR (i.e. if access of a subpath of a file is attempted)
- fixed
- fixed
Pass null to transform function for backwards compat
- fixed
50 other lines we could not sort, mostly version bumps
- 10.0.0
Remove
import-freshdependency in favor of directly clearing the cache. - 8.1.3
Fixed: existence of meta config breaking default loaders
- 8.1.2
Fixed: generation of TypeScript types going to the wrong output path
- 8.1.1
Fixed: meta config overriding original options completely (now merges correctly)
- 8.1.0
Added: always look at
.config.{yml,yaml,json,js,cjs}file to configure cosmiconfig itself, and look for tool configuration in it usingpackageProp(similar to package.json) - 8.0.0
Added: Loader errors now include the path of the file that was tried to be loaded.
- 7.1.0
Added: Additional default
searchPlaceswithin a .config subdirectory (without leading dot in the file name) - 7.0.1
Fixed: If there was a directory that had the same name as a search place (e.g. "package.json"), we would try to read it as a file, which would cause an exception.
- 6.0.0
Migrate from Flowtype to Typescript.
- 6.0.0
Lazy load all default loaders.
4 internal lines (docs, tests, tooling) left out.