Skip to content

Release react 5.3.0 #243

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 4 commits into from
Jan 6, 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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ before_script:
script:
- pub run build_runner test --release -- -p chrome
- pub run build_runner test -- -p chrome
- dart ./tool/run_consumer_tests.dart --orgName Workiva --repoName over_react --testCmd "pub run dart_dev test -P dartdevc"
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
## [5.3.0](https://github.com/cleandart/react-dart/compare/5.2.1...5.3.0)

- Unpin the react-redux JS dependency to allow versions `7.1.1` and higher.
- Run over_react tests as part of the CI process to prevent another situation where changing JS dependencies
regressed tightly coupled libs like `over_react_redux` (like the one that required the 5.2.1 hotfix).
- [#242] Implement StrictMode Component

## [5.2.1](https://github.com/cleandart/react-dart/compare/5.2.0...5.2.1)

- Temporarily pin react-redux dependency to version `7.1.0` to prevent widespread test failures as a result of
- Temporarily pin react-redux dependency to version `7.1.0` to prevent widespread test failures as a result of
[`Provider` being converted into a function component with hooks](https://github.com/reduxjs/react-redux/pull/1377).

## [5.2.0](https://github.com/cleandart/react-dart/compare/5.1.1...5.2.0)
Expand Down Expand Up @@ -31,7 +38,7 @@ __Full ReactJS 16.x Component Lifecycle Support__
- <s>`componentWillUpdate`</s> => `getSnapshotBeforeUpdate` _(new)_
- `componentDidCatch` / `getDerivedStateFromError` _(new)_
- Adds support for [error boundaries](https://reactjs.org/docs/error-boundaries.html).

__[Portals](https://reactjs.org/docs/portals.html)__

- _"Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component."_
Expand Down Expand Up @@ -62,7 +69,7 @@ Pull in 4.9.2 changes that were accidentally reverted as part of 5.0.0.
- The underlying `.js` files provided by this package are now ReactJS version 16.
- Support for the new / updated lifecycle methods from ReactJS 16 [will be released in version `5.1.0`](https://github.com/cleandart/react-dart/milestone/1).

> [Full list of 5.0.0 Changes](https://github.com/cleandart/react-dart/milestone/2?closed=1)
> [Full list of 5.0.0 Changes](https://github.com/cleandart/react-dart/milestone/2?closed=1)

> __[Full List of Breaking Changes](https://github.com/cleandart/react-dart/pull/224)__

Expand Down Expand Up @@ -91,7 +98,7 @@ Pull in 4.9.2 changes that were accidentally reverted as part of 5.0.0.

- [#181]: Remove unnecessary zoning on event handlers that interferes with testing
- Handlers triggered by real events will now always be called in the root zone.

In most cases, handlers were already running in the root zone, so this should not affect behavior. See [#179] for more details.
- When testing, you previous had to bind event handlers or callbacks triggered by event handlers to zones when using `expect` or `expectAsync`.
```dart
Expand Down
836 changes: 562 additions & 274 deletions lib/react_dom.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react_dom.js.map

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions lib/react_dom_prod.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react_dom_prod.js.map

Large diffs are not rendered by default.

20 changes: 14 additions & 6 deletions lib/react_with_react_dom_prod.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react_with_react_dom_prod.js.map

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-dom-factories": "^1.0.2",
"react-redux": "=7.1.0",
"react-redux": "^7.1.3",
"react-test-renderer": "^16.12.0",
"redux": "^4.0.4",
"regenerator-runtime": "^0.13.3",
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: react
version: 5.2.1
version: 5.3.0
authors:
- Samuel Hapák <[email protected]>
- Greg Littlefield <[email protected]>
Expand All @@ -16,6 +16,7 @@ dependencies:
js: ^0.6.0
meta: ^1.1.6
dev_dependencies:
args: ^1.5.1
build_runner: ^1.6.5
build_test: ^0.10.8
build_web_compilers: ^2.1.4
Expand Down
80 changes: 80 additions & 0 deletions tool/run_consumer_tests.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import 'dart:io';

import 'package:args/args.dart';

Future<Null> main(List<String> args) async {
final parser = new ArgParser()
..addOption('repoName')
..addOption('orgName')
..addOption('testCmd')
..addOption('packageName');
final parsedArgs = parser.parse(args);

if (parsedArgs['repoName'] == null) {
throw ProcessException('consumer_tests.dart', parsedArgs.arguments, '--repoName must be provided', -1);
}

if (parsedArgs['orgName'] == null) {
throw ProcessException('consumer_tests.dart', parsedArgs.arguments, '--orgName must be provided', -1);
}

if (parsedArgs['testCmd'] == null) {
throw ProcessException('consumer_tests.dart', parsedArgs.arguments, '--testCmd must be provided', -1);
}

final String repoName = parsedArgs['repoName'];
final String orgName = parsedArgs['orgName'];
final String testCmdStr = parsedArgs['testCmd'];
final String packageName = parsedArgs['packageName'] ?? parsedArgs['repoName'];

final reactGitSha = Process.runSync('git', ['rev-parse', 'HEAD']).stdout;
print('Running $packageName tests while consuming react-dart at $reactGitSha ...\n');

final rootDir = Directory.current;
final tmpDir = Directory('consumer_testing_temp');
if (tmpDir.existsSync()) {
tmpDir.deleteSync(recursive: true);
}
tmpDir.createSync(recursive: true);
Directory.current = tmpDir;
final gitCloneProcess = await Process.start(
'git',
[
'clone',
'https://github.com/$orgName/$repoName.git',
'--progress',
'--branch',
'master',
'--depth',
'1',
],
mode: ProcessStartMode.inheritStdio);
await gitCloneProcess.exitCode;
Directory.current = Directory(repoName);
final repoGitSha = Process.runSync('git', ['rev-parse', 'HEAD']).stdout;
print('Successfully checked out $repoName master at $repoGitSha');
final dependencyOverrides = '''
dependency_overrides:
react:
git:
url: https://github.com/cleandart/react-dart.git
ref: $reactGitSha
''';

final pubspec = File('pubspec.yaml');
var pubspecSrc = pubspec.readAsStringSync();
pubspecSrc = pubspecSrc.replaceFirst('dependencies:', '${dependencyOverrides}dependencies:');
pubspec.writeAsStringSync(pubspecSrc);
final pubGetProcess = await Process.start('pub', ['get'], mode: ProcessStartMode.inheritStdio);
await pubGetProcess.exitCode;

final testArgs = testCmdStr.split(' ');
final consumerTestProcess =
await Process.start(testArgs[0], [...testArgs..removeAt(0)], mode: ProcessStartMode.inheritStdio);
await consumerTestProcess.exitCode;

Directory.current = rootDir;
if (tmpDir.existsSync()) {
tmpDir.deleteSync(recursive: true);
}
}