@omfalos/mokosh 0.4.3 → 0.5.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/README.md +99 -179
- package/dist/cli.js +60 -38
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +60 -38
- package/dist/cli.mjs.map +1 -1
- package/dist/duplication-worker.d.mts +2 -2
- package/dist/duplication-worker.d.ts +2 -2
- package/dist/duplication-worker.js +4 -4
- package/dist/duplication-worker.js.map +1 -1
- package/dist/duplication-worker.mjs +4 -4
- package/dist/duplication-worker.mjs.map +1 -1
- package/dist/index.d.mts +257 -45
- package/dist/index.d.ts +257 -45
- package/dist/index.js +39 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -27
- package/dist/index.mjs.map +1 -1
- package/dist/mcp.js +42 -30
- package/dist/mcp.js.map +1 -1
- package/dist/mcp.mjs +42 -30
- package/dist/mcp.mjs.map +1 -1
- package/dist/parse-worker.d.mts +2 -2
- package/dist/parse-worker.d.ts +2 -2
- package/dist/parse-worker.js +6 -2
- package/dist/parse-worker.js.map +1 -1
- package/dist/parse-worker.mjs +6 -2
- package/dist/parse-worker.mjs.map +1 -1
- package/dist/{parse-CAKctgb6.d.mts → parse-yamNoaoL.d.mts} +1 -1
- package/dist/{parse-CAKctgb6.d.ts → parse-yamNoaoL.d.ts} +1 -1
- package/dist/{tokenizer-BaF1eUBQ.d.mts → tokenizer-DIbb0GLe.d.mts} +2 -2
- package/dist/{tokenizer-BaF1eUBQ.d.ts → tokenizer-DIbb0GLe.d.ts} +2 -2
- package/dist/{types-BtSqoqbZ.d.mts → types-C153Tz5u.d.mts} +1 -1
- package/dist/{types-BlN-U5AM.d.ts → types-y90pqeDR.d.ts} +1 -1
- package/package.json +13 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type FileType = "javascript" | "typescript" | "css" | "scss" | "less" | "stylus" | "coffeescript" | "livescript" | "lua" | "gherkin" | "python" | "go" | "markdown" | "unknown";
|
|
1
|
+
type FileType = "javascript" | "typescript" | "css" | "scss" | "less" | "stylus" | "coffeescript" | "livescript" | "lua" | "gherkin" | "python" | "go" | "java" | "kotlin" | "scala" | "groovy" | "markdown" | "unknown";
|
|
2
2
|
type ImportType = "static" | "dynamic" | "require" | "re-export" | "side-effect";
|
|
3
3
|
type NodeCategory = "logic" | "ui" | "type-only" | "config" | "test" | "barrel" | "other";
|
|
4
4
|
type TagKind = "function" | "class" | "variable" | "type" | "import" | "library" | "comment-marker";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type FileType = "javascript" | "typescript" | "css" | "scss" | "less" | "stylus" | "coffeescript" | "livescript" | "lua" | "gherkin" | "python" | "go" | "markdown" | "unknown";
|
|
1
|
+
type FileType = "javascript" | "typescript" | "css" | "scss" | "less" | "stylus" | "coffeescript" | "livescript" | "lua" | "gherkin" | "python" | "go" | "java" | "kotlin" | "scala" | "groovy" | "markdown" | "unknown";
|
|
2
2
|
type ImportType = "static" | "dynamic" | "require" | "re-export" | "side-effect";
|
|
3
3
|
type NodeCategory = "logic" | "ui" | "type-only" | "config" | "test" | "barrel" | "other";
|
|
4
4
|
type TagKind = "function" | "class" | "variable" | "type" | "import" | "library" | "comment-marker";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Language-agnostic source tokenizer for duplicate-code detection. Strips per-language
|
|
3
3
|
* comment syntax, then splits what remains into a normalized token stream shared by every
|
|
4
4
|
* language `DEFAULT_EXTENSIONS` covers — one generic tokenizer rather than a per-language
|
|
5
|
-
* lexer, so `findDuplicates` works uniformly across TS/JS, Python, Go,
|
|
6
|
-
* LiveScript, Lua, Gherkin, style files, and Markdown.
|
|
5
|
+
* lexer, so `findDuplicates` works uniformly across TS/JS, Python, Go, Java, Kotlin, Scala,
|
|
6
|
+
* Groovy, CoffeeScript, LiveScript, Lua, Gherkin, style files, and Markdown.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/** One normalized token plus the 1-based source line it came from. */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Language-agnostic source tokenizer for duplicate-code detection. Strips per-language
|
|
3
3
|
* comment syntax, then splits what remains into a normalized token stream shared by every
|
|
4
4
|
* language `DEFAULT_EXTENSIONS` covers — one generic tokenizer rather than a per-language
|
|
5
|
-
* lexer, so `findDuplicates` works uniformly across TS/JS, Python, Go,
|
|
6
|
-
* LiveScript, Lua, Gherkin, style files, and Markdown.
|
|
5
|
+
* lexer, so `findDuplicates` works uniformly across TS/JS, Python, Go, Java, Kotlin, Scala,
|
|
6
|
+
* Groovy, CoffeeScript, LiveScript, Lua, Gherkin, style files, and Markdown.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/** One normalized token plus the 1-based source line it came from. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omfalos/mokosh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "A high-performance, AST-powered dependency graph generator for frontend projects, optimized for AI context and smart test selection.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
32
|
"test": "vitest run",
|
|
33
|
+
"test:coverage": "vitest run --coverage",
|
|
34
|
+
"test:affected": "scripts/test-affected.sh",
|
|
33
35
|
"build": "tsup",
|
|
34
36
|
"build:prod": "NODE_ENV=production tsup",
|
|
35
37
|
"lint": "biome lint ./src",
|
|
@@ -37,6 +39,12 @@
|
|
|
37
39
|
"format": "biome format --write ./src",
|
|
38
40
|
"check": "biome check --write ./src",
|
|
39
41
|
"example": "tsx example/run-example.ts",
|
|
42
|
+
"example:vitest": "vitest run --config example/e2e-demo/vitest.config.mts",
|
|
43
|
+
"example:playwright": "playwright test --config example/e2e-demo/e2e/playwright.config.ts",
|
|
44
|
+
"example:gherkin": "NODE_OPTIONS=--import=tsx cucumber-js --config example/e2e-demo/cucumber.cjs",
|
|
45
|
+
"example:pytest": "pytest example/e2e-demo/pytest/tests",
|
|
46
|
+
"example:go": "cd example/e2e-demo/go && go test ./...",
|
|
47
|
+
"example:e2e-demo": "npm run example:vitest && npm run example:playwright && npm run example:gherkin && npm run example:pytest && npm run example:go",
|
|
40
48
|
"changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -o CHANGELOG.md",
|
|
41
49
|
"prepublishOnly": "npm run build:prod",
|
|
42
50
|
"prepare": "husky"
|
|
@@ -69,6 +77,8 @@
|
|
|
69
77
|
"@biomejs/biome": "^2.4.11",
|
|
70
78
|
"@commitlint/cli": "^21.2.1",
|
|
71
79
|
"@commitlint/config-conventional": "^21.2.0",
|
|
80
|
+
"@cucumber/cucumber": "^13.2.1",
|
|
81
|
+
"@playwright/test": "^1.62.1",
|
|
72
82
|
"@types/coffeescript": "^2.5.7",
|
|
73
83
|
"@types/js-yaml": "^4.0.9",
|
|
74
84
|
"@types/luaparse": "^0.2.13",
|
|
@@ -86,9 +96,10 @@
|
|
|
86
96
|
"vitest": "^4.1.4"
|
|
87
97
|
},
|
|
88
98
|
"dependencies": {
|
|
89
|
-
"@cucumber/gherkin": "^
|
|
99
|
+
"@cucumber/gherkin": "^42.0.1",
|
|
90
100
|
"@cucumber/messages": "^34.1.0",
|
|
91
101
|
"@lezer/go": "^1.0.1",
|
|
102
|
+
"@lezer/java": "^1.1.3",
|
|
92
103
|
"@lezer/python": "^1.1.18",
|
|
93
104
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
94
105
|
"coffeescript": "^2.7.0",
|