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

FED-1728 Migrate to null safety #373

Merged
merged 54 commits into from
Oct 16, 2023
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
3dd457e
Remove deprecated forwardRef
greglittlefield-wf Aug 16, 2023
cd2eda7
Remove workaround for dart-lang/sdk#27647, fixed in Dart 2
greglittlefield-wf Aug 16, 2023
ae23239
Migrate to null safety
greglittlefield-wf Aug 16, 2023
3109175
Use Never since Null is no longer the bottom type
greglittlefield-wf Aug 16, 2023
9b2379e
Fix lints
greglittlefield-wf Aug 16, 2023
f1101b7
Fix instances of `dynamic?`
greglittlefield-wf Aug 16, 2023
1c88f0f
Fix more implicit casts in examples
greglittlefield-wf Aug 16, 2023
d7cd354
Update mocks to work in null safety by using mockito's builder
greglittlefield-wf Aug 16, 2023
4176a9e
Address fixme around createReactDartComponentClass(2) nullability
greglittlefield-wf Aug 16, 2023
5adad69
Address fixme around handling a null SyntheticEvent.type
greglittlefield-wf Aug 16, 2023
af89ed3
Address fixme around accessing uninitialized late props/state fields …
greglittlefield-wf Aug 16, 2023
961aa4a
Support non-nullable refs, remove unsafe Ref constructors
greglittlefield-wf Aug 17, 2023
6024c37
Fix useRef deprecation warnings, add useRef2 tests
greglittlefield-wf Aug 18, 2023
4aed55f
Remove FIXME for Simulated event nullability (more info below)
greglittlefield-wf Aug 18, 2023
71f519a
Improve typing and safety of initComponentInternal
greglittlefield-wf Aug 22, 2023
4fa6b9d
Improve comment
greglittlefield-wf Aug 22, 2023
e7f2e9e
Make ReactDartComponentInternal.props non-nullable
greglittlefield-wf Aug 22, 2023
d807613
Eliminate ! operator from state initialization
greglittlefield-wf Aug 22, 2023
90d911e
Fix bad non-null assertion
greglittlefield-wf Aug 29, 2023
0dc260e
Improve useRef nullability by deprecating its argument instead of
greglittlefield-wf Aug 30, 2023
1a06d48
Remove duplicate PropValidator typedef, align typing
greglittlefield-wf Aug 31, 2023
f2ad196
Fix deprecated initial value in useRef not being passed along
greglittlefield-wf Aug 31, 2023
0c561dc
Pull in RefTestCase changes from over_react
greglittlefield-wf Sep 11, 2023
61cc34d
assert that callback ref arguments aren't non-nullable, add tests
greglittlefield-wf Sep 12, 2023
11ca3a7
Make chainRefs AssertionError tests more specific
greglittlefield-wf Sep 12, 2023
abe5735
Remove unused import
greglittlefield-wf Sep 12, 2023
37a47f6
Remove `implements Function` which has had no effect since Dart 2.0
greglittlefield-wf Sep 12, 2023
a6f96f8
Remove unnecessary ReactElement casts
greglittlefield-wf Sep 12, 2023
069f478
Fix most remaining implicit casts
greglittlefield-wf Sep 12, 2023
b9881a1
Add types to top-level DOM factories, clean up casts
greglittlefield-wf Sep 12, 2023
8799ed2
Add tests for how JsBackedMap handles null and other key types
greglittlefield-wf Sep 12, 2023
0d1ab08
JsBackedMap: fix errors when using null keys, fix implicit casts
greglittlefield-wf Sep 12, 2023
d708dfd
Fix find/replace typo
greglittlefield-wf Sep 12, 2023
019cabc
Add test case for `null` key within Map passed to jsifyAndAllowInterop
greglittlefield-wf Sep 12, 2023
8122645
Disable implicit casts in analysis options
greglittlefield-wf Sep 13, 2023
50e9a5e
Adjust Component2Bridge.forComponent nullability
greglittlefield-wf Sep 13, 2023
2c380ce
Tweak createContext for better type promotion
greglittlefield-wf Sep 13, 2023
e4d6570
Clean up FIXME
greglittlefield-wf Sep 13, 2023
d75e962
Format
greglittlefield-wf Oct 2, 2023
c23fffc
Merge branch 'prepare-for-7_0_0' into null-safety-manual-2
greglittlefield-wf Oct 2, 2023
e86096b
Remove deprecated StateHook and ReducerHook constructors
greglittlefield-wf Oct 2, 2023
c26f942
Fix and expand on non-nullable callback ref assertion message
greglittlefield-wf Oct 2, 2023
40a2e19
Fix logic change during migration
greglittlefield-wf Oct 2, 2023
a385e95
Use dart_dev to format so that we can exclude generated mockito files
greglittlefield-wf Oct 2, 2023
95628fc
Fix conflicting outputs in CI, also fix tests not running in dart2js
greglittlefield-wf Oct 3, 2023
086f8cb
Add missing glob dev dependency
greglittlefield-wf Oct 3, 2023
a284dfc
Seal ReducerHook, StateHook, and Ref
greglittlefield-wf Oct 4, 2023
7ca0cb8
Clean up cast
greglittlefield-wf Oct 4, 2023
dbcf43a
Fix bad generic typing on Object.keys
greglittlefield-wf Oct 10, 2023
ee90271
Address CR feedback
greglittlefield-wf Oct 11, 2023
b277b9a
Add more thorough explanation of impact of `late` member changes
greglittlefield-wf Oct 11, 2023
7ab1084
Add typedef and comments to explain StateHook _setValue typing
greglittlefield-wf Oct 12, 2023
0616cd0
Align nullability of context args in
greglittlefield-wf Oct 12, 2023
cb5cfd6
Address CR feedback
greglittlefield-wf Oct 12, 2023
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
Prev Previous commit
Next Next commit
Update mocks to work in null safety by using mockito's builder
greglittlefield-wf committed Aug 16, 2023
commit d7cd3545f5c68acaed5528976d69835b0093749c
7 changes: 3 additions & 4 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
targets:
$default:
builders:
# mockito's builder is expensive and is not needed until this package is
# migrated to null-safety. At that point, it should be scoped only to
# relevant files.
mockito:mockBuilder:
enabled: false
# Scope only to files declaring mocks, for performance.
generate_for:
- test/mockito.dart
build_web_compilers|entrypoint:
# These are globs for the entrypoints you want to compile.
generate_for:
14 changes: 14 additions & 0 deletions test/mockito.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file generates a mockito.mocks.dart, containing mock classes that
// can be imported by other tests.

library react.test.mockito_gen_entrypoint;

import 'dart:html';
import 'package:mockito/annotations.dart';

@GenerateNiceMocks([
MockSpec<KeyboardEvent>(),
MockSpec<DataTransfer>(),
MockSpec<MouseEvent>(),
])
main() {}
Loading