Skip to content

Conversation

@weswigham
Copy link
Member

Fixes #49308

Thanks to @PaperStrike for the research and initial tests - in addition to the sort just being backwards, node's sorting for pattern keys (PATTERN_KEY_COMPARE in the resolution docs) is way more complex now that pattern trailers are a thing, and this sort was never updated to account for that, so now we just use node's algorithm pretty much verbatim.

@DanielRosenwasser
Copy link
Member

4.7.3?

@weswigham weswigham merged commit 19b2284 into microsoft:main Jun 2, 2022
@weswigham
Copy link
Member Author

@typescript-bot cherry-pick this to release-4.7

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 2, 2022

Heya @weswigham, I've started to run the task to cherry-pick this into release-4.7 on this PR at fce9115. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

Hey @weswigham, I've opened #49364 for you.

typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this pull request Jun 2, 2022
Component commits:
fce9115 Use node's algorithm for calculating the longest matching export/import pattern
DanielRosenwasser pushed a commit that referenced this pull request Jun 2, 2022
Component commits:
fce9115 Use node's algorithm for calculating the longest matching export/import pattern

Co-authored-by: Wesley Wigham <[email protected]>
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reverse imports / exports expanding keys priorities

4 participants