| #
8a424beb |
| 11-Aug-2023 |
James Ide <[email protected]> |
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)
Why
---
Prettier 3 is out. Add support for it with this linter config.
**Note for reviewer:** the first commit is the one with th
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)
Why
---
Prettier 3 is out. Add support for it with this linter config.
**Note for reviewer:** the first commit is the one with the actual
changes. The rest of this PR are changes to get the linter passing
(mostly autofix).
How
---
Update eslint-config-prettier and eslint-plugin-prettier. To address
deprecation warnings, also update typescript-eslint/parser and
typescript-eslint/eslint-plugin.
Because of an update to typescript-eslint/parser, we need to suppress
deprecation warnings (documented in a comment).
Regenerated test snapshots. Due to the upgraded dependencies, typecasts
and optional chaining are now auto-fixable by lint. This converts
warnings into autofixes.
Test Plan
---
`yarn test` in the linter config. Run `expotools check --all --fix-lint
--no-build --no-test --no-uniformity-check` to try this config on the
whole repo.
---------
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
1c5b1f9a |
| 23-Feb-2023 |
Alan Hughes <[email protected]> |
[android][media-library] Fix passing sortBy argument to native (#21363)
Fixes https://github.com/expo/expo/issues/21338
|
| #
98ecfc87 |
| 24-Mar-2022 |
James Ide <[email protected]> |
[lint] Add "caughtErrors: 'all'" to linter config (#16591)
Why
---
ES2019 added "optional catch bindings" so that `e`/`error`/etc. don't need to be specified in catch clauses if the thrown value i
[lint] Add "caughtErrors: 'all'" to linter config (#16591)
Why
---
ES2019 added "optional catch bindings" so that `e`/`error`/etc. don't need to be specified in catch clauses if the thrown value isn't used. This changes our lint rules to warn if unnecessary error variables are declared. https://2ality.com/2017/08/optional-catch-binding.html.
In JS, as opposed to TS, we allow unused catch bindings if the variable names are prefixed with an underscore. This is so that JS targeting older JS interpreters can write `catch (_) {}` if needed. With TS we disallow unused catch bindings since tsc can compile code to its target JS version.
How
---
Added `caughtErrors: 'all'` to the no-unused-vars rule's configuration. As part of this change, I made the TypeScript linting rules apply only to .ts/.tsx/.ts.d files and updated the unit test snapshots.
Test Plan
---
Added unit tests to the linter. Ran linter over all modules in this repo with expotools.
show more ...
|
| #
22d1e005 |
| 05-Jan-2022 |
Bartosz Kaszubowski <[email protected]> |
[test-suite] lint files, add lint check to CI (#15772)
|
| #
df3ae3b5 |
| 11-Jun-2021 |
andy <[email protected]> |
[android][qa] minor fixes for test-suite and NCL (#13262)
|
| #
5ccb1d3a |
| 31-May-2021 |
Łukasz Kosmaty <[email protected]> |
[media-library][android] Fix test suite compatibility with Android R (#13057)
# Why
Closes ENG-723.
# How
- Added a new test section that uses default assets to clean those assets after tes
[media-library][android] Fix test suite compatibility with Android R (#13057)
# Why
Closes ENG-723.
# How
- Added a new test section that uses default assets to clean those assets after test execution.
- Increased timeout - some actions need user confirmation.
- Batched some actions to avoid multiple permissions dialogs.
# Test Plan
Run test-suite in Expo Go on different devices:
show more ...
|
| #
f6d54f8c |
| 05-Mar-2021 |
Dan <[email protected]> |
[ios][expo-media-library] In 'getAssetInfoAsync', respect the `shouldDownloadFromNetwork` option. (#12086)
# Why
* While investigating behavior around the `shouldDownloadFromNetwork` option to `M
[ios][expo-media-library] In 'getAssetInfoAsync', respect the `shouldDownloadFromNetwork` option. (#12086)
# Why
* While investigating behavior around the `shouldDownloadFromNetwork` option to `MediaLibrary.getAssetInfoAsync`, noticed several unexpected things.
* In iOS 12, there is a discrepancy between the `isNetworkAsset` field returned on video & photo assets.
* For video assets, `isNetworkAsset` is a boolean, which is consistent with documentation.
* For photo assets, `isNetworkAsset` is a number, which is inconsistent with documentation.
* In iOS 13 & iOS 14 the `isNetworkAsset` is never returned from `MediaLibrary.getAssetInfoAsync`.
* Related to this, the `allowsNetworkAccess` option is always true when fetching photos/videos, even when the `shouldDownloadFromNetwork: false` option is given.
* https://docs.expo.io/versions/latest/sdk/media-library/#medialibrarygetassetinfoasyncasset-options
# How
* Ran `test-suite` in the `bare-expo` app, added tests to cover the behavior I was seeing.
* Render asset info returned from calling `getAssetInfoAsync` with `shouldDownloadFromNetwork: false` on the `<MediaDetailsScreen/>` in the `native-component-list` app, verify that `isNetworkAsset` field is returned.
# Test Plan
* Ran `test-suite` in the `bare-expo` app, added tests to cover the behavior I was seeing.
show more ...
|
| #
8aade7b0 |
| 16-Sep-2020 |
Łukasz Kosmaty <[email protected]> |
[test-suite] Fix assets loading in MediaLibrary (#10202)
# Why
`MediaLibrary` tests don't work in bare-expo.
# How
Fix the assets loading process(according to the changed `Asset` documentat
[test-suite] Fix assets loading in MediaLibrary (#10202)
# Why
`MediaLibrary` tests don't work in bare-expo.
# How
Fix the assets loading process(according to the changed `Asset` documentation).
# Test Plan
- test-suite run on:
- expo-client ✅
- bare-expo ✅
show more ...
|
| #
5dcabadf |
| 02-Sep-2020 |
Łukasz Kosmaty <[email protected]> |
[expo-media-library] Fix permissions on iOS 14 (#10026)
# Why
- We can't get/create an album when the user is not granted permission to all photos.
- `authorizationStatus` was deprecated & in iO
[expo-media-library] Fix permissions on iOS 14 (#10026)
# Why
- We can't get/create an album when the user is not granted permission to all photos.
- `authorizationStatus` was deprecated & in iOS 14 beta 6 it doesn't work. Same with `requestAuthorization`.
- Skip `media-library` tests when not all permissions were granted.
# Test Plan
- NCL ✅
- test-suite ✅
# Changelog
- [fix][expo-media-library] Fix `media-library` methods failing when not all permissions were granted on iOS 14.
show more ...
|
| #
fc1510b0 |
| 04-Jun-2020 |
Eric Samelson <[email protected]> |
[test-suite] make green on Android (#8642)
|
| #
af445d0b |
| 17-Feb-2020 |
Łukasz Kosmaty <[email protected]> |
[media-library] Throw an exception when path doesn't contain an extension (#7030)
# Why
Resolves https://github.com/expo/expo/issues/7018.
# How
Throw when the provided path doesn't contain
[media-library] Throw an exception when path doesn't contain an extension (#7030)
# Why
Resolves https://github.com/expo/expo/issues/7018.
# How
Throw when the provided path doesn't contain an extension.
# Test Plan
| | Android | iOS |
| ---- | :---------: | :-----: |
| [Simple snack](https://snack.expo.io/@lukaszkosmaty/expo---media-library---save-should-fail-when-the-provided-path-does-not-contain-an-extension) | ✅ | ✅ |
| test-suite | ✅ | ✅ |
show more ...
|
| #
c6f5602a |
| 06-Aug-2019 |
Łukasz Kosmaty <[email protected]> |
[media-library][android] Fix media's width and height are sometimes 0 (#4935)
# Why
Resolve #4326.
# How
For some images (for example from Instagram) dimensions got from `query` don't have
[media-library][android] Fix media's width and height are sometimes 0 (#4935)
# Why
Resolve #4326.
# How
For some images (for example from Instagram) dimensions got from `query` don't have value, so i get them from `BitmapFactory.Options`
# Test Plan
You can check it on https://snack.expo.io/@kakarn/medialibrarybug.
show more ...
|
| #
8e06e510 |
| 05-Aug-2019 |
Tomasz Sapeta <[email protected]> |
[media-library] Allow to get assets created in specified time range (#5166)
# Why
There are some use cases where we want to pick media assets from some specific period of time, like during a visi
[media-library] Allow to get assets created in specified time range (#5166)
# Why
There are some use cases where we want to pick media assets from some specific period of time, like during a visit in a food place. That use case is also used in Gyroscope app where I wanted to make it work more smoothly and get rid of filtering all the assets in JS.
# How
Added `createdAfter` and `createdBefore` options to `MediaLibrary.getAssetsAsync` and also added `requestPermissionsAsync` and `getPermissionsAsync` functions which would also be a part of #5061 but I decided to include them earlier so I don't have to migrate in the future releases
# Test Plan
Added tests to test-suite + I tested it in Gyroscope app
show more ...
|
| #
858bd7a2 |
| 22-May-2019 |
Tomasz Sapeta <[email protected]> |
[sdk33] fix tests and NCL for MediaLibrary
|
| #
a47a1472 |
| 14-May-2019 |
Ville Immonen <[email protected]> |
[ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219)
* [ncl][test-suite] Change imports to SDK 33 syntax with the codemod
* [ncl][test-suite] Add new imported packages to de
[ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219)
* [ncl][test-suite] Change imports to SDK 33 syntax with the codemod
* [ncl][test-suite] Add new imported packages to dependencies
show more ...
|
| #
7efeb25e |
| 10-Apr-2019 |
Sergei Chestakov <[email protected]> |
Update test-suite app (#3932)
* Create new component for selecting tests to run
* Add buttons to select all and run tests
* Implement selecting and deselecting
* Add runTests function and
Update test-suite app (#3932)
* Create new component for selecting tests to run
* Add buttons to select all and run tests
* Implement selecting and deselecting
* Add runTests function and pass selected values to parent component
* Run only selected tests
* Fix missing name exports for test modules
* Remove async call in getTestModules and generate data array
* Add react navigation and create seperate screens
* Add styles object and done message
* Refactor select screen to use set instead of map and clear on navigation
* Check if the component is mounted before calling setState
* Move screens to new directory and Modules.js -> TestUtils.js
* Use checkboxes to indicate selected and clean up UI
* Add default case to support web
* Remove Ripple function call for ListItem background on Android
* Add support for /all deeplink that runs all modules in test-suite
* Add suggested changes for PR and run JSC test on Android emulator
show more ...
|
| #
740b3867 |
| 18-Aug-2018 |
James Ide <[email protected]> |
Move test-suite into the Expo repo under apps
This moves test-suite into the Expo repo, setting things up so that CI can verify changes to modules using test-suite.
Tested by loading and running te
Move test-suite into the Expo repo under apps
This moves test-suite into the Expo repo, setting things up so that CI can verify changes to modules using test-suite.
Tested by loading and running test-suite with `expu start` for now. Also will check that our CI passes since there are some dependencies on test-suite (e.g. publishing it). Before merging, the shipit bot needs to be redeployed as well and may need some manual repo editing inside its container.
fbshipit-source-id: 144e1bd
show more ...
|