Skip to content
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

fix(compartment-mapper)!: invert keys/values of renames in captureFromMap #2667

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

boneskull
Copy link
Contributor

BREAKING CHANGE: The CaptureResult.compartmentRenames record returned by captureFromMap() is now new to old; previously it was old to new.

This more accurately solves for the use case of compartmentRenames, because the main use case demands the record is inverted. We can plainly see this issue in captureFromMap's test suite (which this change simplifies).

In a future change, branded types could describe the distinction between key and value, which are currently both string.

Important

The only consumer of captureFromMap that I'm aware of is me, and me doesn't need this to be SemVer major.

…mMap

BREAKING CHANGE: The `CaptureResult.compartmentRenames` record returned by `captureFromMap()` is now _new to old_; previously it was _old to new_.

This more accurately solves for the use case of `compartmentRenames`, because the main use case demands the record is inverted. We can plainly see this issue in `captureFromMap`'s test suite (which this change simplifies).

In a future change, [branded types](https://www.learningtypescript.com/articles/branded-types) could describe the distinction between key and value, which are currently both `string`.

> [!IMPORTANT]
>
> The only consumer of `captureFromMap` that I'm aware of is _me_, and _me_ doesn't need this to be SemVer major.
@boneskull boneskull self-assigned this Dec 20, 2024
@boneskull boneskull requested a review from kriskowal December 20, 2024 23:37
@boneskull boneskull added the devex developer experience label Dec 20, 2024
@boneskull boneskull requested review from naugtur and leotm December 20, 2024 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex developer experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant