Skip to content

Fix source map decoding to handle case sensitivity and --out option #28273

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

Merged
merged 2 commits into from
Nov 1, 2018

Conversation

sheetalkamat
Copy link
Member

Discovered while working on #28261

@sheetalkamat sheetalkamat requested review from a user, rbuckton, weswigham and sandersn October 31, 2018 22:43
@sheetalkamat sheetalkamat merged commit 0544b77 into master Nov 1, 2018
@sheetalkamat sheetalkamat deleted the buildSourceMapNavigation branch November 1, 2018 01:13
@@ -79,7 +80,7 @@ namespace ts.sourcemaps {
// if no exact match, closest is 2's compliment of result
targetIndex = ~targetIndex;
}
if (!maps[targetIndex] || comparePaths(loc.fileName, maps[targetIndex].sourcePath, sourceRoot) !== 0) {
if (!maps[targetIndex] || comparePaths(loc.fileName, maps[targetIndex].sourcePath, sourceRoot, !host.useCaseSensitiveFileNames) !== 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should that ignoreCase parameter in comparePaths be mandatory?

It doesn't look like is EVER safe to assume 'ignore case' without consulting the actual host parameter.

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.

3 participants