Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Nov 13, 2025

Summary

fix(vscode-extension): import rstest error on windows.

use pathToFileUrl to make esm import() work with absolute windows paths

image

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings November 13, 2025 08:33
@netlify
Copy link

netlify bot commented Nov 13, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit b084e1c
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/691597cffd36d8000850e674
😎 Deploy Preview https://deploy-preview-693--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
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 fixes an ESM import error on Windows in the VSCode extension by using pathToFileURL to convert absolute Windows paths to file URLs, which are required by Node.js's ESM loader.

Key Changes:

  • Added pathToFileURL import from node:url module
  • Implemented normalizeImportPath helper function to convert paths to file URLs
  • Applied the normalization to the dynamic import of the rstest module

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

@9aoy 9aoy requested a review from fi3ework November 13, 2025 08:40
@9aoy 9aoy merged commit 8adf325 into main Nov 13, 2025
23 checks passed
@9aoy 9aoy deleted the vscode-extension-windows branch November 13, 2025 09:10
@9aoy 9aoy mentioned this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants