fix!: remove rollup, extraneous types and migrate to ESM-only
#352
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites checklist
What is the purpose of this pull request?
In this PR, I've resolved the issue mentioned in eslint/json#196, removing
rollupand extraneous types and migrating the package to ESM-only.The main focus of this PR is removing much of the logic and the workarounds we previously used to support a dual CommonJS/ESM package.
Some notable parts are as follows:
tsconfig.json: I mostly followed the convention used in the Markdown plugin, which is now an ESM-only package. (Ref: https://github.com/eslint/markdown/blob/main/tsconfig.json)package.json: Likewise, I mostly followed the convention used in the Markdown plugin. (Ref: https://github.com/eslint/markdown/blob/main/package.json).github/workflows/ci.yml: Added@arethetypeswrong/clito verify that type exports work correctly.What changes did you make? (Give an overview)
In this PR, I've resolved the issue mentioned in #196, removing
rollupand extraneous types and migrating the package to ESM-only.Related Issues
rollup, extraneous types and migrate to ESM-only json#197arethetypeswrongin CI markdown#598rollupand migrate to ESM-only as part of the upcoming v1.0.0 (JSON/CSS) json#196Is there anything you'd like reviewers to focus on?
I didn't intentionally remove
tests/types/cjs-import.test.ctssincerequire(ESM)is now enabled. However, if removing it is the right course of action, I'm happy to do so.