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

return events sorted by startDate in android #28353

Open
wants to merge 351 commits into
base: main
Choose a base branch
from

Conversation

demfabris
Copy link

iOS by default returns the events sorted by startDate. Android does not

Why

iOS getEventsAsync returns events in sorted order (by startDate)

How

Update findEvents in android to return events in sorted order to match iOS implementation

EvanBacon and others added 30 commits January 12, 2024 16:53
# Why

- follow up to expo#26113
- fix expo#26111 
- fix expo#22473

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

- Add `EXPO_ADB_USER` which defaults to `0`. This can be used to
configure the user profile that APKs are installed to.

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

- Tested that the default works.
- Tested that the invalid error message is caught and replaced with a
more Expo-specific message.


<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
)

# Why

Currently API Routes work in development regardless of `web.output`.
This creates a disorientating experience, as they will not be exported
or refreshed via fast-refresh.

This update changes API Routes warn the user the first time a route is
called / added / updated when the user has an incorrect `web.output`

# How

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

Manually tested. Unsure if unit tests are required?

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: evanbacon <bacon@expo.io>
@expo/cli@0.16.8
@expo/metro-config@0.17.2
expo-constants@15.4.4
expo-module-template@10.12.7
expo@50.0.0-preview.11
…nking instead (expo#26428)

# Why

[Our
docs](https://docs.expo.dev/versions/latest/sdk/storereview/#storereviewhasaction)
state that `expo-linking` is a peer dependency and must be installed
alongside `expo-store-review` but we don't specify that inside the
package.json, causing expo-doctor and `npx expo install --fix` to not
warn about this missing dependency.

When the user tries to run the app they get an error about expo-linking 
<img height="300"
src="https://github.com/expo/expo/assets/11707729/fb74f419-400d-4274-9717-9feecce62a55"
/>

 
# How

Instead of requiring users to install expo-linking we can just use
remove it dependency and use React Native Linking instead

# Test Plan

- Add expo-store-review to a project without including expo-linking

# Checklist


- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: Tomasz Sapeta <tsapeta@users.noreply.github.com>
Co-authored-by: Daniel Reichhart <34721312+reichhartd@users.noreply.github.com>
# Why

Closes expo#26254.

# How

`HMR` was broken because the client registered a bundle without the proper `transform.engine=hermes&transform.appRoot=app` settings
- The error thrown also triggers an instant HMR client disconnect, without proper logs or error  handling 

I've fixed both the source URL and the source map URL.

# Test Plan

- [smashboy/expo-sdk-50-escape-char-bug](https://github.com/smashboy/expo-sdk-50-escape-char-bug) ✅
# Why

Closes [ENG-11073](https://linear.app/expo/issue/ENG-11073)

# How

There is a bug in the Gorhom bottom sheet that causes the backdrop component to flash. It was reported a while ago, but it doesn’t seem to be resolved. Here are related issues: gorhom/react-native-bottom-sheet#208 and gorhom/react-native-bottom-sheet#908.

I've adjusted the animation to mask the disappearing backdrop component. 

# Test Plan

- Expo Go with empty app ✅
…6431)

# Why

Closes [ENG-11073](https://linear.app/expo/issue/ENG-11073)

# How

We are reusing the root view component, which causes the UI to jump between open, close, and open states (the menu isn’t closed during the first frame). To resolve this, we can create a fresh root view each time.

That approach may not be the best one. We'll optimize it later, but for now, let's get rid of the annoying flash.

# Test Plan

- Expo Go with empty app ✅
…saacs/cliui` module aliases (expo#26459)

# Why

There are issues with yarn v1 and module aliases, as defined in
`@isaacs/cliui@8.0.2`
([issue](isaacs/jackspeak#5)). This package
adds support for both ESM and CJS through an alias:

```json package.json
{
  "dependencies": {
    "string-width": "^5.1.2",
    "string-width-cjs": "npm:string-width@^4.2.0",
    "strip-ansi": "^7.0.1",
    "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
    "wrap-ansi": "^8.1.0",
    "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
  }
}
```

This doesn't work well with yarn v1 and causes issues like:

```
const stringWidth = require('string-width');
                    ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/expo/workingdir/build/updates-e2e/node_modules/string-width/index.js from /Users/expo/workingdir/build/updates-e2e/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /Users/expo/workingdir/build/updates-e2e/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/expo/workingdir/build/updates-e2e/node_modules/cliui/build/index.cjs:291:21)
    at Object.<anonymous> (/Users/expo/workingdir/build/updates-e2e/node_modules/yargs/build/index.cjs:1:60678)
    at Object.<anonymous> (/Users/expo/workingdir/build/updates-e2e/node_modules/yargs/index.cjs:5:30)
    at Object.<anonymous> (/Users/expo/workingdir/build/updates-e2e/node_modules/react-native/scripts/generate-provider-cli.js:24:15) {
  code: 'ERR_REQUIRE_ESM'
}
Node.js v18.18.0
```

# How

The full dependency chain is:

-
[`@expo/config@8`](https://cdn.jsdelivr.net/npm/@expo/config@8/package.json)
|
[`@expo/metro-config@0.10`](https://cdn.jsdelivr.net/npm/@expo/metro-config@0.10/package.json)
-
[`sucrase@^3.35.0`](https://cdn.jsdelivr.net/npm/sucrase@%5E3.35.0/package.json)
-
[`glob@^10.3.10`](https://cdn.jsdelivr.net/npm/glob@%5E10.3.10/package.json)
-
[`jackspeak@^2.3.5`](https://cdn.jsdelivr.net/npm/jackspeak@%5E2.3.5/package.json)
-
[`@isaacs/cliui@^8.0.2`](https://cdn.jsdelivr.net/npm/@isaacs/cliui@^8.0.2/package.json)
      

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
# Why

fixes expo#26174
close ENG-11097

# How

on android, the `RCTNetworking` has slight difference than on ios. it's
a derived class from `NativeEventEmitter`. we should make sure the
`this` pointer is valid. this pr tries to bind the this pointer to the
correct `RCTNetworking`.

# Test Plan

testing lazy component in router-e2e and expo-go.

(cherry picked from commit 3b57ce1)
# Why

from an user feedback when testing api route with .local domain and
being blocked by CORS restriction.

https://discord.com/channels/695411232856997968/1024598419458764820/1195409921378893946

# How

- merge `remoteDevtoolsCorsMiddleware` and
`remoteDevtoolsSecurityHeadersMiddleware` into the new `CorsMiddleware`
- support extra CORS whitelist from `exp.extra.router.origin` and
`exp.extra.router.headOrigin`.

(cherry picked from commit 16652c4)
supersedes expo#26199

this pr touches `@expo/config-plugins` to add the `finalized` type of
mods
- add a `finalized` type of mod that will run after all the other mods
- the pr updates the implementation of `sortMods` that can sort mods by
given priority

new `sortMods` unit tests passed

---------

Co-authored-by: Evan Bacon <bacon@expo.io>
(cherry picked from commit da2abae)
supersedes expo#26199

this pr changes `@expo/cli` and mainly to add the
`config._internal.templateChecksum`
- calculate md5 template checksum when reading from template tarball's
readable stream
- fill `config._internal.templateChecksum` when prebuild
- export `cloneTemplateAndCopyToProjectAsync` for prebuild-patch

(cherry picked from commit 64c7499)
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
…:embed` command (expo#26471)

# Why

Resolves expo#25505

When `export:embed` was called with arguments being repeated, later
arguments would be overridden by earlier arguments since we parse them
in reverse order. This is problematic for our Gradle scripts and build
processes that allow users to append override arguments.

# How

Previously, the options on `export:embed` would resolve in reverse
order, meaning, earlier arguments would override the values of later
ones, since we parse them in reverse order. Instead, we now don't allow
arguments to be overridden once we've parsed them.

This affects the following commands and extra arguments:
- `expo export:embed`
  - `--dev`
  - `--minify`
  - `--sourcemap-use-absolute-path`
  - `--reset-cache`
  - `--read-global-cache`
- `expo run android`
  - `--device`
- `expo run ios`
  - `--device`

# Test Plan

Unit tests have been added to validate that this change works as
intended.

# Checklist

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
# Why

Schema PR: expo/universe#14308

Fulfils part of the requirement of ENG-11084. SDK 50 projects with no
`web.bundler` set, and which do not have `@expo/webpack-config`
installed will default to `metro`.

This changes the error message to

```
CommandError: It looks like you're trying to use web support but don't have the required dependencies installed.

Please install react-native-web@~0.19.6, react-dom@18.2.0 by running:

npx expo install react-native-web@~0.19.6 react-dom@18.2.0

If you're not using web, please ensure you remove the "web" string from the platforms array in the project Expo
config.
```

I"ll update this message in a new PR. Ideally it should just prompt to
user to run `npx expo install`, but that command does not check web
platform dependencies.

# Test Plan



# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: evanbacon <bacon@expo.io>
# Why

**Previous**
```
CommandError: It looks like you're trying to use web support but don't have the required dependencies installed.

Please install react-native-web@~0.19.6, react-dom@18.2.0, @expo/webpack-config@^19.0.0 by running:

npx expo install react-native-web@~0.19.6 react-dom@18.2.0 @expo/webpack-config@^19.0.0

If you're not using web, please ensure you remove the "web" string from the platforms array in the project Expo
config.
```

**Updated**
```
CommandError: It looks like you're trying to use web support but don't have the required dependencies installed.

Please install react-native-web@~0.19.6, react-dom@18.2.0, @expo/webpack-config@^19.0.0 by running:

npx expo install react-native-web, react-dom, @expo/webpack-config

If you're not using web, please ensure you remove the "web" string from the platforms array in the project Expo
config.
```

# How

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: evanbacon <bacon@expo.io>
- Feedback from Expo SDK 50 beta regarding the size of `@expo/server`
being pulled in to basic projects.
- A quick fix is to move this dependency to expo-router since it's more
fundamental to that package.
- A long term fix will be to adapt more winter cg in expo and use the
platform more over time.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

<!--
How did you build this feature or fix this bug and why?
-->

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
… help output. (expo#26480)

# Why

- hide the `export:web` command from the help prompt since it's
deprecated.
- mark `npx expo export:web -h` as deprecated.

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@expo/cli@0.17.0
@expo/config-plugins@7.8.4
@expo/config@8.5.4
@expo/metro-config@0.17.3
@expo/metro-runtime@3.1.1
expo-application@5.8.3
expo-av@13.10.3
expo-constants@15.4.5
expo-dev-launcher@3.6.3
expo-dev-menu@4.5.4
expo-device@5.9.3
expo-eas-client@0.11.2
expo-file-system@16.0.4
expo-font@11.10.2
expo-image@1.10.4
expo-json-utils@0.12.3
expo-keep-awake@12.8.2
expo-localization@14.8.3
expo-manifests@0.13.2
expo-module-template-local@0.4.1
expo-module-template@10.12.8
expo-modules-autolinking@1.10.1
expo-modules-core@1.11.7
expo-splash-screen@0.26.3
expo-store-review@6.8.3
expo-structured-headers@3.7.2
expo-updates-interface@0.15.3
expo-updates@0.24.8
expo@50.0.0
@expo/cli@0.17.1
expo-dev-client@3.3.6
expo-router@3.4.3
expo@50.0.1
@lukmccall
Copy link
Contributor

Can you change the base branch to main from expo:sdk-50?
image

We very rarely want to backport something to existing versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet