@pandacss/config 0.10.0 → 0.11.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/resolve-ts-path-pattern.ts
|
|
2
|
+
import { posix, sep } from "path";
|
|
2
3
|
var resolveTsPathPattern = (pathMappings, moduleSpecifier) => {
|
|
3
4
|
for (const mapping of pathMappings) {
|
|
4
5
|
const match = moduleSpecifier.match(mapping.pattern);
|
|
@@ -11,7 +12,7 @@ var resolveTsPathPattern = (pathMappings, moduleSpecifier) => {
|
|
|
11
12
|
const matchIndex = Math.min(++starCount, match.length - 1);
|
|
12
13
|
return match[matchIndex];
|
|
13
14
|
});
|
|
14
|
-
return mappedId;
|
|
15
|
+
return mappedId.split(sep).join(posix.sep);
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
};
|
package/dist/index.js
CHANGED
|
@@ -57,7 +57,7 @@ function findConfigFile({ cwd, file }) {
|
|
|
57
57
|
|
|
58
58
|
// src/get-mod-deps.ts
|
|
59
59
|
var import_fs = __toESM(require("fs"));
|
|
60
|
-
var
|
|
60
|
+
var import_path4 = __toESM(require("path"));
|
|
61
61
|
|
|
62
62
|
// src/ts-config-paths.ts
|
|
63
63
|
var import_path2 = require("path");
|
|
@@ -83,6 +83,7 @@ function escapeStringRegexp(string) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
// src/resolve-ts-path-pattern.ts
|
|
86
|
+
var import_path3 = require("path");
|
|
86
87
|
var resolveTsPathPattern = (pathMappings, moduleSpecifier) => {
|
|
87
88
|
for (const mapping of pathMappings) {
|
|
88
89
|
const match = moduleSpecifier.match(mapping.pattern);
|
|
@@ -95,7 +96,7 @@ var resolveTsPathPattern = (pathMappings, moduleSpecifier) => {
|
|
|
95
96
|
const matchIndex = Math.min(++starCount, match.length - 1);
|
|
96
97
|
return match[matchIndex];
|
|
97
98
|
});
|
|
98
|
-
return mappedId;
|
|
99
|
+
return mappedId.split(import_path3.sep).join(import_path3.posix.sep);
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
};
|
|
@@ -128,7 +129,7 @@ function getDeps(opts, fromAlias) {
|
|
|
128
129
|
const { filename, seen } = opts;
|
|
129
130
|
const { moduleResolution: _, ...compilerOptions } = opts.compilerOptions ?? {};
|
|
130
131
|
const absoluteFile = resolveWithExtension(
|
|
131
|
-
|
|
132
|
+
import_path4.default.resolve(opts.cwd, filename),
|
|
132
133
|
jsExtensions.includes(opts.ext) ? jsResolutionOrder : tsResolutionOrder
|
|
133
134
|
);
|
|
134
135
|
if (absoluteFile === null)
|
|
@@ -150,8 +151,8 @@ function getDeps(opts, fromAlias) {
|
|
|
150
151
|
return;
|
|
151
152
|
const nextOpts = {
|
|
152
153
|
// Resolve new base for new imports/requires
|
|
153
|
-
cwd:
|
|
154
|
-
ext:
|
|
154
|
+
cwd: import_path4.default.dirname(absoluteFile),
|
|
155
|
+
ext: import_path4.default.extname(absoluteFile),
|
|
155
156
|
seen,
|
|
156
157
|
baseUrl: opts.baseUrl,
|
|
157
158
|
pathMappings: opts.pathMappings,
|
|
@@ -187,8 +188,8 @@ function getConfigDependencies(filePath, tsOptions = { pathMappings: [] }, compi
|
|
|
187
188
|
deps.add(filePath);
|
|
188
189
|
getDeps({
|
|
189
190
|
filename: filePath,
|
|
190
|
-
ext:
|
|
191
|
-
cwd:
|
|
191
|
+
ext: import_path4.default.extname(filePath),
|
|
192
|
+
cwd: import_path4.default.dirname(filePath),
|
|
192
193
|
seen: deps,
|
|
193
194
|
baseUrl: tsOptions.baseUrl,
|
|
194
195
|
pathMappings: tsOptions.pathMappings ?? [],
|
package/dist/index.mjs
CHANGED
|
@@ -23,6 +23,7 @@ __export(resolve_ts_path_pattern_exports, {
|
|
|
23
23
|
resolveTsPathPattern: () => resolveTsPathPattern
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(resolve_ts_path_pattern_exports);
|
|
26
|
+
var import_path = require("path");
|
|
26
27
|
var resolveTsPathPattern = (pathMappings, moduleSpecifier) => {
|
|
27
28
|
for (const mapping of pathMappings) {
|
|
28
29
|
const match = moduleSpecifier.match(mapping.pattern);
|
|
@@ -35,7 +36,7 @@ var resolveTsPathPattern = (pathMappings, moduleSpecifier) => {
|
|
|
35
36
|
const matchIndex = Math.min(++starCount, match.length - 1);
|
|
36
37
|
return match[matchIndex];
|
|
37
38
|
});
|
|
38
|
-
return mappedId;
|
|
39
|
+
return mappedId.split(import_path.sep).join(import_path.posix.sep);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Find and load panda config",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"jiti": "^1.19.1",
|
|
38
38
|
"merge-anything": "^5.1.7",
|
|
39
39
|
"typescript": "^5.1.6",
|
|
40
|
-
"@pandacss/error": "0.
|
|
41
|
-
"@pandacss/logger": "0.
|
|
42
|
-
"@pandacss/preset-base": "0.
|
|
43
|
-
"@pandacss/preset-panda": "0.
|
|
44
|
-
"@pandacss/types": "0.
|
|
40
|
+
"@pandacss/error": "0.11.1",
|
|
41
|
+
"@pandacss/logger": "0.11.1",
|
|
42
|
+
"@pandacss/preset-base": "0.11.1",
|
|
43
|
+
"@pandacss/preset-panda": "0.11.1",
|
|
44
|
+
"@pandacss/types": "0.11.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"pkg-types": "1.0.3"
|