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

Implement @bloomberg/babel-plugin-polyfill-record-tuple #50

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nicolo-ribaudo
Copy link
Contributor

Describe your changes

We provide to polyfill authors the tools to implement their own Babel plugin to inject polyfills (similarly to what Babel does with core-js): https://github.com/babel/babel-polyfills
This is different from how the it is done in the syntax transform plugin, because this new plugin aims to give support for direct usage of the new built-ins rather than to the new syntax.

Since we didn't discuss about this, feel free to close if you think it's out of scope.

Testing performed
Tests added

@@ -0,0 +1,3 @@
import { parseImmutable as _parseImmutable } from "@bloomberg/polyfill-record-tuple";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really pure, it stills define JSON.parseImmutable = .... Imo the polyfill should support another entry point that doesn't define the globals but just exports them.

@rricard rricard marked this pull request as draft July 15, 2022 15:17
@rricard
Copy link
Contributor

rricard commented Jul 18, 2022

@nicolo-ribaudo do we still want to pursue this? If yes, we should rebase and remove references to Box.

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.

None yet

2 participants