Skip to content

fix(rstest): should only handles JavaScript module#12068

Merged
fi3ework merged 2 commits intomainfrom
rstest-js-break
Nov 6, 2025
Merged

fix(rstest): should only handles JavaScript module#12068
fi3ework merged 2 commits intomainfrom
rstest-js-break

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Nov 3, 2025

Summary

  1. for example, it will break WASM file as it's buffer source instead of string.

     ✗ wasm/index.test.ts (1)
      ✗ WASM factorial (1ms)
        WebAssembly.instantiate(): length overflow while decoding section length @+13
    
    Summary of all failing tests:
    
     FAIL  wasm/index.test.ts > WASM factorial
    CompileError: WebAssembly.instantiate(): length overflow while decoding section length @+13
  2. use traceable error instead of panic.

Related links

Checklist

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

@fi3ework fi3ework requested a review from LingyuCoder as a code owner November 3, 2025 09:49
Copilot AI review requested due to automatic review settings November 3, 2025 09:49
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 3, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 71d4df3
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/690898a67acd2200084733f5

@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Nov 3, 2025
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 adds a guard to skip processing non-JavaScript assets in the rstest plugin's mock hoisting function.

  • Adds early return when info.javascript_module is None, preventing the function from attempting to process non-JavaScript assets

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 3, 2025

📦 Binary Size-limit

Comparing 71d4df3 to refactor: import external should not create needless external module (#12064) by Fy

❌ Size increased by 2.13KB from 47.86MB to 47.86MB (⬆️0.00%)

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Nov 3, 2025

CodSpeed Performance Report

Merging #12068 will not alter performance

Comparing rstest-js-break (71d4df3) with main (46a54da)

Summary

✅ 17 untouched

@fi3ework fi3ework enabled auto-merge (squash) November 4, 2025 06:23
@fi3ework fi3ework merged commit c714bc8 into main Nov 6, 2025
70 of 72 checks passed
@fi3ework fi3ework deleted the rstest-js-break branch November 6, 2025 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) 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