Skip to content

Commit

Permalink
Merge pull request #386 from lovegaoshi/dev
Browse files Browse the repository at this point in the history
chore: dep migration
  • Loading branch information
lovegaoshi authored Apr 23, 2024
2 parents e4ada5c + 66da698 commit 6991734
Show file tree
Hide file tree
Showing 37 changed files with 18,613 additions and 15,006 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
with:
node-version: '18'

- name: Setup Yarn
uses: threeal/[email protected]

- name: 'Create env file'
run: |
echo "${{ secrets.ENV_FILE }}" > .env
Expand Down Expand Up @@ -85,7 +88,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 10
command: yarn
command: yarn install; yarn postinstall

- name: clean generated builds
run: rm -rf android/app/build/generated/
Expand Down Expand Up @@ -141,6 +144,9 @@ jobs:
with:
node-version: '18'

- name: Setup Yarn
uses: threeal/[email protected]

- name: 'Create env file'
run: |
echo "${{ secrets.ENV_FILE }}" > .env
Expand Down Expand Up @@ -191,7 +197,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 10
command: yarn
command: yarn install; yarn postinstall

- name: clean generated builds
run: rm -rf android/app/build/generated/
Expand Down Expand Up @@ -243,6 +249,9 @@ jobs:
with:
node-version: '18'

- name: Setup Yarn
uses: threeal/[email protected]

- name: 'Create env file'
run: |
echo "${{ secrets.ENV_FILE }}" > .env
Expand All @@ -268,7 +277,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 10
command: yarn
command: yarn install; yarn postinstall

- name: Pod Install
run: cd ios && rm Podfile.lock && pod install --repo-update
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/android-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ jobs:
with:
node-version: '18'

- name: Setup Yarn
uses: threeal/[email protected]

- name: 'Create env file'
run: |
echo "${{ secrets.ENV_FILE }}" > .env
Expand Down Expand Up @@ -104,7 +107,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 10
command: yarn
command: yarn install; yarn postinstall

- name: clean generated builds
run: rm -rf android/app/build/generated/
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Yarn
uses: threeal/[email protected]

- name: Install dependencies
uses: nick-fields/retry@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/play-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
with:
node-version: '18'

- name: Setup Yarn
uses: threeal/[email protected]

- name: 'Create env file'
run: |
echo "${{ secrets.ENV_FILE }}" > .env
Expand Down Expand Up @@ -74,7 +77,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 10
command: yarn
command: yarn install; yarn postinstall

- name: clean generated builds
run: rm -rf android/app/build/generated/
Expand Down
Binary file added .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
2 changes: 1 addition & 1 deletion __tests__/mediafetch/biliDynamic.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fetchDynamic } from '../../src/utils/mediafetch/biliDynamic';
test('bilicolle', async () => {
test('biliDynamic', async () => {
const content = await fetchDynamic();
// console.log(content);
expect(Object.values(content)[0][0]?.id).not.toBeNull();
Expand Down
6 changes: 6 additions & 0 deletions __tests__/mediafetch/biliMusicTop.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { fetchMusicTop } from '../../src/utils/mediafetch/biliMusicTop';
test('biliMusicTop', async () => {
const content = await fetchMusicTop();
// console.log(content);
expect(content[0].bvid).not.toBeNull();
}, 50000);
2 changes: 1 addition & 1 deletion __tests__/mediafetch/biliRanking.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fetchRanking } from '../../src/utils/mediafetch/biliRanking';
test('bilicolle', async () => {
test('biliRank', async () => {
const content = await fetchRanking();
// console.log(content);
expect(Object.values(content)[0][0]?.id).not.toBeNull();
Expand Down
47 changes: 22 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
"prepare": "yarn run compile",
"pretest": "yarn run compile",
"prettify": "prettier --write ./src",
"ios:build": "yarn && cd ios && rm Podfile.lock && pod install --repo-update && cd ..",
"codepush": "appcenter codepush release-react -a lovegaoshi/Azusa-Player-Mobile",
"codepush:rollback": "appcenter codepush rollback -a lovegaoshi/Azusa-Player-Mobile Production",
"codepush:promote": "appcenter codepush promote -a lovegaoshi/Azusa-Player-Mobile -s Staging -d Production",
"dep": "yarn upgrade-interactive --latest",
"build": "yarn install; yarn postinstall",
"ios:build": "yarn build && cd ios && rm Podfile.lock && pod install --repo-update && cd ..",
"dep": "yarn upgrade-interactive",
"release": "git switch master && git pull && python release_bump.py",
"postinstall": "patch-package"
},
Expand All @@ -34,16 +32,16 @@
"@react-native-community/netinfo": "^11.3.1",
"@react-native-cookies/cookies": "^6.2.1",
"@react-native-masked-view/masked-view": "^0.3.1",
"@react-native/babel-preset": "^0.75.0-main",
"@react-native/metro-config": "^0.75.0-main",
"@react-native/babel-preset": "^0.74.81",
"@react-native/metro-config": "^0.74.81",
"@react-navigation/drawer": "^6.6.15",
"@react-navigation/material-top-tabs": "^6.6.13",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26",
"@sentry/react-native": "^5.22.0",
"@sharcoux/slider": "^7.1.1",
"@shopify/flash-list": "^1.6.4",
"@shopify/react-native-skia": "1.2.2",
"@shopify/react-native-skia": "1.2.3",
"axios": "^1.6.8",
"babel-plugin-transform-remove-console": "^6.9.4",
"base-64": "^1.0.0",
Expand All @@ -52,15 +50,15 @@
"bottleneck": "^2.19.5",
"cheerio": "^1.0.0-rc.12",
"colord": "^2.9.3",
"crypto-js": "^4.1.1",
"crypto-js": "^4.2.0",
"d3": "^7.9.0",
"dayjs": "^1.11.9",
"dayjs": "^1.11.10",
"deepmerge": "^4.3.1",
"dropbox": "git+https://[email protected]/lovegaoshi/dropbox-sdk-js.git",
"expo": "^50.0.17",
"expo-clipboard": "~5.0.1",
"expo-document-picker": "~11.10.1",
"expo-image": "^1.10.6",
"expo-image": "1.10.6",
"expo-keep-awake": "^12.8.2",
"expo-secure-store": "~12.8.1",
"fflate": "^0.8.2",
Expand Down Expand Up @@ -95,10 +93,9 @@
"react-native-screens": "3.29.0",
"react-native-shadow-2": "^7.0.8",
"react-native-share-menu": "git+https://github.com/lovegaoshi/react-native-share-menu.git",
"react-native-snackbar": "^2.4.0",
"react-native-svg": "^15.1.0",
"react-native-svga-player": "git+https://[email protected]/lovegaoshi/react-native-svga-player.git",
"react-native-tab-view": "^3.5.1",
"react-native-tab-view": "^3.5.2",
"react-native-text-ticker": "git+https://[email protected]/lovegaoshi/react-native-text-ticker.git",
"react-native-track-player": "git+https://[email protected]/lovegaoshi/react-native-track-player.git#APM",
"react-native-url-polyfill": "^2.0.0",
Expand All @@ -108,7 +105,7 @@
"react-native-windows": "^0.73.11",
"react-use": "^17.5.0",
"use-debounce": "^10.0.0",
"uuid": "^9.0.0",
"uuid": "^9.0.1",
"ytdl-core": "git+https://[email protected]/lovegaoshi/node-ytdl-core.git",
"zustand": "^4.5.2"
},
Expand All @@ -133,28 +130,28 @@
"@types/react-native-background-timer": "^2.0.2",
"@types/react-native-share-menu": "^5.0.5",
"@types/react-native-video": "^5.0.20",
"@types/react-test-renderer": "^18.0.6",
"@types/react-test-renderer": "^18.0.7",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"@welldone-software/why-did-you-render": "^8.0.1",
"argparse": "^2.0.1",
"babel-jest": "^29.6.4",
"babel-plugin-module-resolver": "^5.0.1",
"babel-jest": "^29.7.0",
"babel-plugin-module-resolver": "^5.0.2",
"cpx": "^1.5.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint": "^9.1.1",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-babel-module": "^5.3.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"gts": "^5.3.0",
"jest": "^29.2.1",
"jest": "^29.7.0",
"metro-react-native-babel-preset": "0.77.0",
"prettier": "^3.2.5",
"react-native-clean-project": "^4.0.1",
"react-native-clean-project": "^4.0.3",
"react-native-dotenv": "^3.4.11",
"react-test-renderer": "18.2.0",
"reactotron-react-native": "^5.1.6",
Expand All @@ -165,5 +162,5 @@
"node": ">=18.0.0"
},
"isSwift": true,
"packageManager": "yarn@1.22.19"
}
"packageManager": "yarn@4.1.1"
}
21 changes: 0 additions & 21 deletions patches/react-native-snackbar+2.6.2.patch

This file was deleted.

2 changes: 2 additions & 0 deletions src/AzusaPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import merge from 'deepmerge';
import { useTranslation } from 'react-i18next';

import SnackBar from './components/commonui/Snackbar';
import Player from './components/player/View';
import Playlist from './components/playlist/View';
import PlayerBottomPanel from './components/player/controls/PlayerProgressControls';
Expand Down Expand Up @@ -150,6 +151,7 @@ const AzusaPlayer = () => {
<NoxBottomTab navigation={navigation} />
</View>
</NavigationContainer>
<SnackBar />
</PaperProvider>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/components/background/MainBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const MainBackground = ({ children }: { children: React.JSX.Element }) => {
disableFocus={true}
preventsDisplaySleepDuringVideoPlayback={false}
bufferConfig={{
// @ts-ignore
cacheSizeMB: 200,
}}
/>
Expand Down
29 changes: 29 additions & 0 deletions src/components/commonui/Snackbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Credits to @matewka: https://snack.expo.dev/@matewka/react-native-paper-snackbar-problem
import * as React from 'react';
import { Snackbar, Portal, ActivityIndicator } from 'react-native-paper';

import useSnack, { InfiniteDuration } from '@stores/useSnack';
import { useNoxSetting } from '@stores/useApp';

export default function SnackBar() {
const { snackMsg, snackDuration, snackVisible, snackOnDismiss } = useSnack();
const playerStyle = useNoxSetting(state => state.playerStyle);
const persisting = snackDuration === InfiniteDuration;

return (
<Portal>
<Snackbar
theme={{ dark: playerStyle.metaData.darkTheme }}
visible={snackVisible}
onDismiss={snackOnDismiss}
duration={snackDuration}
icon={
persisting ? () => <ActivityIndicator></ActivityIndicator> : undefined
}
onIconPress={persisting ? () => undefined : undefined}
>
{snackMsg}
</Snackbar>
</Portal>
);
}
2 changes: 2 additions & 0 deletions src/components/landscape/AzusaPlayerLandscape.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
import LandscapePlayerPanel from './LandscapePlayerPanel';
import LandscapeActions from './LandscapeActions';
import LandscapePlaylistPanel from './LandscapePlaylistPanel';
import SnackBar from '../commonui/Snackbar';

const { LightTheme, DarkTheme } = adaptNavigationTheme({
reactNavigationLight: NavigationDefaultTheme,
Expand Down Expand Up @@ -72,6 +73,7 @@ const AzusaPlayer = () => {
<LandscapePlaylistPanel panelWidth={width / 2} />
</View>
</NavigationContainer>
<SnackBar />
</PaperProvider>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/login/BiliSelectFavButtton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default () => {
)}
<GenericCheckDialog
visible={visible}
title="Check Dialog"
title={t('Login.SyncBiliFavlist')}
options={favLists}
onSubmit={onSubmit}
onClose={() => hideDialog()}
Expand Down
Loading

0 comments on commit 6991734

Please sign in to comment.