Conversation
There was a problem hiding this comment.
Pull Request Overview
Upgrade the CLI tool to support Moleculer v0.15 by modernizing code, refactoring command handlers to async/await, adding header support, and updating dependencies and templates.
- Refactored the
initcommand to use async/await, dynamic imports, and a pluggable renderer. - Extended
emitandcallcommands to include HTTP-like headers. - Updated templates, scripts, configuration files, and bumped dependencies for modern tooling.
Reviewed Changes
Copilot reviewed 54 out of 54 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/start/index.js | Normalized yargs option key syntax |
| src/init/index.js | Refactored init command to async/await, dynamic imports, alias handling |
| src/emit/index.js | Added header support to the emit command |
| src/call/index.js | Added header support to the call command |
| src/create/service/* | Updated service templates and dynamic inquirer imports |
| src/create/service/index.js | Refactored service creation to async/await and dynamic imports |
| src/create/index.js | Added default case for unknown file types |
| src/connect/index.js | Normalized yargs option syntax |
| src/connect-handler.js | Streamlined config assignment and formatting |
| src/alias-template/index.js | Refactored alias-template handler to async/await |
| package.json | Bumped dependencies, scripts, and Node engine requirement |
| eslint.config.js | Added new ESLint flat config |
| .prettierrc.json | Added Prettier configuration |
| README.md & LICENSE | Updated copyright year |
| .vscode/launch.json | Simplified debug configuration |
| .github/workflows/ci.yml | Updated CI Node.js version matrix |
Comments suppressed due to low confidence (4)
src/emit/index.js:77
- [nitpick] Using '.map' for side-effects without using the returned array can be confusing; use '.forEach' for iteration instead.
Object.keys(opts).map(key => {
src/call/index.js:61
- [nitpick] Using '.map' for side-effects without using the returned array is misleading. Consider using '.forEach' instead.
Object.keys(opts).map(key => {
src/init/index.js:117
- The function uses fs but 'fs' is not imported at the top of the file. Please add "const fs = require('fs');". Similarly, 'path' is used but not imported. Add "const path = require('path');".
if (fs.existsSync(aliasesPath)) {
src/init/index.js:360
- The variable 'str' is undefined here. You need to assign 'const str = files[file].contents.toString();' before using it for rendering.
files[file].contents = Buffer.from(await render(str, metadata));
This was referenced Jun 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.