Closed joebingham-wk closed 3 years ago
Recommendation: :bangbang: Major version bump (fyi @Workiva/semver-audit-group )
@@ line 301: package:react/src/react_client/event_factory.dart @@
- SyntheticAnimationEvent syntheticAnimationEventFactory(SyntheticAnimationEvent e)
// Removing a top-level function is a major change.
@@ line 216: package:react/src/react_client/event_factory.dart @@
- SyntheticMouseEvent syntheticMouseEventFactory(SyntheticMouseEvent e)
// Removing a top-level function is a major change.
@@ line 17: package:react/src/react_client/event_factory.dart @@
- SyntheticClipboardEvent syntheticClipboardEventFactory(SyntheticClipboardEvent e)
// Removing a top-level function is a major change.
@@ line 346: package:react/src/react_client/event_factory.dart @@
- SyntheticWheelEvent syntheticWheelEventFactory(SyntheticWheelEvent e)
// Removing a top-level function is a major change.
@@ line 37: package:react/src/react_client/event_factory.dart @@
- SyntheticCompositionEvent syntheticCompositionEventFactory(SyntheticCompositionEvent e)
// Removing a top-level function is a major change.
--- ```diff @@ line 118: package:react/src/react_client/event_factory.dart @@ - SyntheticDataTransfer syntheticDataTransferFactory(Object dt) // Removing a top-level function is a major change. ``` ```diff @@ line 107: package:react/src/react_client/event_factory.dart @@ - SyntheticFormEvent syntheticFormEventFactory(SyntheticFormEvent e) // Removing a top-level function is a major change. ``` ```diff @@ line 278: package:react/src/react_client/event_factory.dart @@ - SyntheticTransitionEvent syntheticTransitionEventFactory(SyntheticTransitionEvent e) // Removing a top-level function is a major change. ``` ```diff @@ line 57: package:react/src/react_client/event_factory.dart @@ - SyntheticKeyboardEvent syntheticKeyboardEventFactory(SyntheticKeyboardEvent e) // Removing a top-level function is a major change. ``` ```diff @@ line 254: package:react/src/react_client/event_helpers.dart @@ - SyntheticMouseEvent createSyntheticMouseEvent({SyntheticMouseEvent baseEvent, bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, void Function() preventDefault, void Function() stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, bool altKey, num button, num buttons, num clientX, num clientY, bool ctrlKey, SyntheticDataTransfer dataTransfer, bool metaKey, num pageX, num pageY, dynamic relatedTarget, num screenX, num screenY, bool shiftKey}) + SyntheticMouseEvent createSyntheticMouseEvent({SyntheticMouseEvent baseEvent, bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, void Function() preventDefault, void Function() stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, bool altKey, num button, num buttons, num clientX, num clientY, bool ctrlKey, dynamic dataTransfer, bool metaKey, num pageX, num pageY, dynamic relatedTarget, num screenX, num screenY, bool shiftKey}) // `type` of `dataTransfer` has changed. // Changing a parameter signature is a major change. ``` ```diff @@ line 9: package:react/src/react_client/event_factory.dart @@ - SyntheticEvent syntheticEventFactory(SyntheticEvent e) // Removing a top-level function is a major change. ``` ```diff @@ line 324: package:react/src/react_client/event_factory.dart @@ - SyntheticUIEvent syntheticUIEventFactory(SyntheticUIEvent e) // Removing a top-level function is a major change. ``` ```diff @@ line 87: package:react/src/react_client/event_factory.dart @@ - SyntheticFocusEvent syntheticFocusEventFactory(SyntheticFocusEvent e) // Removing a top-level function is a major change. ``` ```diff @@ line 186: package:react/src/react_client/event_factory.dart @@ - SyntheticPointerEvent syntheticPointerEventFactory(SyntheticPointerEvent e) // Removing a top-level function is a major change. ``` ```diff @@ line 251: package:react/src/react_client/event_factory.dart @@ - SyntheticTouchEvent syntheticTouchEventFactory(SyntheticTouchEvent e) // Removing a top-level function is a major change. ``` ```diff @@ line 1884: package:react/react.dart @@ class SyntheticTransitionEvent extends SyntheticEvent - SyntheticTransitionEvent SyntheticTransitionEvent(dynamic bubbles, dynamic cancelable, dynamic currentTarget, dynamic _defaultPrevented, dynamic _preventDefault, dynamic stopPropagation, dynamic eventPhase, dynamic isTrusted, dynamic nativeEvent, dynamic target, dynamic timeStamp, dynamic type, String propertyName, num elapsedTime, String pseudoElement) // Removing a constructor is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. ``` ```diff @@ line 1756: package:react/react.dart @@ class SyntheticMouseEvent extends SyntheticEvent - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - dynamic get relatedTarget + EventTarget get relatedTarget // `type` of `relatedTarget` has changed from `dynamic` to `EventTarget`. // Changing a class field is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. - SyntheticMouseEvent SyntheticMouseEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, bool altKey, num button, num buttons, num clientX, num clientY, bool ctrlKey, SyntheticDataTransfer dataTransfer, bool metaKey, num pageX, num pageY, dynamic relatedTarget, num screenX, num screenY, bool shiftKey) // Removing a constructor is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. - SyntheticDataTransfer get dataTransfer // Removing a field is a major change. ``` ```diff @@ line 1447: package:react/react.dart @@ class SyntheticEvent - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. - SyntheticEvent SyntheticEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool _defaultPrevented, dynamic _preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type) // Removing a constructor is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. ``` ```diff @@ line 1806: package:react/react.dart @@ class SyntheticPointerEvent extends SyntheticEvent - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. - SyntheticPointerEvent SyntheticPointerEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, num pointerId, num width, num height, num pressure, num tangentialPressure, num tiltX, num tiltY, num twist, String pointerType, bool isPrimary) // Removing a constructor is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. ``` ```diff @@ line 1912: package:react/react.dart @@ class SyntheticAnimationEvent extends SyntheticEvent - SyntheticAnimationEvent SyntheticAnimationEvent(dynamic bubbles, dynamic cancelable, dynamic currentTarget, dynamic _defaultPrevented, dynamic _preventDefault, dynamic stopPropagation, dynamic eventPhase, dynamic isTrusted, dynamic nativeEvent, dynamic target, dynamic timeStamp, dynamic type, String animationName, num elapsedTime, String pseudoElement) // Removing a constructor is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. ``` ```diff @@ line 1610: package:react/react.dart @@ class SyntheticClipboardEvent extends SyntheticEvent - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - SyntheticClipboardEvent SyntheticClipboardEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, dynamic clipboardData) // Removing a constructor is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. ``` ```diff @@ line 1634: package:react/react.dart @@ class SyntheticKeyboardEvent extends SyntheticEvent - SyntheticKeyboardEvent SyntheticKeyboardEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, bool altKey, String char, num charCode, bool ctrlKey, String locale, num location, String key, num keyCode, bool metaKey, bool repeat, bool shiftKey) // Removing a constructor is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. ``` ```diff @@ line 1940: package:react/react.dart @@ class SyntheticUIEvent extends SyntheticEvent - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. - SyntheticUIEvent SyntheticUIEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool _defaultPrevented, dynamic _preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, num detail, dynamic view) // Removing a constructor is a major change. ``` ```diff @@ line 1678: package:react/react.dart @@ class SyntheticCompositionEvent extends SyntheticEvent - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. - SyntheticCompositionEvent SyntheticCompositionEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, String data) // Removing a constructor is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. ``` ```diff @@ line 1848: package:react/react.dart @@ class SyntheticTouchEvent extends SyntheticEvent - dynamic get touches + TouchList get touches // `type` of `touches` has changed from `dynamic` to `TouchList`. // Changing a class field is a major change. - dynamic get targetTouches + TouchList get targetTouches // `type` of `targetTouches` has changed from `dynamic` to `TouchList`. // Changing a class field is a major change. - SyntheticTouchEvent SyntheticTouchEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, bool altKey, dynamic changedTouches, bool ctrlKey, bool metaKey, bool shiftKey, dynamic targetTouches, dynamic touches) // Removing a constructor is a major change. - dynamic get changedTouches + TouchList get changedTouches // `type` of `changedTouches` has changed from `dynamic` to `TouchList`. // Changing a class field is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. ``` ```diff @@ line 1726: package:react/react.dart @@ class SyntheticFormEvent extends SyntheticEvent - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - SyntheticFormEvent SyntheticFormEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type) // Removing a constructor is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. ``` ```diff @@ line 1702: package:react/react.dart @@ class SyntheticFocusEvent extends SyntheticEvent - dynamic get relatedTarget + EventTarget get relatedTarget // `type` of `relatedTarget` has changed from `dynamic` to `EventTarget`. // Changing a class field is a major change. - SyntheticFocusEvent SyntheticFocusEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, dynamic relatedTarget) // Removing a constructor is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. ``` ```diff @@ line 1966: package:react/react.dart @@ class SyntheticWheelEvent extends SyntheticEvent - SyntheticWheelEvent SyntheticWheelEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, num deltaX, num deltaMode, num deltaY, num deltaZ) // Removing a constructor is a major change. - bool get isPersistent + bool isPersistent() // Removed getter for `isPersistent`. // Removing a field is a major change. - void Function() $$jsPersistDoNotSetThisOrYouWillBeFired // Removing a field is a major change. - dynamic get stopPropagation + void stopPropagation() // Removed getter for `stopPropagation`. // Removing a field is a major change. ``` ```diff @@ line 91: package:react/src/react_client/event_helpers.dart @@ + SyntheticFormEvent fakeSyntheticFormEvent(Element element, String type) // Adding a top-level function is a minor change. ``` ```diff @@ line 50: package:react/src/react_client/event_helpers.dart @@ + SyntheticMouseEvent wrapNativeMouseEvent(MouseEvent nativeEvent) // Adding a top-level function is a minor change. ``` ```diff @@ line 14: package:react/src/react_client/event_helpers.dart @@ + SyntheticKeyboardEvent wrapNativeKeyboardEvent(KeyboardEvent nativeEvent) // Adding a top-level function is a minor change. ``` ```diff @@ line 804: package:react/src/react_client/event_helpers.dart @@ + extension DataTransferHelper on SyntheticMouseEvent // Adding a class is a minor change. ``` ```diff @@ line 292: package:react/src/react_client/synthetic_event_wrappers.dart @@ + class NonNativeDataTransfer // Adding a class is a minor change. ``` ---
Showing results for 8063199ce92cda53f944dd5688c86308fdd2b55a
Powered by semver-audit-service. Please report any problems by filing an issue. Reported by the dart semver audit client 2.2.0 Browse public API.
Some feedback from the semver report:
NonNativeDataTransfer
is publicly exported; I think we should keep that private for now since it's an implementation detail and there's not currently a use-case for exposing it.
isPersistant
- bool get isPersistent + bool isPersistent()
Unfortunately the old API differed from the React version, so we'll want to keep this as a getter (we should be able to just do one that always returns true, either via a non-external getter or an extension).
Changing relatedTarget
from dynamic
to EventTarget
: while this is the correct typing, changing it would result in breakages in consumer code where they're currently performing dynamic calls to methods that exist on EventTarget subclasses (which seems to be pretty common). For example:
if (event.relatedTarget is Element) {
event.relatedTarget.focus();
}
This currently only works because the call to .focus()
is on a dynamic object; event.relatedTarget
doesn't get type-promoted inside the if-check, so after these changes you'd get an error: "The method 'focus' isn't defined for the type 'EventTarget'"
While we should probably update the typing eventually, I think we should keep it as dynamic
for now to make the upgrade easier.
TouchEvent updates: I'm a little worried about the TouchList
types being incompatible with simulated events that pass in List
s (e.g., this case) because TouchList
can't easily be instantiated in Dart; what about List<Touch>
instead?
Recommendation: :bangbang: Major version bump (fyi @Workiva/semver-audit-group )
@@ line 301: package:react/src/react_client/event_factory.dart @@
- SyntheticAnimationEvent syntheticAnimationEventFactory(SyntheticAnimationEvent e)
// Removing a top-level function is a major change.
@@ line 216: package:react/src/react_client/event_factory.dart @@
- SyntheticMouseEvent syntheticMouseEventFactory(SyntheticMouseEvent e)
// Removing a top-level function is a major change.
@@ line 17: package:react/src/react_client/event_factory.dart @@
- SyntheticClipboardEvent syntheticClipboardEventFactory(SyntheticClipboardEvent e)
// Removing a top-level function is a major change.
@@ line 346: package:react/src/react_client/event_factory.dart @@
- SyntheticWheelEvent syntheticWheelEventFactory(SyntheticWheelEvent e)
// Removing a top-level function is a major change.
@@ line 37: package:react/src/react_client/event_factory.dart @@
- SyntheticCompositionEvent syntheticCompositionEventFactory(SyntheticCompositionEvent e)
// Removing a top-level function is a major change.
---
```diff
@@ line 118: package:react/src/react_client/event_factory.dart @@
- SyntheticDataTransfer syntheticDataTransferFactory(Object dt)
// Removing a top-level function is a major change.
```
```diff
@@ line 107: package:react/src/react_client/event_factory.dart @@
- SyntheticFormEvent syntheticFormEventFactory(SyntheticFormEvent e)
// Removing a top-level function is a major change.
```
```diff
@@ line 278: package:react/src/react_client/event_factory.dart @@
- SyntheticTransitionEvent syntheticTransitionEventFactory(SyntheticTransitionEvent e)
// Removing a top-level function is a major change.
```
```diff
@@ line 57: package:react/src/react_client/event_factory.dart @@
- SyntheticKeyboardEvent syntheticKeyboardEventFactory(SyntheticKeyboardEvent e)
// Removing a top-level function is a major change.
```
```diff
@@ line 254: package:react/src/react_client/event_helpers.dart @@
- SyntheticMouseEvent createSyntheticMouseEvent({SyntheticMouseEvent baseEvent, bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, void Function() preventDefault, void Function() stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, bool altKey, num button, num buttons, num clientX, num clientY, bool ctrlKey, SyntheticDataTransfer dataTransfer, bool metaKey, num pageX, num pageY, dynamic relatedTarget, num screenX, num screenY, bool shiftKey})
+ SyntheticMouseEvent createSyntheticMouseEvent({SyntheticMouseEvent baseEvent, bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, void Function() preventDefault, void Function() stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, bool altKey, num button, num buttons, num clientX, num clientY, bool ctrlKey, dynamic dataTransfer, bool metaKey, num pageX, num pageY, dynamic relatedTarget, num screenX, num screenY, bool shiftKey})
// `type` of `dataTransfer` has changed.
// Changing a parameter signature is a major change.
```
```diff
@@ line 9: package:react/src/react_client/event_factory.dart @@
- SyntheticEvent syntheticEventFactory(SyntheticEvent e)
// Removing a top-level function is a major change.
```
```diff
@@ line 324: package:react/src/react_client/event_factory.dart @@
- SyntheticUIEvent syntheticUIEventFactory(SyntheticUIEvent e)
// Removing a top-level function is a major change.
```
```diff
@@ line 87: package:react/src/react_client/event_factory.dart @@
- SyntheticFocusEvent syntheticFocusEventFactory(SyntheticFocusEvent e)
// Removing a top-level function is a major change.
```
```diff
@@ line 186: package:react/src/react_client/event_factory.dart @@
- SyntheticPointerEvent syntheticPointerEventFactory(SyntheticPointerEvent e)
// Removing a top-level function is a major change.
```
```diff
@@ line 251: package:react/src/react_client/event_factory.dart @@
- SyntheticTouchEvent syntheticTouchEventFactory(SyntheticTouchEvent e)
// Removing a top-level function is a major change.
```
```diff
@@ line 1884: package:react/react.dart @@
class SyntheticTransitionEvent extends SyntheticEvent
- SyntheticTransitionEvent SyntheticTransitionEvent(dynamic bubbles, dynamic cancelable, dynamic currentTarget, dynamic _defaultPrevented, dynamic _preventDefault, dynamic stopPropagation, dynamic eventPhase, dynamic isTrusted, dynamic nativeEvent, dynamic target, dynamic timeStamp, dynamic type, String propertyName, num elapsedTime, String pseudoElement)
// Removing a constructor is a major change.
- dynamic get stopPropagation
+ void stopPropagation()
// Removed getter for `stopPropagation`.
// Removing a field is a major change.
- void Function() $$jsPersistDoNotSetThisOrYouWillBeFired
// Removing a field is a major change.
- bool get isPersistent
// Removing a field is a major change.
```
```diff
@@ line 1756: package:react/react.dart @@
class SyntheticMouseEvent extends SyntheticEvent
- bool get isPersistent
// Removing a field is a major change.
- dynamic get relatedTarget
+ EventTarget get relatedTarget
// `type` of `relatedTarget` has changed from `dynamic` to `EventTarget`.
// Changing a class field is a major change.
- void Function() $$jsPersistDoNotSetThisOrYouWillBeFired
// Removing a field is a major change.
- SyntheticMouseEvent SyntheticMouseEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, bool altKey, num button, num buttons, num clientX, num clientY, bool ctrlKey, SyntheticDataTransfer dataTransfer, bool metaKey, num pageX, num pageY, dynamic relatedTarget, num screenX, num screenY, bool shiftKey)
// Removing a constructor is a major change.
- dynamic get stopPropagation
+ void stopPropagation()
// Removed getter for `stopPropagation`.
// Removing a field is a major change.
- SyntheticDataTransfer get dataTransfer
// Removing a field is a major change.
```
```diff
@@ line 1447: package:react/react.dart @@
class SyntheticEvent
- bool get isPersistent
// Removing a field is a major change.
- dynamic get stopPropagation
+ void stopPropagation()
// Removed getter for `stopPropagation`.
// Removing a field is a major change.
- SyntheticEvent SyntheticEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool _defaultPrevented, dynamic _preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type)
// Removing a constructor is a major change.
- void Function() $$jsPersistDoNotSetThisOrYouWillBeFired
// Removing a field is a major change.
```
```diff
@@ line 1806: package:react/react.dart @@
class SyntheticPointerEvent extends SyntheticEvent
- dynamic get stopPropagation
+ void stopPropagation()
// Removed getter for `stopPropagation`.
// Removing a field is a major change.
- SyntheticPointerEvent SyntheticPointerEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, num pointerId, num width, num height, num pressure, num tangentialPressure, num tiltX, num tiltY, num twist, String pointerType, bool isPrimary)
// Removing a constructor is a major change.
- void Function() $$jsPersistDoNotSetThisOrYouWillBeFired
// Removing a field is a major change.
- bool get isPersistent
// Removing a field is a major change.
```
```diff
@@ line 1912: package:react/react.dart @@
class SyntheticAnimationEvent extends SyntheticEvent
- SyntheticAnimationEvent SyntheticAnimationEvent(dynamic bubbles, dynamic cancelable, dynamic currentTarget, dynamic _defaultPrevented, dynamic _preventDefault, dynamic stopPropagation, dynamic eventPhase, dynamic isTrusted, dynamic nativeEvent, dynamic target, dynamic timeStamp, dynamic type, String animationName, num elapsedTime, String pseudoElement)
// Removing a constructor is a major change.
- void Function() $$jsPersistDoNotSetThisOrYouWillBeFired
// Removing a field is a major change.
- dynamic get stopPropagation
+ void stopPropagation()
// Removed getter for `stopPropagation`.
// Removing a field is a major change.
- bool get isPersistent
// Removing a field is a major change.
```
```diff
@@ line 1610: package:react/react.dart @@
class SyntheticClipboardEvent extends SyntheticEvent
- dynamic get stopPropagation
+ void stopPropagation()
// Removed getter for `stopPropagation`.
// Removing a field is a major change.
- bool get isPersistent
// Removing a field is a major change.
- SyntheticClipboardEvent SyntheticClipboardEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, dynamic clipboardData)
// Removing a constructor is a major change.
- void Function() $$jsPersistDoNotSetThisOrYouWillBeFired
// Removing a field is a major change.
```
```diff
@@ line 1634: package:react/react.dart @@
class SyntheticKeyboardEvent extends SyntheticEvent
- SyntheticKeyboardEvent SyntheticKeyboardEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, bool altKey, String char, num charCode, bool ctrlKey, String locale, num location, String key, num keyCode, bool metaKey, bool repeat, bool shiftKey)
// Removing a constructor is a major change.
- dynamic get stopPropagation
+ void stopPropagation()
// Removed getter for `stopPropagation`.
// Removing a field is a major change.
- bool get isPersistent
// Removing a field is a major change.
- void Function() $$jsPersistDoNotSetThisOrYouWillBeFired
// Removing a field is a major change.
```
```diff
@@ line 1940: package:react/react.dart @@
class SyntheticUIEvent extends SyntheticEvent
- void Function() $$jsPersistDoNotSetThisOrYouWillBeFired
// Removing a field is a major change.
- bool get isPersistent
// Removing a field is a major change.
- dynamic get stopPropagation
+ void stopPropagation()
// Removed getter for `stopPropagation`.
// Removing a field is a major change.
- SyntheticUIEvent SyntheticUIEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool _defaultPrevented, dynamic _preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, num detail, dynamic view)
// Removing a constructor is a major change.
```
```diff
@@ line 1678: package:react/react.dart @@
class SyntheticCompositionEvent extends SyntheticEvent
- dynamic get stopPropagation
+ void stopPropagation()
// Removed getter for `stopPropagation`.
// Removing a field is a major change.
- SyntheticCompositionEvent SyntheticCompositionEvent(bool bubbles, bool cancelable, dynamic currentTarget, bool defaultPrevented, dynamic preventDefault, dynamic stopPropagation, num eventPhase, bool isTrusted, dynamic nativeEvent, dynamic target, num timeStamp, String type, String data)
// Removing a constructor is a major change.
- bool get isPersistent
// Removing a field is a major change.
- void Function() $$jsPersistDoNotSetThisOrYouWillBeFired
// Removing a field is a major change.
```
```diff
@@ line 1848: package:react/react.dart @@
class SyntheticTouchEvent extends SyntheticEvent
- dynamic get touches
+ List
Showing results for 9aa536f65a57faefdf8996dc77c9bbf41f905b25
Powered by semver-audit-service. Please report any problems by filing an issue. Reported by the dart semver audit client 2.2.0 Browse public API.
Motivation
In order to make updating to React 17 easy, we need to change the internals of the publicly exposed event helper utils to construct anonymous interop object as opposed to using the wrapper constructors.
NOTE: There was some follow up work discovered while working the ticket. These are:
SyntheticFormEvent
is not a class in React.dart. It still works as a wrapper, but it seems like an opportunity to clean up some dead code since the interface is empty anyway. That discussion can be found here.Changes
create{x}Event
utilities to create maps cast as the synthetic event typeSyntheticEventTypeHelpers
helpers to use duck typing instead ofis
.SyntheticMouseEvent.dataTransfer
that takes the interoped field and wraps it in a Dart wrapper, running the conversion logic that was used for the original synthetic event Dart classesQA
SyntheticEventTypeHelpers
helpers were added