webpack-contrib / postcss-loader

PostCSS loader for webpack
MIT License
2.86k stars 211 forks source link

chore(deps): update before release #659

Closed alexander-akait closed 1 year ago

alexander-akait commented 1 year ago

This PR contains a:

Motivation / Use-Case

regenerate lock file and validate latest version before release

Breaking Changes

No

Additional Info

No

alexander-akait commented 1 year ago

@d-fischer there is a breaking change with .mjs implementation

Example:

import { cosmiconfig, defaultLoaders } from "cosmiconfig";

console.log(defaultLoaders[".js"]);

Before it was sync function https://github.com/cosmiconfig/cosmiconfig/blob/v8.0.0/src/loaders.ts#L7, now it is async, I am afraid you will get a lot of issue about it soon, I think not many have been updated yet, so everything is fine for now.

I can patch it here, but a lot of CLI tools use postcss-loader and can't easy update it.

alexander-akait commented 1 year ago

Perhaps we should have introduced this improvement under a new major release, but it is too late to change it.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.28 :tada:

Comparison is base (e754c3f) 88.41% compared to head (f880ff1) 88.70%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #659 +/- ## ========================================== + Coverage 88.41% 88.70% +0.28% ========================================== Files 3 3 Lines 354 354 Branches 115 115 ========================================== + Hits 313 314 +1 + Misses 38 37 -1 Partials 3 3 ``` | [Impacted Files](https://app.codecov.io/gh/webpack-contrib/postcss-loader/pull/659?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webpack-contrib) | Coverage Δ | | |---|---|---| | [src/utils.js](https://app.codecov.io/gh/webpack-contrib/postcss-loader/pull/659?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webpack-contrib#diff-c3JjL3V0aWxzLmpz) | `86.41% <100.00%> (+0.37%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

d-fischer commented 1 year ago

Just wondering - as the containing function is already async, why didn't you just add an await?

I agree that multiple people including myself missed that this is breaking, and should have been part of a major release, but reverting now would by itself be another breaking change.

alexander-akait commented 1 year ago

@d-fischer

Just wondering - as the containing function is already async, why didn't you just add an await?

Due to jest and Node.js, we have a custom implementation for loading to avoid memory leak, so I want to just use import-refresh with require here and do not try to import(...) if it was failed, it is faster and due new Function(...) Node.js remove it from cache after gc

I agree that multiple people including myself missed that this is breaking, and should have been part of a major release, but reverting now would by itself be another breaking change.

yeah, I agree, reverting this will be a problem more, maybe we should add notes in changelog about it, so it wasn't a surprise