mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
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:
@@ -10,7 +10,7 @@ export {
|
||||
isAuthenticationError,
|
||||
classifyError,
|
||||
getUserFriendlyErrorMessage,
|
||||
} from './error-handler';
|
||||
} from './error-handler.js';
|
||||
|
||||
// Conversation utilities
|
||||
export {
|
||||
@@ -18,7 +18,7 @@ export {
|
||||
normalizeContentBlocks,
|
||||
formatHistoryAsText,
|
||||
convertHistoryToMessages,
|
||||
} from './conversation-utils';
|
||||
} from './conversation-utils.js';
|
||||
|
||||
// Image handling
|
||||
export {
|
||||
@@ -26,14 +26,14 @@ export {
|
||||
readImageAsBase64,
|
||||
convertImagesToContentBlocks,
|
||||
formatImagePathsForPrompt,
|
||||
} from './image-handler';
|
||||
} from './image-handler.js';
|
||||
|
||||
// Prompt building
|
||||
export {
|
||||
buildPromptWithImages,
|
||||
type PromptContent,
|
||||
type PromptWithImages,
|
||||
} from './prompt-builder';
|
||||
} from './prompt-builder.js';
|
||||
|
||||
// Logger
|
||||
export {
|
||||
@@ -41,10 +41,10 @@ export {
|
||||
getLogLevel,
|
||||
setLogLevel,
|
||||
LogLevel,
|
||||
} from './logger';
|
||||
} from './logger.js';
|
||||
|
||||
// File system utilities
|
||||
export {
|
||||
mkdirSafe,
|
||||
existsSafe,
|
||||
} from './fs-utils';
|
||||
} from './fs-utils.js';
|
||||
|
||||
Reference in New Issue
Block a user