plugins icon indicating copy to clipboard operation
plugins copied to clipboard

feat(typescript): support 4.7 nodenext

Open perrin4869 opened this issue 3 years ago • 1 comments

Rollup Plugin Name: typescript

This PR contains:

  • [ ] bugfix
  • [x] feature
  • [ ] refactor
  • [ ] documentation
  • [ ] other

Are tests included?

  • [x] yes (bugfixes and features will not be merged without tests)
  • [ ] no

Breaking Changes?

  • [ ] yes (breaking changes will not be merged unless absolutely necessary)
  • [x] no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

Add support for the new module: nodenext/node16 typescript options in 4.7. This is breaking because it will now require typescript >= 4.7. I tested that this works in my environment via patch-package, but there are broken tests, etc. If one of the maintainers can provide pointers towards getting this ready I will be highly grateful!

perrin4869 avatar May 26 '22 17:05 perrin4869

@shellscape @lukastaegert

OK I finally got around to deep dive into this issue and iron out the details. Originally I thought that this would be a breaking change and require typescript 4.7, but thinking more carefully, I think this will work perfectly fine with older typescript versions as it has thus far. Took inspiration from @cspotcode's work on https://github.com/TypeStrong/ts-node/issues/1778, couldn't have figured this all out without his help! I added some tests to ensure typescript is resolving to the expected module type (cjs or esnext), and hopefully didn't introduce any regressions in the process. The previous tests are all passing as usual.

perrin4869 avatar Jun 07 '22 05:06 perrin4869

Any update about this PR?

Mister-Hope avatar Aug 28 '22 07:08 Mister-Hope

I could fix the conflicts but I'll need someone to merge it 😅

perrin4869 avatar Aug 28 '22 08:08 perrin4869

I could fix the conflicts but I'll need someone to merge it

@perrin4869 please do, then ping me directly if you don't see action within 24 hours.

shellscape avatar Sep 02 '22 17:09 shellscape

Done! 😄

perrin4869 avatar Sep 04 '22 14:09 perrin4869