-
Notifications
You must be signed in to change notification settings - Fork 603
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
version check for compiled bundles #720
Comments
I think it's a great idea. Ideally the used version number can be deduced from package.json's version. |
So, every new minor version would be incompatible? |
I would explore something in this line:
We need to explore ideas. |
My original idea was to just have a simple integer, and the runtime check would be a
Unfortunately, existing bundles (that don't have the Edit: The compiler needs to be passed |
Generated bundle will throw an error if used with incompatible globalize-runtime. Refs globalizejs/globalize#720
Closing this issue, because #719 (comment) was solved using an approach that doesn't require this. |
Thanks! |
#719 and most likely any fix for #705 would make existing runtime bundles incompatible with 1.3.0's runtime code. If you update your npm packages, but forget to rebuild the bundle, your code will break.
I don't know how likely this is, but to be safe, my idea is to add a version number to the compiled bundle, and warn the user if the version number is incompatible.
This version number would be an integer, which is incremented whenever there's a breaking change. If the version number is missing, it'll default to 0, and so also cause a warning.
What do you think?
The text was updated successfully, but these errors were encountered: