davidtheclark/cosmiconfig
### [`v7.1.0`](https://togithub.com/davidtheclark/cosmiconfig/blob/HEAD/CHANGELOG.md#710)
[Compare Source](https://togithub.com/davidtheclark/cosmiconfig/compare/v7.0.1...v7.1.0)
- Added: additional default `searchPlaces` within a .config subdirectory (without leading dot in the file name)
### [`v7.0.1`](https://togithub.com/davidtheclark/cosmiconfig/blob/HEAD/CHANGELOG.md#701)
[Compare Source](https://togithub.com/davidtheclark/cosmiconfig/compare/v7.0.0...v7.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.
### [`v7.0.0`](https://togithub.com/davidtheclark/cosmiconfig/blob/HEAD/CHANGELOG.md#700)
[Compare Source](https://togithub.com/davidtheclark/cosmiconfig/compare/6.0.0...v7.0.0)
- **Breaking change:** Add `${moduleName}rc.cjs` and `${moduleName}.config.cjs` to the default `searchPlaces`, to support users of `"type": "module"` in recent versions of Node.
- **Breaking change:** Drop support for Node 8. Now requires Node 10+.
### [`v6.0.0`](https://togithub.com/davidtheclark/cosmiconfig/blob/HEAD/CHANGELOG.md#600)
[Compare Source](https://togithub.com/davidtheclark/cosmiconfig/compare/5.2.1...6.0.0)
- **Breaking change:** The package now has named exports. See examples below.
- **Breaking change:** Separate async and sync APIs, accessible from different named exports. If you used `explorer.searchSync()` or `explorer.loadSync()`, you'll now create a sync explorer with `cosmiconfigSync()`, then use `explorerSync.search()` and `explorerSync.load()`.
```js
// OLD: cosmiconfig v5
import cosmiconfig from 'cosmiconfig';
const explorer = cosmiconfig('example');
const searchAsyncResult = await explorer.search();
const loadAsyncResult = await explorer.load('./file/to/load');
const searchSyncResult = explorer.searchSync();
const loadSyncResult = explorer.loadSync('./file/to/load');
// NEW: cosmiconfig v6
import { cosmiconfig, cosmiconfigSync } from 'cosmiconfig';
const explorer = cosmiconfig('example');
const searchAsyncResult = await explorer.search();
const loadAsyncResult = await explorer.load('./file/to/load');
const explorerSync = cosmiconfigSync('example');
const searchSyncResult = explorerSync.search();
const loadSyncResult = explorerSync.load('./file/to/load');
```
- **Breaking change:** Remove support for Node 4 and 6. Requires Node 8+.
- **Breaking change:** Use npm package [yaml](https://www.npmjs.com/package/yaml) to parse YAML instead of npm package [js-yaml](https://www.npmjs.com/package/js-yaml).
- **Breaking change:** Remove `cosmiconfig.loaders` and add named export `defaultLoaders` that exports the default loaders used for each extension.
```js
import { defaultLoaders } from 'cosmiconfig';
console.log(Object.entries(defaultLoaders))
// [
// [ '.js', [Function: loadJs] ],
// [ '.json', [Function: loadJson] ],
// [ '.yaml', [Function: loadYaml] ],
// [ '.yml', [Function: loadYaml] ],
// [ 'noExt', [Function: loadYaml] ]
// ]
```
- Migrate from Flowtype to Typescript.
- Lazy load all default loaders.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^5.2.1
->^7.0.0
Release Notes
davidtheclark/cosmiconfig
### [`v7.1.0`](https://togithub.com/davidtheclark/cosmiconfig/blob/HEAD/CHANGELOG.md#710) [Compare Source](https://togithub.com/davidtheclark/cosmiconfig/compare/v7.0.1...v7.1.0) - Added: additional default `searchPlaces` within a .config subdirectory (without leading dot in the file name) ### [`v7.0.1`](https://togithub.com/davidtheclark/cosmiconfig/blob/HEAD/CHANGELOG.md#701) [Compare Source](https://togithub.com/davidtheclark/cosmiconfig/compare/v7.0.0...v7.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. ### [`v7.0.0`](https://togithub.com/davidtheclark/cosmiconfig/blob/HEAD/CHANGELOG.md#700) [Compare Source](https://togithub.com/davidtheclark/cosmiconfig/compare/6.0.0...v7.0.0) - **Breaking change:** Add `${moduleName}rc.cjs` and `${moduleName}.config.cjs` to the default `searchPlaces`, to support users of `"type": "module"` in recent versions of Node. - **Breaking change:** Drop support for Node 8. Now requires Node 10+. ### [`v6.0.0`](https://togithub.com/davidtheclark/cosmiconfig/blob/HEAD/CHANGELOG.md#600) [Compare Source](https://togithub.com/davidtheclark/cosmiconfig/compare/5.2.1...6.0.0) - **Breaking change:** The package now has named exports. See examples below. - **Breaking change:** Separate async and sync APIs, accessible from different named exports. If you used `explorer.searchSync()` or `explorer.loadSync()`, you'll now create a sync explorer with `cosmiconfigSync()`, then use `explorerSync.search()` and `explorerSync.load()`. ```js // OLD: cosmiconfig v5 import cosmiconfig from 'cosmiconfig'; const explorer = cosmiconfig('example'); const searchAsyncResult = await explorer.search(); const loadAsyncResult = await explorer.load('./file/to/load'); const searchSyncResult = explorer.searchSync(); const loadSyncResult = explorer.loadSync('./file/to/load'); // NEW: cosmiconfig v6 import { cosmiconfig, cosmiconfigSync } from 'cosmiconfig'; const explorer = cosmiconfig('example'); const searchAsyncResult = await explorer.search(); const loadAsyncResult = await explorer.load('./file/to/load'); const explorerSync = cosmiconfigSync('example'); const searchSyncResult = explorerSync.search(); const loadSyncResult = explorerSync.load('./file/to/load'); ``` - **Breaking change:** Remove support for Node 4 and 6. Requires Node 8+. - **Breaking change:** Use npm package [yaml](https://www.npmjs.com/package/yaml) to parse YAML instead of npm package [js-yaml](https://www.npmjs.com/package/js-yaml). - **Breaking change:** Remove `cosmiconfig.loaders` and add named export `defaultLoaders` that exports the default loaders used for each extension. ```js import { defaultLoaders } from 'cosmiconfig'; console.log(Object.entries(defaultLoaders)) // [ // [ '.js', [Function: loadJs] ], // [ '.json', [Function: loadJson] ], // [ '.yaml', [Function: loadYaml] ], // [ '.yml', [Function: loadYaml] ], // [ 'noExt', [Function: loadYaml] ] // ] ``` - Migrate from Flowtype to Typescript. - Lazy load all default loaders.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.