Skip to content

feat!: migrate to ESM and bump major version to 4.0.0#741

Merged
llun merged 6 commits intomainfrom
codex/esm-v4-major
Feb 14, 2026
Merged

feat!: migrate to ESM and bump major version to 4.0.0#741
llun merged 6 commits intomainfrom
codex/esm-v4-major

Conversation

@llun
Copy link
Owner

@llun llun commented Feb 14, 2026

Summary

  • migrate the project runtime and action entrypoint to ESM (type: module, action.mjs)
  • replace SWC register runtime hooks with tsx for load/test scripts
  • update TypeScript module settings for ESM/bundler behavior
  • bump package major version from 3.3.0 to 4.0.0
  • refresh docs examples to use llun/feeds@4.0.0
  • bump dependencies to latest versions and update lockfile

Verification

  • yarn test (44 passed)
  • yarn build (successful Next.js static build)

@gemini-code-assist
Copy link

Summary of Changes

Hello @llun, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request implements a substantial modernization of the project by migrating its core architecture to ECMAScript Modules (ESM). This transition impacts the project's runtime, GitHub Action entrypoint, and build configurations, leading to a major version increment to 4.0.0. The changes also involve streamlining the development toolchain by replacing SWC-based transpilation with tsx and updating TypeScript settings to reflect contemporary module resolution practices. Additionally, all dependencies have been brought up to date to ensure compatibility and leverage the latest features.

Highlights

  • ESM Migration: The project's runtime and action entrypoint have been migrated to ECMAScript Modules (ESM).
  • Major Version Bump: The package major version has been bumped from 3.3.0 to 4.0.0 to reflect the significant changes.
  • Tooling Update: SWC register runtime hooks have been replaced with tsx for load and test scripts, simplifying the development environment.
  • TypeScript Configuration: TypeScript module settings were updated to align with modern ESM and bundler behavior.
  • Dependency Updates: All project dependencies have been updated to their latest versions, and the yarn.lock file has been refreshed.
  • Documentation Refresh: Documentation examples in readme.md were updated to reference the new 4.0.0 action version.
Changelog
  • action.mjs
    • Renamed action.js to action.mjs to signify its ESM nature.
    • Converted CommonJS require statements to ESM import syntax.
    • Updated the Node.js execution command to use --import tsx instead of -r @swc-node/register.
  • action.yml
    • Updated the main entrypoint from action.js to action.mjs.
  • action/repository.ts
    • Added action.mjs, next.config.ts, postcss.config.mjs, and tailwind.config.ts to the list of files to be ignored during publishing.
  • next.config.ts
    • Modified the retrieval of customDomainName from @actions/core.getInput to process.env['INPUT_CUSTOMDOMAIN'].
    • Removed the async keyword from the default export function.
  • package.json
    • Updated the package version from 3.3.0 to 4.0.0.
    • Added "type": "module" to explicitly define the package as ESM.
    • Modified load and loadFile scripts to use node --import tsx.
    • Updated the test script to use NODE_OPTIONS='--import tsx' ava.
    • Removed @swc-node/core, @swc-node/register, and @swc/core dependencies.
    • Updated @actions/core from ^2.0.2 to ^3.0.0.
    • Updated @actions/github from ^7.0.0 to ^9.0.0.
    • Added tsx dependency (^4.21.0).
  • readme.md
    • Updated usage examples to reference llun/feeds@4.0.0 instead of llun/feeds@3.0.0.
  • tsconfig.json
    • Changed module compiler option from nodenext to ESNext.
    • Changed moduleResolution compiler option from NodeNext to Bundler.
  • yarn.lock
    • Updated numerous dependency versions, including @actions/core, @actions/github, and various @octokit/* packages.
    • Removed all @swc-node and @swc/core related entries.
    • Added tsx and its associated dependencies like esbuild and get-tsconfig.
Activity
  • No human activity has been recorded on this pull request since its creation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a great step forward in modernizing the project by migrating to ESM. The changes are logical and well-implemented, especially the switch to tsx and the updates to package.json and tsconfig.json. I've added a couple of suggestions to improve robustness and consistency which you might want to consider.

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 performs a breaking migration of the GitHub Action and local runtime to ESM, updates the action entrypoint, replaces SWC runtime hooks with tsx, and bumps the package to v4.0.0 alongside dependency and documentation updates.

Changes:

  • Switch action runtime/entrypoint to ESM (type: module, action.mjs) and update action.yml to use Node 24.
  • Replace @swc-node/register usage with tsx for load/test execution paths.
  • Update TypeScript module settings and refresh docs/examples for llun/feeds@4.0.0, plus dependency/lockfile updates.

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
yarn.lock Updates dependency graph/lockfile for new major runtime/tooling dependencies (notably tsx).
tsconfig.json Adjusts TS module + resolution settings for ESM/bundler behavior.
readme.md Updates docs to reflect Node 24 runtime and v4 usage/examples; clarifies storageType default.
package.json Bumps major version, enables ESM via type: module, switches scripts to tsx.
next.config.ts Removes @actions/core input dependency and derives base path from action env vars.
action/repository.ts Updates publish cleanup list to include new/renamed config/action artifacts.
action.yml Updates runs.using to node24 and entrypoint to action.mjs.
action.mjs Converts action entrypoint to ESM imports and executes TS via node --import tsx.
Comments suppressed due to low confidence (2)

action.mjs:62

  • executeResult.error won’t catch index.ts runtime failures that exit with a non-zero code. Use executeResult.status !== 0 (and/or signal) to decide when to throw so the action fails correctly if the site builder script errors.
    action.mjs:56
  • Same issue as above: yarn install failures typically show up as a non-zero status, not result.error. Update the failure check to handle non-zero exit codes so the action aborts reliably when dependencies can’t be installed.

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

@llun llun merged commit 68958e5 into main Feb 14, 2026
6 checks passed
@llun llun deleted the codex/esm-v4-major branch February 14, 2026 12:49
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