Skip to content

Bump all deprecations to 7.0.0 #289

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

Merged
merged 2 commits into from
Nov 25, 2020
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
170 changes: 85 additions & 85 deletions lib/react.dart

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/react_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ export 'package:react/src/typedefs.dart' show JsFunctionComponent;
/// > __DEPRECATED.__
/// >
/// > Environment configuration is now done by default and should not be altered. This can now be removed.
/// > This will be removed in 6.0.0, along with other configuration setting functions.
@Deprecated('It is not longer required and can be removed. Will be removed from this library in the 6.0.0 release.')
/// > This will be removed in 7.0.0, along with other configuration setting functions.
@Deprecated('It is not longer required and can be removed. Will be removed from this library in the 7.0.0 release.')
void setClientConfiguration() {}
4 changes: 2 additions & 2 deletions lib/react_client/component_factory.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ mixin JsBackedMapComponentFactoryMixin on ReactComponentFactoryProxy {

/// Use [ReactDartComponentFactoryProxy2] instead by calling [registerComponent2].
///
/// Will be removed when [Component] is removed in the `6.0.0` release.
@Deprecated('6.0.0')
/// Will be removed when [Component] is removed in the `7.0.0` release.
@Deprecated('7.0.0')
class ReactDartComponentFactoryProxy<TComponent extends Component> extends ReactComponentFactoryProxy {
/// The ReactJS class used as the type for all [ReactElement]s built by
/// this factory.
Expand Down
46 changes: 23 additions & 23 deletions lib/react_client/react_interop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ abstract class React {
dynamic defaultValue,
int Function(dynamic currentValue, dynamic nextValue) calculateChangedBits,
]);
@Deprecated('6.0.0')
@Deprecated('7.0.0')
external static ReactClass createClass(ReactClassConfig reactClassConfig);
@Deprecated('6.0.0')
@Deprecated('7.0.0')
external static ReactJsComponentFactory createFactory(type);
external static ReactElement createElement(dynamic type, props, [dynamic children]);
external static JsRef createRef();
Expand Down Expand Up @@ -397,9 +397,9 @@ class ReactClass {
///
/// For use in [ReactDartComponentFactoryProxy] when creating new [ReactElement]s,
/// or for external use involving inspection of Dart prop defaults.
@Deprecated('6.0.0')
@Deprecated('7.0.0`')
external Map get dartDefaultProps;
@Deprecated('6.0.0')
@Deprecated('7.0.0`')
external set dartDefaultProps(Map value);

/// A string to distinguish between different Dart component implementations / base classes.
Expand Down Expand Up @@ -451,8 +451,8 @@ abstract class ReactDartComponentVersion {
///
/// > __DEPRECATED.__
/// >
/// > Will be removed alongside [React.createClass] in the `6.0.0` release.
@Deprecated('6.0.0')
/// > Will be removed alongside [React.createClass] in the `7.0.0` release.
@Deprecated('7.0.0')
@JS()
@anonymous
class ReactClassConfig {
Expand Down Expand Up @@ -559,7 +559,7 @@ class ReactPortal {
@JS()
@anonymous
class ReactComponent {
// TODO: Cast as Component2 in 6.0.0
// TODO: Cast as Component2 in 7.0.0
external Component get dartComponent;
// TODO how to make this JsMap without breaking stuff?
external InteropProps get props;
Expand Down Expand Up @@ -587,8 +587,8 @@ class ReactComponent {
/// > This API was never stable in any version of ReactJS, and was replaced with a new, incompatible context API
/// > in ReactJS 16 that is exposed via the [Component2] class.
/// >
/// > This will be completely removed when the JS side of it is slated for removal (ReactJS 17 / react.dart 6.0.0)
@Deprecated('6.0.0')
/// > This will be completely removed when the JS side of it is slated for removal (ReactJS 18 / react.dart 7.0.0)
@Deprecated('7.0.0')
@JS()
@anonymous
class InteropContextValue {
Expand Down Expand Up @@ -623,8 +623,8 @@ class InteropProps implements JsMap {
/// replacement - `Component2` utilizes JS Maps for props,
/// making `internal` obsolete.
///
/// Will be removed alongside `Component` in the `6.0.0` release.
@Deprecated('6.0.0')
/// Will be removed alongside `Component` in the `7.0.0` release.
@Deprecated('7.0.0')
external ReactDartComponentInternal get internal;
external dynamic get key;
external dynamic get ref;
Expand All @@ -638,8 +638,8 @@ class InteropProps implements JsMap {
/// replacement - `Component2` utilizes JS Maps for props,
/// making `InteropProps` obsolete.
///
/// Will be removed alongside `Component` in the `6.0.0` release.
@Deprecated('6.0.0')
/// Will be removed alongside `Component` in the `7.0.0` release.
@Deprecated('7.0.0')
external factory InteropProps({
ReactDartComponentInternal internal,
String key,
Expand All @@ -653,13 +653,13 @@ class InteropProps implements JsMap {
/// replacement - `Component2` utilizes JS Maps for props,
/// making `InteropProps` obsolete.
///
/// Will be removed alongside `Component` in the `6.0.0` release.
/// Will be removed alongside `Component` in the `7.0.0` release.
///
/// > Internal react-dart information used to proxy React JS lifecycle to Dart
/// > [Component] instances.
/// >
/// > __For internal/advanced use only.__
@Deprecated('6.0.0')
@Deprecated('7.0.0')
class ReactDartComponentInternal {
/// For a `ReactElement`, this is the initial props with defaults merged.
///
Expand All @@ -678,8 +678,8 @@ class ReactDartComponentInternal {
/// > This API was never stable in any version of ReactJS, and was replaced with a new, incompatible context API
/// > in ReactJS 16 that is exposed via the [Component2] class.
/// >
/// > This will be completely removed when the JS side of it is slated for removal (ReactJS 17 / react.dart 6.0.0)
@Deprecated('6.0.0')
/// > This will be completely removed when the JS side of it is slated for removal (ReactJS 18 / react.dart 7.0.0)
@Deprecated('7.0.0')
class ReactDartContextInternal {
final dynamic value;

Expand Down Expand Up @@ -733,9 +733,9 @@ void markChildrenValidated(List<dynamic> children) {
///
/// > __DEPRECATED.__
/// >
/// > Will be removed in `6.0.0` alongside [Component].
/// > Will be removed in `7.0.0` alongside [Component].
@JS('_createReactDartComponentClass')
@Deprecated('6.0.0')
@Deprecated('7.0.0')
external ReactClass createReactDartComponentClass(
ReactDartInteropStatics dartInteropStatics, ComponentStatics componentStatics,
[JsComponentConfig jsConfig]);
Expand Down Expand Up @@ -768,10 +768,10 @@ bool get inReactDevMode => _inReactDevMode;
///
/// __Deprecated.__
///
/// Will be removed when [Component] is removed in the `6.0.0` release.
/// Will be removed when [Component] is removed in the `7.0.0` release.
@JS()
@anonymous
@Deprecated('6.0.0')
@Deprecated('7.0.0')
class ReactDartInteropStatics {
external factory ReactDartInteropStatics({
Component Function(
Expand Down Expand Up @@ -837,8 +837,8 @@ class ComponentStatics2 {
/// > via the [Component2] class and is supported by [JsComponentConfig2].
/// >
/// > This will be completely removed when the JS side of `context` it is slated for
/// > removal (ReactJS 17 / react.dart 6.0.0)
@Deprecated('6.0.0')
/// > removal (ReactJS 18 / react.dart 7.0.0)
@Deprecated('7.0.0')
@JS()
@anonymous
class JsComponentConfig {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/react_client/component_registration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ List<String> _filterSkipMethods(Iterable<String> methods) {

/// Creates and returns a new [ReactDartComponentFactoryProxy] from the provided [componentFactory]
/// which produces a new JS [`ReactClass` component class](https://facebook.github.io/react/docs/top-level-api.html#react.createclass).
@Deprecated('6.0.0')
@Deprecated('7.0.0')
ReactDartComponentFactoryProxy registerComponent(
ComponentFactory componentFactory, [
Iterable<String> skipMethods = const ['getDerivedStateFromError', 'componentDidCatch'],
Expand Down
2 changes: 1 addition & 1 deletion lib/src/react_client/dart_interop_statics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'package:react/src/react_client/private_utils.dart';
import 'package:react/src/typedefs.dart';

/// The static methods that proxy JS component lifecycle methods to Dart components.
@Deprecated('6.0.0')
@Deprecated('7.0.0')
final ReactDartInteropStatics dartInteropStatics = (() {
var zone = Zone.current;

Expand Down
4 changes: 2 additions & 2 deletions lib/src/react_client/private_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:react/src/js_interop_util.dart';
/// This is used when setting environment variables to ensure they can be set properly.
bool _isJsApiValid = false;

@Deprecated('6.0.0')
@Deprecated('7.0.0')
InteropContextValue jsifyContext(Map<String, dynamic> context) {
var interopContext = new InteropContextValue();
context.forEach((key, value) {
Expand All @@ -29,7 +29,7 @@ T validateJsApiThenReturn<T>(T Function() computeReturn) {
return computeReturn();
}

@Deprecated('6.0.0')
@Deprecated('7.0.0')
Map<String, dynamic> unjsifyContext(InteropContextValue interopContext) {
// TODO consider using `contextKeys` for this if perf of objectKeys is bad.
return new Map.fromIterable(objectKeys(interopContext), value: (key) {
Expand Down