Skip to content

Migrate to ESM #1647

Open
Open

Description

@MikeMcC399

What would you like?

Migrate this repo from CommonJS to ESM, currently

"type": "commonjs",

Why is this needed?

Key dependencies in this repo have moved or will move to ESM, for example:

Activity

  1. added theissue type on Jan 29, 2026
  2. MikeMcC399 commented on Jan 29, 2026

    @MikeMcC399
    CollaboratorAuthor

    I don't expect to be doing this myself and it will probably fall to the Cypress.io team if it is to be done. In the long term, if it is not addressed then the action will tend to become unmaintainable. The got dependency version used is already unmaintained. Edit: resolved.

  3. MikeMcC399 commented on Jan 31, 2026

    @MikeMcC399
    CollaboratorAuthor

    For example @actions/core@3.0.0 says:

    • Breaking change: Package is now ESM-only
    • CommonJS consumers must use dynamic import() instead of require()

    Attempting to update the action to this version fails at the build stage if no other changes are made:

    $ npm run build
    
    > @cypress/github-action@0.0.0-development build
    > ncc build -o dist index.js
    
    ncc: Version 0.38.4
    ncc: Compiling file index.js into CJS
    Error: Module not found: Error: Package path . is not exported from package <repo-root>/github-action/node_modules/@actions/core (see exports field in <repo-root>/github-action/node_modules/@actions/core/package.json)
    
  4. MikeMcC399 commented on Mar 3, 2026

    @MikeMcC399
    CollaboratorAuthor
  5. MikeMcC399 commented on Aug 31, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions