Skip to content

Releases: antonk52/lilconfig

v3.1.2 Webpack friendly

09 Jun 18:45
Compare
Choose a tag to compare

The new changes make lilconfig work as expected when a nodejs app is bundled using webpack.

Thanks @CHC383

v3.1.1 Security release

18 Feb 14:39
Compare
Choose a tag to compare
  1. Fix security vulnerability by migrating from typescript to javascript with TSDoc comments. See #48
  2. Use tabs instead of spaces

Due to how typescript compilation works I had to use eval() to have a dynamic import in project compiled to commonjs in v3.1.0. Eval call introduced a security vulnerability as it was pointed out to me by kind people from Secfault Security. As there is currently no way to make typescript output dynamic import with a commonjs target I migrated the source code to be in javascript. This means that the code in this repository is the code that gets published to npm. The package still includes first party typescript types in index.d.ts file that gets published as well. The runtime code now uses TSDoc annotations to maintain type safety.

v3.1.0 Support ESM config files (async api only)

14 Feb 21:44
Compare
Choose a tag to compare

Lilconfig now supports loading ESM configuration files.

ESM configs can be searched or loaded via async API only.

ESM syntax can be valid in either

  • .js and .mjs files in projects with "type": "module" in package.json
  • .mjs files in projects that use commonjs

Thanks for pushing this feature @marekdedic

v3.0.0 Cache support

19 Nov 00:00
Compare
Choose a tag to compare

BREAKING CHANGES

  • Cache support enabled by default
  • Drop support for Node v10 & v12

New cache feature

Lilconfig now can cache results in between searches within the same nodejs process. If you are reusing the searcher to look up configuration files, you will get much faster configuration lookups.

Otherwise you can disable it in options using the new cache key

lilconfig('myapp', {cache: false})

v2.1.0 adds support for `.config/<name>rc` files

02 Mar 19:45
Compare
Choose a tag to compare

The default search places for configuration now also searches in the following files:

  • .config/${name}rc
  • .config/${name}rc.json
  • .config/${name}rc.js
  • .config/${name}rc.cjs

This version should nicely correlate with cosmiconfig v7.1.0

v2.0.6 adds missing LICENSE file

10 Jul 13:40
Compare
Choose a tag to compare

Thanks for reporting @edgan πŸ‘

v2.0.5 Fixes async loaders πŸ‘‰ user defined ESM support

23 Mar 22:45
Compare
Choose a tag to compare

Thanks to @michael42 who reported and fixed a bug for async loaders in lilconfig function πŸ‘

You can now add support to ESM configs by providing a custom loader

import {lilconfig} from 'lilconfig';

const loadEsm = filepath => import(filepath);

lilconfig('myapp', {
    loaders: {
        '.js': loadEsm,
        '.mjs': loadEsm,
    }
})
    .search()
    .then(result => {
        result // {config, filepath}

        result.config.default // if config uses `export default`
    });

v2.0.4 Fix relative paths handling for `load` methods

05 Nov 22:26
Compare
Choose a tag to compare

Thanks to @iiroj for highlighting a bug in okonet/lint-staged/issues/1034 where relative paths did not work appropriately when passed to load methods. This bug has been fixed and tested to make sure this would not happen again πŸ™‚

There were also a few minor improvements:

  • Dev dependencies update
  • Include nodejs v14 and v16 into PR checks
  • Add missing .yml key in add loaded example in readme

v2.0.3 Fixes unix root directory path (thanks @JounQin)

06 Jun 20:04
Compare
Choose a tag to compare

This release contains a fix for unix root directory. Please see #17 for more information

Thank you @JounQin for the PR πŸ™Œ

Remove deprecated nodejs API

04 Dec 08:18
Compare
Choose a tag to compare

Lilconfig got future proof by removing the usage of deprecated nodejs api.

Thanks to @jeetiss & @TrySound πŸ‘