Merge branch 'fix-package-json' into bug-fix-test

This commit is contained in:
Jelle van Snik 2022-05-03 18:30:51 +02:00
commit 37da0dd2cf
5 changed files with 2890 additions and 2993 deletions

View File

@ -5,24 +5,15 @@
"homepage": "https://movie.squeezebox.dev",
"dependencies": {
"@headlessui/react": "^1.5.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/crypto-js": "^4.1.1",
"@types/react-router": "^5.1.18",
"crypto-js": "^4.1.1",
"fuse.js": "^6.4.6",
"hls.js": "^1.0.7",
"json5": "^2.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^5.0.0",
"react-tracked": "^1.7.6",
"scheduler": "^0.20.2",
"unpacker": "^1.0.1",
"web-vitals": "^1.0.1"
"react-scripts": "5.0.1",
"unpacker": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
@ -43,11 +34,12 @@
]
},
"devDependencies": {
"@types/jest": "^27.4.0",
"@types/crypto-js": "^4.1.1",
"@types/node": "^17.0.15",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@types/react-router-dom": "^5.3.3",
"@types/react-router": "^5.1.18",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"autoprefixer": "^10.4.2",
@ -57,7 +49,7 @@
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react-hooks": "4.3.0",
"postcss": "^8.4.6",
"prettier": "^2.5.1",

View File

@ -48,7 +48,7 @@ export class ErrorBoundary extends Component<
}
render() {
if (!this.state.hasError) return this.props.children;
if (!this.state.hasError) return this.props.children as any;
return (
<div className="flex min-h-screen w-full flex-col items-center justify-center px-4 py-12">
@ -69,7 +69,7 @@ export class ErrorBoundary extends Component<
</p>
</div>
{this.state.error ? (
<div className="bg-denim-300 w-4xl mt-12 max-w-full rounded px-6 py-4">
<div className="w-4xl mt-12 max-w-full rounded bg-denim-300 px-6 py-4">
<p className="mb-1 break-words font-bold text-white">
{this.state.error.name} - {this.state.error.description}
</p>

View File

@ -1,6 +1,6 @@
import { MWPortableMedia } from "providers";
import { useEffect, useState } from "react";
import { useParams } from "react-router";
import { useParams } from "react-router-dom";
export function deserializePortableMedia(media: string): MWPortableMedia {
return JSON.parse(atob(decodeURIComponent(media)));

View File

@ -73,7 +73,11 @@ function sortResults(
providerResults: MWMassProviderOutput
): MWMassProviderOutput {
const results: MWMassProviderOutput = { ...providerResults };
const fuse = new Fuse(results.results, { threshold: 0.3, keys: ["title"] });
const fuse = new Fuse(results.results, {
threshold: 0.3,
keys: ["title"],
fieldNormWeight: 0.5,
});
results.results = fuse.search(query.searchQuery).map((v) => v.item);
return results;
}

5853
yarn.lock

File diff suppressed because it is too large Load Diff