From 36f3469d20d00f4d1f5b3c1f7f12ce3e7ae37944 Mon Sep 17 00:00:00 2001 From: Aaron Lademann Date: Fri, 11 May 2018 11:37:53 -0700 Subject: [PATCH 1/5] Fix lower bound of w_common + We are using an API that is only available in version 1.10.0 and up --- CHANGELOG.md | 8 ++++++++ pubspec.yaml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 397cb5d51..05e92b699 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # OverReact Changelog +## 1.24.1 + +> [Complete `1.24.1` Changeset](https://github.com/Workiva/over_react/compare/1.24.0...1.24.1) + +__Dependency Updates__ + +* w_common `^1.10.0` (was `^1.8.0`) + ## 1.24.0 > [Complete `1.24.0` Changeset](https://github.com/Workiva/over_react/compare/1.23.1...1.24.0) diff --git a/pubspec.yaml b/pubspec.yaml index f4b3f124c..a3feca130 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: react: ^4.3.0 source_span: ^1.4.0 transformer_utils: ^0.1.1 - w_common: ^1.8.0 + w_common: ^1.10.0 w_flux: ^2.7.1 platform_detect: ^1.3.2 quiver: ">=0.21.4 <=0.28.0" # 0.28.0+ is Dart 2 only From de4d20320d5c100ba97fa78a022354721e46a76d Mon Sep 17 00:00:00 2001 From: Aaron Lademann Date: Fri, 11 May 2018 11:39:37 -0700 Subject: [PATCH 2/5] Address ReactComponentFactory deprecations --- CHANGELOG.md | 4 ++++ .../component_declaration/component_base_test.dart | 4 ++-- test/over_react/util/react_wrappers_test.dart | 6 ++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05e92b699..882314c9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ __Dependency Updates__ * w_common `^1.10.0` (was `^1.8.0`) +__Tech Debt__ + +* Address `ReactComponentFactory` deprecation + ## 1.24.0 > [Complete `1.24.0` Changeset](https://github.com/Workiva/over_react/compare/1.23.1...1.24.0) diff --git a/test/over_react/component_declaration/component_base_test.dart b/test/over_react/component_declaration/component_base_test.dart index d5df57534..53154c594 100644 --- a/test/over_react/component_declaration/component_base_test.dart +++ b/test/over_react/component_declaration/component_base_test.dart @@ -979,7 +979,7 @@ class TestComponentProps extends UiProps { TestComponentProps([Map props]) : this.props = props ?? ({}); } -ReactComponentFactory _TestComponentComponentFactory = registerComponent(() => new TestComponentComponent()); +final _TestComponentComponentFactory = registerComponent(() => new TestComponentComponent()); class TestComponentComponent extends UiComponent { @override final List consumedProps; @@ -1016,7 +1016,7 @@ class TestStatefulComponentState extends UiState { TestStatefulComponentState([Map state]) : this.state = state ?? ({}); } -ReactComponentFactory _TestStatefulComponentComponentFactory = registerComponent(() => new TestStatefulComponentComponent()); +final _TestStatefulComponentComponentFactory = registerComponent(() => new TestStatefulComponentComponent()); class TestStatefulComponentComponent extends UiStatefulComponent { @override render() {} diff --git a/test/over_react/util/react_wrappers_test.dart b/test/over_react/util/react_wrappers_test.dart index 35ba2145c..08b6301d6 100644 --- a/test/over_react/util/react_wrappers_test.dart +++ b/test/over_react/util/react_wrappers_test.dart @@ -1128,8 +1128,7 @@ main() { } /// Helper component for testing a Dart (react-dart) React component with cloneElement. -final TestComponentFactory = - react.registerComponent(() => new TestComponent()) as ReactComponentFactory; // ignore: avoid_as +final TestComponentFactory = react.registerComponent(() => new TestComponent()); class TestComponent extends react.Component { @override render() => Dom.div()(); @@ -1148,8 +1147,7 @@ class PlainObjectStyleMap { } /// Helper component that renders whatever you tell it to. Necessary for rendering components with the 'ref' prop. -final RenderingContainerComponentFactory = - react.registerComponent(() => new RenderingContainerComponent()) as ReactComponentFactory; // ignore: avoid_as +final RenderingContainerComponentFactory = react.registerComponent(() => new RenderingContainerComponent()); class RenderingContainerComponent extends react.Component { @override From 30ff6fb73df508c135c60be4451f1f56e97da815 Mon Sep 17 00:00:00 2001 From: Aaron Lademann Date: Fri, 11 May 2018 11:40:49 -0700 Subject: [PATCH 3/5] Address findRenderedComponentWithType deprecation --- CHANGELOG.md | 1 + test/over_react/util/react_wrappers_test.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 882314c9a..d935fcbee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ __Dependency Updates__ __Tech Debt__ * Address `ReactComponentFactory` deprecation +* Address `findRenderedComponentWithType` deprecation ## 1.24.0 diff --git a/test/over_react/util/react_wrappers_test.dart b/test/over_react/util/react_wrappers_test.dart index 08b6301d6..9d61cd6ce 100644 --- a/test/over_react/util/react_wrappers_test.dart +++ b/test/over_react/util/react_wrappers_test.dart @@ -266,7 +266,7 @@ main() { expect(clone.key, equals(overrideKeyRefProps['key'])); expect(clone.ref, equals(overrideKeyRefProps['ref'])); - var renderedClone = react_test_utils.findRenderedComponentWithType(renderedHolder, TestComponentFactory); + var renderedClone = react_test_utils.findRenderedComponentWithTypeV2(renderedHolder, TestComponentFactory); Map cloneDartProps = getDartComponent(renderedClone).props; expect(cloneDartProps, isNot(anyOf(contains('key'), contains('ref'))), From 7ba05d50daf67816a91f48069d0fa0dc96ebe6f2 Mon Sep 17 00:00:00 2001 From: Aaron Lademann Date: Fri, 11 May 2018 11:42:32 -0700 Subject: [PATCH 4/5] Bump lower bound of react dependency --- CHANGELOG.md | 1 + pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d935fcbee..d67097b9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ __Dependency Updates__ * w_common `^1.10.0` (was `^1.8.0`) +* react `^4.4.1` (was `^4.3.0`) __Tech Debt__ diff --git a/pubspec.yaml b/pubspec.yaml index a3feca130..f174b58f7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: logging: ">=0.11.3+1 <1.0.0" meta: ^1.0.4 path: ^1.4.1 - react: ^4.3.0 + react: ^4.4.1 source_span: ^1.4.0 transformer_utils: ^0.1.1 w_common: ^1.10.0 From b163cd9429d28ce041480bc407678c8b1a15ac23 Mon Sep 17 00:00:00 2001 From: Aaron Lademann Date: Fri, 11 May 2018 11:42:34 -0700 Subject: [PATCH 5/5] Update version strings for 1.24.1 RC --- README.md | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d07402e5..a99c901a4 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ ```yaml dependencies: - over_react: ^1.24.0 + over_react: ^1.24.1 ``` 2. Add the `over_react` [transformer] to your `pubspec.yaml`. diff --git a/pubspec.yaml b/pubspec.yaml index f174b58f7..12286ddc2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: over_react -version: 1.24.0 +version: 1.24.1 description: A library for building statically-typed React UI components using Dart. homepage: https://github.com/Workiva/over_react/ authors: