-
Notifications
You must be signed in to change notification settings - Fork 71
fix!: remove rollup and extraneous types #383
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
base: main
Are you sure you want to change the base?
Conversation
Let's make sure that the types test is passing. That should cover our bases when it comes to exported types.
|
Thanks for sending a PR! I just noted down what I noticed. Currently, Also, many of the types that were originally exported from We used to be able to access these exported types, but now many of them are no longer accessible. |
I don't think all of the types from |
Similar to the CSS and JSON plugins, I've modified the test to import SourceLocation and SourceRange from '@eslint/core'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks. Would like another review before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Leaving it open for @lumirlumir
I’m not sure how other team members feel about this, but I’d like to point out that the current change introduces a Breaking Change. For example, In my custom Markdown plugin, I imported the However, with this change, the As a result, users can no longer access it via:
"exports": {
".": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"./types": {
"types": "./dist/esm/types.d.ts"
}
},
But is this issue limited to just As I mentioned in this earlier comment, some types were not explicitly exported from However, thanks to Rollup’s behavior, the generated One such example is While I agree that explicitly importing types from So, I'd like to ask the team to reconsider this issue. Refernece: #367 (comment) |
This is actually part of the reason I wanted to make this change. I'm okay with marking this as a breaking bug fix if others agree. |
I agree with marking this PR as a breaking change 👍 Could other team members share their thoughts on this? @eslint/eslint-team @eslint/eslint-tsc |
As a breaking change, we should hold off on merging this until we do another patch release to incorporate the non-breaking PRs that are in review currently. |
Prerequisites checklist
What is the purpose of this pull request?
Simplify build process and type management by removing unnecessary Rollup bundling for this ESM package.
What changes did you make? (Give an overview)
Removed Rollup, using tsc to emit code/types directly to dist
Related Issues
Closes #374
Is there anything you'd like reviewers to focus on?
This change causes a breaking issue because tsc splits type declarations across multiple files instead of bundling them in index.d.ts like Rollup did. Some types are no longer exported from the main entry point. Should we re-export them in index.js for backwards compatibility, or accept this as a breaking change? Would appreciate team feedback.