-
Notifications
You must be signed in to change notification settings - Fork 470
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
Differentiate between compatibility patches and pure warnings #472
Comments
I agree we're doing two different things here, but wonder what the solution is for this. Would we create another flag like |
Yeah, naming is hard. ;) Would a single API be enough, considering there are use cases both to only enable patches required to make the current major version of jQuery work post-upgrade and to only enable deprecation warnings for a future major? We could also bake it into Then we'd just need to keep a list of compat patches and compare those special keys against that. Thoughts? |
I've been thinking about this more. From my original list, the first point - about differentiating between warnings for APIs that still exist and patches - seem less important to me than the second one - about not allowing patches restoring behavior from earlier jQuery versions than the one from which the upgrade process starts. Let's focus on that. This is important as Migrate will now support both jQuery I think we need to be able to specify the jQuery major from which the update starts, considering that breaking changes should generally only land in major releases now (jQuery 3.5 was a one-off BC due to a security issue). An API like: jQuery.migrateUpgradingFromJQuery( major ); where I'd also propose for jQuery Migrate We also need to think how to implement that - we need to somehow associate each warning with a jQuery version where a related breaking change occurred - or none, if the warning is for an API that still exists in all stable jQuery versions. It doesn't seem clean to repeat the major in each If someone has a better idea for how to implement this, or what a good API would look like here, I'm all ears! On a related note, I'm also considering making Migrate 4.x only support running with jQuery |
Discussed in meetings and landed on the following:
|
This is handled in a way Timmy described above for 4.x in #555. |
Also: 1. Group `warnings.md` by this type. 2. Rename `jQuery.migrateWarnings` to `jQuery.migrateMessages`. 3. Rename `jQuery.migrateDeduplicateWarnings` to `jQuery.migrateDeduplicateMessages`. 4. Adding "info" versions of some internal APIs. Fixes jquerygh-472
jQuery Migrate does two things:
It makes sense to differentiate these two for a few reasons:
We should have an easier way to only enable patches required to address before removing Migrate or to only enable the ones preparing for the next major version.
Thoughts, @dmethvin @timmywil @gibson042?
The text was updated successfully, but these errors were encountered: