Packages

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…

Other targets from 5.0.0Latest10.0.1
  1. 5.0.0yours
  2. 5.0.1breaking
  3. 8 releases
  4. 5.2.1target
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

  1. 5.0.3 – 5.2.18 releases, nothing new or fixed in the notes

  2. 5.0.2

    7 May 20181 new
    • new

      Fixed: Allow searchSync and loadSync to load JS configuration files whose export is a Promise.

  3. 5.0.1

    Migration needed5 May 2018
    • breaking

      packageProp no longer accepts false. If you don't want to look in package.json, write a searchPlaces array that does not include it.

    • breaking

      Removed the format option. Formats are now all handled via the file extensions specified in loaders.

18 other lines we could not sort, mostly version bumps
  • Added: packageProp values can be arrays of strings, to allow for property names that include periods. (This was possible before, but not documented or deliberately supported.)

    5.2.0
  • Added: packageProp values can include periods to describe paths to nested objects within package.json.

    5.1.0
  • 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.7
  • Fixed: Better error message if the end user tries an extension Cosmiconfig is not configured to understand.

    5.0.6
  • Fixed: load and loadSync work with paths relative to process.cwd().

    5.0.5
  • Fixed: rc files with .js extensions included in default searchPlaces.

    5.0.4
  • The loaders option 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 searchPlaces option allows you to specify exactly where cosmiconfig looks within each directory it searches.

    5.0.1
  • The combination of loaders and searchPlaces means 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, and load() loads a configuration file that you don't need to search for.

    5.0.1

4 internal lines (docs, tests, tooling) left out.