@omfalos/mokosh 0.4.4 → 0.5.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,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";
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Language-agnostic source tokenizer for duplicate-code detection. Strips per-language
3
- * comment syntax, then splits what remains into a normalized token stream shared by every
3
+ * comment syntax and import/using statements, 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, CoffeeScript,
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. */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Language-agnostic source tokenizer for duplicate-code detection. Strips per-language
3
- * comment syntax, then splits what remains into a normalized token stream shared by every
3
+ * comment syntax and import/using statements, 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, CoffeeScript,
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. */
@@ -1,4 +1,4 @@
1
- import { F as FileType, N as NodeCategory, I as ImportType, T as TagKind } from './parse-CAKctgb6.mjs';
1
+ import { F as FileType, N as NodeCategory, I as ImportType, T as TagKind } from './parse-yamNoaoL.mjs';
2
2
 
3
3
  interface StructuredTag {
4
4
  name: string;
@@ -23,6 +23,10 @@ interface ImportEdge {
23
23
  isWorkspace?: boolean | undefined;
24
24
  /** The workspace package name (e.g. `"@myorg/shared"`) when `isWorkspace` is true. */
25
25
  workspacePackage?: string | undefined;
26
+ /** True for the synthetic JVM same-package sibling edge (`<own-package>.*`) — a file's implicit coupling to its package siblings, not a written `import`. Structural analyses (cycle detection) skip these; blast-radius analyses keep them. */
27
+ isSamePackage?: boolean | undefined;
28
+ /** True for an edge minted from a Markdown doc's link or code-span file reference (ADR-009), not a written `import`. Structural analyses (cycle detection) skip these by default; doc-drift enrichment keeps them. */
29
+ isDocReference?: boolean | undefined;
26
30
  /** Fraction of the target's exports consumed by this import (0–1). Only present for internal non-side-effect imports where the target has at least one export. */
27
31
  exportUsageRatio?: number;
28
32
  }
@@ -1,4 +1,4 @@
1
- import { F as FileType, N as NodeCategory, I as ImportType, T as TagKind } from './parse-CAKctgb6.js';
1
+ import { F as FileType, N as NodeCategory, I as ImportType, T as TagKind } from './parse-yamNoaoL.js';
2
2
 
3
3
  interface StructuredTag {
4
4
  name: string;
@@ -23,6 +23,10 @@ interface ImportEdge {
23
23
  isWorkspace?: boolean | undefined;
24
24
  /** The workspace package name (e.g. `"@myorg/shared"`) when `isWorkspace` is true. */
25
25
  workspacePackage?: string | undefined;
26
+ /** True for the synthetic JVM same-package sibling edge (`<own-package>.*`) — a file's implicit coupling to its package siblings, not a written `import`. Structural analyses (cycle detection) skip these; blast-radius analyses keep them. */
27
+ isSamePackage?: boolean | undefined;
28
+ /** True for an edge minted from a Markdown doc's link or code-span file reference (ADR-009), not a written `import`. Structural analyses (cycle detection) skip these by default; doc-drift enrichment keeps them. */
29
+ isDocReference?: boolean | undefined;
26
30
  /** Fraction of the target's exports consumed by this import (0–1). Only present for internal non-side-effect imports where the target has at least one export. */
27
31
  exportUsageRatio?: number;
28
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omfalos/mokosh",
3
- "version": "0.4.4",
3
+ "version": "0.5.1",
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",
@@ -96,9 +96,10 @@
96
96
  "vitest": "^4.1.4"
97
97
  },
98
98
  "dependencies": {
99
- "@cucumber/gherkin": "^41.0.0",
99
+ "@cucumber/gherkin": "^42.0.1",
100
100
  "@cucumber/messages": "^34.1.0",
101
101
  "@lezer/go": "^1.0.1",
102
+ "@lezer/java": "^1.1.3",
102
103
  "@lezer/python": "^1.1.18",
103
104
  "@modelcontextprotocol/sdk": "^1.29.0",
104
105
  "coffeescript": "^2.7.0",