postcss / postcss-load-config

Autoload Config for PostCSS
MIT License
638 stars 71 forks source link

chore: drop import-cwd #227

Closed 43081j closed 2 years ago

43081j commented 2 years ago

@ai up to you if you want this or not ofc.

basically we introduced import-cwd at some point which is arguably fairly redundant since we can just use the built in node functions for this directly. personally don't see the point in these one-liner packages.

by dropping it, you can reduce the dependencies tree by at least 2-3 packages (surprisingly for something so simple).

let me know if you agree

Type

SemVer

Checklist

ai commented 2 years ago

This is my favorite type of PRs!

ai commented 2 years ago

But we need to support old Node.js 10

43081j commented 2 years ago

hmm, the package we were depending on pretty much does this same code, so maybe we already regressed when we introduced it? (supporting node 10)

looking at the node docs, it looks like 10.x has createRequireFromPath rather than createRequire

ai commented 2 years ago

Breaking changes is not worth for 2-3 dependencies reduction

43081j commented 2 years ago

its ok i've figured it out, we were using an older version of the dependency. ill see if i can update the code

43081j commented 2 years ago

@ai can you trigger CI? this seems to work locally on node 10

ai commented 2 years ago

Thanks. Released in 3.1.1.