Skip to content

feat(tools-node): Add a destructureModuleRef function that does all the module reference parsing at the same time#3505

Merged
JasonVMo merged 5 commits intomicrosoft:mainfrom
JasonVMo:destructure-module
Feb 5, 2025
Merged

feat(tools-node): Add a destructureModuleRef function that does all the module reference parsing at the same time#3505
JasonVMo merged 5 commits intomicrosoft:mainfrom
JasonVMo:destructure-module

Conversation

@JasonVMo
Copy link
Collaborator

@JasonVMo JasonVMo commented Feb 4, 2025

Description

This adds a new helper destructureModuleRef that picks apart a module reference and separates the @scope/name/path parts in the same pass, rather than splitting it up amongst multiple functions. The other functions that use this code are then reworked to call the new function.

Test plan

  • passed all the various tests of different paths. Signature is exact including having missing keys for scope/path when not set (instead of returning scope: undefined or path: undefined.

@JasonVMo JasonVMo merged commit 8b3d041 into microsoft:main Feb 5, 2025
10 checks passed
@JasonVMo JasonVMo deleted the destructure-module branch February 5, 2025 17:52
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