c12
c12 copied to clipboard
⚙️ Smart Configuration Loader
### Environment #### In stackblitz System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries:...
### Describe the feature I was just about to open a feature request to suggest adding a util / type to allow the easy creation of your own `defineConfig` type...
### Environment Node 20.2.0 c12 1.4.1 ### Reproduction ```js // my-config.mjs import { createDefineConfig } from "c12"; export interface MyConfig { github: { token: string; }; } export const defineConfig...
Frameworks such as vite, support more than one env file like `.env.local` and `.env.prod`. This is [heavily discouraged](https://github.com/motdotla/dotenv#should-i-have-multiple-env-files) by 12 factor and dotenv package however this is a common usage...
### Environment node: v16.14.2 "c12": v1.1.2 ### Reproduction https://stackblitz.com/edit/c12-bug-extends?file=index.mjs ### Describe the bug The `extends` option does not load configuration files in subdirectories, nor does it load configuration from npm...
I think `ResolvedConfig` should not be possibly `null`, if a default config is present. This would make typings more intuitive, as I have to either cast or do something like...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [eslint](https://eslint.org) ([source](https://togithub.com/eslint/eslint)) | [`^8.57.0` -> `^9.3.0`](https://renovatebot.com/diffs/npm/eslint/8.57.0/9.3.0) |...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [automd](https://togithub.com/unjs/automd) | [`^0.3.6` -> `^0.3.7`](https://renovatebot.com/diffs/npm/automd/0.3.6/0.3.7) | [](https://docs.renovatebot.com/merge-confidence/)...
### Describe the feature For and example if the service is depends on partial values from environment variable like ```json { "someServicePath": "${S3_PATH}/abc/file.json" } ``` Can we also have environment...