Skip to content

toResource incorrectly calls URI.parse on zipfile:// resources #843

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

Closed
michael-withington-simplisafe opened this issue Jan 5, 2024 · 2 comments · Fixed by #862
Closed
Labels

Comments

@michael-withington-simplisafe

toTsFilePath and toResource both have the same comment:

 // Yarn v2+ hooks tsserver and sends `zipfile:` URIs for Vim. Keep as-is.
 // Example: zipfile:///foo/bar/baz.zip::path/to/module

however, toTsFilePath correctly returns the URL without doing anything, and toResource calls URI.parse on it, causing it to break and not be able to load the resource.

return URI.parse(filepath);

@rchl rchl added the bug label Jan 10, 2024
@michael-withington-simplisafe
Copy link
Author

@rchl want me to open a PR with the bug-fix?

@rchl
Copy link
Member

rchl commented Jan 17, 2024

I think that a proper fix would require quite some work given how now things are expected to be URI. If you have some simple fix then it would probably not work in all cases.

I've looked into it a bit but so far haven't come up with satisfying solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants