-
Notifications
You must be signed in to change notification settings - Fork 92
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
Update stylelint to v13.0.0 #428
Conversation
}, | ||
"peerDependencies": { | ||
"stylelint": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0" | ||
"stylelint": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0" |
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.
BTW this is getting too long. We should probably drop some versions from here.
@hudochenkov: maybe you could have a quick look? It seems all of the percent-placeholder-pattern tests fail with v13.0.0. After some quick debugging it seems the cause it's stylelint/stylelint#4483 |
Your discovery is correct. This plugin uses internals of stylelint, which are not a public API. I would suggest copy required utils from stylelint ( stylelint concerns about standard CSS only, that's why we have these utils. |
Thanks for the reply :) TBH I think stylelint-scss should not duplicate everything, hence why I made #430, because I see a lot seemingly identical code. That being said, for the time being, I will try first your suggestion so that we can update to the latest version and leave the other refactoring changes for later :) |
This comes with a price, that something could break even with patch release of stylelint :) I think you need to change |
I was under the impression that utils were part of the public API too. Is there a list of things that are officially part of the public API? |
The thing is that Or does it mean that only the mentioned utils methods are exposed? |
I think only exposed methods are available. |
Hmm, then I guess we need the opposite of #430 so that we are safe. Have you guys thought about exposing the other utils too? Currently there's like 500 lines of code and 15 files that are duplicated, and if we add more files this will keep increasing. |
There were never discussion about this. You can start one in stylelint repo :) |
8f1bac9
to
8683ca7
Compare
@kristerkari I think this is ready for review after #427 is merged. I added the upstream code and tests before the breaking change. |
8683ca7
to
2b0d3da
Compare
Thanks! I've been away from home for the weekend and at work today the whole day, but I'll try to get this reviewed asap. |
btw. I merged #427 |
2b0d3da
to
c22219e
Compare
Rebased. I'm not sure if the new upstream files I backported make all sense; I see code for Less etc. |
c22219e
to
d3c286b
Compare
388a983
to
1c13ec5
Compare
I split this for easier review. |
@kristerkari frinedly ping for this and the other open PRs |
fd15d56
to
db938d1
Compare
db938d1
to
1ce2ade
Compare
}, | ||
"peerDependencies": { | ||
"stylelint": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0" |
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.
Hmm... I'm still not sure if it's a good idea to drop support for everything else than the newest version.
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.
Well, the thing is that
- what was the last time you tested stylelist-scss master with stylelint 8.0.0? Or any version other than the latest?
- if you are going to make sure every future version works with stylelint, why don't you just use
>=
? - This should be a major release IMO and we should try to merge Remove babel. #429 too, which makes it a good time to remove this
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.
I can revert it BTW, my initial patch didn't change this.
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.
what was the last time you tested stylelist-scss master with stylelint 8.0.0? Or any version other than the latest?
I don't think that you really understand my point of view here. I don't really care about stylelint version 8, and I don't know if it has even any users other than some outdated projects. I just don't think that it is a good idea to drop the support for 5 versions at the same time, as the chances that there are people using some those versions is really high.
I actually have one React Native project where I had to lock the stylelint version to v9.x because newer stylelint versions depend on some dependency that uses @types/node
which messes up the Typescript typings for React Native in my project and causes Typescript to throw errors.
I've ran into similar issues with other npm packages, where I could not update to the latest version of a package because it required the newest version of a peer dependency, so the only solution is not to update.
The thing is that managing peer dependency versions is a complicated thing, and IMO the best way is to gradually drop supported versions from the end and release those in separate releases.
if you are going to make sure every future version works with stylelint, why don't you just use
>=
?
Because I don't know if the version that we have now works with a stylelint version that gets released two years from now. That's why the versions are whitelisted.
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.
Hence why I reverted that change and I just added v13.0.0 in peerDependencies.
I still believe this should be cleaned up later.
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.
Yes, it definitely should be cleaned up, but I need to see if there is any data about downloads per stylelint version to get an idea if people are still using those old versions.
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.
Not sure where you can find such metrics TBH.
Anyway, I assume this PR should be good to go as is? I need to rebase a few of my other PRs after this gets merged.
1ce2ade
to
4f595de
Compare
4f595de
to
1445870
Compare
WDYT about drop node 8 support? |
The thing is that it seems stylelint-scss works with Node.js 8.x and maybe old stylelint versions. IMHO we should grab this opportunity and:
|
Friendly ping @kristerkari ^^ |
Requires #427 merged and tests to be fixed
Closes #433