plugins icon indicating copy to clipboard operation
plugins copied to clipboard

fix(repo): type definitions not being exported correctly for esm modules

Open danielbayley opened this issue 1 year ago • 5 comments

Rollup Plugin Name: {name}

This PR contains:

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

Are tests included?

  • [ ] yes (bugfixes and features will not be merged without tests)
  • [x] 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

Picking up the baton from @Geylnu in #1578 …

I also ran into this. As mentioned elsewhere, the types are wrong in all Rollup plugins! Meaning they do not play nice with TypeScript.

More detailed explanations can be found here and here.

Fixes #1541. Fixes #1329.

danielbayley avatar Jun 30 '24 01:06 danielbayley

Since this affects all plugins in the repo, this PR also needs to assert that every plugin has a types test. Moving this away from sibling types is opening an entirely new can of worms, and types now need to be verified for both commonjs and ES tsconfig#module users.

Had the last PR made it beyond CI, that would have been the ask as well.

shellscape avatar Jun 30 '24 02:06 shellscape

Since this affects all plugins in the repo, this PR also needs to assert that every plugin has a types test. Moving this away from sibling types is opening an entirely new can of worms, and types now need to be verified for both commonjs and ES tsconfig#module users.

Had the last PR made it beyond CI, that would have been the ask as well.

@shellscape Sure, will circle back to this and look into it…

danielbayley avatar Jul 03 '24 02:07 danielbayley

@danielbayley last call on this one

shellscape avatar Sep 22 '24 23:09 shellscape

@danielbayley last call on this one

This PR makes Node choke when importing certain plugins (typescript and babel, at least) from an ESM package. Generating minimal package.json files next to the es bundles shouldn't be disabled.

image

Nevertheless, the types issue is a very, very long-standing one and needs to be fixed. I'm willing to take over if @danielbayley cannot pursue himself.

Since this affects all plugins in the repo, this PR also needs to assert that every plugin has a types test. Moving this away from sibling types is opening an entirely new can of worms, and types now need to be verified for both commonjs and ES tsconfig#module users.

@shellscape > none of the packages currently have types tests; what would you like to see, exactly?

Septh avatar Sep 23 '24 23:09 Septh

@danielbayley last call on this one

@shellscape I've been on holiday, then had COVID, and a bunch of other life-in-the-way stuff… So only just getting back into things. This is certainly still on my list to fix!

Nevertheless, the types issue is a very, very long-standing one and needs to be fixed. I'm willing to take over if @danielbayley cannot pursue himself.

Yeah it needs to be resolved! @Septh You're welcome to lend a hand with this PR…

danielbayley avatar Sep 26 '24 10:09 danielbayley

Closing as abandoned for now. Please feel free to re-open should you get back around to it.

shellscape avatar Dec 15 '24 16:12 shellscape