Skip to content

Conversation

ersachin3112
Copy link
Contributor

@ersachin3112 ersachin3112 commented Jul 26, 2025

This PR contains a:

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

Motivation / Use-Case

upgrade eslint from v8 to v9

Breaking Changes

No

Additional Info

No

Copy link

codecov bot commented Jul 26, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.99%. Comparing base (9c8c58c) to head (6080bb9).
⚠️ Report is 22 commits behind head on master.

Files with missing lines Patch % Lines
src/utils.js 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #251      +/-   ##
==========================================
- Coverage   82.26%   72.99%   -9.28%     
==========================================
  Files           4        4              
  Lines         141      137       -4     
  Branches       51       51              
==========================================
- Hits          116      100      -16     
- Misses         16       24       +8     
- Partials        9       13       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

if (typeof window === "object") {
return window;
if (typeof globalThis.window === "object") {
return globalThis;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this place lets keep window for tests, just use // eslint-disable-next-line

}

return g;
return globalObj;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change, we should keep logic without globalThis, because it will not work in old browsers

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the comment above

@ersachin3112
Copy link
Contributor Author

@alexander-akait done

// This works if eval is allowed (see CSP)
// eslint-disable-next-line no-new-func
g = this || new Function("return this")();
} catch (e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep e because old browsers doesn't support optional catch

@alexander-akait alexander-akait merged commit 3ebac92 into webpack-contrib:master Jul 29, 2025
16 of 17 checks passed
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.

2 participants