@ryuugg/stanza 0.1.0 → 0.1.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryuugg/stanza",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "An opinionated code formatter for TypeScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"formatter",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"check": "oxlint && oxfmt --check",
|
|
43
43
|
"check:fix": "oxlint --fix && oxfmt",
|
|
44
44
|
"self-check": "bun run src/cli.ts --check src scripts tests/*.ts",
|
|
45
|
+
"tegami": "bun scripts/tegami.ts",
|
|
45
46
|
"test": "bun test --parallel",
|
|
46
47
|
"typecheck": "tsc --noEmit"
|
|
47
48
|
},
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"@types/bun": "latest",
|
|
53
54
|
"oxfmt": "^0.70.0",
|
|
54
55
|
"oxlint": "^1.85.0",
|
|
56
|
+
"tegami": "^1.5.0",
|
|
55
57
|
"typescript": "5"
|
|
56
58
|
},
|
|
57
59
|
"engines": {
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { Entry } from "../language.ts";
|
|
2
2
|
|
|
3
|
+
const extensions = [".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"];
|
|
4
|
+
const generatedSuffixes = [
|
|
5
|
+
...extensions.map((extension) => `.gen${extension}`),
|
|
6
|
+
...extensions
|
|
7
|
+
.filter((extension) => extension.endsWith("js"))
|
|
8
|
+
.map((extension) => `.min${extension}`),
|
|
9
|
+
];
|
|
10
|
+
|
|
3
11
|
const directories = new Set([
|
|
4
12
|
"node_modules",
|
|
5
13
|
"dist",
|
|
@@ -13,12 +21,7 @@ const directories = new Set([
|
|
|
13
21
|
]);
|
|
14
22
|
|
|
15
23
|
function generatedName(name: string): boolean {
|
|
16
|
-
return (
|
|
17
|
-
name.endsWith(".gen.ts") ||
|
|
18
|
-
name.endsWith(".gen.tsx") ||
|
|
19
|
-
name.includes(".generated.") ||
|
|
20
|
-
name.endsWith(".min.js")
|
|
21
|
-
);
|
|
24
|
+
return name.includes(".generated.") || generatedSuffixes.some((suffix) => name.endsWith(suffix));
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
function skipsName(name: string, keepGenerated: boolean): boolean {
|
|
@@ -32,7 +35,7 @@ function skipsName(name: string, keepGenerated: boolean): boolean {
|
|
|
32
35
|
|
|
33
36
|
export const entry: Entry = {
|
|
34
37
|
id: "javascript",
|
|
35
|
-
extensions
|
|
38
|
+
extensions,
|
|
36
39
|
directories,
|
|
37
40
|
skipsName,
|
|
38
41
|
load: () => (require("./index.ts") as typeof import("./index.ts")).language,
|