Skip to content

Commit f6ab411

Browse files
scotty595claude
andcommitted
fix: add .js extension to import-lexer import in repo-patterns
Published 0.8.1 and 0.8.2 shipped a broken ESM import in dist/repo-patterns.js (`from "./import-lexer"` without .js). Node strict ESM resolution rejects the extensionless path, crashing any consumer that imports repo-patterns at runtime. Webpack/Turbopack tolerated it on the host, masking the bug, but it broke the API server in Docker. Add .js to the source so future builds (and any future drift in fix-esm-imports.mjs) stay correct. Bumps governance-sdk to 0.8.3. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e599df8 commit f6ab411

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/governance/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "governance-sdk",
3-
"version": "0.8.2",
3+
"version": "0.8.3",
44
"description": "AI Agent Governance for TypeScript — policy enforcement, scoring, compliance, and audit for AI agents",
55
"type": "module",
66
"main": "./dist/index.js",

packages/governance/src/repo-patterns.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Feed it file contents, get capability detection results.
66
*/
77

8-
import { extractToolImports, parseImports, toolNamesFromImport } from "./import-lexer";
8+
import { extractToolImports, parseImports, toolNamesFromImport } from "./import-lexer.js";
99
import type { ScannerPlugin, FileResolver } from "./scanner-plugins/types.js";
1010

1111
/** Detection result for a single capability */

0 commit comments

Comments
 (0)