You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change uses uri.with to get a new version which has the same fields except no scheme. It also removes paths.normalize because the uri may be a URL, not a path, and that causes it to have \ on windows. I don't know if that's safe or if paths.normalize is needed in some case. I also don't know whether the if (resource.scheme === 'debug') check is necessary.
I think that embedding a URL or path or made up path like <node_internals>/... into a URI might be unsafe in other cases too, but I don't really know. Another approach would be to just encodeURIComponent the entire thing from the debugger, instead of trying to interpret it in vscode, and only decode it for display. I don't know whether there's anywhere that we need it to work like an actual URI?
roblourens, thanks for your PR! By analyzing the history of the files in this pull request, we identified João Moreno (@joaomoreno) to be a potential reviewer.
You will also need to remove the unused import paths as well. It is good we are getting rid of this since we should use node path api instead if needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change uses
uri.withto get a new version which has the same fields except no scheme. It also removespaths.normalizebecause the uri may be a URL, not a path, and that causes it to have \ on windows. I don't know if that's safe or ifpaths.normalizeis needed in some case. I also don't know whether theif (resource.scheme === 'debug')check is necessary.I think that embedding a URL or path or made up path like
<node_internals>/...into a URI might be unsafe in other cases too, but I don't really know. Another approach would be to justencodeURIComponentthe entire thing from the debugger, instead of trying to interpret it in vscode, and only decode it for display. I don't know whether there's anywhere that we need it to work like an actual URI?