@cosmicdrift/kumiko-guards 0.323.0 → 0.324.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-guards",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.324.0",
|
|
4
4
|
"description": "AST-based security guards for Kumiko repos: direct-fs/fetch, tenant escalation, admin-API, escape hatches and related checks, run over a shared ts-morph project.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"kumiko-pre-push": "./src/pre-push.sh"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@cosmicdrift/kumiko-repo-manifest": "0.
|
|
31
|
+
"@cosmicdrift/kumiko-repo-manifest": "0.324.0",
|
|
32
32
|
"ts-morph": "^28.0.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
package/src/changes.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.324.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "lib-test-coverage guard links NodeNext-style .js/.mjs/.cjs test imports to their .ts source",
|
|
6
|
+
"detail": "Under moduleResolution NodeNext a test imports \"../foo.js\" while the source is foo.ts.\nThe guard now strips .js/.jsx/.mjs/.cjs as well as .ts/.tsx/.mts/.cts before comparing,\nso such a test no longer triggers a false \"no test imports this lib module\"."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.323.0",
|
|
4
10
|
"type": "improvement",
|
|
@@ -68,8 +68,11 @@ function exportedCallables(sf: SourceFile): Export[] {
|
|
|
68
68
|
return out;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
// NodeNext-Importe schreiben ".js"/".jsx", obwohl die Quelle ".ts"/".tsx" ist
|
|
72
|
+
// (und analog .mjs/.cjs zu .mts/.cts) — die Extension muss beim Vergleich der
|
|
73
|
+
// Modulpfade also für alle vier Paar-Varianten fallen, sonst reißt der Link.
|
|
71
74
|
function stripExt(path: string): string {
|
|
72
|
-
return path.replace(/\.tsx
|
|
75
|
+
return path.replace(/\.(?:[cm]?tsx?|[cm]?jsx?)$/, "");
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
// Ein Test ist mit einer lib-Datei verknüpft, wenn er relativ aus genau dieser
|