chore: update deps (#10)

This commit is contained in:
cl.st authored and GitHub committed 2024-05-31 01:08:11 +02:00
1 parent 4f3c99aff8
commit de6eaa70a0
19 files changed
+1673 -239

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
GENERATE_SOURCEMAP=false
REACT_APP_REPO_API_URL="/cstaelen/shazarr-app"
REACT_APP_REPO_API_URL="/cstaelen/shazarr"
REACT_APP_CURRENT_VERSION="v0.0.9"
+13
View File
@@ -3,6 +3,19 @@ Shazarr notable changes.
[Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format.
## 📦 [Unreleased]
### 🖍 Changed
* Change notification message to specify prerelease ou release update status
### 🐛 Fixed
* Fix display issue on screen orientation change
* Fix readme apk download link
### 🧹 Renovate
* Update node deps
* Migrate capacitor from v5 to v6
* Typescript 5
* Eslint 9
## 📦 0.0.9
### 🚀 Added
* Playwright testing
+4 -7
View File
@@ -2,7 +2,7 @@
[![GitHub Release](https://img.shields.io/github/release-date/cstaelen/shazarr-app?color=013b51&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/cstaelen/shazarr-app/releases)
[![GitHub Release](https://img.shields.io/github/release/cstaelen/shazarr-app?color=013b51&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/cstaelen/shazarr-app/releases)
![Playwright CI](https://img.shields.io/github/actions/workflow/status/cstaelen/shazarr-app/playwright.yml?label=Playwright%20CI&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)
[![Download APK](https://img.shields.io/github/downloads/cstaelen/shazarr-app/latest/shazarr-signed.apk?color=a2c438&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=android)](https://github.com/downloads/cstaelen/shazarr-app/latest/shazarr-signed.apk)
[![Download APK](https://img.shields.io/github/downloads/cstaelen/shazarr-app/latest/shazarr-signed.apk?color=a2c438&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=android)](https://github.com/cstaelen/shazarr/releases/latest/download/shazarr-signed.apk)
# Shazarr - Unofficial Shazam mobile app web UI
Shazarr project is a mobile app (android, ios) providing Shazam song recognition service with [Lidarr](https://github.com/linuxserver/docker-lidarr) and [Tidarr](https://github.com/cstaelen/tidarr) integration.
@@ -25,8 +25,8 @@ Shazarr project is a mobile app (android, ios) providing Shazam song recognition
## Get started
- **android**: ✅ APK download
- **ios**: ⚠️ build app from Xcode ONLY (needs xcode and paired device)
- **Android**: ✅ APK Download APK [here](https://github.com/cstaelen/shazarr/releases/latest/download/shazarr-signed.apk)
- **iOS**: ⚠️ build app from Xcode ONLY (needs xcode and paired device)
Get last release :
@@ -39,11 +39,8 @@ Get last release :
- **Custom service URL**: `http://<service-url>?query=`
- **Custom service name**: `My custom music service`
### Android APP
APK available [here](https://github.com/cstaelen/docker-shazarr/raw/main/outputs/shazarr-app.apk)
#### iOS ( /!\ source build only )
Requirements: `npm`, `ionic`, `xcode`.
Requirements: `npm`, `xcode`.
1. Git clone project first
2. in project folder run:
+1 -1
View File
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
namespace "com.shazarr.app"
compileSdkVersion rootProject.ext.compileSdkVersion
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.shazarr.app"
minSdkVersion rootProject.ext.minSdkVersion
+1
View File
@@ -15,6 +15,7 @@ dependencies {
implementation project(':capacitor-local-notifications')
implementation project(':capacitor-network')
implementation project(':capacitor-preferences')
implementation project(':capacitor-screen-orientation')
implementation project(':capacitor-voice-recorder')
}
+2 -2
View File
@@ -7,8 +7,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.2'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.android.tools.build:gradle:8.3.1'
classpath 'com.google.gms:google-services:4.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
+3
View File
@@ -20,5 +20,8 @@ project(':capacitor-network').projectDir = new File('../node_modules/@capacitor/
include ':capacitor-preferences'
project(':capacitor-preferences').projectDir = new File('../node_modules/@capacitor/preferences/android')
include ':capacitor-screen-orientation'
project(':capacitor-screen-orientation').projectDir = new File('../node_modules/@capacitor/screen-orientation/android')
include ':capacitor-voice-recorder'
project(':capacitor-voice-recorder').projectDir = new File('../node_modules/capacitor-voice-recorder/android')
+1
View File
@@ -20,3 +20,4 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+7 -7
View File
@@ -1,14 +1,14 @@
ext {
minSdkVersion = 22
compileSdkVersion = 33
targetSdkVersion = 33
androidxActivityVersion = '1.7.0'
compileSdkVersion = 34
targetSdkVersion = 34
androidxActivityVersion = '1.8.0'
androidxAppCompatVersion = '1.6.1'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.10.0'
androidxFragmentVersion = '1.5.6'
coreSplashScreenVersion = '1.0.0'
androidxWebkitVersion = '1.6.1'
androidxCoreVersion = '1.12.0'
androidxFragmentVersion = '1.6.2'
coreSplashScreenVersion = '1.0.1'
androidxWebkitVersion = '1.9.0'
junitVersion = '4.13.2'
androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.5.1'
+1
View File
@@ -11,3 +11,4 @@ capacitor-cordova-ios-plugins
# Generated Config files
App/App/capacitor.config.json
App/App/config.xml
@@ -1,14 +1,14 @@
{
"images": [
{
"idiom": "universal",
"size": "1024x1024",
"filename": "AppIcon-512@2x.png",
"platform": "ios"
"images" : [
{
"filename" : "AppIcon-512@2x.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
],
"info": {
"author": "xcode",
"version": 1
}
}
+1
View File
@@ -17,6 +17,7 @@ def capacitor_pods
pod 'CapacitorLocalNotifications', :path => '../../node_modules/@capacitor/local-notifications'
pod 'CapacitorNetwork', :path => '../../node_modules/@capacitor/network'
pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences'
pod 'CapacitorScreenOrientation', :path => '../../node_modules/@capacitor/screen-orientation'
pod 'CapacitorVoiceRecorder', :path => '../../node_modules/capacitor-voice-recorder'
end
+23 -17
View File
@@ -1,18 +1,20 @@
PODS:
- Capacitor (5.7.5):
- Capacitor (6.0.0):
- CapacitorCordova
- CapacitorApp (5.0.7):
- CapacitorApp (6.0.0):
- Capacitor
- CapacitorCordova (5.7.5)
- CapacitorDevice (5.0.7):
- CapacitorCordova (6.0.0)
- CapacitorDevice (6.0.0):
- Capacitor
- CapacitorHaptics (5.0.7):
- CapacitorHaptics (6.0.0):
- Capacitor
- CapacitorLocalNotifications (5.0.7):
- CapacitorLocalNotifications (6.0.0):
- Capacitor
- CapacitorNetwork (5.0.7):
- CapacitorNetwork (6.0.0):
- Capacitor
- CapacitorPreferences (5.0.7):
- CapacitorPreferences (6.0.0):
- Capacitor
- CapacitorScreenOrientation (6.0.0):
- Capacitor
- CapacitorVoiceRecorder (5.0.0):
- Capacitor
@@ -26,6 +28,7 @@ DEPENDENCIES:
- "CapacitorLocalNotifications (from `../../node_modules/@capacitor/local-notifications`)"
- "CapacitorNetwork (from `../../node_modules/@capacitor/network`)"
- "CapacitorPreferences (from `../../node_modules/@capacitor/preferences`)"
- "CapacitorScreenOrientation (from `../../node_modules/@capacitor/screen-orientation`)"
- CapacitorVoiceRecorder (from `../../node_modules/capacitor-voice-recorder`)
EXTERNAL SOURCES:
@@ -45,20 +48,23 @@ EXTERNAL SOURCES:
:path: "../../node_modules/@capacitor/network"
CapacitorPreferences:
:path: "../../node_modules/@capacitor/preferences"
CapacitorScreenOrientation:
:path: "../../node_modules/@capacitor/screen-orientation"
CapacitorVoiceRecorder:
:path: "../../node_modules/capacitor-voice-recorder"
SPEC CHECKSUMS:
Capacitor: 7d42085cb786b2d3ea9ac8a17ebd7e3305be7b72
CapacitorApp: 17fecd0e6cb23feafac7eb0939417389038b0979
CapacitorCordova: c946a6052b547e1e185fc46862003f7b9130ead1
CapacitorDevice: fc91bdb484dc0e70755e9b621cd557afe642613a
CapacitorHaptics: 7c7c206f0c96a628fed073830c96d28c4b2e772e
CapacitorLocalNotifications: c58afadd159f6bc540ef9b3cbdbc82510a2bf112
CapacitorNetwork: 81ef9728aa7a65cac8c1181ce79e578162b57b57
CapacitorPreferences: 77ac427e98db83bace772455f8ba447430382c4c
Capacitor: 559d073c4ca6c27f8e7002c807eea94c3ba435a9
CapacitorApp: 9d53aec7101f7b030a950c5bdc4df8612576b279
CapacitorCordova: 8c4bfdf69368512e85b1d8b724dd7546abeb30af
CapacitorDevice: f8fd88f9edd1261c55a109f32015b09bbbfdc4a0
CapacitorHaptics: 9ebc9363f0e9b8eb4295088a0b474530acf1859b
CapacitorLocalNotifications: 4ab68f0be5f697a579558fadd307d823a9ec1c26
CapacitorNetwork: f15a94c16a33cba7c47a17814cb6bcfe3ea34ded
CapacitorPreferences: c9b839a80baa72e4ed4bdb117618e1950d3046b5
CapacitorScreenOrientation: d78ce2b710bfcd1c32d3a090d32b6686c1c95e4f
CapacitorVoiceRecorder: 872ea857b497ce2c71afe3e4eb5de0a74290c0db
PODFILE CHECKSUM: 4ed71b9840802318387ac9461d8e85f0e97ddd89
PODFILE CHECKSUM: 8814b064c6a28c0f8680cac7ab4e756f5bf9c2ab
COCOAPODS: 1.14.3
+1554 -158
View File
File diff suppressed because it is too large. Load diff
+33 -26
View File
@@ -2,20 +2,20 @@
"name": "shazarr-app",
"version": "0.1.0",
"private": true,
"engines" : {
"node" : ">=20.0.0"
"engines": {
"node": ">=20.0.0"
},
"dependencies": {
"@capacitor/android": "5.6.0",
"@capacitor/app": "^5.0.7",
"@capacitor/cli": "^5.6.0",
"@capacitor/core": "^5.6.0",
"@capacitor/device": "^5.0.6",
"@capacitor/haptics": "^5.0.6",
"@capacitor/ios": "^5.6.0",
"@capacitor/local-notifications": "^5.0.7",
"@capacitor/network": "^5.0.6",
"@capacitor/preferences": "^5.0.6",
"@capacitor/android": "^6.0.0",
"@capacitor/app": "^6.0.0",
"@capacitor/core": "^6.0.0",
"@capacitor/device": "^6.0.0",
"@capacitor/haptics": "^6.0.0",
"@capacitor/ios": "^6.0.0",
"@capacitor/local-notifications": "^6.0.0",
"@capacitor/network": "^6.0.0",
"@capacitor/preferences": "^6.0.0",
"@capacitor/screen-orientation": "^6.0.0",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.15.18",
@@ -28,24 +28,27 @@
"shazam-api": "0.2.0"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@capacitor/assets": "^3.0.5",
"@playwright/test": "^1.44.0",
"@types/node": "^16.18.70",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"@capacitor/cli": "^6.0.0",
"@ionic/cli": "^7.2.0",
"@playwright/test": "^1.44.1",
"@types/node": "^20.12.13",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"depcheck": "^1.4.7",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-simple-import-sort": "^12.1.0",
"prettier": "^3.2.5",
"ts-prune": "^0.10.3",
"typescript": "^4"
"typescript": "^5.4.5"
},
"scripts": {
"start": "react-scripts start",
@@ -61,11 +64,15 @@
"quality:depcheck": "npx depcheck",
"quality:eslint": "eslint .",
"quality:eslint-fix": "eslint --fix .",
"testing:run": "docker run --rm -it -v .:/srv -w /srv mcr.microsoft.com/playwright:v1.44.0-jammy npx playwright test",
"testing:run": "docker run --rm -it -v .:/srv -w /srv mcr.microsoft.com/playwright:v1.44.1-jammy npx playwright test",
"testing:ui": "npx playwright test --ui",
"testing:ci": "docker run --rm -e CI=true -v .:/srv -w /srv mcr.microsoft.com/playwright:v1.44.0-jammy npx playwright test",
"testing:show-report": "docker run --rm -it -p 9323:9323 -v .:/srv -w /srv mcr.microsoft.com/playwright:v1.44.0-jammy npx playwright show-report ./testing/playwright-report --host 0.0.0.0",
"testing:update-snapshots": "docker run --rm -it -v .:/srv -w /srv mcr.microsoft.com/playwright:v1.44.0-jammy npx playwright test --update-snapshots"
"testing:ci": "docker run --rm -e CI=true -v .:/srv -w /srv mcr.microsoft.com/playwright:v1.44.1-jammy npx playwright test",
"testing:show-report": "docker run --rm -it -p 9323:9323 -v .:/srv -w /srv mcr.microsoft.com/playwright:v1.44.1-jammy npx playwright show-report ./testing/playwright-report --host 0.0.0.0",
"testing:update-snapshots": "docker run --rm -it -v .:/srv -w /srv mcr.microsoft.com/playwright:v1.44.1-jammy npx playwright test --update-snapshots"
},
"overrides": {
"typescript": "^5.4.5",
"@capacitor/core": "^6.0.0"
},
"browserslist": {
"production": [
@@ -79,4 +86,4 @@
"last 1 safari version"
]
}
}
}
+4 -4
View File
@@ -129,7 +129,7 @@ export function ConfigProvider({ children }: { children: ReactNode }) {
latestVersion !== currentVersion &&
latestVersion > currentVersion
) {
sendNotification();
sendNotification(data[0].tag_name, data[0].prerelease);
}
} catch (e) {
console.log("fetch github issue", e);
@@ -137,7 +137,7 @@ export function ConfigProvider({ children }: { children: ReactNode }) {
}
}, []);
async function sendNotification() {
async function sendNotification(name: string, prerelease: boolean) {
let allowed = false;
const { display: currentPerm } =
@@ -164,8 +164,8 @@ export function ConfigProvider({ children }: { children: ReactNode }) {
LocalNotifications.schedule({
notifications: [
{
title: "Update available !",
body: "A new version of Shazarr is available. Download it on github.",
title: `${prerelease ? "’[prerelease]" : ""} Update available !`,
body: `A new ${prerelease ? "prerelease" : "version"} of Shazarr is available (${name}). Click to download it on Github.`,
id: 1,
largeIcon: "ic_stat_name/ic_stat_name",
smallIcon: "ic_stat_name/ic_stat_name",
+8
View File
@@ -6,6 +6,7 @@ import React, {
useState,
} from "react";
import { Haptics } from "@capacitor/haptics";
import { ScreenOrientation } from "@capacitor/screen-orientation";
import { VoiceRecorder } from "capacitor-voice-recorder";
import { Shazam } from "shazam-api";
import { ShazamRoot, ShazamTrack } from "shazam-api/dist/types";
@@ -75,9 +76,13 @@ export function ShazarrProvider({ children }: { children: ReactNode }) {
return;
}
}
// Start recording lock screen
// await ScreenOrientation.lock({ orientation: "natural" });
setRecordingStatus("recording");
vibrateAction();
const { value: isRecording } = await VoiceRecorder.startRecording();
if (isRecording) {
setTimeout(async () => {
const { status } = await VoiceRecorder.getCurrentStatus();
@@ -152,6 +157,7 @@ export function ShazarrProvider({ children }: { children: ReactNode }) {
})
.finally(async () => {
await vibrateAction();
await ScreenOrientation.unlock();
setRecordingStatus("inactive");
setShazarrLoading(false);
});
@@ -197,6 +203,8 @@ export function ShazarrProvider({ children }: { children: ReactNode }) {
setShazarrLoading(false);
setHistorySearch(undefined);
await ScreenOrientation.unlock();
try {
const { status } = await VoiceRecorder.getCurrentStatus();
if (status === "RECORDING") {
+4 -4
View File
@@ -1,9 +1,9 @@
import { expect } from "@playwright/test";
import { expect, Page } from "@playwright/test";
import historyFixtures from "../fixtures/history.json";
export async function gotoWithLocalStorage(url, page) {
page.goto("/");
export async function gotoWithLocalStorage(url: string, page: Page) {
page.goto(url);
await expect(page.getByText("Shazarr")).toBeVisible();
const stringifiedData = JSON.stringify(historyFixtures);
@@ -19,7 +19,7 @@ export async function gotoWithLocalStorage(url, page) {
page.reload();
}
export async function waitForImgLoaded(page) {
export async function waitForImgLoaded(page: Page) {
await page.waitForFunction(() => {
const images = Array.from(document.querySelectorAll("img"));
return images.every((img) => img.complete);