css-modules / css-modules-loader-core

A loader-agnostic CSS Modules implementation, based on PostCSS
91 stars 34 forks source link

Chore: Modernize Dependencies #236

Closed lukeed closed 4 years ago

lukeed commented 4 years ago

This package is seriously outdated, and it's causing a noticeable hiccup when installing postcss-modules. Analysis below:

This module – on its own – pulls in two distinct versions of postcss: graph

It's directly & solely responsible for postcss@6.0.1 being loaded. It shares responsibility for postcss@6.0.23 with:

  • postcss-modules-scope@1.1.0 – (2.2.0 available)
  • postcss-modules-local-by-default@1.2.0 – (3.0.2 available)
  • postcss-modules-values@1.3.0 – (3.0.0 available)
  • postcss-modules-extract-imports@1.1.0 – (2.0.0 available)

Then postcss-modules, a popular dependent of this package, requires postcss@7.0.32 – as it should, since that's the latest.

In any event postcss-modules loads 49 packages total in its network. This css-modules-loader-core package is responsible for 38 of them.

This PR updates all dependencies to their latest semver ranges. It also updates your devDependencies which were seriously outdated too.

It's actually pretty impressive that despite 5 dependencies loading new major versions, the only difference was with newline placements in the most complex test case. 👏


Closes #231, #234, #233, #24

lukeed commented 4 years ago

Travis is failing because new Mocha/whatever doesn't run on Nodes 4 and 6.

I set this up to support a patch release – so that we can resolve this dependency hell ASAP. However, if you plan on releasing this as a major, let's update (and define) the engines constraints to something more recent than 2016.

Please let me know which so that I can adjust the test runner accordingly.

lukeed commented 4 years ago

Sorry for pings, but this has been a problem for nearly 2 years. Please let me know how to next proceed. If you have zero intention of moving forward, then please let me know as well so that I can make efforts in forking and replacing this npm module. Either way, we need to end this misery.

@evilebottnawi @geelen @joshgillies @joshwnj @markdalgleish @michael-ciniawsky @outpunk @sokra @sullenor @TrySound

madyankin commented 4 years ago

Unfortunately, I only have permissions for the postcss-modules repo.

Actually, I'm quite frustrated because of the state of the CSS Modules family and thinking of rewriting postcss-modules to not use any deps.

It's much easier to maintain a library that doesn't depend on unmaintained libraries. But this is a big amount of work, and I don't use postcss-modules myself. So I'm not sure if I should rewrite or maintain it at all.

lukeed commented 4 years ago

@outpunk Yes, my initial mission was to rebuild postcss-modules from scratch, but then I found that nearly all the problems stemmed from this package. Fixing it here is an easier, lower hanging fruit. Now that I've identified this as the problem, my "worst case scenario" is forking this and hoping to PR the fork into postcss-modules. I'd rather not, but will if needed.

Reworking postcss-modules to be slimmer and/or more future-proof can still be done (sounds interesting!) but this needs addressing now.

I'm not aware of permissions – I just pinged everyone in the css-modules org, sorry

madyankin commented 4 years ago

@lukeed let's do this another way — by copy-pasting the css-modules-loader-core files into postcss-modules. This will allow to fix the problem fast and start gradual rewriting of the library

madyankin commented 4 years ago

@lukeed working on it https://github.com/css-modules/postcss-modules/pull/108

alexander-akait commented 4 years ago

Agree, let's focus on postcss-modules, i think we should deprecate css-modules-loader-core

lukeed commented 4 years ago

Awesome :) thanks @outpunk !