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

CPLAT-4061 Deprecate getJsProps(), $Props, and $PropKeys. #230

Merged
merged 1 commit into from
Feb 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# OverReact Changelog

## 1.31.0

> [Complete `1.31.0` Changeset](https://github.com/Workiva/over_react/compare/1.30.2...1.31.0)

__Deprecations__

* [#230] Deprecate the following APIs (they will be removed in 2.0.0):
* `getJsProps()` - use `getProps()` instead.
* `$Props` and `$PropKeys` - see the [Dart 2 migration guide](https://github.com/Workiva/over_react/blob/master/doc/dart2_migration.md)
for more information.

## 1.30.2

> [Complete `1.30.2` Changeset](https://github.com/Workiva/over_react/compare/1.30.1...1.30.2)
Expand Down
6 changes: 6 additions & 0 deletions lib/src/component_declaration/transformer_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export './component_base.dart'
/// in a static yet unsafe way.
///
/// __For advanced usage only.__
///
/// __Deprecated. Will be removed in 2.0.0.__
@deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

#nit could use @Deprecated('2.0.0')

@proxy
class $PropKeys implements List<String> {
/// A placeholder that gets swapped out by the `over_react` transformer
Expand All @@ -49,6 +52,9 @@ class $PropKeys implements List<String> {
/// in a static yet unsafe way.
///
/// __For advanced usage only.__
///
/// __Deprecated. Will be removed in 2.0.0.__
@deprecated
@proxy
class $Props implements component_base.ConsumedProps {
/// A placeholder that gets swapped out by the `over_react` transformer
Expand Down
3 changes: 3 additions & 0 deletions lib/src/util/react_wrappers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ Map _dartifyJsMap(jsMap) {
///
/// If `style` is specified in props, then it too is shallow-converted and included
/// in the returned Map.
///
/// __Deprecated. Use [getProps] instead. Will be removed in 2.0.0.__
@deprecated
Map getJsProps(/* ReactElement|ReactComponent */ instance) {
var props = _dartifyJsMap(instance.props);

Expand Down