Skip to content

Override diagnostic about baseUrl path checks #1407

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 5 commits into from
Jul 21, 2025

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Jul 16, 2025

Addresses #1381 (comment)

The diagnostic generator now lets us override diagnostics for this repo, so I dropped the mention of baseUrl.

@jakebailey jakebailey marked this pull request as ready for review July 20, 2025 17:56
@Copilot Copilot AI review requested due to automatic review settings July 20, 2025 17:56
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the TypeScript compiler's diagnostic message for path validation to remove the confusing reference to 'baseUrl'. The diagnostic now provides a cleaner error message when non-relative paths are used in path mappings without the deprecated baseUrl option.

Key changes:

  • Updated diagnostic message TS5090 to remove mention of baseUrl
  • Modified diagnostic generation code to support overriding diagnostics by code rather than message text
  • Updated all test baselines to reflect the new error message

Reviewed Changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/diagnostics/extraDiagnosticMessages.json Added override for TS5090 diagnostic with simplified message
internal/diagnostics/generate.go Refactored to override diagnostics by code instead of message text
internal/diagnostics/diagnostics_generated.go Updated generated diagnostic variable name and message text
internal/compiler/program.go Updated reference to use new diagnostic variable name
testdata/baselines/reference/**/*.{js,txt,diff} Updated test baselines to reflect new error message

@jakebailey jakebailey added this pull request to the merge queue Jul 21, 2025
Merged via the queue into main with commit 2c5f228 Jul 21, 2025
22 checks passed
@jakebailey jakebailey deleted the jabaile/better-base-url-error branch July 21, 2025 21:44
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.

2 participants