Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the Homey CLI entrypoint toward ESM (while keeping a CJS bin/homey.js shim), updates the required Node/yargs versions accordingly, and adds a CLI regression test to ensure all commands support --help.
Changes:
- Add ESM CLI entrypoint (
bin/homey.mjs) and switchbin/homey.jsto a dynamic-import shim. - Introduce ESM implementations for select commands (
docs/tools/whoami) with CJS wrappers preserved for yargs command loading. - Bump Node engine requirement and yargs major version; update GitHub Actions workflows and add a
--helpsmoke test for all CLI commands.
Reviewed changes
Copilot reviewed 5 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/cli/CommandsHelp.test.js | New test that spawns the CLI for each command and asserts --help exits successfully. |
| package.json | Raises Node minimum version and bumps yargs to v18. |
| package-lock.json | Lockfile updates for yargs v18 and transitive dependency changes. |
| bin/homey.mjs | New ESM CLI implementation with Node version gate, notifier/message setup, and async yargs parsing. |
| bin/homey.js | Converts to a small CJS shim that dynamic-imports the ESM entrypoint. |
| bin/cmds/whoami.mjs / bin/cmds/whoami.js | Moves implementation to ESM with a CJS wrapper handler. |
| bin/cmds/tools.mjs / bin/cmds/tools.js | Moves implementation to ESM with a CJS wrapper handler. |
| bin/cmds/docs.mjs / bin/cmds/docs.js | Moves implementation to ESM with a CJS wrapper handler. |
| .github/workflows/update-homey-lib.yml | Updates workflow to use Node 20 and setup-node v4. |
| .github/workflows/npm-version.yml | Updates workflow to use Node 20 and setup-node v4. |
| .github/workflows/lint.yml | Updates workflow to use Node 20 and setup-node v4. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 16 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.