Skip to content

Upgrade for Moleculer 0.15 #74

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

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Upgrade for Moleculer 0.15 #74

wants to merge 24 commits into from

Conversation

icebob
Copy link
Member

@icebob icebob commented Jun 11, 2025

No description provided.

@icebob icebob requested a review from Copilot June 12, 2025 07:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 init command to use async/await, dynamic imports, and a pluggable renderer.
  • Extended emit and call commands 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));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant