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

Remove uncss? #165

Closed
devongovett opened this issue Oct 8, 2021 · 10 comments · Fixed by #168
Closed

Remove uncss? #165

devongovett opened this issue Oct 8, 2021 · 10 comments · Fixed by #168

Comments

@devongovett
Copy link

It seems pretty much unmaintained, and purgecss is already supported as an alternative. Currently, the dependency on uncss causes a bunch of deprecated packages to be installed via a very old JSDOM dependency, including request, request-promise-native, and har-validator. These show up during an npm install of htmlnano or any other tool using htmlnano (like Parcel).

@maltsev
Copy link
Member

maltsev commented Oct 11, 2021

@NovaAtWarren maintains a fork of uncss with updated dependencies (#152). Also, some people, I guess, might still use it. Maybe instead of removing we could move it to optionalDependencies? So it won't be installed by default, but if someone wants to use it, they can install it.

@thewilkybarkid
Copy link

Just had a quick look at what's needed. I see that uncss is currently the default tool so would be a breaking change. I'm surprised at that patch file too: I've not tried it, but surely that doesn't work?

Would it make sense to remove uncss entirely and release a new major version?

@maltsev
Copy link
Member

maltsev commented Oct 24, 2021

I've not tried it, but surely that doesn't work?

I guess it works.

Would it make sense to remove uncss entirely and release a new major version?

I don't think we should remove it entirely. Some people are still using it. Instead, I'd suggest switching to PurgeCSS as a default option and let people install uncss as an optional dependency and use it as well. What do you think? 

@SukkaW
Copy link
Contributor

SukkaW commented Nov 21, 2021

@maltsev

What about making them peer dependencies? Anyone who wants to use will have to install it by him/herself.

Also cc @thewilkybarkid

@maltsev
Copy link
Member

maltsev commented Nov 21, 2021

What about making them peer dependencies? Anyone who wants to use will have to install it by him/herself.

Yes, that's a great idea! I'm not 100% sure it'd work seamlessly though. It'd be awesome if someone could create a PR with that :-)

@maltsev
Copy link
Member

maltsev commented Nov 21, 2021

Fixed in #168.

@maltsev maltsev closed this as completed Nov 21, 2021
@devongovett
Copy link
Author

This is now causing a security issue for all downstream dependencies of htmlnano due to an old version of postcss. See GHSA-566m-qj78-rww5. Any chance this could be released?

@maltsev
Copy link
Member

maltsev commented Jan 12, 2022

Any chance this could be released?

Sure. I'll do it this evening.

@maltsev maltsev mentioned this issue Jan 12, 2022
@maltsev
Copy link
Member

maltsev commented Jan 12, 2022

@folknor
Copy link

folknor commented Jan 14, 2022

But uncss is still used in lib/modules/removeUnusedCss.es6? What is it I don't understand?
It's also listed in package.json and my build system is still complaining about uncss 0.17.3 depending on old, unmaintainted, unsupported, and explicitly deprecated package versions.

EDIT: Nevermind, I see how it works now. Thank you.

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 a pull request may close this issue.

5 participants