Repository navigation
fix(migrations): normalize .d.ts paths in output migration field IDs - #71267
Merged
Merged
Conversation
getUniqueIdForProperty called id.replace(/\.d\.ts$/, '.ts') and dropped the result, so an @output seen through a .d.ts got a different ID than the same output in its .ts source. The signal input and signal queries migrations already assign the normalized ID. Claude-Session: https://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq
JeanMeche
approved these changes
Oct 9, 2026
Member
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
PR Checklist
PR Type
What is the current behavior?
getUniqueIdForPropertyinoutput-migration/output_helpers.tstries to normalize declaration files to their source path, but drops the result:So an
@Output()reached through a.d.ts(another compilation unit in batch mode) gets a differentClassFieldUniqueKeythan the same output in its.tssource, and problematic usages recorded against the.d.tskey never meet the source declaration when unit data is merged.The two sibling migrations already do this correctly:
signal-migration/src/utils/input_id.ts:const id = file.id.replace(/\.d\.ts$/, '.ts');signal-queries-migration/field_tracking.ts:const id = projectFile(...).id.replace(/\.d\.ts$/, '.ts');What is the new behavior?
The normalized path is assigned, matching the input and query migrations.
Tests
runTsurgeMigrationruns a single program and (per its own TODO) has no batch/multi-unit mode, which is where the.d.tskey matters, so I didn't find a way to cover this inoutput-migration.spec.tswithout new harness support. Happy to add a test if there's a preferred place for it.Does this PR introduce a breaking change?
https://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq