Skip to content
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

fix: error handling #1141

Merged
merged 4 commits into from
May 25, 2023
Merged

fix: error handling #1141

merged 4 commits into from
May 25, 2023

Conversation

alexander-akait
Copy link
Member

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Part of webpack/webpack#15980

Breaking Changes

No

Additional Info

No

@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Patch coverage: 84.61% and project coverage change: -0.63 ⚠️

Comparison is base (daf62be) 94.66% compared to head (1f7b9bd) 94.03%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1141      +/-   ##
==========================================
- Coverage   94.66%   94.03%   -0.63%     
==========================================
  Files           5        5              
  Lines         375      369       -6     
  Branches      137      136       -1     
==========================================
- Hits          355      347       -8     
- Misses         17       19       +2     
  Partials        3        3              
Impacted Files Coverage Δ
src/index.js 96.22% <71.42%> (-3.78%) ⬇️
src/SassError.js 100.00% <100.00%> (ø)
src/utils.js 93.24% <100.00%> (-0.18%) ⬇️

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

@alexander-akait alexander-akait merged commit 1f99474 into master May 25, 2023
@alexander-akait alexander-akait deleted the fix-errors-handling branch May 25, 2023 21:52
mischnic added a commit to vercel/next.js that referenced this pull request Sep 16, 2024
Bump sass-loader to include
webpack-contrib/sass-loader#1141.

Closes PACK-2447

Previously sass-loader called `this.async()()` when failing to load the
dependency, which meant that
the following Webpack loaders still run (because that call is passes
`error = undefined` and `content = undefined`).
That PR changes it to `this.async()(err)`.

This in turn changes the **Turbopack** error message in this case from
```
resolve-url-loader: PostCSS error
PostCSS received undefined instead of string
```
to
```
Error evaluating Node.js code
Error: Cannot find module 'sass'
```

I upgraded to sass-loader 15 because 16 has a pretty breaking change
regarding options:
https://github.com/webpack-contrib/sass-loader/releases/tag/v16.0.0

[Breaking sass-loader changes between 12.6.0 and
15.0.0](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md):

- 15.0.0 (2024-07-23)
    - prefer sass-embedded over sass by default
- 14.0.0 (2024-01-15)
    - removed `fibers` support
    - minimum supported Node.js version is 18.12.0
- 13.0.0
    - minimum supported Node.js version is 14.15.0
- emit `@warn` at-rules as webpack warnings by default, if you want to
revert behavior please use the warnRuleAsWarning option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant