-
Notifications
You must be signed in to change notification settings - Fork 3
Replace Bun with Node.js #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Update package.json to remove Bun dependencies and add Node.js scripts - Add TypeScript configuration and build process - Update action.yml to use Node.js setup and local compiled JavaScript - Update RELEASE.md documentation to reference npm commands - Replace bun.lock with package-lock.json - Add TypeScript source files with proper ES module support - Update .gitignore to handle TypeScript compiled output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The migration from Bun to Node.js looks well-structured overall. However, there are several critical issues that need to be addressed before this can work correctly, primarily around the missing dist/ directory and build artifacts.
🤖 Automated review complete. Please react with 👍 or 👎 on the individual review comments to provide feedback on their usefulness.
| # TypeScript build info (but keep dist/ for GitHub Actions) | ||
| *.tsbuildinfo | ||
|
|
||
| # TypeScript compiled output in src/ (we use tsx to run directly) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment "we use tsx to run directly" is misleading in the context of this PR. According to action.yml, the action runs pre-compiled JavaScript from the dist/ directory (node ${{ github.action_path }}/dist/index.js), not TypeScript via tsx.
Suggested improvement:
# TypeScript compiled output in src/ (dist/ contains the built action)| "type": "module", | ||
| "scripts": { | ||
| "test": "bun test", | ||
| "test": "npm test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical Issue: This test script creates infinite recursion by calling itself. Running npm test will execute npm test indefinitely.
Suggested improvement:
Either remove this script if there are no tests yet, or implement a proper test command:
"test": "echo \"No tests specified\" && exit 0"Or if you plan to add tests:
"test": "node --test"| working-directory: ${{ github.action_path }} | ||
|
|
||
| - name: Run Augment Agent | ||
| run: node ${{ github.action_path }}/dist/index.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical Issue: This step attempts to run node ${{ github.action_path }}/dist/index.js, but the dist/ directory doesn't exist in the repository and is excluded by .gitignore.
This will cause the action to fail with a "Cannot find module" error.
Required actions:
- Remove
distfrom .gitignore (currently on line 86 of .gitignore) - Run
npm run buildlocally to generate the dist/ directory - Commit the dist/ directory with all compiled artifacts
- Add dist/ to the
filesfield in package.json
Without these changes, the action cannot execute successfully.
Replace Bun with Node.js as the runtime for the augment-agent GitHub Action.
Key Changes
.js,.d.ts,.mapfiles) are now committed to the repository for GitHub Actions compatibilitybun.lockwithpackage-lock.jsonand update engine requirements to specify Node.js ≥22.0.0package.jsonscripts to usenpm/nodecommands instead ofbunaction.ymland execute compiled JavaScript instead of TypeScript sourceRELEASE.mdto referencenpmcommands throughoutTechnical Impact
This change improves compatibility with standard Node.js tooling and GitHub Actions infrastructure. The action now runs pre-compiled JavaScript files, eliminating the need for runtime TypeScript compilation.
Testing
Related
This PR applies changes from augmentcode/augment-agent#9 to this repository.
Pull Request opened by Augment Code with guidance from the PR author