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

feat: update expo libs #11600

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"husky": "^1.2.0",
"jest": "26.4.2",
"jest-dom": "^1.3.1",
"jest-expo": "^42.0.0",
"jest-expo": "^44.0.1",
"jest-fetch-mock": "^3.0.3",
"jest-localstorage-mock": "^2.4.0",
"jest-mock-console": "^1.0.0",
Expand Down
17 changes: 8 additions & 9 deletions packages/taro-components-rn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@
"@ant-design/react-native": "^4.2.0",
"@react-native-community/slider": "~4.1.12",
"@react-native-picker/picker": "~2.2.1",
"expo-asset": "~8.3.3",
"expo-av": "~9.2.3",
"expo-barcode-scanner": "~10.2.2",
"expo-camera": "~11.2.2",
"expo-av": "~10.2.1",
"expo-barcode-scanner": "~11.2.1",
"expo-camera": "~12.1.2",
"prop-types": "^15.6.2",
"react-native-maps": "^0.25.0",
"react-native-pager-view": "~5.4.9",
Expand All @@ -44,17 +43,17 @@
"@types/react-native": "0.67.0",
"@unimodules/core": "^7.1.2",
"cpy-cli": "^3.1.1",
"expo-constants": "~9.2.0",
"expo-file-system": "~11.1.3",
"expo": "~44.0.6",
"metro-react-native-babel-preset": "^0.66.2",
"react-native": "^0.67.3"
},
"peerDependencies": {
"@react-native-community/slider": "~4.1.12",
"@react-native-picker/picker": "~2.2.1",
"expo-av": "~9.2.3",
"expo-barcode-scanner": "~10.2.2",
"expo-camera": "~11.2.2",
"expo": "~44.0.6",
"expo-av": "~10.2.1",
"expo-barcode-scanner": "~11.2.1",
"expo-camera": "~12.1.2",
"react-native-pager-view": "~5.4.9",
"react-native-svg": "~12.1.1",
"react-native-webview": "~11.14.3"
Expand Down
4 changes: 3 additions & 1 deletion packages/taro-components-rn/src/__tests__/checkbox.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import * as React from 'react'
import { View } from 'react-native'
import { fireEvent, render } from '@testing-library/react-native'
import { Label, Checkbox, CheckboxGroup } from '..'
import Label from '../components/Label'
import Checkbox from '../components/Checkbox'
import CheckboxGroup from '../components/CheckboxGroup'

describe('<Checkbox />', () => {
describe('<Checkbox />', () => {
Expand Down
47 changes: 24 additions & 23 deletions packages/taro-rn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,19 @@
"@react-native-community/geolocation": "~2.0.2",
"@react-native-community/netinfo": "~7.1.2",
"@tarojs/runtime-rn": "3.4.6",
"babel-preset-expo": "~8.5.1",
"babel-preset-expo": "~9.0.2",
"base64-js": "^1.3.0",
"expo-av": "~9.2.3",
"expo-barcode-scanner": "~10.2.2",
"expo-brightness": "~9.2.2",
"expo-camera": "~11.2.2",
"expo-file-system": "~11.1.3",
"expo-image-picker": "~10.2.3",
"expo-keep-awake": "~9.2.0",
"expo-permissions": "~12.1.1",
"expo-sensors": "~10.2.2",
"expo-av": "~10.2.1",
"expo-barcode-scanner": "~11.2.1",
"expo-brightness": "~10.1.1",
"expo-camera": "~12.1.2",
"expo-file-system": "~13.1.4",
"expo-image-picker": "~12.0.2",
"expo-keep-awake": "~10.0.2",
"expo-location": "~14.0.2",
"expo-modules-core": "~0.6.5",
"expo-permissions": "~13.1.1",
"expo-sensors": "~11.1.1",
"nullthrows": "^1.1.1",
"react-native-device-info": "~8.4.8",
"react-native-image-resizer": "~1.4.5",
Expand All @@ -64,29 +66,28 @@
"@types/react-native": "0.67.0",
"cpy-cli": "^3.1.1",
"fbjs-scripts": "^3.0.1",
"react-native": "^0.67.3",
"react-native-unimodules": "~0.14.10"
"react-native": "^0.67.3"
},
"peerDependencies": {
"@react-native-async-storage/async-storage": "~1.15.11",
"@react-native-community/cameraroll": "~4.1.2",
"@react-native-community/clipboard": "~1.5.1",
"@react-native-community/geolocation": "~2.0.2",
"@react-native-community/netinfo": "~7.1.2",
"expo-av": "~9.2.3",
"expo-barcode-scanner": "~10.2.2",
"expo-brightness": "~9.2.2",
"expo-camera": "~11.2.2",
"expo-file-system": "~11.1.3",
"expo-image-picker": "~10.2.3",
"expo-keep-awake": "~9.2.0",
"expo-permissions": "~12.1.1",
"expo-sensors": "~10.2.2",
"expo-av": "~10.2.1",
"expo-barcode-scanner": "~11.2.1",
"expo-brightness": "~10.1.1",
"expo-camera": "~12.1.2",
"expo-file-system": "~13.1.4",
"expo-image-picker": "~12.0.2",
"expo-keep-awake": "~10.0.2",
"expo-modules-core": "~0.6.5",
"expo-permissions": "~13.1.1",
"expo-sensors": "~11.1.1",
"react-native-device-info": "~8.4.8",
"react-native-image-resizer": "~1.4.5",
"react-native-safe-area-context": "~3.4.1",
"react-native-syan-image-picker": "0.5.3",
"react-native-unimodules": "~0.14.10"
"react-native-syan-image-picker": "0.5.3"
},
"resolutions": {
"@types/react": "17.0.11",
Expand Down
4 changes: 0 additions & 4 deletions packages/taro-rn/src/__tests__/media.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// import CameraRoll from './__mock__/mockCameraRoll'
import '@unimodules/core'
import 'react-native'
import 'react-native-unimodules'
import { getImageInfo } from '../lib/getImageInfo'
import { saveImageToPhotosAlbum } from '../lib/saveImageToPhotosAlbum'
import { saveVideoToPhotosAlbum } from '../lib/saveVideoToPhotosAlbum'
Expand Down
3 changes: 2 additions & 1 deletion packages/taro-rn/src/lib/getRecorderManager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ class RecorderManager {
}: any = opts
const options = {
android: Object.assign({}, RecorderManager.RecordingOptions.android, { sampleRate, numberOfChannels, bitRate: encodeBitRate }),
ios: Object.assign({}, RecorderManager.RecordingOptions.ios, { sampleRate, numberOfChannels, bitRate: encodeBitRate })
ios: Object.assign({}, RecorderManager.RecordingOptions.ios, { sampleRate, numberOfChannels, bitRate: encodeBitRate }),
web: {}
}
try {
await Audio.setAudioModeAsync({
Expand Down
11 changes: 2 additions & 9 deletions packages/taro-rn/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jest.doMock('react-native', () => {
return ReactNative
})

jest.doMock('@unimodules/core', () => {
const unimodules = jest.requireActual('@unimodules/core') as any
jest.doMock('expo-modules-core', () => {
const unimodules = jest.requireActual('expo-modules-core') as any
const permisson = jest.requireActual('./__tests__/__mock__/mockExpoPermissions')
const { NativeModulesProxy } = unimodules

Expand All @@ -62,10 +62,3 @@ jest.doMock('@unimodules/core', () => {

return unimodules
})

jest.doMock('react-native-unimodules', () => {
const unimodules = jest.requireActual('react-native-unimodules') as any
const permisson = jest.requireActual('./__tests__/__mock__/mockExpoPermissions')
unimodules.Permissions = permisson
return unimodules
})
Loading