supertokens / supertokens-web-js

SuperTokens SDK for vanilla JS for all recipes
Other
58 stars 10 forks source link

feat: Add dateprovider.js bundle #106

Closed anku255 closed 8 months ago

anku255 commented 8 months ago

Summary of change

This PR adds the dateprovider.js bundle file allowing DateProvider to be used with script tags as well. After importing the dateprovider.js bundle file, it can be used as

const timeNow = supertokensDateProvider.DateProviderReference.getReferenceOrThrow().dateProvider.now();

Test Plan

Tested locally by creating a web server in the bundle folder, along with an index.html file. Imported the required bundles and confirmed that DateProvider initialized correctly after calling supertokens.init.

Documentation changes

(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)

Checklist for important updates

github-actions[bot] commented 8 months ago

size-limit report 📦

Path Size
lib/build/index.js 25.95 KB (+0.01% 🔺)
recipe/emailverification/index.js 26.31 KB (+0.01% 🔺)
recipe/emailpassword/index.js 26.04 KB (0%)
recipe/thirdparty/index.js 27.09 KB (+0.01% 🔺)
recipe/thirdpartyemailpassword/index.js 29.03 KB (0%)
recipe/session/index.js 23.19 KB (0%)
recipe/passwordless/index.js 27.36 KB (0%)
recipe/thirdpartypasswordless/index.js 29.73 KB (+0.01% 🔺)
recipe/userroles/index.js 23.45 KB (0%)
recipe/multitenancy/index.js 25.69 KB (0%)