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

@codecov
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.51%. Comparing base (3a924e4) to head (2c20f0f).
⚠️ Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
src/utils.js 36.36% 9 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #475      +/-   ##
==========================================
+ Coverage   77.16%   77.51%   +0.34%     
==========================================
  Files           4        4              
  Lines         727      756      +29     
  Branches      282      307      +25     
==========================================
+ Hits          561      586      +25     
- Misses        137      141       +4     
  Partials       29       29              

☔ 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.
src/index.js Outdated
const generators = Array.isArray(this.options.generator)
? this.options.generator.filter((item) => item.type === "asset")
? this.options.generator.filter(
(item) => !item.type || item.type === "asset",
Copy link
Member

Choose a reason for hiding this comment

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

Why do you change it?

src/utils.js Outdated
if (check([0x57, 0x45, 0x42, 0x50], { offset: 8 })) {
if (
check([0x52, 0x49, 0x46, 0x46]) &&
check([0x57, 0x45, 0x42, 0x50], { offset: 8 })
Copy link
Member

Choose a reason for hiding this comment

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

Why do you add more?

src/utils.js Outdated
async function squooshImagePoolTeardown() {
if (pool) {
await pool.close();
await /** @type {{close(): Promise<void>}} */ (pool).close();
Copy link
Member

Choose a reason for hiding this comment

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

Describe the pool variable

src/utils.js Outdated
const imagePool =
/** @type {{ingestImage(data: Uint8Array): {preprocess(options: Record<string, unknown>): Promise<void>, encode(options: Record<string, unknown>): Promise<void>, encodedWith: Record<string, {binary: Uint8Array, extension: string}>, decoded: {bitmap: {width: number, height: number}}}, close(): Promise<void>}} */ (
pool || squooshImagePoolCreate()
);
Copy link
Member

Choose a reason for hiding this comment

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

Please remove it from everywhere and make a new type, then reuse this type for the pool variable and for return for squooshImagePoolCreate

src/utils.js Outdated
if (!encodeOptions[targetCodec]) {
encodeOptions[targetCodec] = {};
if (!(/** @type {Record<string, unknown>} */ (encodeOptions)[targetCodec])) {
/** @type {Record<string, unknown>} */ (encodeOptions)[targetCodec] = {};
Copy link
Member

Choose a reason for hiding this comment

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

It should be not Record<string, unknown>, other options too

src/worker.js Outdated
warnings: [],
errors: [],
info: {
...options.info,
Copy link
Member

Choose a reason for hiding this comment

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

Why it was changed?

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 in future when you change a code - add comments why it was changed, also please fix the problem above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants