Releases: monots/monots
load-esm-config@0.2.0
0.2.0
2022-05-30
Minor Changes
-
04ba7ca: BREAKING: Rename
lookupFilesToRoot
option todisableUpwardLookup
. The default is now forloadEsmConfig
to search upward until it reaches the root directory. You can set this option to true to only search the provided working directory (cwd
).BREAKING: Rename interface
LoadEsmConfig
toLoadEsmConfigOptions
.Other changes:
- Improved the readme for better npm documentation.
- Refactored the code to be more readable.
Patch Changes
- Updated dependencies [ecbcdf7]
- @monots/utils@0.5.0
create-monots@0.11.0
@monots/utils@0.5.0
0.5.0
2022-05-30
Minor Changes
- ecbcdf7: Add
hasDefaultExport()
andmatchAll()
functions to exports. Also re-export@sindresorhus/is
andtiny-invariant
@monots/cli@0.13.1
@monots/cli@0.13.0
superstruct-extra@0.1.7
prettier-config-monots@0.2.2
load-esm-config@0.1.0
2022-05-27
Minor Changes
-
b807c2f: Add new package
load-esm-config
for loading a configuration written in TypeScript / JavaScript with support for both CommonJS and ESModule packages.import { loadEsmConfig } from 'load-esm-config'; // Load the configuration file and the absolute path to the config file. const { config, path } = loadEsmConfig({ name: 'something' });
By default it supports these extensions:
['.ts', '.mts', '.cts', '.js', '.mjs', '.cjs']
. It is also possible to limit support for extensions by passing theextensions
property.Another feature allows you to load from custom configuration folders. By default
./
(current) and.config/
folders will be searched for matching configuration files. In the example above bothsomething.config.ts
and.config/something.config.mjs
are valid configuration locations. This optionality should help remove configuration file overload in top level Further configuration folders can be added via thedirs
property.