refactor: Migrate all lib packages to ESM

Convert all shared library packages from CommonJS to ESM for consistency
with apps/server and modern JavaScript standards.

Changes:
- Add "type": "module" to package.json for all libs
- Update tsconfig.json to use "NodeNext" module/moduleResolution
- Add .js extensions to all relative imports

Packages migrated:
- @automaker/dependency-resolver (already ESM, added .js extension)
- @automaker/git-utils (CommonJS → ESM)
- @automaker/model-resolver (CommonJS → ESM)
- @automaker/platform (CommonJS → ESM)
- @automaker/utils (CommonJS → ESM)

Benefits:
 Consistent module system across all packages
 Better tree-shaking and modern bundling support
 Native browser support (future-proof)
 Fixes E2E CI server startup issues

All tests passing: 632/632 server tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-21 00:23:13 +01:00
parent 49a5a7448c
commit c1386caeb2
16 changed files with 34 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ export {
getCredentialsPath,
getProjectSettingsPath,
ensureDataDir,
} from './paths';
} from './paths.js';
// Subprocess management
export {
@@ -28,7 +28,7 @@ export {
spawnProcess,
type SubprocessOptions,
type SubprocessResult,
} from './subprocess';
} from './subprocess.js';
// Security
export {
@@ -37,4 +37,4 @@ export {
isPathAllowed,
validatePath,
getAllowedPaths,
} from './security';
} from './security.js';