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

[RNMobile] Fix CI issues during npm ci #26455

Merged
merged 5 commits into from
Oct 26, 2020
Merged

[RNMobile] Fix CI issues during npm ci #26455

merged 5 commits into from
Oct 26, 2020

Conversation

ceyhun
Copy link
Member

@ceyhun ceyhun commented Oct 26, 2020

Description

Fixes an error happening on master with CI during npm ci phase:

The full error
ℹ Generating type definitions with tsc
src/native-stack/navigators/createNativeStackNavigator.tsx:32:5 - error TS2314: Generic type 'StackNavigationState' requires 1 type argument(s).
32     StackNavigationState,
       ~~~~~~~~~~~~~~~~~~~~
src/native-stack/navigators/createNativeStackNavigator.tsx:32:5 - error TS2558: Expected 5 type arguments, but got 4.
32     StackNavigationState,
       ~~~~~~~~~~~~~~~~~~~~~
33     StackRouterOptions,
   ~~~~~~~~~~~~~~~~~~~~~~~
34     NativeStackNavigationOptions,
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35     NativeStackNavigationEventMap
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/native-stack/navigators/createNativeStackNavigator.tsx:73:7 - error TS2322: Type 'Record<string, Descriptor<Record<string, object | undefined>, string, any, NativeStackNavigationEventMap, {}>>' is not assignable to type 'NativeStackDescriptorMap'.
  Index signatures are incompatible.
    Type 'Descriptor<Record<string, object | undefined>, string, any, NativeStackNavigationEventMap, {}>' is not assignable to type 'Descriptor<Record<string, object | undefined>, string, any, NativeStackNavigationOptions, {}>'.
      Types of property 'options' are incompatible.
        Type 'NativeStackNavigationEventMap' has no properties in common with type 'NativeStackNavigationOptions'.
73       descriptors={descriptors}
         ~~~~~~~~~~~
  src/native-stack/views/NativeStackView.tsx:24:3
    24   descriptors: NativeStackDescriptorMap;
         ~~~~~~~~~~~
    The expected type comes from property 'descriptors' which is declared here on type 'IntrinsicAttributes & Props'
src/native-stack/navigators/createNativeStackNavigator.tsx:79:3 - error TS2314: Generic type 'StackNavigationState' requires 1 type argument(s).
79   StackNavigationState,
     ~~~~~~~~~~~~~~~~~~~~
src/native-stack/types.tsx:31:3 - error TS2314: Generic type 'StackNavigationState' requires 1 type argument(s).
31   StackNavigationState,
     ~~~~~~~~~~~~~~~~~~~~
src/native-stack/types.tsx:254:3 - error TS2314: Generic type 'StackNavigationState' requires 1 type argument(s).
254   StackNavigationState,
      ~~~~~~~~~~~~~~~~~~~~
src/native-stack/views/NativeStackView.tsx:22:10 - error TS2314: Generic type 'StackNavigationState' requires 1 type argument(s).
22   state: StackNavigationState;
            ~~~~~~~~~~~~~~~~~~~~
src/native-stack/views/NativeStackView.tsx:36:26 - error TS7006: Parameter 'route' implicitly has an 'any' type.
36       {state.routes.map((route) => {
                            ~~~~~
Found 8 errors.
✖ Failed to build definition files.

Also enabled React Native E2E Tests on master branch.

How has this been tested?

  • Run a clean npm install locally and expect to see no errors
  • Make sure CI is green
    The Compressed Size / Check is still failing because it's trying to run npm install both in the current and the master branch, which is already failing. I think we can still merge this despite this error after confirming that it's running fine locally.

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@ceyhun ceyhun added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Oct 26, 2020
@ceyhun ceyhun marked this pull request as ready for review October 26, 2020 17:27
@ItsJonQ
Copy link

ItsJonQ commented Oct 26, 2020

Thank you! Will merge this up 🎉

@ItsJonQ ItsJonQ merged commit defd7f0 into master Oct 26, 2020
@ItsJonQ ItsJonQ deleted the rnmobile/fix-ci branch October 26, 2020 17:48
@github-actions github-actions bot added this to the Gutenberg 9.3 milestone Oct 26, 2020
cameronvoell pushed a commit that referenced this pull request Oct 26, 2020
* Run mobile tests on master

* Debug CI

* Revert "Debug CI"

This reverts commit dec1ebe.

* Update react-native-screens ref, pin @react-navigation/native version

* Pin @react-navigation/core,router versions
tellthemachines pushed a commit that referenced this pull request Oct 27, 2020
* Run mobile tests on master

* Debug CI

* Revert "Debug CI"

This reverts commit dec1ebe.

* Update react-native-screens ref, pin @react-navigation/native version

* Pin @react-navigation/core,router versions
tellthemachines added a commit that referenced this pull request Oct 27, 2020
* Fix drop zone indicators for non blocks (#25986)

* Remove isDraggingBlocks check

* Clean up drag and drop data if the user presses escape when dragging

* Add comment to ensure avoidance of dragend

* Switch to using dragend

* Fix archives block render function (#26309)

* Code block: preserve indentation on paste (#26347)

* Turn off autocomplete for token input. (#26427)

* Fix parent post selector: ensure initial value available, search performed, all results shown. (#26397)

Co-authored-by: Nik Tsekouras <ntsekouras@outlook.com>

* [RNMobile] Fix CI issues during `npm ci` (#26455)

* Run mobile tests on master

* Debug CI

* Revert "Debug CI"

This reverts commit dec1ebe.

* Update react-native-screens ref, pin @react-navigation/native version

* Pin @react-navigation/core,router versions

* Fix composer test failures due to invalid lock (#26472)

* Fix gallery block undo issue (#26377)

* Mark change in attributes when gallery mounts as not persistant

* Fix typo

* Fix package lock changes

* Fix some Twenty Twenty One related e2e test failures (#26341)

* Account for unknown number of controls in block inspector

* Ensure selection is on-screen by using a group block instead of cover, which takes up less space on screen

* Fix typewriter test

* Use correct name for patterns test

* Revert change to .wp-env.json

* Fix multi-entity side editor saving test

* Remove blank line

* insert paragraph instead of tempalte part (#26371)

* Fix autosave e2e tests (#26416)

* Update how block to render is tracked (#26356)

Co-authored-by: Daniel Richards <daniel.richards@automattic.com>
Co-authored-by: Riad Benguella <benguella@gmail.com>
Co-authored-by: Ella van Durpe <wp@iseulde.com>
Co-authored-by: Adam Silverstein <adamsilverstein@earthboundhosting.com>
Co-authored-by: Nik Tsekouras <ntsekouras@outlook.com>
Co-authored-by: Ceyhun Ozugur <ceyhunozugur@gmail.com>
Co-authored-by: Marcus Kazmierczak <marcus@mkaz.com>
Co-authored-by: Addison Stavlo <Stavz01@gmail.com>
Co-authored-by: O André <nosolosw@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants