Problem/Motivation
The postcss 8.5.6 and postcss-import 16.1.1 need updating in core for Drupal 12. Their current releases are 8.5.28, and 17.0.0. So postcss-import would be a major version updates while postcss is a patch version update.
The reason these should go together is the resulting whitespace changes both bring. Both packages changed how they treat blank lines and comments that are next to a rule. postcss 8.5.19 released a "bug fix", that stops it from throwing away the blank line in front of a rule after a plugin has moved that rule. postcss-import 17 moves rules and comments around more than version 16 did.
If postcss-import is updated before postcss itself then weird glued code comments show up like } /* The actual sort link. */ because of the lack of whitespace. If postcss-import is updated after postcss then they update almost the same lines and the import update also results in a bunch of whitespace changes.
So I think it makes sense to couple them into one.
As for the major version-updateness of postcss-import, reading https://github.com/postcss/postcss-import/blob/HEAD/CHANGELOG.md#1700--2... it lists two breaking things, node v22 required, which Drupal core already is higher at v24. Also files with identical content at different paths are no longer treated as duplicates and no longer skipped. I don't see an issue about that and have no expectation that core would have relied on the bugos behaviour in the past.
Steps to reproduce
Proposed resolution
Update to postcss 8.5.28, and postcss-import 17.0.0 and accept the resulting automated whitespace changes.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
LLM disclosure
LLM was used to research this issue. The major update consideration in particular was made by a human by reading the changelog.
Issue fork drupal-3625308
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
gábor hojtsyAlso postcss 8.5.28 needs nanoid ^3.3.18, which the existing 3.3.11 cannot satisfy, so that is added as a transitive dependency. The old 3.3.11 entry is not removed because older postcss copies remain in the tree: 8.5.3 and 8.5.6 are still required by other packages on main, such as stylelint 16. So this MR has two nanoid entries for now. This would be cleaned up in #3621277: Update JavaScript dependencies for 12.0.0-beta1 or other issues where stylelint gets updated for example.
Every other changes are autogenerated and whitespace only.
Comment #4
smustgrave commentedChanges LGTM.
Comment #5
longwaveCommitted and pushed 0cc9c28f188 to main. Thanks!
I think we should backport the postcss update (but not postcss-import) to 11.x, to keep the CSS whitespace in sync, in case we backport any other changes in the future - thinking about fixes to navigation and default_admin here, for example.
Comment #7
longwave