Conversation
…umeric 0 and 1 values (#42978) # Why Noticed that Swift treats NSNumber(value: 1.0) and value 0.0 as Booleans while debugging some issue for `animation` modifier in Expo UI. e.g. Below will print `Optional(true)` ```bash swift -e "import Foundation; print(NSNumber(value: 1.0) as? Bool)" ``` This creates issue for a type like `Either<Bool, Double>`. If someone passes `0.0` and `1.0` in JS, it will detect it as Bool instead of Double when using below code. ```swift if let value: Bool = animatedValue?.get() { content.animation(animationValue, value: value) } else if let value: Double = animatedValue?.get() { content.animation(animationValue, value: value) } else { content } ``` I am not sure if this is a bug or an expected behaviour. This does not happen on Android so I thought maybe it needs to be treated as a bug? 🤔 . Also this would be a breaking change for some library that is expecting this behaviour. Issues like `Either<Bool, Double>` can also be fixed by just doing `Either<Double, Bool>`, so we can document it if we want to keep existing behaviour. <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How Add `DynamicBoolType` which prevents `NSNumber` from implicit casting `0` and `1` values to boolean. <!-- How did you build this feature or fix this bug and why? --> # Test Plan Added unit tests in android and iOS. Android does not have this issue but I added for testing and kept it. Can remove there. <!-- 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. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why
`<Text>{0}</Text>` returns `null` instead of native component.
# How
Changed `!children` to `children === undefined || children === null`
# Test Plan
Pass `0` as a children to Text component
# Why #42977 Nice modifier that allows cool animation on numeric `Text`. <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How Added modifier that matches SwiftUI's API. <!-- How did you build this feature or fix this bug and why? --> # Test Plan Added screen in NCL app. https://github.com/user-attachments/assets/ce7d5bfa-0420-4519-ae81-2a1cc852839e <!-- 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. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) --------- Co-authored-by: Aman Mittal <amandeepmittal@live.com>
…42605) Co-authored-by: Kadi Kraman <kadi@expo.io>
…43065) # Why This PR prevents failures in `.github/workflows/issue-closed.yml` when a corresponding Linear issue cannot be found. This happens rarely as a consequence of failed `🔎 Import issue to Linear` in `.github/workflows/issue-triage.yml` but it happened in https://github.com/expo/expo/actions/runs/21864091751/job/63100557088 ``` Error: S.match is not a function - s.match is not a function There was an error running import-github-issue-to-linear command: S.match is not a function - s.match is not a function ``` it's not immediately clear how that error should be resolved, and re-running the action passed okay. # How - Added a comment to the "Close Linear issue" step in the GitHub workflow - Updated the `importIssueAsync` function to return the result of `Linear.createIssueAsync` so that the result is awaited. That shouldn't make any difference for this problem though # Test Plan - green CI # Checklist - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
…ddleware` (#43074) # Why Supersedes #35757 > This removes a longstanding hack that covered for a lack of JSON body parsing in Metro's `/symbolicate` endpoint. We're now resolving this in facebook/metro#1475 — meaning this can be removed from Expo CLI. > — @huntie This also raised that we had two calls to `/symbolicate` that weren't being called with `application/json`. However, without the `rawBody` property, Metro's middlewares now expect the `Content-Type: application/json` header. # How - Update `@expo/log-box` to set `Content-Type: application/json` on JSON POST requests - Update `@expo/cli` to set `Content-Type: application/json` on internal `/symbolicate` request - Drop `rawBodyMiddleware` from CLI's `createMetroMiddleware` - Replace `rawBody` with JSON body parsing for `/open-stack-frame` # Test Plan - Run app and cause an error with a stack trace - The `/symbolicate` call should work as before - Clicking a frame, `/open-stack-frame` should work as before # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why Fix spam of `console.log` warnings on prebuild and remove them from start. # How Yoink `withIosWarning` from `expo-sharing` https://github.com/expo/expo/blob/49914479511b11af6f7bf57c17779bc744528025/packages/expo-sharing/plugin/src/ios/withIosWarning.ts # Test Plan Run `yarn expo prebuild -p ios` with expo-widgets installed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )