c12 3.0.0 → 3.0.2
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/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as loadConfig, S as SUPPORTED_EXTENSIONS } from './shared/c12.
|
|
2
|
-
export { a as loadDotenv, s as setupDotenv } from './shared/c12.
|
|
1
|
+
import { l as loadConfig, S as SUPPORTED_EXTENSIONS } from './shared/c12.X4pJ8kft.mjs';
|
|
2
|
+
export { a as loadDotenv, s as setupDotenv } from './shared/c12.X4pJ8kft.mjs';
|
|
3
3
|
import { debounce } from 'perfect-debounce';
|
|
4
4
|
import { resolve } from 'pathe';
|
|
5
5
|
import 'node:fs';
|
|
@@ -2,7 +2,7 @@ import { existsSync, promises } from 'node:fs';
|
|
|
2
2
|
import { rm, readFile } from 'node:fs/promises';
|
|
3
3
|
import { pathToFileURL } from 'node:url';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
|
-
import { resolve, join, dirname, basename, extname } from 'pathe';
|
|
5
|
+
import { resolve, join, dirname, basename, extname, normalize } from 'pathe';
|
|
6
6
|
import { resolveModulePath } from 'exsolve';
|
|
7
7
|
import { createJiti } from 'jiti';
|
|
8
8
|
import * as rc9 from 'rc9';
|
|
@@ -373,13 +373,14 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
373
373
|
return res;
|
|
374
374
|
}
|
|
375
375
|
function tryResolve(id, options) {
|
|
376
|
-
|
|
376
|
+
const res = resolveModulePath(id, {
|
|
377
377
|
try: true,
|
|
378
378
|
from: pathToFileURL(join(options.cwd || ".", options.configFile || "/")),
|
|
379
379
|
suffixes: ["", "/index"],
|
|
380
380
|
extensions: SUPPORTED_EXTENSIONS,
|
|
381
381
|
cache: false
|
|
382
382
|
});
|
|
383
|
+
return res ? normalize(res) : void 0;
|
|
383
384
|
}
|
|
384
385
|
|
|
385
386
|
export { SUPPORTED_EXTENSIONS as S, loadDotenv as a, loadConfig as l, setupDotenv as s };
|
package/dist/update.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveModulePath } from 'exsolve';
|
|
2
|
-
import { S as SUPPORTED_EXTENSIONS } from './shared/c12.
|
|
3
|
-
import { join } from 'pathe';
|
|
2
|
+
import { S as SUPPORTED_EXTENSIONS } from './shared/c12.X4pJ8kft.mjs';
|
|
3
|
+
import { join, normalize } from 'pathe';
|
|
4
4
|
import { mkdir, writeFile, readFile } from 'node:fs/promises';
|
|
5
5
|
import { dirname, extname } from 'node:path';
|
|
6
6
|
import 'node:fs';
|
|
@@ -61,13 +61,14 @@ async function updateConfig(opts) {
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
function tryResolve(path, cwd, extensions) {
|
|
64
|
-
|
|
64
|
+
const res = resolveModulePath(path, {
|
|
65
65
|
try: true,
|
|
66
66
|
from: join(cwd, "/"),
|
|
67
67
|
extensions,
|
|
68
68
|
suffixes: ["", "/index"],
|
|
69
69
|
cache: false
|
|
70
70
|
});
|
|
71
|
+
return res ? normalize(res) : void 0;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
export { updateConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c12",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Smart Config Loader",
|
|
5
5
|
"repository": "unjs/c12",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"confbox": "^0.1.8",
|
|
36
36
|
"defu": "^6.1.4",
|
|
37
37
|
"dotenv": "^16.4.7",
|
|
38
|
-
"exsolve": "^0.
|
|
38
|
+
"exsolve": "^1.0.0",
|
|
39
39
|
"giget": "^2.0.0",
|
|
40
40
|
"jiti": "^2.4.2",
|
|
41
41
|
"ohash": "^2.0.5",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^22.13.5",
|
|
49
49
|
"@vitest/coverage-v8": "^3.0.7",
|
|
50
|
-
"automd": "^0.
|
|
51
|
-
"changelogen": "^0.
|
|
50
|
+
"automd": "^0.4.0",
|
|
51
|
+
"changelogen": "^0.6.0",
|
|
52
52
|
"eslint": "^9.21.0",
|
|
53
53
|
"eslint-config-unjs": "^0.4.2",
|
|
54
54
|
"expect-type": "^1.1.0",
|
|
55
55
|
"magicast": "^0.3.5",
|
|
56
56
|
"prettier": "^3.5.2",
|
|
57
57
|
"typescript": "^5.7.3",
|
|
58
|
-
"unbuild": "^3.
|
|
58
|
+
"unbuild": "^3.5.0",
|
|
59
59
|
"vitest": "^3.0.7"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"optional": true
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
"packageManager": "pnpm@10.5.
|
|
69
|
+
"packageManager": "pnpm@10.5.1"
|
|
70
70
|
}
|