diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 12f1bf556..83aa1745d 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,7 +4,7 @@ inputs: save-cache: description: Whether to save the Rust cache required: false - default: "false" + default: 'false' runs: using: 'composite' steps: diff --git a/.github/scripts/setup-system.sh b/.github/scripts/setup-system.sh index 4bf080453..c649be4c2 100755 --- a/.github/scripts/setup-system.sh +++ b/.github/scripts/setup-system.sh @@ -121,7 +121,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then # Protobuf compiler - https://github.com/archlinux/svntogit-packages/blob/packages/protobuf/trunk/PKGBUILD provides `libprotoc` ARCH_LIBP2P_DEPS="protobuf" - sudo pacman -Syu + sudo pacman -Sy sudo pacman -S --needed $ARCH_TAURI_DEPS $ARCH_FFMPEG_DEPS $ARCH_BINDGEN_DEPS $ARCH_LIBP2P_DEPS elif command -v dnf >/dev/null; then echo "Detected dnf!" diff --git a/.github/workflows/cache-factory.yaml b/.github/workflows/cache-factory.yaml index 01f503b89..2247e1b53 100644 --- a/.github/workflows/cache-factory.yaml +++ b/.github/workflows/cache-factory.yaml @@ -25,7 +25,7 @@ jobs: - uses: ./.github/actions/setup with: - save-cache: "true" + save-cache: 'true' - name: Compile workspace with stable Rust run: cargo test --workspace --all-features --no-run diff --git a/.npmrc b/.npmrc index 89f147e1d..98b5bd549 100644 --- a/.npmrc +++ b/.npmrc @@ -5,3 +5,4 @@ prefer-symlinked-executables=false ; necessary for metro + mobile strict-peer-dependencies=false node-linker=hoisted +auto-install-peers=true diff --git a/apps/desktop/vite.config.ts b/apps/desktop/vite.config.ts index 6dcb6cae1..b984a7306 100644 --- a/apps/desktop/vite.config.ts +++ b/apps/desktop/vite.config.ts @@ -17,7 +17,7 @@ export default defineConfig({ svg({ svgrOptions: { icon: true } }), createHtmlPlugin({ minify: true - }), + }) ], css: { modules: { diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index afa1594a5..09555334e 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -22,7 +22,7 @@ export default defineConfig({ visualizer({ gzipSize: true, brotliSize: true - }), + }) ], css: { modules: { diff --git a/interface/app/$libraryId/index.tsx b/interface/app/$libraryId/index.tsx index e9987663a..d24676b49 100644 --- a/interface/app/$libraryId/index.tsx +++ b/interface/app/$libraryId/index.tsx @@ -3,17 +3,17 @@ import settingsRoutes from './settings'; export default [ { - lazy: () => import("./PageLayout"), + lazy: () => import('./PageLayout'), children: [ { path: 'overview', lazy: () => import('./overview') }, - { path: 'people', lazy: () => import('./people')}, + { path: 'people', lazy: () => import('./people') }, { path: 'media', lazy: () => import('./media') }, { path: 'spaces', lazy: () => import('./spaces') }, { path: 'debug', lazy: () => import('./debug') }, - { path: 'spacedrop', lazy: () => import('./spacedrop') }, + { path: 'spacedrop', lazy: () => import('./spacedrop') } ] }, { path: 'location/:id', lazy: () => import('./location/$id') }, diff --git a/interface/app/$libraryId/settings/client/index.ts b/interface/app/$libraryId/settings/client/index.ts index 88a56014e..abd764770 100644 --- a/interface/app/$libraryId/settings/client/index.ts +++ b/interface/app/$libraryId/settings/client/index.ts @@ -1,9 +1,9 @@ -import { RouteObject } from "react-router"; +import { RouteObject } from 'react-router'; export default [ { path: 'general', lazy: () => import('./general') }, { path: 'appearance', lazy: () => import('./appearance') }, { path: 'keybindings', lazy: () => import('./keybindings') }, { path: 'extensions', lazy: () => import('./extensions') }, - { path: 'privacy', lazy: () => import('./privacy') }, -] satisfies RouteObject[] + { path: 'privacy', lazy: () => import('./privacy') } +] satisfies RouteObject[]; diff --git a/interface/app/$libraryId/settings/node/index.tsx b/interface/app/$libraryId/settings/node/index.tsx index 3c527ddd8..32bf3ce61 100644 --- a/interface/app/$libraryId/settings/node/index.tsx +++ b/interface/app/$libraryId/settings/node/index.tsx @@ -1,6 +1,6 @@ -import { RouteObject } from "react-router"; +import { RouteObject } from 'react-router'; export default [ { path: 'p2p', lazy: () => import('./p2p') }, - { path: 'libraries', lazy: () => import('./libraries') }, -] satisfies RouteObject[] + { path: 'libraries', lazy: () => import('./libraries') } +] satisfies RouteObject[]; diff --git a/interface/app/$libraryId/settings/resources/index.tsx b/interface/app/$libraryId/settings/resources/index.tsx index 8e1e90455..ea1e6da83 100644 --- a/interface/app/$libraryId/settings/resources/index.tsx +++ b/interface/app/$libraryId/settings/resources/index.tsx @@ -1,8 +1,8 @@ -import { RouteObject } from "react-router"; +import { RouteObject } from 'react-router'; export default [ { path: 'about', lazy: () => import('./about') }, { path: 'changelog', lazy: () => import('./changelog') }, { path: 'dependencies', lazy: () => import('./dependencies') }, - { path: 'support', lazy: () => import('./support') }, -] satisfies RouteObject[] + { path: 'support', lazy: () => import('./support') } +] satisfies RouteObject[]; diff --git a/interface/app/index.tsx b/interface/app/index.tsx index 8754a56fc..03b36590a 100644 --- a/interface/app/index.tsx +++ b/interface/app/index.tsx @@ -1,9 +1,9 @@ import { Navigate, Outlet, RouteObject } from 'react-router-dom'; import { currentLibraryCache, useCachedLibraries, useInvalidateQuery } from '@sd/client'; +import { useKeybindHandler } from '~/hooks/useKeyboardHandler'; import libraryRoutes from './$libraryId'; import onboardingRoutes from './onboarding'; import './style.scss'; -import { useKeybindHandler } from '~/hooks/useKeyboardHandler'; const Index = () => { const libraries = useCachedLibraries(); @@ -19,33 +19,35 @@ const Index = () => { return ; }; - const Wrapper = () => { useKeybindHandler(); useInvalidateQuery(); - return -} + return ; +}; // NOTE: all route `Layout`s below should contain // the `usePlausiblePageViewMonitor` hook, as early as possible (ideally within the layout itself). // the hook should only be included if there's a valid `ClientContext` (so not onboarding) -export const routes = [{ - element: , - children: [ +export const routes = [ { - index: true, - element: - }, - { - path: 'onboarding', - lazy: () => import('./onboarding/Layout'), - children: onboardingRoutes - }, - { - path: ':libraryId', - lazy: () => import('./$libraryId/Layout'), - children: libraryRoutes, - }] -}] satisfies RouteObject[]; + element: , + children: [ + { + index: true, + element: + }, + { + path: 'onboarding', + lazy: () => import('./onboarding/Layout'), + children: onboardingRoutes + }, + { + path: ':libraryId', + lazy: () => import('./$libraryId/Layout'), + children: libraryRoutes + } + ] + } +] satisfies RouteObject[]; diff --git a/interface/package.json b/interface/package.json index 6e8879a45..5006ecb9f 100644 --- a/interface/package.json +++ b/interface/package.json @@ -50,7 +50,7 @@ "react-json-view": "^1.21.3", "react-loading-skeleton": "^3.1.0", "react-qr-code": "^2.0.11", - "react-responsive": "^9.0.2", + "react-responsive": "^9.0.2", "react-router": "6.9.0", "react-router-dom": "6.9.0", "rooks": "^5.14.0", diff --git a/package.json b/package.json index 4ff07ecdc..fd769d373 100644 --- a/package.json +++ b/package.json @@ -33,11 +33,11 @@ "@babel/plugin-syntax-import-assertions": "^7.20.0", "@cspell/dict-rust": "^2.0.1", "@cspell/dict-typescript": "^2.0.2", - "@trivago/prettier-plugin-sort-imports": "^3.4.0", + "@trivago/prettier-plugin-sort-imports": "^4.1.1", "cspell": "^6.12.0", "markdown-link-check": "^3.10.3", - "prettier": "^2.8.3", - "prettier-plugin-tailwindcss": "^0.2.2", + "prettier": "^2.8.4", + "prettier-plugin-tailwindcss": "^0.2.5", "rimraf": "^4.1.1", "turbo": "^1.5.5", "turbo-ignore": "^0.3.0", diff --git a/packages/client/src/utils/keys.ts b/packages/client/src/utils/keys.ts index 644032727..fa2a04af0 100644 --- a/packages/client/src/utils/keys.ts +++ b/packages/client/src/utils/keys.ts @@ -2,13 +2,13 @@ import { z } from 'zod'; import { HashingAlgorithm } from '../core'; export const hashingAlgoSlugSchema = z.union([ - z.literal("Argon2id-s"), - z.literal("Argon2id-h"), - z.literal("Argon2id-p"), - z.literal("BalloonBlake3-s"), - z.literal("BalloonBlake3-h"), - z.literal("BalloonBlake3-p"), -]) + z.literal('Argon2id-s'), + z.literal('Argon2id-h'), + z.literal('Argon2id-p'), + z.literal('BalloonBlake3-s'), + z.literal('BalloonBlake3-h'), + z.literal('BalloonBlake3-p') +]); export type HashingAlgoSlug = z.infer; @@ -21,7 +21,7 @@ export const HASHING_ALGOS = { 'BalloonBlake3-p': { name: 'BalloonBlake3', params: 'Paranoid' } } as const satisfies Record; -export const slugFromHashingAlgo = (hashingAlgorithm: HashingAlgorithm): HashingAlgoSlug => +export const slugFromHashingAlgo = (hashingAlgorithm: HashingAlgorithm): HashingAlgoSlug => Object.entries(HASHING_ALGOS).find( ([_, hashAlg]) => hashAlg.name === hashingAlgorithm.name && hashAlg.params === hashingAlgorithm.params diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3e1f534f0..1a2c85208 100644 Binary files a/pnpm-lock.yaml and b/pnpm-lock.yaml differ