mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Update node packages
This commit is contained in:
parent
1769aa45c9
commit
9084a78420
@ -1,4 +1,4 @@
|
||||
FROM node:16-alpine AS builder
|
||||
FROM node:18-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY .yarn ./.yarn
|
||||
COPY .yarnrc.yml ./
|
||||
@ -16,7 +16,7 @@ ENV NODE_ENV production
|
||||
RUN yarn build:web
|
||||
|
||||
|
||||
FROM node:16-alpine
|
||||
FROM node:18-alpine
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/apps/web/.next/standalone/apps/web .
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM node:16-alpine
|
||||
FROM node:18-alpine
|
||||
RUN apk add git bash
|
||||
WORKDIR /app
|
||||
COPY .yarn ./.yarn
|
||||
|
@ -68,7 +68,7 @@ const config = {
|
||||
projectId: "55de6b52-c649-4a15-9a45-569ff5ed036c",
|
||||
},
|
||||
},
|
||||
plugins: ["expo-build-properties"],
|
||||
plugins: ["expo-build-properties", "expo-localization"],
|
||||
},
|
||||
};
|
||||
export default config;
|
||||
|
@ -13,39 +13,39 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo-google-fonts/poppins": "^0.2.3",
|
||||
"@formatjs/intl-displaynames": "^6.5.0",
|
||||
"@formatjs/intl-locale": "^3.3.2",
|
||||
"@formatjs/intl-displaynames": "^6.6.1",
|
||||
"@formatjs/intl-locale": "^3.4.0",
|
||||
"@gorhom/portal": "^1.0.14",
|
||||
"@kyoo/ui": "workspace:^",
|
||||
"@material-symbols/svg-400": "^0.10.3",
|
||||
"@material-symbols/svg-400": "^0.13.2",
|
||||
"@shopify/flash-list": "1.4.3",
|
||||
"@tanstack/react-query": "^4.32.6",
|
||||
"@tanstack/react-query": "^5.4.3",
|
||||
"array-shuffle": "^3.0.0",
|
||||
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
||||
"expo": "^49.0.6",
|
||||
"expo": "^49.0.16",
|
||||
"expo-build-properties": "~0.8.3",
|
||||
"expo-constants": "~14.4.2",
|
||||
"expo-dev-client": "~2.4.6",
|
||||
"expo-dev-client": "~2.4.11",
|
||||
"expo-font": "~11.4.0",
|
||||
"expo-linear-gradient": "~12.3.0",
|
||||
"expo-linking": "~5.0.2",
|
||||
"expo-localization": "~14.3.0",
|
||||
"expo-navigation-bar": "~2.3.0",
|
||||
"expo-router": "2.0.0",
|
||||
"expo-screen-orientation": "~6.0.5",
|
||||
"expo-router": "2.0.10",
|
||||
"expo-screen-orientation": "~6.0.6",
|
||||
"expo-secure-store": "~12.3.1",
|
||||
"expo-status-bar": "~1.6.0",
|
||||
"expo-updates": "~0.18.11",
|
||||
"i18next": "^23.4.2",
|
||||
"expo-updates": "~0.18.17",
|
||||
"i18next": "^23.6.0",
|
||||
"intl-pluralrules": "^2.0.1",
|
||||
"moti": "^0.26.0",
|
||||
"moti": "^0.26.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-i18next": "^13.0.3",
|
||||
"react-native": "0.72.3",
|
||||
"react-i18next": "^13.3.1",
|
||||
"react-native": "0.72.6",
|
||||
"react-native-blurhash": "^1.1.11",
|
||||
"react-native-fast-image": "^8.6.3",
|
||||
"react-native-mmkv": "^2.10.1",
|
||||
"react-native-mmkv": "^2.10.2",
|
||||
"react-native-reanimated": "~3.3.0",
|
||||
"react-native-safe-area-context": "4.6.3",
|
||||
"react-native-screens": "~3.22.0",
|
||||
@ -55,10 +55,10 @@
|
||||
"yoshiki": "1.2.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.10",
|
||||
"@types/react": "18.2.0",
|
||||
"@babel/core": "^7.23.2",
|
||||
"@types/react": "18.2.34",
|
||||
"react-native-svg-transformer": "^1.1.0",
|
||||
"typescript": "^5.1.6"
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"installConfig": {
|
||||
"hoistingLimits": "workspaces"
|
||||
|
@ -38,6 +38,7 @@ const nextConfig = {
|
||||
{
|
||||
context: suboctopus,
|
||||
from: "*",
|
||||
filter: (filepath) => !filepath.endsWith(".es.js"),
|
||||
to: "static/chunks/",
|
||||
},
|
||||
],
|
||||
|
@ -14,45 +14,45 @@
|
||||
"@kyoo/models": "workspace:^",
|
||||
"@kyoo/primitives": "workspace:^",
|
||||
"@kyoo/ui": "workspace:^",
|
||||
"@material-symbols/svg-400": "^0.10.3",
|
||||
"@radix-ui/react-dropdown-menu": "^2.0.5",
|
||||
"@tanstack/react-query": "^4.32.6",
|
||||
"@material-symbols/svg-400": "^0.13.2",
|
||||
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
||||
"@tanstack/react-query": "^5.4.3",
|
||||
"array-shuffle": "^3.0.0",
|
||||
"expo-linear-gradient": "^12.4.0",
|
||||
"expo-modules-core": "^1.5.9",
|
||||
"hls.js": "^1.4.10",
|
||||
"i18next": "^23.4.2",
|
||||
"jassub": "^1.7.8",
|
||||
"jotai": "^2.3.1",
|
||||
"moti": "^0.26.0",
|
||||
"next": "13.4.19",
|
||||
"next-translate": "^2.5.3",
|
||||
"expo-linear-gradient": "^12.5.0",
|
||||
"expo-modules-core": "^1.5.11",
|
||||
"hls.js": "^1.4.12",
|
||||
"i18next": "^23.6.0",
|
||||
"jassub": "^1.7.10",
|
||||
"jotai": "^2.5.0",
|
||||
"moti": "^0.26.1",
|
||||
"next": "14.0.1",
|
||||
"next-translate": "^2.6.1",
|
||||
"raf": "^3.4.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-i18next": "^13.0.3",
|
||||
"react-native-reanimated": "~3.3.0",
|
||||
"react-native-svg": "13.11.0",
|
||||
"react-i18next": "^13.3.1",
|
||||
"react-native-reanimated": "~3.5.4",
|
||||
"react-native-svg": "13.14.0",
|
||||
"react-native-video": "^6.0.0-alpha.7",
|
||||
"react-native-web": "0.19.7",
|
||||
"react-native-web": "0.19.9",
|
||||
"react-tooltip": "^5.22.0",
|
||||
"solito": "^4.0.1",
|
||||
"solito": "^4.1.3",
|
||||
"srt-webvtt": "^2.0.0",
|
||||
"superjson": "^1.13.1",
|
||||
"sweetalert2": "^11.7.20",
|
||||
"superjson": "^2.2.0",
|
||||
"sweetalert2": "^11.9.0",
|
||||
"yoshiki": "1.2.12",
|
||||
"zod": "^3.21.4"
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@svgr/webpack": "^8.0.1",
|
||||
"@types/node": "20.4.8",
|
||||
"@types/react": "18.2.0",
|
||||
"@types/react-dom": "18.2.0",
|
||||
"@svgr/webpack": "^8.1.0",
|
||||
"@types/node": "20.8.10",
|
||||
"@types/react": "18.2.34",
|
||||
"@types/react-dom": "18.2.14",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint-config-next": "13.4.13",
|
||||
"react-native": "0.72.3",
|
||||
"typescript": "^5.1.6",
|
||||
"webpack": "^5.88.2"
|
||||
"eslint": "^8.53.0",
|
||||
"eslint-config-next": "14.0.1",
|
||||
"react-native": "0.72.6",
|
||||
"typescript": "^5.2.2",
|
||||
"webpack": "^5.89.0"
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
import "../polyfill";
|
||||
|
||||
import { Hydrate, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { HydrationBoundary, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { HiddenIfNoJs, SkeletonCss, ThemeSelector } from "@kyoo/primitives";
|
||||
import { WebTooltip } from "@kyoo/primitives/src/tooltip.web";
|
||||
import {
|
||||
@ -124,7 +124,7 @@ const App = ({ Component, pageProps }: AppProps) => {
|
||||
<meta name="description" content="A portable and vast media library solution." />
|
||||
</Head>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Hydrate state={queryState}>
|
||||
<HydrationBoundary state={queryState}>
|
||||
<ThemeSelector theme="auto" font={{ normal: "inherit" }}>
|
||||
<GlobalCssTheme />
|
||||
<Layout
|
||||
@ -142,7 +142,7 @@ const App = ({ Component, pageProps }: AppProps) => {
|
||||
/>
|
||||
<Tooltip id="tooltip" positionStrategy={"fixed"} />
|
||||
</ThemeSelector>
|
||||
</Hydrate>
|
||||
</HydrationBoundary>
|
||||
</QueryClientProvider>
|
||||
</>
|
||||
</YoshikiDebug>
|
||||
|
@ -26,12 +26,12 @@
|
||||
"trailingComma": "all"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "8.46.0",
|
||||
"eslint-config-next": "13.4.13",
|
||||
"eslint": "8.53.0",
|
||||
"eslint-config-next": "14.0.1",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-header": "^3.1.1",
|
||||
"prettier": "^3.0.1",
|
||||
"typescript": "5.1.6"
|
||||
"prettier": "^3.0.3",
|
||||
"typescript": "5.2.2"
|
||||
},
|
||||
"packageManager": "yarn@3.2.4"
|
||||
}
|
||||
|
@ -4,9 +4,9 @@
|
||||
"types": "src/index.ts",
|
||||
"packageManager": "yarn@3.2.4",
|
||||
"devDependencies": {
|
||||
"@types/react": "18.2.0",
|
||||
"react-native-mmkv": "^2.10.1",
|
||||
"typescript": "^5.1.6"
|
||||
"@types/react": "18.2.34",
|
||||
"react-native-mmkv": "^2.10.2",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@tanstack/react-query": "*",
|
||||
@ -19,6 +19,6 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^3.21.4"
|
||||
"zod": "^3.22.4"
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,8 @@ import {
|
||||
dehydrate,
|
||||
QueryClient,
|
||||
QueryFunctionContext,
|
||||
QueryKey,
|
||||
useInfiniteQuery,
|
||||
UseInfiniteQueryOptions,
|
||||
useQuery,
|
||||
} from "@tanstack/react-query";
|
||||
import { z } from "zod";
|
||||
@ -70,9 +70,9 @@ export const queryFn = async <Data,>(
|
||||
const path = [url]
|
||||
.concat(
|
||||
"path" in context
|
||||
? context.path.filter((x) => x)
|
||||
: context.pageParam
|
||||
? [context.pageParam]
|
||||
? (context.path.filter((x) => x) as string[])
|
||||
: "pageParam" in context
|
||||
? [context.pageParam as string]
|
||||
: (context.queryKey.filter((x, i) => x && i) as string[]),
|
||||
)
|
||||
.join("/")
|
||||
@ -197,17 +197,14 @@ export const useFetch = <Data,>(query: QueryIdentifier<Data>) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const useInfiniteFetch = <Data, Ret>(
|
||||
query: QueryIdentifier<Data, Ret>,
|
||||
options?: Partial<UseInfiniteQueryOptions<Data[], KyooErrors>>,
|
||||
) => {
|
||||
export const useInfiniteFetch = <Data, Ret>(query: QueryIdentifier<Data, Ret>) => {
|
||||
if (query.getNext) {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
const ret = useInfiniteQuery<Data[], KyooErrors>({
|
||||
queryKey: toQueryKey(query),
|
||||
queryFn: (ctx) => queryFn(ctx, z.array(query.parser)),
|
||||
getNextPageParam: query.getNext,
|
||||
...options,
|
||||
initialPageParam: undefined,
|
||||
});
|
||||
return { ...ret, items: ret.data?.pages.flatMap((x) => x) as unknown as Ret[] | undefined };
|
||||
}
|
||||
@ -216,6 +213,7 @@ export const useInfiniteFetch = <Data, Ret>(
|
||||
queryKey: toQueryKey(query),
|
||||
queryFn: (ctx) => queryFn(ctx, Paged(query.parser)),
|
||||
getNextPageParam: (page: Page<Data>) => page?.next || undefined,
|
||||
initialPageParam: undefined,
|
||||
});
|
||||
const items = ret.data?.pages.flatMap((x) => x.items);
|
||||
return {
|
||||
@ -239,6 +237,7 @@ export const fetchQuery = async (queries: QueryIdentifier[], authToken?: string
|
||||
return client.prefetchInfiniteQuery({
|
||||
queryKey: toQueryKey(query),
|
||||
queryFn: (ctx) => queryFn(ctx, Paged(query.parser), authToken),
|
||||
initialPageParam: undefined,
|
||||
});
|
||||
} else {
|
||||
return client.prefetchQuery({
|
||||
|
@ -5,8 +5,8 @@
|
||||
"packageManager": "yarn@3.2.4",
|
||||
"devDependencies": {
|
||||
"@gorhom/portal": "^1.0.14",
|
||||
"@types/react": "18.2.0",
|
||||
"typescript": "^5.1.6"
|
||||
"@types/react": "18.2.34",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@gorhom/portal": "*",
|
||||
@ -45,8 +45,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/html-elements": "^0.5.1",
|
||||
"@tanstack/react-query": "^4.32.6",
|
||||
"solito": "^4.0.1"
|
||||
"@tanstack/react-query": "^5.4.3",
|
||||
"solito": "^4.1.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"blurhash": "^2.0.5",
|
||||
|
@ -8,10 +8,10 @@
|
||||
"@kyoo/primitives": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@shopify/flash-list": "^1.5.0",
|
||||
"@types/react": "18.2.0",
|
||||
"@shopify/flash-list": "^1.6.2",
|
||||
"@types/react": "18.2.34",
|
||||
"react-native-uuid": "^2.0.1",
|
||||
"typescript": "^5.1.6"
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@material-symbols/svg-400": "*",
|
||||
|
@ -101,8 +101,6 @@ export const InfiniteFetch = <Data, Props, _>({
|
||||
} & Omit<ComponentProps<typeof InfiniteFetchList<Data, Props, _>>, "query">) => {
|
||||
if (!query.infinite) console.warn("A non infinite query was passed to an InfiniteFetch.");
|
||||
|
||||
const ret = useInfiniteFetch(query, {
|
||||
useErrorBoundary: false,
|
||||
});
|
||||
const ret = useInfiniteFetch(query);
|
||||
return <InfiniteFetchList query={ret} {...props} />;
|
||||
};
|
||||
|
@ -206,8 +206,6 @@ export const InfiniteFetch = <Data, Props, _>({
|
||||
} & Omit<ComponentProps<typeof InfiniteFetchList<Data, Props, _>>, "query">) => {
|
||||
if (!query.infinite) console.warn("A non infinite query was passed to an InfiniteFetch.");
|
||||
|
||||
const ret = useInfiniteFetch(query, {
|
||||
useErrorBoundary: false,
|
||||
});
|
||||
const ret = useInfiniteFetch(query);
|
||||
return <InfiniteFetchList query={ret} {...props} />;
|
||||
};
|
||||
|
@ -77,7 +77,7 @@ export const LoginPage: QueryPage = () => {
|
||||
const { error } = await loginFunc("login", { username, password }, cleanApiUrl(apiUrl));
|
||||
setError(error);
|
||||
if (error) return;
|
||||
queryClient.invalidateQueries(["auth", "me"]);
|
||||
queryClient.invalidateQueries({ queryKey: ["auth", "me"] });
|
||||
router.replace("/", undefined, {
|
||||
experimental: { nativeBehavior: "stack-replace", isNestedNavigator: false },
|
||||
});
|
||||
|
@ -92,7 +92,7 @@ export const RegisterPage: QueryPage = () => {
|
||||
);
|
||||
setError(error);
|
||||
if (error) return;
|
||||
queryClient.invalidateQueries(["auth", "me"]);
|
||||
queryClient.invalidateQueries({ queryKey: ["auth", "me"] });
|
||||
router.replace("/", undefined, {
|
||||
experimental: { nativeBehavior: "stack-replace", isNestedNavigator: false },
|
||||
});
|
||||
|
@ -139,7 +139,7 @@ export const NavbarProfile = () => {
|
||||
icon={Logout}
|
||||
onSelect={() => {
|
||||
logout();
|
||||
queryClient.invalidateQueries(["auth", "me"]);
|
||||
queryClient.invalidateQueries({ queryKey: ["auth", "me"] });
|
||||
}}
|
||||
/>
|
||||
<Menu.Item
|
||||
@ -154,7 +154,7 @@ export const NavbarProfile = () => {
|
||||
text: t("misc.delete"),
|
||||
onPress: async () => {
|
||||
await deleteAccount();
|
||||
queryClient.invalidateQueries(["auth", "me"]);
|
||||
queryClient.invalidateQueries({ queryKey: ["auth", "me"] });
|
||||
},
|
||||
style: "destructive",
|
||||
},
|
||||
|
@ -59,6 +59,7 @@ export const fullscreenAtom = atom(
|
||||
navigationUI: "hide",
|
||||
});
|
||||
set(privateFullscreen, true);
|
||||
// @ts-expect-error Firefox does not support this so ts complains
|
||||
await screen.orientation.lock("landscape");
|
||||
} else {
|
||||
await document.exitFullscreen();
|
||||
|
2328
front/yarn.lock
2328
front/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user