Skip to content

Use named exports for all packages with a default export #1951

Closed

Description

@marcalexiei

Follow up to Default exports vs named ones Discord thread

We should move into using named exports across the whole codebase.

To avoid breaking consumers, we’ll keep the existing default exports for now but mark them as deprecated.
These default exports will be removed in the next major release (v4).

Note

CJS compatibility should not be a problem as changeless is a cli tool and usually is not bundled

Adding ESM module log from a require() call for reference:

export { foo } -> logs { foo: [Function: foo] }
export default foo -> logs { __esModule: true, default: [Function: foo] }
export { foo }; export default foo -> logs { __esModule: true, default: [Function: foo], foo: [Function: foo] }

Activity

  1. added this to the v3 milestone on May 4, 2026
  2. marcalexiei commented on May 5, 2026

    @marcalexiei
    ContributorAuthor

    Done via #1969

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions