Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt type = module. #112

Merged
merged 4 commits into from Apr 24, 2021
Merged

Adopt type = module. #112

merged 4 commits into from Apr 24, 2021

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Apr 16, 2021

This is a “trial run” for adopting type: "module" throughout D3, per d3/d3#3469. Summary:

  • Bump the major version.
  • Continue to export UMD bundles (minified and non-minified).
  • Replace tape with mocha (since the latter supports ES modules).
  • Add GitHub Actions for CI.

Rewriting all the tests is the most tedious part, but on the bright side, it’s an excuse to update them to modern ES syntax.

@mbostock mbostock requested a review from Fil April 16, 2021 20:14
@mbostock
Copy link
Member Author

I investigated using @small-tech/esm-tape-runner and Tape, and it worked, but I like the experience and design of Mocha better, and I suspect it is now better supported. Probably going to go ahead with this PR, though I think I need to add an engines restriction to the package.json for either Node ≥12 or ≥14.

@mbostock
Copy link
Member Author

@Fil Did you want to take a look at this? If you’re happy with this approach we can start applying it to the other D3 repos.

Copy link
Member

@Fil Fil left a comment

Choose a reason for hiding this comment

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

lgtm

Fil added a commit to Fil/attitude that referenced this pull request Apr 24, 2021
@Fil Fil mentioned this pull request Apr 24, 2021
@mbostock mbostock merged commit aa6cb29 into main Apr 24, 2021
@mbostock mbostock deleted the mbostock/type-module branch April 24, 2021 18:40
Fil added a commit to d3/versor that referenced this pull request May 29, 2021
* adopt type="module"
* modernize tooling
* change default branch to main
* license ISC
@mbostock mbostock mentioned this pull request Jun 4, 2021
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants