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: replace previous mapping when provided with a new one #132

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

DJTB
Copy link
Collaborator

@DJTB DJTB commented Feb 8, 2022

We were replacing custom mappings only when a previous one did not exist.

This PR ensures we rebuild mappings anytime they change, but also skips running the map creation when unnecessary (via memoize and deep equal).

This also adds 2 new dependencies (which are <1kb combined), whereas we used to be dependency free. I don't know if that was by chance or philosophical when this project was started. Any thoughts on this? Do you mind the change? @mimshwright @vietqhoang

However our current build contains a lot of backwards browser compatibility cruft that is outdated and unneeded these days. I think we should tackle that it a separate PR (which would likely shed a lot of weight).

Fixes #129

@DJTB DJTB force-pushed the fix-replace-mapping branch from 03aa4f9 to 5dfd57c Compare February 8, 2022 01:19
@DJTB DJTB changed the title Fix replace mapping fix: replace previous mapping when provided with a new one Feb 8, 2022
@mimshwright
Copy link
Contributor

That was by chance. Also, the original version predated npm iirc!

@DJTB DJTB self-assigned this Feb 8, 2022
@DJTB DJTB added the bug label Feb 8, 2022
@DJTB DJTB force-pushed the fix-replace-mapping branch from 5dfd57c to 65b2d18 Compare April 15, 2022 02:14
@DJTB DJTB merged commit 9ec392d into master Apr 15, 2022
@DJTB DJTB deleted the fix-replace-mapping branch February 28, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to reset custom mapping?
2 participants