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

RM-60869 Release over_react 3.0.0+dart2 (stable) #408

Merged
merged 3 commits into from Nov 5, 2019

Conversation

aaronlademann-wf
Copy link
Contributor

@aaronlademann-wf aaronlademann-wf commented Nov 4, 2019

This stable, major release of over_react includes:

ReactJS 16.x Support

  • The underlying .js files provided by this package are now ReactJS version 16.10.1.
  • Support for the new / updated lifecycle methods from ReactJS 16 will be released in version 3.1.0.

Full List of 3.0.0 Changes:


Breaking Changes

ReactJS 16 breaking changes

Source: https://reactjs.org/blog/2017/09/26/react-v16.0.html#breaking-changes

Breakage Migration path
Errors in the render and lifecycle methods now unmount the component tree by default. To prevent this, add error boundaries to the appropriate places in the UI.This can be done easily via the OverReact ErrorBoundary utility component.
Unitless props.style string values are no longer auto-converted to px.This has been a warning since React 15.0.0. Change values from Strings to nums, or add a unit explicitly to string
react_dom.render calls within React lifecycle methods are no longer guaranteed to be synchronous, and may return null Either: Use Portals to render content in a different DOM treeUpdate code to handle async mounting
setState callbacks (second argument) now fire immediately after componentDidMount / componentDidUpdate instead of after all components have rendered. Transfer callback logic into componentDidUpdate.
It is not safe to re-render into a container that was modified by something other than React. This worked previously in some cases but was never supported. We now emit a warning in this case. Instead you should clean up your component trees using unmountComponentAtNode.
Bool values used in non-bool props are no longer stringified, and are ignored. In most cases, passing bool values to these props is a programmer error, and should be replaced with the correct attribute values. .toString() the value in any places where "false" or "true" are needed.
Previously, changing the ref to a component would always detach the ref before that component’s render is called. Now, we change the ref later, when applying the changes to the DOM. Should not affect most usages.
When replacing <A /> with <B />B.componentWillMount now always happens before A.componentWillUnmount. Previously, A.componentWillUnmount could fire first in some cases. Should not affect most usages. If it does, switching from componentWillMount to componentDidMount should resolve the issue, and will be functionally equivalent in most cases.

Dart API breaking changes

All of the Dart API breaking changes come from re-exports of members of the react package. Check out the react 5.0.0 breaking changes for more information.

@aviary3-wk
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@semveraudit-wf
Copy link

semveraudit-wf commented Nov 4, 2019

Public API Changes

Release PR detected; using previous release (2.7.0+dart2) as the diff base.

Recommendation: **:bangbang: Major version bump (fyi @Workiva/semver-audit-group )**
@@ line 62: package:over_react/src/component/dom_components.dart @@
class SvgProps extends UiProps with DomPropsMixin, SvgPropsMixin, GeneratedClass implements DomProps {}
-     SvgProps(this.componentFactory, [Map props]);
+     SvgProps(this.componentFactory, [Map props]);
//    `type` of `componentFactory` has changed.
//    Changing a parameter signature is a major change.

      From package:over_react/src/component/prop_mixins.over_react.g.dart
-     dynamic open;
+     bool open;
//    `type` of `open` has changed from `dynamic` to `bool`.
//    Changing a class field is a major change.

      From package:over_react/src/component_declaration/component_base.dart
-     ReactDomComponentFactoryProxy get componentFactory;
+     ReactComponentFactoryProxy componentFactory;
//    `type` of `componentFactory` has changed from `ReactDomComponentFactoryProxy` to `ReactComponentFactoryProxy`.
//    Changing a class field is a major change.
@@ line 37: package:over_react/src/component/abstract_transition.dart @@
class AbstractTransitionComponent<T extends AbstractTransitionProps, S extends AbstractTransitionState> extends UiStatefulComponent<TProps extends UiProps, TState extends UiState> {}

      From package:react/react.dart
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
-     dynamic bind(key);
//    Removing a method is a major change.
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
@@ line 63: package:over_react/src/component/prop_mixins.over_react.g.dart @@
class DomPropsMixin {}

      From package:over_react/src/component/prop_mixins.dart
-     dynamic open;
+     bool open;
//    `type` of `open` has changed from `dynamic` to `bool`.
//    Changing a class field is a major change.
@@ line 48: package:over_react/src/component_declaration/builder_helpers.dart @@
class UiComponent<TProps extends UiProps> extends UiComponent<TProps extends UiProps> with GeneratedClass {}

      From package:react/react.dart
-     dynamic bind(key);
//    Removing a method is a major change.
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
@@ line 86: package:over_react/src/component_declaration/component_base.dart @@
class UiComponent<TProps extends UiProps> extends Component implements DisposableManagerV7 {}

      From package:react/react.dart
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
-     dynamic bind(key);
//    Removing a method is a major change.
Click to see 22 more API Changes


@@ line 743: package:react/react.dart @@
class SyntheticFormEvent extends SyntheticEvent {}
-     SyntheticFormEvent(bubbles, cancelable, currentTarget, _defaultPrevented, _preventDefault, stopPropagation, eventPhase, isTrusted, nativeEvent, target, timeStamp, type);
+     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);
//    `type` of `bubbles` has changed.
//    Changing a parameter signature is a major change.
@@ line 77: package:over_react/src/component/error_boundary.dart @@
class ErrorBoundaryComponent<T extends ErrorBoundaryProps, S extends ErrorBoundaryState> extends UiStatefulComponent<TProps extends UiProps, TState extends UiState> {}
-     void componentDidCatch(Error error, dynamic componentStack);
+     void componentDidCatch(dynamic error, dynamic jsErrorInfo);
//    `type` of `error` has changed.
//    Changing a parameter signature is a major change.

+     void reset();
//    Adding a method is a minor change.

      From package:react/react.dart
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
-     dynamic bind(key);
//    Removing a method is a major change.
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
@@ line 61: package:over_react/src/component_declaration/flux_component.dart @@
class FluxUiComponent<TProps extends FluxUiProps<dynamic, dynamic>> extends UiComponent<TProps extends UiProps> with BatchedRedraws {}

      From package:react/react.dart
-     dynamic bind(key);
//    Removing a method is a major change.
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
@@ line 19: package:over_react/src/util/prop_errors.dart @@
class PropError extends Error {}
-     PropError(this.propName, [this.message = '']);
+     PropError(this.propName, [this.message = '']);
//    `type` of `message` has changed.
//    Changing a parameter signature is a major change.

-     dynamic get message;
+     String get message;
//    `type` of `message` has changed from `dynamic` to `String`.
//    Changing a class field is a major change.

-     PropError.required(this.propName, [this.message = '']);
+     PropError.required(this.propName, [this.message = '']);
//    `type` of `message` has changed.
//    Changing a parameter signature is a major change.

-     PropError.value(this.invalidValue, this.propName, [this.message = '']);
+     PropError.value(this.invalidValue, this.propName, [this.message = '']);
//    `type` of `message` has changed.
//    Changing a parameter signature is a major change.

-     PropError.combination(this.propName, this.prop2Name, [this.message = '']);
+     PropError.combination(this.propName, this.prop2Name, [this.message = '']);
//    `type` of `message` has changed.
//    Changing a parameter signature is a major change.
@@ line 806: package:react/react.dart @@
class SyntheticTouchEvent extends SyntheticEvent {}
-     SyntheticTouchEvent(bubbles, cancelable, currentTarget, _defaultPrevented, _preventDefault, stopPropagation, eventPhase, isTrusted, nativeEvent, target, timeStamp, type, this.altKey, this.changedTouches, this.ctrlKey, this.metaKey, this.shiftKey, this.targetTouches, this.touches);
+     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, this.altKey, this.changedTouches, this.ctrlKey, this.metaKey, this.shiftKey, this.targetTouches, this.touches);
//    `type` of `bubbles` has changed.
//    Changing a parameter signature is a major change.
@@ line 889: package:react/react.dart @@
class SyntheticUIEvent extends SyntheticEvent {}
-     SyntheticUIEvent(bubbles, cancelable, currentTarget, _defaultPrevented, _preventDefault, stopPropagation, eventPhase, isTrusted, nativeEvent, target, timeStamp, type, this.detail, this.view);
+     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, this.detail, this.view);
//    `type` of `bubbles` has changed.
//    Changing a parameter signature is a major change.
@@ line 379: package:over_react/src/component_declaration/component_base.dart @@
class UiStatefulComponent<TProps extends UiProps, TState extends UiState> extends UiComponent<TProps extends UiProps> {}

      From package:react/react.dart
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
-     dynamic bind(key);
//    Removing a method is a major change.
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
@@ line 734: package:react/react.dart @@
class SyntheticFocusEvent extends SyntheticEvent {}
-     SyntheticFocusEvent(bubbles, cancelable, currentTarget, _defaultPrevented, _preventDefault, stopPropagation, eventPhase, isTrusted, nativeEvent, target, timeStamp, type, this.relatedTarget);
+     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, this.relatedTarget);
//    `type` of `bubbles` has changed.
//    Changing a parameter signature is a major change.
@@ line 42: package:over_react/src/component_declaration/built_redux_component.dart @@
class BuiltReduxUiComponent<V extends Built<V, B>, B extends Builder<V, B>, A extends ReduxActions, T extends BuiltReduxUiProps<V, B, A>, Substate> extends UiComponent<TProps extends UiProps> {}

      From package:react/react.dart
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
-     dynamic bind(key);
//    Removing a method is a major change.
@@ line 693: package:react/react.dart @@
class SyntheticKeyboardEvent extends SyntheticEvent {}
-     SyntheticKeyboardEvent(bubbles, cancelable, currentTarget, _defaultPrevented, _preventDefault, stopPropagation, eventPhase, isTrusted, nativeEvent, target, timeStamp, type, this.altKey, this.char, this.charCode, this.ctrlKey, this.locale, this.location, this.key, this.keyCode, this.metaKey, this.repeat, this.shiftKey);
+     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, this.altKey, this.char, this.charCode, this.ctrlKey, this.locale, this.location, this.key, this.keyCode, this.metaKey, this.repeat, this.shiftKey);
//    `type` of `bubbles` has changed.
//    Changing a parameter signature is a major change.
@@ line 759: package:react/react.dart @@
class SyntheticMouseEvent extends SyntheticEvent {}
-     SyntheticMouseEvent(bubbles, cancelable, currentTarget, _defaultPrevented, _preventDefault, stopPropagation, eventPhase, isTrusted, nativeEvent, target, timeStamp, type, this.altKey, this.button, this.buttons, this.clientX, this.clientY, this.ctrlKey, this.dataTransfer, this.metaKey, this.pageX, this.pageY, this.relatedTarget, this.screenX, this.screenY, this.shiftKey);
+     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, this.altKey, this.button, this.buttons, this.clientX, this.clientY, this.ctrlKey, this.dataTransfer, this.metaKey, this.pageX, this.pageY, this.relatedTarget, this.screenX, this.screenY, this.shiftKey);
//    `type` of `bubbles` has changed.
//    Changing a parameter signature is a major change.
@@ line 108: package:over_react/src/util/validation_util.dart @@
class ValidationWarning extends Error {}
-     ValidationWarning([this.message]);
+     ValidationWarning([this.message]);
//    `type` of `message` has changed.
//    Changing a parameter signature is a major change.

-     dynamic get message;
+     String get message;
//    `type` of `message` has changed from `dynamic` to `String`.
//    Changing a class field is a major change.
@@ line 684: package:react/react.dart @@
class SyntheticClipboardEvent extends SyntheticEvent {}
-     SyntheticClipboardEvent(bubbles, cancelable, currentTarget, _defaultPrevented, _preventDefault, stopPropagation, eventPhase, isTrusted, nativeEvent, target, timeStamp, type, this.clipboardData);
+     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, this.clipboardData);
//    `type` of `bubbles` has changed.
//    Changing a parameter signature is a major change.
@@ line 41: package:over_react/src/component/dom_components.dart @@
class DomProps extends UiProps with DomPropsMixin, GeneratedClass implements UiProps {}
-     DomProps(this.componentFactory, [Map props]);
+     DomProps(this.componentFactory, [Map props]);
//    `type` of `componentFactory` has changed.
//    Changing a parameter signature is a major change.

      From package:over_react/src/component/prop_mixins.over_react.g.dart
-     dynamic open;
+     bool open;
//    `type` of `open` has changed from `dynamic` to `bool`.
//    Changing a class field is a major change.

      From package:over_react/src/component_declaration/component_base.dart
-     ReactDomComponentFactoryProxy get componentFactory;
+     ReactComponentFactoryProxy componentFactory;
//    `type` of `componentFactory` has changed from `ReactDomComponentFactoryProxy` to `ReactComponentFactoryProxy`.
//    Changing a class field is a major change.
@@ line 101: package:over_react/src/component_declaration/flux_component.dart @@
class FluxUiStatefulComponent<TProps extends FluxUiProps<dynamic, dynamic>, TState extends UiState> extends UiStatefulComponent<TProps extends UiProps, TState extends UiState> with BatchedRedraws {}

      From package:react/react.dart
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
-     dynamic bind(key);
//    Removing a method is a major change.
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
@@ line 19: package:over_react/src/component/dummy_component.dart @@
class DummyComponent extends Component {}

      From package:react/react.dart
-     dynamic bind(key);
//    Removing a method is a major change.
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
@@ line 76: package:over_react/src/component_declaration/builder_helpers.dart @@
class UiStatefulComponent<TProps extends UiProps, TState extends UiState> extends UiStatefulComponent<TProps extends UiProps, TState extends UiState> with GeneratedClass {}

      From package:react/react.dart
-     dynamic bind(key);
//    Removing a method is a major change.
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
@@ line 170: package:over_react/src/component/resize_sensor.dart @@
class ResizeSensorComponent extends UiComponent<TProps extends UiProps> {}

      From package:react/react.dart
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.
-     dynamic bind(key);
//    Removing a method is a major change.
@@ line 899: package:react/react.dart @@
class SyntheticWheelEvent extends SyntheticEvent {}
-     SyntheticWheelEvent(bubbles, cancelable, currentTarget, _defaultPrevented, _preventDefault, stopPropagation, eventPhase, isTrusted, nativeEvent, target, timeStamp, type, this.deltaX, this.deltaMode, this.deltaY, this.deltaZ);
+     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, this.deltaX, this.deltaMode, this.deltaY, this.deltaZ);
//    `type` of `bubbles` has changed.
//    Changing a parameter signature is a major change.
@@ line 131: package:over_react/src/component/error_boundary.over_react.g.dart @@
class ErrorBoundaryState {}
+     bool showFallbackUIOnError;
//    Adding a field is a minor change.
@@ line 131: package:over_react/src/component/error_boundary.over_react.g.dart @@
class ErrorBoundaryProps {}
+     Duration identicalErrorFrequencyTolerance;
//    Adding a field is a minor change.

+     _ComponentDidCatchCallback onComponentIsUnrecoverable;
//    Adding a field is a minor change.

Ignored changes - @experimental members:

@@ line 42: package:over_react/src/component_declaration/built_redux_component.dart @@
class BuiltReduxUiComponent<V extends Built<V, B>, B extends Builder<V, B>, A extends ReduxActions, T extends BuiltReduxUiProps<V, B, A>, Substate> extends UiComponent<TProps extends UiProps> {}

      From package:react/react.dart
-     dynamic bind(key);
//    Removing a method is a major change.
-     dynamic initComponentInternal(props, _jsRedraw, [Ref ref, _jsThis, context]);
+     dynamic initComponentInternal(props, _jsRedraw, [RefMethod ref, _jsThis, context]);
//    `type` of `ref` has changed.
//    Changing a parameter signature is a major change.
-     Ref ref;
+     RefMethod ref;
//    `type` of `ref` has changed from `Ref` to `RefMethod`.
//    Changing a class field is a major change.

Showing results for e83f9c2

Reported by the dart semver audit client 2.0.1

@aaronlademann-wf aaronlademann-wf changed the title RM-60869 Release over_react 3.0.0+dart2 RM-60869 Release over_react 3.0.0+dart2 (stable) Nov 4, 2019
README.md Outdated Show resolved Hide resolved
Co-Authored-By: Greg Littlefield <greg.littlefield@workiva.com>
@aaronlademann-wf
Copy link
Contributor Author

Semver +1

@aaronlademann-wf aaronlademann-wf marked this pull request as ready for review November 5, 2019 20:12
@greglittlefield-wf
Copy link
Contributor

+10

Copy link
Contributor

@joebingham-wk joebingham-wk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@greglittlefield-wf
Copy link
Contributor

semver +1

@aaronlademann-wf
Copy link
Contributor Author

@Workiva/release-management-pp

@rm-astro-wf rm-astro-wf merged commit 7fd1998 into master Nov 5, 2019
@rm-astro-wf rm-astro-wf deleted the release-over_react-3.0.0+dart2 branch November 5, 2019 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants