Skip to content

test: disable iconv-lite decode warning in test tools#12217

Merged
LingyuCoder merged 1 commit intomainfrom
test/iconv-lite-warning
Nov 17, 2025
Merged

test: disable iconv-lite decode warning in test tools#12217
LingyuCoder merged 1 commit intomainfrom
test/iconv-lite-warning

Conversation

@LingyuCoder
Copy link
Copy Markdown
Contributor

Summary

Can not find a better way to prevent emitting warning in iconv-lite.

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@LingyuCoder LingyuCoder requested review from 9aoy and Copilot November 17, 2025 08:32
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 17, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit a4f87cf
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/691add92ab279d0008642a56

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 17, 2025
@LingyuCoder LingyuCoder enabled auto-merge (squash) November 17, 2025 08:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR centralizes the suppression of iconv-lite decode warnings in the test tools package by creating a dedicated helper function that modifies the skipDecodeWarning property on all loaded iconv-lite modules in the require cache. This addresses console noise during testing.

  • Creates a new disableIconvLiteWarning() helper function that iterates through require.cache to find and configure iconv-lite modules
  • Invokes this helper at the module level in the test tools entry point (index.ts)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/rspack-test-tools/src/helper/disable-iconv-lite-warning.ts New helper function to suppress iconv-lite warnings by modifying modules in require.cache
packages/rspack-test-tools/src/index.ts Calls the new helper at module initialization time

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing a4f87cf to fix: should handle loader error with empty stack trace (#12213) by Cong-Cong Pan

🙈 Size remains the same at 47.46MB

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Nov 17, 2025

CodSpeed Performance Report

Merging #12217 will not alter performance

Comparing test/iconv-lite-warning (a4f87cf) with main (09a4d48)

Summary

✅ 17 untouched

@LingyuCoder LingyuCoder merged commit 250e4a5 into main Nov 17, 2025
79 of 82 checks passed
@LingyuCoder LingyuCoder deleted the test/iconv-lite-warning branch November 17, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants