Skip to content

Fix ESM compatibility and add release workflow#6

Merged
utkarsh232005 merged 2 commits intoKDM-cli:mainfrom
utkarsh232005:main
May 10, 2026
Merged

Fix ESM compatibility and add release workflow#6
utkarsh232005 merged 2 commits intoKDM-cli:mainfrom
utkarsh232005:main

Conversation

@utkarsh232005
Copy link
Copy Markdown
Contributor

fix #5 also added new workflows for auto publish release

Copilot AI review requested due to automatic review settings May 10, 2026 19:47
@utkarsh232005 utkarsh232005 merged commit 5272887 into KDM-cli:main May 10, 2026
2 checks passed
Copy link
Copy Markdown

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 CLI build/output to native ESM to avoid Node.js v24 ERR_REQUIRE_ASYNC_MODULE failures when loading ESM-only dependencies like ink, and adds a manual GitHub Actions workflow to bump versions, publish to npm, and create a GitHub Release.

Changes:

  • Switch TypeScript + build output from CommonJS to ESM (tsconfig.json, tsup format, and package "type": "module").
  • Update the CLI entrypoint script to use ESM import instead of require.
  • Add a workflow to version-bump, publish to npm, and create a GitHub Release.

Reviewed changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.json Updates TS module settings for ESM builds.
package.json Declares ESM package type and builds with tsup --format esm.
package-lock.json Bumps lockfile package version metadata to 1.1.0.
bin/kdm.js Converts CLI launcher from require to ESM import.
.github/workflows/publish.yml Adds a workflow to version, publish to npm, and create a GitHub Release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- name: Get Version
id: get_version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
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.

LTS verison issue

2 participants