{"name":"c12","version":"3.3.2","license":"MIT","_id":"c12@3.3.2","maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/unjs/c12#readme","bugs":{"url":"https://github.com/unjs/c12/issues"},"dist":{"shasum":"8bfb9d57147319e6bf7e8530979c5c4fa68ba602","tarball":"http://registry-npm.ywwl.com/c12/download/c12-3.3.2.tgz","fileCount":7,"integrity":"sha512-QkikB2X5voO1okL3QsES0N690Sn/K9WokXqUsDQsWy5SnYb+psYQFGA10iy1bZHj3fjISKsI67Q90gruvWWM3A==","signatures":[{"sig":"MEQCICHBtEOhjrDPa48iXj1CO8hmHYekpXCDJO3w78QXe1FiAiAZRqAXDbnZ4/PcdJ5y9fCXyTEou9nsHuyGTV6YgtSRlQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40600,"size":12637,"noattachment":false,"key":"/c12/-/c12-3.3.2.tgz"},"type":"module","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"./update":{"types":"./dist/update.d.mts","default":"./dist/update.mjs"}},"gitHead":"fd7b5f92479f9ebf7079b35a63043e1da808b751","scripts":{"dev":"vitest dev","lint":"eslint . && prettier -c src test","test":"pnpm lint && vitest run --coverage && pnpm test:types","build":"obuild","prepack":"unbuild","release":"pnpm build && pnpm test && changelogen --release --push --publish","lint:fix":"automd && eslint . --fix && prettier -w src test","test:types":"tsc --noEmit"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"repository":{"url":"git+https://github.com/unjs/c12.git","type":"git"},"_npmVersion":"11.6.1","description":"Smart Config Loader","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","dependencies":{"rc9":"^2.1.2","defu":"^6.1.4","jiti":"^2.6.1","giget":"^2.0.0","ohash":"^2.0.11","pathe":"^2.0.3","dotenv":"^17.2.3","confbox":"^0.2.2","exsolve":"^1.0.8","chokidar":"^4.0.3","pkg-types":"^2.3.0","perfect-debounce":"^2.0.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"automd":"^0.4.2","eslint":"^9.39.1","obuild":"^0.4.1","vitest":"^4.0.8","magicast":"^0.5.1","prettier":"^3.6.2","typescript":"^5.9.3","@types/node":"^24.10.0","changelogen":"^0.6.2","expect-type":"^1.2.2","eslint-config-unjs":"^0.5.0","@vitest/coverage-v8":"^4.0.8"},"peerDependencies":{"magicast":"*"},"peerDependenciesMeta":{"magicast":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/c12_3.3.2_1762811584465_0.5889489721354304","host":"s3://npm-registry-packages-npm-production"},"readme":"# ⚙️ c12\n\n<!-- automd:badges color=yellow codecov -->\n\n[![npm version](https://img.shields.io/npm/v/c12?color=yellow)](https://npmjs.com/package/c12)\n[![npm downloads](https://img.shields.io/npm/dm/c12?color=yellow)](https://npm.chart.dev/c12)\n[![codecov](https://img.shields.io/codecov/c/gh/unjs/c12?color=yellow)](https://codecov.io/gh/unjs/c12)\n\n<!-- /automd -->\n\nc12 (pronounced as /siːtwelv/, like c-twelve) is a smart configuration loader.\n\n> [!NOTE]\n> See the [Migration section](#migration) for upgrading from v3 to v4.\n\n## ✅ Features\n\n- `.js`, `.ts`, `.mjs`, `.cjs`, `.mts`, `.cts` config loader with customizable import or [unjs/jiti](https://jiti.unjs.io) fallback.\n- `.json` config loader with `JSON.parse` and `.jsonc`, `.json5`, `.yaml`, `.yml`, `.toml` with [unjs/confbox](https://confbox.unjs.io)\n- `.config/` directory support ([config dir proposal](https://github.com/pi0/config-dir))\n- `.rc` config support with [unjs/rc9](https://github.com/unjs/rc9)\n- `.env` support with variable interpolation and optional `_FILE` references resolution\n- Multiple sources merged with [unjs/defu](https://github.com/unjs/defu)\n- Reads config from the nearest `package.json` file\n- [Extends configurations](https://github.com/unjs/c12#extending-configuration) from multiple local or git sources\n- Overwrite with [environment-specific configuration](#environment-specific-configuration)\n- Config watcher with auto-reload and HMR support\n- Create or update configuration files with [magicast](https://github.com/unjs/magicast)\n\n## 🦴 Used by\n\n- [Hey API](https://github.com/hey-api/openapi-ts)\n- [Gen API](https://github.com/hairyf/genapi)\n- [Kysely](https://github.com/kysely-org/kysely-ctl)\n- [Nitro](https://nitro.build/)\n- [Nuxt](https://nuxt.com/)\n- [Prisma](https://github.com/prisma/prisma)\n- [Trigger.dev](https://github.com/triggerdotdev/trigger.dev)\n- [UnJS](https://github.com/unjs)\n- [WXT](https://github.com/wxt-dev/wxt)\n\n## Usage\n\nInstall package:\n\n```sh\n# ✨ Auto-detect\nnpx nypm install c12\n```\n\nImport:\n\n```js\n// ESM import\nimport { loadConfig, watchConfig } from \"c12\";\n\n// or using dynamic import\nconst { loadConfig, watchConfig } = await import(\"c12\");\n```\n\nLoad configuration:\n\n```js\n// Get loaded config\nconst { config } = await loadConfig({});\n\n// Get resolved config and extended layers\nconst { config, configFile, layers } = await loadConfig({});\n```\n\n> [!NOTE]\n> Merged `config` may share nested object references with `layers[].config`, so mutating `config` can also mutate a layer (and vice versa). If you need to mutate the result, clone it first using a deep clone strategy that fits your config (for example [`klona`](https://github.com/lukeed/klona) or `structuredClone`):\n>\n> ```js\n> import { klona } from \"klona\";\n>\n> const { config: _config, layers } = await loadConfig({});\n> const config = klona(_config);\n> ```\n\n## Loading priority\n\nc12 merged config sources with [unjs/defu](https://github.com/unjs/defu) by below order:\n\n1. Config overrides passed by options\n2. Config file in CWD\n3. RC file in CWD\n4. RC file in the workspace directory\n5. RC file in the user's config directory (`$XDG_CONFIG_HOME` or `~/.config`)\n6. Legacy RC file in the user's home directory\n7. Config from `package.json`\n8. Default config passed by options\n9. Extended config layers\n\n## Options\n\n### `cwd`\n\nResolve configuration from this working directory. The default is `process.cwd()`\n\n### `name`\n\nConfiguration base name. The default is `config`.\n\n### `configFile`\n\nConfiguration file name without extension. Default is generated from `name` (f.e., if `name` is `foo`, the config file will be => `foo.config`).\n\n### `rcFile`\n\nRC Config file name. Default is generated from `name` (name=foo => `.foorc`).\n\nSet to `false` to disable loading RC config.\n\n### `globalRc`\n\nLoad RC config from the workspace directory, the user's config directory (`$XDG_CONFIG_HOME` or `~/.config`) and the user's home directory. Only enabled when `rcFile` is provided. Set to `false` to disable this functionality.\n\nWhen the same key is set in more than one of these, the workspace wins over the user config directory, which wins over the home directory.\n\n### `dotenv`\n\nLoads `.env` file when `true` or an options object is passed. It is disabled by default.\n\nSupports loading multiple files that extend eachother in left-to-right order when a `fileName`s array of relative/absolute paths is passed in the options object.\n\n**Example:**\n\n```ini\n# .env\nCONNECTION_POOL_MAX=\"10\"\nDATABASE_URL=\"<...rds...>\"\n```\n\n```ini\n# .env.local\nDATABASE_URL=\"<...localhost...>\"\n```\n\n```js\nexport default {\n  connectionPoolMax: process.env.CONNECTION_POOL_MAX,\n  databaseURL: process.env.DATABASE_URL,\n};\n```\n\n```ts\nimport { loadConfig } from \"c12\";\n\nconst config = await loadConfig({\n  dotenv: {\n    fileName: [\".env\", \".env.local\"],\n  },\n});\n\nconsole.log(config.config.connectionPoolMax); // \"10\"\nconsole.log(config.config.databaseURL); // \"<...localhost...>\"\n```\n\n#### `interpolate`\n\nEnabled by default. Variables within `.env` files are interpolated using `$VAR` or `${VAR}` syntax (use `\\${VAR}` to escape). Within braces, a default value can be provided with `${VAR:-default}` (used when `VAR` is unset **or** empty) or `${VAR-default}` (used when `VAR` is unset only). Default values can themselves contain interpolations. A reference that cannot be resolved is kept as-is rather than replaced with an empty value. Set to `false` to disable.\n\n```ini\n# .env\nBASE_DIR=\"/test\"\n# \"/test/further\"\nANOTHER_DIR=\"${BASE_DIR}/further\"\n# \"/test/fallback\" when CACHE_DIR_INPUT is unset or empty\nCACHE_DIR=\"${CACHE_DIR_INPUT:-${BASE_DIR}/fallback}\"\n# \"info\" when LOG_LEVEL_INPUT is unset (an empty value is kept as-is)\nLOG_LEVEL=\"${LOG_LEVEL_INPUT-info}\"\n# kept as the literal \"${UNKNOWN}\" since it cannot be resolved\nUNRESOLVED=\"${UNKNOWN}\"\n```\n\n#### `expandFileReferences`\n\nDisabled by default. Environment variables ending with `_FILE` are resolved by reading the file at the specified path and assigning its trimmed content to the base key (without the `_FILE` suffix). This is useful for container secrets (e.g. Docker, Kubernetes) where sensitive values are mounted as files. Set to `true` to enable.\n\n```ini\n# .env\nDATABASE_PASSWORD_FILE=\"/run/secrets/db_password\"\n```\n\n```ts\nimport { loadConfig } from \"c12\";\n\nconst config = await loadConfig({\n  dotenv: {\n    expandFileReferences: true,\n  },\n});\n\n// DATABASE_PASSWORD is now set to the contents of /run/secrets/db_password\n```\n\n#### `parse`\n\nCustom `.env` file parser with `(src: string) => Record<string, string>` signature (exported as `DotenvParseFn` type). By default, `node:util.parseEnv` is used when available, falling back to the optional `dotenv` package.\n\n```ts\nimport { loadConfig } from \"c12\";\nimport { parse } from \"dotenv\";\n\nconst config = await loadConfig({\n  dotenv: { parse },\n});\n```\n\n### `packageJson`\n\nLoads config from nearest `package.json` file. It is disabled by default.\n\nIf `true` value is passed, c12 uses `name` field from `package.json`.\n\nYou can also pass either a string or an array of strings as a value to use those fields.\n\n### `defaults`\n\nSpecify default configuration. It has the **lowest** priority and is applied **after extending** config.\n\n### `defaultConfig`\n\nSpecify default configuration. It is applied **before** extending config.\n\n### `overrides`\n\nSpecify override configuration. It has the **highest** priority and is applied **before extending** config.\n\n### `omit$Keys`\n\nExclude environment-specific and built-in keys start with `$` in the resolved config. The default is `false`.\n\n### `import`\n\nCustom import function used to load configuration files. By default, c12 uses native `import()` with [unjs/jiti](https://github.com/unjs/jiti) as fallback.\n\n**Example:** Using a custom [jiti](https://github.com/unjs/jiti) instance with options:\n\n```js\nimport { createJiti } from \"jiti\";\n\nconst jiti = createJiti(import.meta.url, {/* jiti options */});\n\nconst { config } = await loadConfig({\n  import: (id) => jiti.import(id),\n});\n```\n\n### `jitiOptions`\n\nOptions passed to [unjs/jiti](https://github.com/unjs/jiti) when c12 falls back to it for loading config files. Has no effect if a custom `import` is provided.\n\n**Example:**\n\n```js\nconst { config } = await loadConfig({\n  jitiOptions: {\n    fsCache: false,\n    transformOptions: {/* ... */},\n  },\n});\n```\n\n### `resolveModule`\n\nCustom resolver for picking which export to use from the loaded module. Default: `(mod) => mod.default || mod`.\n\n**Example:** Using a named export:\n\n```js\nconst { config } = await loadConfig({\n  resolveModule: (mod) => mod.myConfig,\n});\n```\n\n### `giget`\n\nOptions passed to [unjs/giget](https://github.com/unjs/giget) when extending layer from git source.\n\n### `merger`\n\nCustom options merger function. Default is [defu](https://github.com/unjs/defu).\n\n**Note:** Custom merge function should deeply merge options with arguments high -> low priority.\n\n### `envMerger`\n\nCustom merger used to apply [environment specific configuration](#environment-specific-configuration) (`$<envName>` and `$env.<envName>` keys) onto the config. Defaults to [`merger`](#merger) (or [defu](https://github.com/unjs/defu)).\n\n**Note:** It only applies when merging a layer's env keys onto that same layer. Layers (`extends`), `overrides`, RC, `package.json` and `defaults` are still combined with `merger`.\n\nUseful when an environment override should replace a value instead of being merged into it. For example, to replace arrays instead of concatenating them:\n\n```js\nimport { createDefu } from \"defu\";\n\nconst replaceArrays = createDefu((obj, key, value) => {\n  if (Array.isArray(value)) {\n    obj[key] = [...value];\n    return true;\n  }\n});\n\nconst { config } = await loadConfig({\n  envMerger: (...sources) => replaceArrays({}, ...sources),\n});\n```\n\n### `envName`\n\nEnvironment name used for [environment specific configuration](#environment-specific-configuration).\n\nThe default is `process.env.NODE_ENV`. You can set `envName` to `false` or an empty string to disable the feature.\n\nYou can also pass an array of names (e.g. `[\"production\", \"prerender\"]`) to apply several environments. Later names have higher priority.\n\n### `context`\n\nContext object passed to dynamic config functions.\n\n### `resolve`\n\nYou can define a custom function that resolves the config.\n\n### `configFileRequired`\n\nIf this option is set to `true`, loader fails if the main config file does not exists.\n\n### `schema`\n\nA [Standard Schema](https://standardschema.dev) (zod, valibot, arktype, ...) used to validate the final config, after all layers are merged.\n\n```js\nimport { z } from \"zod\";\n\nconst { config } = await loadConfig({\n  name: \"app\",\n  schema: z.looseObject({ port: z.coerce.number().default(3000) }),\n});\n```\n\nThe validated output replaces `config`, so schema defaults and transforms are applied (and unknown keys may be stripped depending on your schema). On failure, an error listing all issues is thrown (raw issues are available on `error.cause`).\n\nNotes:\n\n- The schema should output an object.\n- Environment-specific keys (`$development`, `$env`, ...) are passed to the schema unless [`omit$Keys`](#omitkeys) is enabled.\n- `layers` keep the raw (unvalidated) configs, and the validated `config` may not share references with them.\n- With `watchConfig`, a validation error on reload is logged and the previous config is kept.\n\n## Extending configuration\n\nIf resolved config contains a `extends` key, it will be used to extend the configuration.\n\nExtending can be nested and each layer can extend from one base or more.\n\nThe final config is merged result of extended options and user options with [unjs/defu](https://github.com/unjs/defu).\n\nEach item in extends is a string that can be either an absolute or relative path to the current config file pointing to a config file for extending or the directory containing the config file.\nIf it starts with either `github:`, `gitlab:`, `bitbucket:`, or `https:`, c12 automatically clones it.\n\nFor custom merging strategies, you can directly access each layer with `layers` property.\n\n**Example:**\n\n```js\n// config.ts\nexport default {\n  colors: {\n    primary: \"user_primary\",\n  },\n  extends: [\"./theme\"],\n};\n```\n\n```js\n// config.dev.ts\nexport default {\n  dev: true,\n};\n```\n\n```js\n// theme/config.ts\nexport default {\n  extends: \"../base\",\n  colors: {\n    primary: \"theme_primary\",\n    secondary: \"theme_secondary\",\n  },\n};\n```\n\n```js\n// base/config.ts\nexport default {\n  colors: {\n    primary: \"base_primary\",\n    text: \"base_text\",\n  },\n};\n```\n\nThe loaded configuration would look like this:\n\n```js\nconst config = {\n  dev: true,\n  colors: {\n    primary: \"user_primary\",\n    secondary: \"theme_secondary\",\n    text: \"base_text\",\n  },\n};\n```\n\nLayers:\n\n```js\n[\n  {\n    config: {/* theme config */},\n    configFile: \"/path/to/theme/config.ts\",\n    cwd: \"/path/to/theme \",\n  },\n  {\n    config: {/* base  config */},\n    configFile: \"/path/to/base/config.ts\",\n    cwd: \"/path/to/base\",\n  },\n  {\n    config: {/* dev   config */},\n    configFile: \"/path/to/config.dev.ts\",\n    cwd: \"/path/\",\n  },\n];\n```\n\n## Extending config layer from remote sources\n\n> [!NOTE]\n> Extending from remote sources requires the [`giget`](https://giget.unjs.io) peer dependency to be installed.\n>\n> ```sh\n> # ✨ Auto-detect\n> npx nypm install giget\n> ```\n\nYou can also extend configuration from remote sources such as npm or github.\n\nIn the repo, there should be a `config.ts` (or `config.{name}.ts`) file to be considered as a valid config layer.\n\n**Example:** Extend from a github repository\n\n```js\n// config.ts\nexport default {\n  extends: \"gh:user/repo\",\n};\n```\n\n**Example:** Extend from a github repository with branch and subpath\n\n```js\n// config.ts\nexport default {\n  extends: \"gh:user/repo/theme#dev\",\n};\n```\n\n**Example:** Extend a private repository and install dependencies:\n\n```js\n// config.ts\nexport default {\n  extends: [\"gh:user/repo\", { auth: process.env.GITHUB_TOKEN, install: true }],\n};\n```\n\nYou can pass more options to `giget: {}` in layer config or disable it by setting it to `false`.\n\nRefer to [unjs/giget](https://giget.unjs.io) for more information.\n\n## Environment-specific configuration\n\nUsers can define environment-specific configuration using these config keys:\n\n- `$test: {...}`\n- `$development: {...}`\n- `$production: {...}`\n- `$env: { [env]: {...} }`\n\nc12 tries to match [`envName`](#envname) and override environment config if specified.\n\n**Note:** Environment will be applied when extending each configuration layer. This way layers can provide environment-specific configuration.\n\n**Example:**\n\n```js\nexport default {\n  // Default configuration\n  logLevel: \"info\",\n\n  // Environment overrides\n  $test: { logLevel: \"silent\" },\n  $development: { logLevel: \"warning\" },\n  $production: { logLevel: \"error\" },\n  $env: {\n    staging: { logLevel: \"debug\" },\n  },\n};\n```\n\n## Typed `defineConfig` helpers\n\nLibraries that expose a typed config file can use [`createDefineConfig`](https://github.com/unjs/c12/blob/main/src/types.ts) to ship a `defineConfig`-style helper for `.ts` configs.\n\n```ts\nimport { createDefineConfig, loadConfig } from \"c12\";\n\ninterface MyConfig {\n  apiUrl: string;\n  logLevel?: \"info\" | \"debug\" | \"error\";\n}\n\ninterface MyMeta {\n  name?: string;\n  author?: string;\n}\n\nexport const defineMyConfig = createDefineConfig<MyConfig, MyMeta>();\n\n// my.config.ts\nexport default defineMyConfig({\n  apiUrl: \"https://api.example.com\",\n  logLevel: \"info\",\n  $meta: {\n    name: \"my-app\",\n    author: \"acme\",\n  },\n  $development: {\n    logLevel: \"debug\",\n  },\n});\n```\n\n`createDefineConfig` is an identity function at runtime. Its value is TypeScript inference: the returned helper accepts your config keys plus c12 reserved keys (`$meta`, `$development`, `$production`, `$test`, `$env`).\n\nPass the same generics to `loadConfig` so resolved `config` and `meta` stay typed:\n\n```ts\nconst { config, meta } = await loadConfig<MyConfig, MyMeta>({\n  name: \"my\",\n});\n\nconfig.apiUrl; // string\nmeta?.author; // string | undefined\n```\n\n### `$meta`\n\n`$meta` is a reserved namespace for **layer metadata**, not user-facing options. Use it for values such as layer name, author, repository, or credentials that describe the config layer itself.\n\nc12 reads `$meta` (merged with `sourceOptions.meta` when extending) into the resolved layer's `meta` field and **removes** it from `config`, so it does not mix with regular options.\n\n```ts\nconst { config, meta, layers } = await loadConfig<MyConfig, MyMeta>({});\n\n// Regular options live on `config`\nconsole.log(config.apiUrl);\n\n// Layer metadata lives on `meta` / `layers[].meta`\nconsole.log(meta?.name);\n```\n\n## Watching configuration\n\nyou can use `watchConfig` instead of `loadConfig` to load config and watch for changes, add and removals in all expected configuration paths and auto reload with new config.\n\nWatching uses native (non-recursive) [`fs.watch`](https://nodejs.org/api/fs.html#fswatchfilename-options-listener) on the directories of expected config paths, no extra dependencies are needed.\n\n### Lifecycle hooks\n\n- `onWatch`: This function is always called when config is updated, added, or removed before attempting to reload the config.\n- `acceptHMR`: By implementing this function, you can compare old and new functions and return `true` if a full reload is not needed.\n- `onUpdate`: This function is always called after the new config is updated. If `acceptHMR` returns true, it will be skipped.\n\n```ts\nimport { watchConfig } from \"c12\";\n\nconst config = watchConfig({\n  cwd: \".\",\n  // debounce: 200 // Default is 100. You can set it to false to disable debounced watcher\n  onWatch: (event) => {\n    console.log(\"[watcher]\", event.type, event.path);\n  },\n  acceptHMR({ oldConfig, newConfig, getDiff }) {\n    const diff = getDiff();\n    if (diff.length === 0) {\n      console.log(\"No config changed detected!\");\n      return true; // No changes!\n    }\n  },\n  onUpdate({ oldConfig, newConfig, getDiff }) {\n    const diff = getDiff();\n    console.log(\"Config updated:\\n\" + diff.map((i) => i.toJSON()).join(\"\\n\"));\n  },\n});\n\nconsole.log(\"watching config files:\", config.watchingFiles);\nconsole.log(\"initial config\", config.config);\n\n// Stop watcher when not needed anymore\n// await config.unwatch();\n```\n\n## Updating config\n\n> [!NOTE]\n> This feature is experimental\n\nUpdate or create a new configuration files.\n\nAdd `magicast` peer dependency:\n\n```sh\n# ✨ Auto-detect\nnpx nypm install -D magicast\n```\n\nImport util from `c12/update`\n\n```js\nconst { configFile, created } = await updateConfig({\n  cwd: \".\",\n  configFile: \"foo.config\",\n  onCreate: ({ configFile }) => {\n    // You can prompt user if wants to create a new config file and return false to cancel\n    console.log(`Creating new config file in ${configFile}...`);\n    return \"export default { test: true }\";\n  },\n  onUpdate: (config) => {\n    // You can update the config contents just like an object\n    config.test2 = false;\n  },\n});\n\nconsole.log(`Config file ${created ? \"created\" : \"updated\"} in ${configFile}`);\n```\n\n## Configuration functions\n\nYou can use a function to define your configuration dynamically based on context.\n\n```ts\n// config.ts\nexport default (ctx) => {\n  return {\n    apiUrl: ctx?.dev ? \"http://localhost:3000\" : \"https://api.example.com\",\n  };\n};\n```\n\n```ts\n// Usage\nimport { loadConfig } from \"c12\";\n\nconst config = await loadConfig({\n  context: { dev: true },\n});\n```\n\n## Migration\n\n### v3 to v4\n\nc12 install size is now down to [380kB](https://packagephobia.com/result?p=c12@4.0.0-beta.2) from [3.44MB](https://packagephobia.com/result?p=c12@3.3.3) ([20 deps](https://npmgraph.js.org/?q=c12@3) to [7 deps](https://npmgraph.js.org/?q=c12#select=c12%404.0.0-beta.2)).\n\nLoading TypeScript files is significantly faster (on cold cache) — simple TS config loads ~2.5x faster ([bench](https://github.com/unjs/c12/tree/main/test/bench)).\n\n- If you need extends feature with remote/git source, install giget as a peer dependency (docs)\n- `watchConfig` now uses native `node:fs` watching. The `chokidar` peer dependency and `chokidarOptions` option are removed (#260).\n- If you need legacy TypeScript support (mixed ESM/CJS, no import extensions, etc.), install jiti as a peer dependency (c12 automatically falls back) or provide a custom import config (docs).\n- Dotenv parsing now uses native runtime features (see #296). You might need to add dotenv as a peer dependency only for legacy/Deno support.\n\n## Contribution\n\n<details>\n  <summary>Local development</summary>\n\n- Clone this repository\n- Install the latest LTS version of [Node.js](https://nodejs.org/en/)\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- Run tests using `pnpm dev` or `pnpm test`\n\n</details>\n\n<!-- /automd -->\n\n## License\n\n<!-- automd:contributors license=MIT author=\"pi0\" -->\n\nPublished under the [MIT](https://github.com/unjs/c12/blob/main/LICENSE) license.\nMade by [@pi0](https://github.com/pi0) and [community](https://github.com/unjs/c12/graphs/contributors) 💛\n<br><br>\n<a href=\"https://github.com/unjs/c12/graphs/contributors\">\n<img src=\"https://contrib.rocks/image?repo=unjs/c12\" />\n</a>\n\n<!-- /automd -->\n\n<!-- automd:with-automd -->\n\n---\n\n_🤖 auto updated with [automd](https://automd.unjs.io)_\n\n<!-- /automd -->\n","publish_time":1762811584653,"_cnpm_publish_time":1762811584653,"dist-tags":{"3x":"3.3.4","latest":"4.0.0-rc.4"}}