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
Prepare 16.0.0 #6930
Comments
I'm catching up on my notifications. Seeing all the releases and hard work done over the last few months is fantastic!
I agree, and with including #6740 & #5291. Let's also remove the deprecated rules now that community plugins are available. One of the original motivations for deprecating the stylistic rules was to aid our migration to ESM, as those rules are the bulk of the oldest parts of our codebase. @ybiquitous As an aside, do you have admin rights to recover my Stylelint 1password account? Something is up with my secret key. |
@jeddy3 Welcome back! 😄 I agree with removing the deprecated rules, and I just updated this issue description.
Oh..., I don't have any admin access to 1password and am unsure about 1password details. 😓 |
I was able to get access myself via my old laptop. I've given you admin access in case you need it in the future. |
@jeddy3 Thanks. I can access it as an admin. 👍🏼 By the way, can I invite @mattxwang? He has recently performed releasing work many times (also today). |
Absolutely. You can invite him to the Team Member's group with access to the shared vault. @mattxwang Thanks for doing the recent releases. You're doing a fantastic job! |
@mattxwang I've sent an invitation to your email on your profile page. Can you check it, please? |
I've added #6966 to the "Discussing" list. |
Thanks - just signed up with an account with my public email address! |
@mattxwang I've confirmed your account. Let me know if you're in trouble. 👍🏼 |
@ybiquitous should I have access to a shared vault? I don't see anything under my items in the UI. |
@mattxwang Oh, sorry! I forgot to assign you to the shared vault. 🙇🏼 Can you see it now? |
Thanks @ybiquitous - it works now! |
Sorry the permissions conversation got a bit off-target! To re-focus - I've started the removing deprecated rules process at #6979. @ybiquitous had a good suggestion of a |
Thanks for creating the Reminder: we may need to regularly merge changes on |
As the ball is rolling on this (#6979), I've converted the top post into a task list. |
concerning futur-major
|
Sorry for being a bit MIA, my work at NEU ended up being a bit more consuming than I thought. I have a couple of weeks before instruction starts where I can get into the nitty gritty. What could I best help out with? I know @ybiquitous has been doing a great job with ESM migration - would you like more reviews there and/or me to help with the migration? Alternatively, I could start doing the rest of #6966, which could be done (almost) completely asynchronously, and could in theory be folded into future v15 releases. |
@mattxwang Thanks for the proposal and help. Yes, I need more support and review for my ESM migration work. But, of course, you can take on tasks that you are interested in. We need to migrate so many rules' codes to ESM, and tasks not directly related to ESM, like #6966, also remain. You're free to do any work. 😉 |
I've just added #7141 to the task list on #6930 (comment). |
I think that we should remove some issues so that we can merge v16 sooner.
That would leave us with only #5291 left; @ybiquitous is sure working hard towards its completion. |
https://github.com/stylelint/stylelint/releases/tag/16.0.0-2 is out! The main change is the addition of ESM plugin support (#7339). |
I've begun migrating stylelint-scales to ESM to test our latest prerelease and to check if anything needs to be added to our migration guide for plugin authors. It was mostly smooth going, but there were a few oddities. 1. I followed the latest plugin example, and used this export structure: rule.ruleName = ruleName;
rule.messages = messages;
rule.meta = meta;
export default createPlugin(ruleName, rule); I now have to destructure the nested rule object in my tests: - const { messages, ruleName } = require("..");
+ import rule from "../index.js";
+ const {
+ rule: { messages, ruleName },
+ } = rule; Because it has this signature: {
ruleName: 'scales/alpha-values',
rule: [Function: rule] {
primaryOptionArray: true,
ruleName: 'scales/alpha-values',
messages: { expected: [Function (anonymous)] },
meta: {
url: 'https://github.com/jeddy3/stylelint-scales/blob/main/lib/rules/alpha-values/README.md',
fixable: true
}
}
} Does that nested structure look right? It seems off. 2. I was slightly thrown when setting up our Jest preset as I had to update the path. - global.testRule = getTestRule({ plugins: ["./"] });
+ global.testRule = getTestRule({ plugins: ["./lib/index.js"] }); I assume this has something to do with change from {
- "main": "lib/index.js",
+ "exports": "./lib/index.js",
} Did I get something wrong? If not, we'll want to add something to the migration guide as part of #7340. 3. Lastly, Jest is tripping up on Windows and Node.js@18 on *nix. *nix: A jest worker process (pid=2039) was terminated by another process: signal=SIGSEGV, exitCode=null. Operating system logs may contain more information on why this occurred. Windows: D:\a\stylelint-scales\stylelint-scales\node_modules\.bin\jest:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list @ybiquitous Did you encounter either of these when migrating the tests for Stylelint's built-in rules to ESM? |
@jeddy3 Thanks for trying. I answer them below.
Yes, right. The previous code in CJS is incorrect: module.exports = createPlugin(ruleName, rule);
module.exports.ruleName = ruleName;
module.exports.messages = messages; should have been: rule.ruleName = ruleName;
rule.messages = messages;
module.exports = createPlugin(ruleName, rule); However, because the The new code in ESM is correct. 👌🏼 For your information, I share the following type definitions with 15.11.0 for a plugin and rule. They will not change with 16.0.0, too:
The change to
For the And I'm unsure about the |
moved to #7340## concerning 2.
This should be removed. It's not necessary; it's equivalent but slightly less compatible with other tools that might only pick up You should add a note saying that a dual ESM/CJS plugin that would target stylelint 14 and ≥15 would require both |
@Mouvedia For #6930 (comment), can you please comment on #7340 instead of here? There are so many comments already on this issue. |
May I ask when the official version will be released? |
I may sound silly, but watching all the things you have to do for a dual module system makes me feel sorry for your efforts. It seems like it would be much easier for you to switch completely to pure ESM in version 16, and declare version 15 as LTS for a year (or two), which you maintain in a separate branch, releasing only patches with bug fixes, maybe one or two minor versions. Although I feel sorry for the effort you've spent, because you'll remove it all in the next major version anyway, at the same time I admire the work you've done |
Yes, I agree. We can put out another prerelease, do some more local testing and give the documentation the once over, and then I think we're about ready to release! 🚀 |
Wow, great, looking forward to it 🎉 |
@ybiquitous Thank you so much for your work, love you so much |
https://github.com/stylelint/stylelint/releases/tag/16.0.0-3 is out! Please try |
Is the idea of creating a |
@firefoxic Thanks for the reminder. I've just created the repository, although it's still blank: https://github.com/stylelint/stylelint-test-rule-node. Please let us know if you want to contribute to the new package. Ref #7340 (comment) |
I tried to use +:root { --foo: { color: red }; --bar: { color: blue }; --foo-bar: { color: blue }; --bar-foo: { color: red }; }
-:root { --foo: {; color: red }; --bar: {; color: blue }; --foo-bar: {; color: blue }; --bar-foo: {; color: red } } Started looking into their history, and found the reason for adding exactly the tests that failed: #1806 and #1830. Given that the I'm more interested in why the fails happened only now. Having looked at the diff between |
@firefoxic Thanks a lot for the feedback. I'm also concerned about the change. Can you share where I can look into the failure? (tests on stylelint-stylistic/stylelint-stylistic#6 seems successful) |
Yeah, sure. Habit of not pushing until fixed 🤭 |
My assumption was wrong — it's not about an empty set, because there is one set that is not empty: It's about the And still, the question is relevant for me: why do we need code samples in tests with invalid CSS syntax and without specifying |
That's probably 1e8517e#diff-5a796b3daf3cbd1194a107ee4510d9c802312af9c7487158cd203e6b3f92caf9R126 |
Yes, it is. |
If Line 6 in a83af3e
And by the way, have you considered switching to |
Good catch. Can you open PR to change the flag if you have time?
As I remember, there are no issues, but a related one is #6298. You can freely open an issue to suggest |
@firefoxic #6930 (comment) is not a blocker for v16? |
Not anymore. I removed those tests with non-standard syntax from the plugin. If such tests don't fail in Stylelint, it's probably not critical. |
Nice to have:
message
option #6966fix
regardless of extension #7116I think it's a good time to start a discussion about the next major version.
Ref:
Please suggest other issues with a comment if you have any ideas.
The text was updated successfully, but these errors were encountered: