Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@spotlightjs/astro: Fix importing arbitrary paths on Windows #276

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

66Leo66
Copy link
Contributor

@66Leo66 66Leo66 commented Dec 15, 2023

Before opening this PR:

  • I added a Changeset Entry with pnpm changeset:add
  • I referenced issues that this PR addresses

Changes

Use JSON.stringify when injecting arbitrary paths so it works on Windows (backslashes wont cause problems)

Related

Fix withastro/astro#9389
Astro's fix PR withastro/astro#9400

Notes

Spotlight's Astro integration, for some reason, does its own import via vite while registering another import via Astro's Dev Toolbar API. Unfortunately both have the same issue related to absolute path and \ on Windows. This PR fixes the former while withastro/astro#9400 fixes the latter(not yet landed).

JSON.stringify is used in the fix as well as withastro/astro#9400 .

Copy link

vercel bot commented Dec 15, 2023

@66Leo66 is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

@66Leo66 66Leo66 changed the title Fix importing arbitrary paths on Windows @spotlight/astro: Fix importing arbitrary paths on Windows Dec 15, 2023
@66Leo66 66Leo66 changed the title @spotlight/astro: Fix importing arbitrary paths on Windows @spotlightjs/astro: Fix importing arbitrary paths on Windows Dec 15, 2023
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Hi @66Leo66 thanks for opening this PR! I saw your issue and PR comment in the Astro repo. I believe that once we merge and release this fix as well as Astro resolves things on their end we should be good, correct?

Copy link

vercel bot commented Dec 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spotlightjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 15, 2023 2:44pm

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (48e4742) 32.42% compared to head (1246b5a) 32.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #276   +/-   ##
=======================================
  Coverage   32.42%   32.42%           
=======================================
  Files          45       45           
  Lines        2091     2091           
  Branches       71       71           
=======================================
  Hits          678      678           
  Misses       1413     1413           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@66Leo66
Copy link
Contributor Author

66Leo66 commented Dec 15, 2023

Hi @66Leo66 thanks for opening this PR! I saw your issue and PR comment in the Astro repo. I believe that once we merge and release this fix as well as Astro resolves things on their end we should be good, correct?

Yeah, as in withastro/astro#9400 (comment), applying fix to both side should resolve the problem.

@Lms24 Lms24 merged commit e3c55c6 into getsentry:main Dec 15, 2023
7 checks passed
@Lms24
Copy link
Member

Lms24 commented Dec 15, 2023

Thanks, we'll cut a release on Monday!

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.

Dev Toolbar Apps failed to import on Windows
2 participants