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

Use in production? #48

Open
timkindberg opened this issue Sep 12, 2024 · 1 comment
Open

Use in production? #48

timkindberg opened this issue Sep 12, 2024 · 1 comment

Comments

@timkindberg
Copy link

timkindberg commented Sep 12, 2024

Hello and thank you for this project!

We are curious if this is safe enough to use in production. We know future API changes could still occur and we are fine with that. More I'm wondering about other unknowns that might make you concerned for someone to use this in a production-grade application.

Thanks for any insights!

@connor-baer
Copy link

connor-baer commented Sep 12, 2024

We recently began adopting the Temporal API using this package at https://github.com/sumup and have been using it without issue in production. We guard against incompatibilities with future spec changes by importing the polyfill locally, not globally:

- import "temporal-polyfill/global";
+ import { Temporal, Intl, toTemporalInstant } from "temporal-polyfill";

In effect, this means that we treat the polyfill like a regular dependency, which enables us to safely adjust our code (if necessary) when we upgrade to the latest/final polyfill/spec version. Once the first implementations land in browsers, we plan to remove the local imports and switch to conditionally loading the global polyfill when needed.

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

No branches or pull requests

2 participants