Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
matamegger committed Mar 1, 2024
1 parent f5b5c96 commit bb3a815
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 23 deletions.
2 changes: 1 addition & 1 deletion example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');
const pak = require('../package.json');

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['@react-native/babel-preset'],
plugins: [
[
'module-resolver',
Expand Down
18 changes: 10 additions & 8 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export type RootStackParamsList = {
navigation: NativeStackNavigationProp<RootStackParamsList>;
};
SubtitlePlayback: undefined;
ProgrammaticTrackSelection: undefined;
CustomPlaybackForm: undefined;
OfflinePlayback: undefined;
CustomPlayback: {
Expand All @@ -56,9 +57,10 @@ export type RootStackParamsList = {
navigation: NativeStackNavigationProp<RootStackParamsList>;
};
Casting: undefined;
SystemUI: undefined;
};

const RootStack = createNativeStackNavigator();
const RootStack = createNativeStackNavigator<RootStackParamsList>();

const isTVOS = Platform.OS === 'ios' && Platform.isTV;

Expand All @@ -81,31 +83,31 @@ export default function App() {
data: [
{
title: 'Basic playback',
routeName: 'BasicPlayback',
routeName: 'BasicPlayback' as keyof RootStackParamsList,
},
{
title: 'Basic Analytics',
routeName: 'BasicAnalytics',
routeName: 'BasicAnalytics' as keyof RootStackParamsList,
},
{
title: 'Basic Drm playback',
routeName: 'BasicDrmPlayback',
routeName: 'BasicDrmPlayback' as keyof RootStackParamsList,
},
{
title: 'Subtitle and captions',
routeName: 'SubtitlePlayback',
routeName: 'SubtitlePlayback' as keyof RootStackParamsList,
},
{
title: 'Basic Picture in Picture',
routeName: 'BasicPictureInPicture',
routeName: 'BasicPictureInPicture' as keyof RootStackParamsList,
},
{
title: 'Basic Ads',
routeName: 'BasicAds',
routeName: 'BasicAds' as keyof RootStackParamsList,
},
{
title: 'Programmatic Track Selection',
routeName: 'ProgrammaticTrackSelection',
routeName: 'ProgrammaticTrackSelection' as keyof RootStackParamsList,
},
],
};
Expand Down
5 changes: 4 additions & 1 deletion example/src/screens/CustomPlaybackForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ const initialFormState = {
playDisabled: true,
};

type CustomPlaybackFormProps = NativeStackScreenProps<RootStackParamsList>;
type CustomPlaybackFormProps = NativeStackScreenProps<
RootStackParamsList,
'CustomPlaybackForm'
>;

const CustomPlaybackForm: React.FC<CustomPlaybackFormProps> = ({
navigation,
Expand Down
1 change: 1 addition & 0 deletions example/src/screens/ExamplesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const ExamplesList: React.FC<ExamplesListProps> = ({ route, navigation }) => (
<ExampleItem
title={item.title}
onPress={() => {
// @ts-ignore
navigation.navigate(item.routeName);
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.app.Application;

import com.bitmovin.player.reactnative.integrationtest.BuildConfig;
import com.bitmovin.player.reactnative.integrationtest.ReactNativeFlipper;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
Expand Down
2 changes: 1 addition & 1 deletion integration_test/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');
const pak = require('../package.json');

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['@react-native/babel-preset'],
plugins: [
[
'module-resolver',
Expand Down
4 changes: 2 additions & 2 deletions integration_test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/metro-config": "^0.73.5",
"@types/cavy": "^3.2.7",
"@types/cavy": "^3.2.9",
"babel-plugin-module-resolver": "^5.0.0",
"cavy-cli": "^3.0.0",
"@react-native/babel-preset": "0.73.18",
Expand All @@ -39,6 +39,6 @@
"node": ">=18"
},
"resolutions": {
"@types/react": "~17.0.21"
"@types/react": "^18.0.0"
}
}
2 changes: 1 addition & 1 deletion integration_test/src/TestablePlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface TestablePlayerProps {

export default function TestablePlayer({
playerTestWorld,
}: TestablePlayerProps): JSX.Element {
}: TestablePlayerProps): React.JSX.Element {
const generateTestHook = useCavy();
const [renderCount, setRenderCount] = useState(0);
playerTestWorld.onReRender = () => setRenderCount((count) => count + 1);
Expand Down
16 changes: 8 additions & 8 deletions integration_test/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1650,10 +1650,10 @@
dependencies:
"@sinonjs/commons" "^3.0.0"

"@types/cavy@^3.2.7":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@types/cavy/-/cavy-3.2.8.tgz#8b3beafe0251482acd2335d3cbc0fb91c3b8da21"
integrity sha512-252TeL+OxYRRgIWRppVVrV5dj8sD4JyDyvgfTTdi5duvoWrqX1VpFbUealS2pPSn1ujymM3w2g4fD+u3yMvd9A==
"@types/cavy@^3.2.9":
version "3.2.9"
resolved "https://registry.yarnpkg.com/@types/cavy/-/cavy-3.2.9.tgz#2190e19220f9b1670255019f03fdbbae75be4d2d"
integrity sha512-VLAicAl0Jj5F2P2sHcliP4tU/aPAwNQ4hURA72msaTnvO0jB7HiGUr34sp1OqNfr6Qd9UMluiyaeRVuWrJI95w==
dependencies:
"@types/react" "*"

Expand Down Expand Up @@ -1688,10 +1688,10 @@
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.10.tgz#892afc9332c4d62a5ea7e897fe48ed2085bbb08a"
integrity sha512-mxSnDQxPqsZxmeShFH+uwQ4kO4gcJcGahjjMFeLbKE95IAZiiZyiEepGZjtXJ7hN/yfu0bu9xN2ajcU0JcxX6A==

"@types/react@*", "@types/react@~17.0.21":
version "17.0.71"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.71.tgz#3673d446ad482b1564e44bf853b3ab5bcbc942c4"
integrity sha512-lfqOu9mp16nmaGRrS8deS2Taqhd5Ih0o92Te5Ws6I1py4ytHBcXLqh0YIqVsViqwVI5f+haiFM6hju814BzcmA==
"@types/react@*", "@types/react@^18.0.0":
version "18.2.61"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.61.tgz#5607308495037436779939ec0348a5816c08799d"
integrity sha512-NURTN0qNnJa7O/k4XUkEW2yfygA+NxS0V5h1+kp9jPwhzZy95q3ADoGMP0+JypMhrZBTTgjKAUlTctde1zzeQA==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
Expand Down

0 comments on commit bb3a815

Please sign in to comment.