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

chore: update cssnano for types #213

Closed
wants to merge 1 commit into from

Conversation

dfreeman
Copy link

#212 removed @types/cssnano as being unnecessary, but cssnano itself didn't begin shipping types until 5.1, and those types weren't 100% compatible with what had been in @types/cssnano.

For whatever reason it looks like CI didn't run on that pull request, though, so the issue wasn't flagged.

This PR updates the cssnano dependency so that its types are available, and fixes a couple of references so that everything typechecks cleanly.

@dfreeman
Copy link
Author

Hi @Anidetrix — is there anything I can do from my side to help move this and #214 forward? We'd love to be able to adopt rollup-plugin-styles for our projects but are currently blocked on needing something like #214 🙂

@CxRes
Copy link

CxRes commented Apr 23, 2022

I opened #216 and then I saw this PR. @dfreeman Thanks!

However I am finding that just bumping cssnano throws the following error in the tests:

src/index.ts:280:28 - error TS2352: Conversion of type 'Plugin' to type 'Processor' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
      Type 'Plugin' is missing the following properties from type 'Processor': version, plugins, use, process

@dfreeman
Copy link
Author

@CxRes if you check the diff here, you can see where I had to change the code in this plugin in a couple of places to accommodate the new types—it's pretty common when shifting from DefinitelyTyped to natively-published types for a package that there is some breakage like that.

@dfreeman dfreeman closed this Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants