c12 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <!-- automd:badges color=yellow codecov -->
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/c12?color=yellow)](https://npmjs.com/package/c12)
6
- [![npm downloads](https://img.shields.io/npm/dm/c12?color=yellow)](https://npmjs.com/package/c12)
6
+ [![npm downloads](https://img.shields.io/npm/dm/c12?color=yellow)](https://npm.chart.dev/c12)
7
7
  [![codecov](https://img.shields.io/codecov/c/gh/unjs/c12?color=yellow)](https://codecov.io/gh/unjs/c12)
8
8
 
9
9
  <!-- /automd -->
@@ -55,6 +55,9 @@ pnpm install c12
55
55
 
56
56
  # bun
57
57
  bun install c12
58
+
59
+ # deno
60
+ deno install c12
58
61
  ```
59
62
 
60
63
  <!-- /automd -->
@@ -63,7 +66,7 @@ Import:
63
66
 
64
67
  <!-- automd:jsimport cjs imports="loadConfig,watchConfig" -->
65
68
 
66
- **ESM** (Node.js, Bun)
69
+ **ESM** (Node.js, Bun, Deno)
67
70
 
68
71
  ```js
69
72
  import { loadConfig, watchConfig } from "c12";
@@ -404,6 +407,9 @@ pnpm install -D magicast
404
407
 
405
408
  # bun
406
409
  bun install -D magicast
410
+
411
+ # deno
412
+ deno install --dev magicast
407
413
  ```
408
414
 
409
415
  <!-- /automd -->
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const loader = require('./shared/c12.NHTPwjBF.cjs');
3
+ const loader = require('./shared/c12.CLRr5qYj.cjs');
4
4
  const perfectDebounce = require('perfect-debounce');
5
5
  const pathe = require('pathe');
6
6
  const ohash = require('ohash');
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { l as loadConfig, S as SUPPORTED_EXTENSIONS } from './shared/c12.C11qeCBR.mjs';
2
- export { a as loadDotenv, s as setupDotenv } from './shared/c12.C11qeCBR.mjs';
1
+ import { l as loadConfig, S as SUPPORTED_EXTENSIONS } from './shared/c12.B4fc1S0C.mjs';
2
+ export { a as loadDotenv, s as setupDotenv } from './shared/c12.B4fc1S0C.mjs';
3
3
  import { debounce } from 'perfect-debounce';
4
4
  import { resolve } from 'pathe';
5
5
  import { diff } from 'ohash';
@@ -340,7 +340,9 @@ async function resolveConfig(source, options, sourceOptions = {}) {
340
340
  const contents = await readFile(res.configFile, "utf8");
341
341
  res.config = asyncLoader(contents);
342
342
  } else {
343
- res.config = await options.jiti.import(res.configFile);
343
+ res.config = await options.jiti.import(res.configFile, {
344
+ default: true
345
+ });
344
346
  }
345
347
  if (res.config instanceof Function) {
346
348
  res.config = await res.config();
@@ -357,7 +357,9 @@ async function resolveConfig(source, options, sourceOptions = {}) {
357
357
  const contents = await promises.readFile(res.configFile, "utf8");
358
358
  res.config = asyncLoader(contents);
359
359
  } else {
360
- res.config = await options.jiti.import(res.configFile);
360
+ res.config = await options.jiti.import(res.configFile, {
361
+ default: true
362
+ });
361
363
  }
362
364
  if (res.config instanceof Function) {
363
365
  res.config = await res.config();
package/dist/update.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const mlly = require('mlly');
4
- const loader = require('./shared/c12.NHTPwjBF.cjs');
4
+ const loader = require('./shared/c12.CLRr5qYj.cjs');
5
5
  const pathe = require('pathe');
6
6
  const promises = require('node:fs/promises');
7
7
  const node_path = require('node:path');
package/dist/update.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { resolvePath } from 'mlly';
2
- import { S as SUPPORTED_EXTENSIONS } from './shared/c12.C11qeCBR.mjs';
2
+ import { S as SUPPORTED_EXTENSIONS } from './shared/c12.B4fc1S0C.mjs';
3
3
  import { join } from 'pathe';
4
4
  import { mkdir, writeFile, readFile } from 'node:fs/promises';
5
5
  import { dirname, extname } from 'node:path';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c12",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Smart Config Loader",
5
5
  "repository": "unjs/c12",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "defu": "^6.1.4",
42
42
  "dotenv": "^16.4.5",
43
43
  "giget": "^1.2.3",
44
- "jiti": "^2.0.0",
44
+ "jiti": "^2.3.0",
45
45
  "mlly": "^1.7.1",
46
46
  "ohash": "^1.1.4",
47
47
  "pathe": "^1.1.2",
@@ -51,17 +51,17 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "^22.7.4",
54
- "@vitest/coverage-v8": "^2.1.1",
55
- "automd": "^0.3.8",
54
+ "@vitest/coverage-v8": "^2.1.2",
55
+ "automd": "^0.3.10",
56
56
  "changelogen": "^0.5.7",
57
- "eslint": "^9.11.1",
57
+ "eslint": "^9.12.0",
58
58
  "eslint-config-unjs": "^0.4.1",
59
- "expect-type": "^0.20.0",
59
+ "expect-type": "^1.0.0",
60
60
  "magicast": "^0.3.5",
61
61
  "prettier": "^3.3.3",
62
62
  "typescript": "^5.6.2",
63
63
  "unbuild": "3.0.0-rc.8",
64
- "vitest": "^2.1.1"
64
+ "vitest": "^2.1.2"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "magicast": "^0.3.5"