Skip to content

fix: Fix custom ESM loader for tests within vscode extension#345

Merged
tkislan merged 1 commit intomainfrom
tk/fix-mocha-esm-loader-vscode
Mar 4, 2026
Merged

fix: Fix custom ESM loader for tests within vscode extension#345
tkislan merged 1 commit intomainfrom
tk/fix-mocha-esm-loader-vscode

Conversation

@tkislan
Copy link
Copy Markdown
Contributor

@tkislan tkislan commented Mar 3, 2026

Summary by CodeRabbit

  • Refactor
    • Refined module loader file identification with stricter path matching for more accurate processing during the build.

@tkislan tkislan requested a review from a team as a code owner March 3, 2026 13:45
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9f0f2d1 and dba5e59.

📒 Files selected for processing (1)
  • build/mocha-esm-loader.js

📝 Walkthrough

Walkthrough

The mocha ESM loader's URL validation for CJS global shimming was refined. A broad substring-based check that matched any file:// URL containing /out/ and ending with .js was replaced with a stricter condition using a computed projectOutUrl constant. The new approach validates that URLs start with the project's out/ directory path and end with .js, narrowing the scope of shimmed files to the intended directory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing the custom ESM loader specifically for VS Code extension tests by refining URL path conditions.
Updates Docs ✅ Passed PR fixes internal test infrastructure (mocha ESM loader). Documentation updates required only for feature implementations, not build tooling refinements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

@tkislan tkislan enabled auto-merge (squash) March 3, 2026 13:55
@tkislan tkislan disabled auto-merge March 4, 2026 09:55
@tkislan tkislan merged commit a8827b7 into main Mar 4, 2026
11 checks passed
@tkislan tkislan deleted the tk/fix-mocha-esm-loader-vscode branch March 4, 2026 09:55
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0%. Comparing base (9f0f2d1) to head (dba5e59).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #345   +/-   ##
===========================
===========================
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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