Skip to content

Conversation

nyannyacha
Copy link
Contributor

@nyannyacha nyannyacha commented Jan 28, 2024

What kind of change does this PR introduce?

Fix

Description

Instead of letting the panic leak out by failing to strip a leading slash from the given module path, I add some assertions and make sure that things usually proceed instead of panicking when possible.

I don't know whether the problem is caused by the specifier being formatted to follow the Windows path format when ESZip is created in a Windows environment or caused by there being no slashes.

Because I currently don't have a Windows machine, so I take the most conservative approach possible to add logic to relax the leading slash restrictions.

…while reading module path

(cherry picked from commit 999f625653b456d2ddf049f19ff147c5a3d27095)
(cherry picked from commit 3ad82a6bb12dbb9c95e98f4f51b0c7491d60deca)
@laktek laktek merged commit 25dfa12 into supabase:main Feb 1, 2024
Copy link

github-actions bot commented Feb 1, 2024

🎉 This PR is included in version 1.33.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@nyannyacha nyannyacha deleted the sb-graph-module-path branch February 1, 2024 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants