Skip to content

feature/esm#577

Open
jeroenwienk wants to merge 6 commits intodevelopfrom
feature/esm
Open

feature/esm#577
jeroenwienk wants to merge 6 commits intodevelopfrom
feature/esm

Conversation

@jeroenwienk
Copy link
Contributor

No description provided.

Copy link
Contributor

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

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 switch bin/homey.js to 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 --help smoke 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.

Copy link
Contributor

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants