Skip to content

Modernize import syntax to ESModules#665

Merged
EzraBrooks merged 5 commits intodevelopfrom
modernize-import-syntax
Feb 20, 2024
Merged

Modernize import syntax to ESModules#665
EzraBrooks merged 5 commits intodevelopfrom
modernize-import-syntax

Conversation

@EzraBrooks
Copy link
Copy Markdown
Contributor

@EzraBrooks EzraBrooks commented Jan 8, 2024

Public API Changes

This is definitely a breaking change. Code requiring CommonJS modules may no longer work the same way or at all.

Description

This removes usage of the old CommonJS module require syntax in favor of ECMAScript Module import syntax, to ease the adoption of a newer bundler like Rollup. This code works in my Vite-based codebase, so it should work in Rollup.

The bulk of this PR is a change to package-lock.json from shuffling dependencies around.

Related to desire for a better/newer bundler in #647.

@EzraBrooks EzraBrooks added the v2 Issues and PRs, which will be fixed in v2, as it is a breaking change label Jan 8, 2024
@EzraBrooks

This comment was marked as resolved.

@EzraBrooks EzraBrooks force-pushed the modernize-import-syntax branch 3 times, most recently from a7a5bb1 to 6a8c988 Compare January 25, 2024 21:03
@EzraBrooks EzraBrooks force-pushed the modernize-import-syntax branch 2 times, most recently from 448079a to 6c53d44 Compare February 5, 2024 21:44
@EzraBrooks
Copy link
Copy Markdown
Contributor Author

Sorry for the delay here, it's actually a good sign, because this branch has been working in such a bulletproof manner on my project that I've been forgetting to come back and finish this..

@EzraBrooks EzraBrooks force-pushed the modernize-import-syntax branch 6 times, most recently from 086e1e8 to 8f01f52 Compare February 20, 2024 17:16
@EzraBrooks EzraBrooks force-pushed the modernize-import-syntax branch from 8f01f52 to ef40260 Compare February 20, 2024 17:17
@EzraBrooks EzraBrooks marked this pull request as ready for review February 20, 2024 18:16
@EzraBrooks
Copy link
Copy Markdown
Contributor Author

See #687 for why we're doing this! The existing library layout didn't work with Rollup and Vite, but after this PR it does!

@EzraBrooks EzraBrooks merged commit 2f88836 into develop Feb 20, 2024
@EzraBrooks EzraBrooks deleted the modernize-import-syntax branch February 20, 2024 18:59
@EzraBrooks EzraBrooks added this to the 2.0.0 milestone Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Issues and PRs, which will be fixed in v2, as it is a breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants