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

refactor: use optional chaining for sourceMapCallback #363

Conversation

agilgur5
Copy link
Collaborator

Summary

Tiny one-liner change to use optional chaining

Misc

Is sourceMapCallback actually used by anyone? It's not listed in the docs so I didn't know it was a thing until I saw it in the code

- following other optional chaining simplifications
@agilgur5 agilgur5 added the kind: internal Changes only affect the internals, and _not_ the public API or external-facing docs label Jun 22, 2022
@ezolenko ezolenko merged commit 4de17cf into ezolenko:master Jun 24, 2022
@agilgur5
Copy link
Collaborator Author

Is sourceMapCallback actually used by anyone? It's not listed in the docs so I didn't know it was a thing until I saw it in the code

Seems like it originates from #69 and that is the only reference to it in the entire issue/PR landscape, so that contributor may be the only person to use it 😅

The use-case may also no longer be necessary with newer Istanbul versions (and nyc existing) based on some of the upstream comments linked, or with better source map handling in Rollup, but really hard to tell with such a complicated use-case without a simple repro

@ezolenko
Copy link
Owner

ezolenko commented Jul 6, 2022

The problem with having many options is that once they are in, they tend to stay in, unless you have lots of telemetry and actively trim unused ones...

@agilgur5
Copy link
Collaborator Author

agilgur5 commented Jul 6, 2022

Yea one of the reasons to be careful of introducing new features is the long-term maintenance cost 😕

Telemetry not being a thing in OSS also makes these things super hard to track too; there's a space for it for sure, albeit controversial

@agilgur5 agilgur5 deleted the refactor-optional-chaining-sourceMapCallback branch July 2, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: internal Changes only affect the internals, and _not_ the public API or external-facing docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants