diff --git a/.buildkite/linux/docker/Dockerfile.amd64 b/.buildkite/linux/docker/Dockerfile.amd64 index 0223bb2b6..7c99c39e0 100644 --- a/.buildkite/linux/docker/Dockerfile.amd64 +++ b/.buildkite/linux/docker/Dockerfile.amd64 @@ -1,4 +1,4 @@ -FROM debian:10-slim +FROM debian:11-slim ARG DEBIAN_FRONTEND="noninteractive" @@ -53,13 +53,6 @@ RUN mkdir -p /etc/buildkite-agent/hooks && chown -R user /etc/buildkite-agent COPY buildkite.cfg /etc/buildkite-agent/buildkite-agent.cfg COPY environment /etc/buildkite-agent/hooks/environment -# Available in Debian 11 as ninja-build, but we're building with Debian 10 -RUN curl -LO https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip \ - && unzip ninja-linux.zip \ - && chmod +x ninja \ - && mv ninja /usr/bin \ - && rm ninja-linux.zip - RUN mkdir /state/rust && chown user /state/rust USER user diff --git a/.dprint.json b/.dprint.json index 65f451981..b73c6db10 100644 --- a/.dprint.json +++ b/.dprint.json @@ -31,14 +31,15 @@ "target", ".mypy_cache", "extra", - "ts/.svelte-kit" + "ts/.svelte-kit", + "ts/vite.config.ts.timestamp*" ], "plugins": [ - "https://plugins.dprint.dev/typescript-0.85.1.wasm", - "https://plugins.dprint.dev/json-0.17.4.wasm", - "https://plugins.dprint.dev/markdown-0.15.3.wasm", - "https://plugins.dprint.dev/toml-0.5.4.wasm", - "https://plugins.dprint.dev/prettier-0.13.0.json@dc5d12b7c1bf1a4683eff317c2c87350e75a5a3dfcc127f3d5628931bfb534b1", - "https://plugins.dprint.dev/disrupted/css-0.2.2.wasm" + "https://plugins.dprint.dev/typescript-0.91.6.wasm", + "https://plugins.dprint.dev/json-0.19.3.wasm", + "https://plugins.dprint.dev/markdown-0.17.6.wasm", + "https://plugins.dprint.dev/toml-0.6.2.wasm", + "https://plugins.dprint.dev/prettier-0.46.1.json@e5bd083088a8dfc6e5ce2d3c9bee81489b065bd5345ef55b59f5d96627928b7a", + "https://plugins.dprint.dev/disrupted/css-0.2.3.wasm" ] } diff --git a/Cargo.toml b/Cargo.toml index 081dea700..8486f1e03 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,27 +1,27 @@ [workspace.package] version = "0.0.0" authors = ["Ankitects Pty Ltd and contributors "] +edition = "2021" license = "AGPL-3.0-or-later" rust-version = "1.65" -edition = "2021" [workspace] members = [ - "rslib", - "rslib/i18n", - "rslib/linkchecker", - "rslib/proto", - "rslib/io", - "rslib/process", - "rslib/sync", - "pylib/rsbridge", "build/configure", "build/ninja_gen", "build/runner", "ftl", - "tools/minilints", - "qt/bundle/win", + "pylib/rsbridge", "qt/bundle/mac", + "qt/bundle/win", + "rslib", + "rslib/i18n", + "rslib/io", + "rslib/linkchecker", + "rslib/process", + "rslib/proto", + "rslib/sync", + "tools/minilints", ] exclude = ["qt/bundle"] resolver = "2" @@ -45,8 +45,8 @@ version = "1.1.5" anki = { path = "rslib" } anki_i18n = { path = "rslib/i18n" } anki_io = { path = "rslib/io" } -anki_proto = { path = "rslib/proto" } anki_process = { path = "rslib/process" } +anki_proto = { path = "rslib/proto" } anki_proto_gen = { path = "rslib/proto_gen" } ninja_gen = { "path" = "build/ninja_gen" } @@ -74,6 +74,9 @@ criterion = { version = "0.5.1" } csv = "1.3.0" data-encoding = "2.6.0" difflib = "0.4.0" +dirs = "5.0.1" +dunce = "1.0.4" +envy = "0.4.2" flate2 = "1.0.30" fluent = "0.16.1" fluent-bundle = "0.15.3" @@ -145,9 +148,6 @@ wiremock = "0.5.22" xz2 = "0.1.7" zip = { version = "0.6.6", default-features = false, features = ["deflate", "time"] } zstd = { version = "0.13.2", features = ["zstdmt"] } -envy = "0.4.2" -dirs = "5.0.1" -dunce = "1.0.4" # Apply mild optimizations to our dependencies in dev mode, which among other things # improves sha2 performance by about 21x. Opt 1 chosen due to diff --git a/package.json b/package.json index 930481436..dcc6b3f48 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "caniuse-lite": "^1.0.30001431", "cross-env": "^7.0.2", "diff": "^5.0.0", - "dprint": "=0.35.3", + "dprint": "^0.47.2", "esbuild": "^0.18.10", "esbuild-sass-plugin": "^2", "esbuild-svelte": "^0.7.4", diff --git a/ts/editor/CollapseBadge.svelte b/ts/editor/CollapseBadge.svelte index f2b434afc..d004116e5 100644 --- a/ts/editor/CollapseBadge.svelte +++ b/ts/editor/CollapseBadge.svelte @@ -18,7 +18,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html .collapse-badge { display: inline-block; opacity: 0.4; - transition: opacity var(--transition) ease-in-out, + transition: + opacity var(--transition) ease-in-out, transform var(--transition) ease-in; :global(.collapse-label:hover) & { opacity: 1; diff --git a/ts/lib/components/Col.svelte b/ts/lib/components/Col.svelte index 9123c5631..539c70004 100644 --- a/ts/lib/components/Col.svelte +++ b/ts/lib/components/Col.svelte @@ -48,8 +48,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html "md": $calc, "lg": $calc, "xl": $calc, - "xxl": $calc - ) + "xxl": $calc, + ), ) ); diff --git a/ts/lib/components/ScrollArea.svelte b/ts/lib/components/ScrollArea.svelte index 5a2eab164..5667c8c5d 100644 --- a/ts/lib/components/ScrollArea.svelte +++ b/ts/lib/components/ScrollArea.svelte @@ -62,10 +62,18 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html - {#if scrollStates.top}
{/if} - {#if scrollStates.bottom}
{/if} - {#if scrollStates.left}
{/if} - {#if scrollStates.right}
{/if} + {#if scrollStates.top} +
+ {/if} + {#if scrollStates.bottom} +
+ {/if} + {#if scrollStates.left} +
+ {/if} + {#if scrollStates.right} +
+ {/if}
diff --git a/ts/lib/sass/base.scss b/ts/lib/sass/base.scss index 90a33b8d3..c997eb20a 100644 --- a/ts/lib/sass/base.scss +++ b/ts/lib/sass/base.scss @@ -56,7 +56,8 @@ body { button:not(.btn, .btn-close) { /* override transition for instant hover response */ - transition: color var(--transition) ease-in-out, + transition: + color var(--transition) ease-in-out, box-shadow var(--transition) ease-in-out !important; border-radius: prop(border-radius); @include button.base; diff --git a/ts/routes/deck-options/DailyLimits.svelte b/ts/routes/deck-options/DailyLimits.svelte index ae5412f71..d3e5ce74c 100644 --- a/ts/routes/deck-options/DailyLimits.svelte +++ b/ts/routes/deck-options/DailyLimits.svelte @@ -86,7 +86,7 @@ ), new ValueTab( tr.deckConfigTodayOnly(), - $limits.newTodayActive ? $limits.newToday ?? null : null, + $limits.newTodayActive ? ($limits.newToday ?? null) : null, (value) => ($limits.newToday = value ?? undefined), null, $limits.newToday ?? null, @@ -110,7 +110,7 @@ ), new ValueTab( tr.deckConfigTodayOnly(), - $limits.reviewTodayActive ? $limits.reviewToday ?? null : null, + $limits.reviewTodayActive ? ($limits.reviewToday ?? null) : null, (value) => ($limits.reviewToday = value ?? undefined), null, $limits.reviewToday ?? null, diff --git a/ts/routes/graphs/GraphsPage.svelte b/ts/routes/graphs/GraphsPage.svelte index 172681b7a..8a20ac28d 100644 --- a/ts/routes/graphs/GraphsPage.svelte +++ b/ts/routes/graphs/GraphsPage.svelte @@ -18,7 +18,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html const search = writable(initialSearch); const days = writable(initialDays); - export let graphs: typeof SvelteComponent[]; + export let graphs: (typeof SvelteComponent)[]; /** See RangeBox */ export let controller: typeof SvelteComponent | null = RangeBox; diff --git a/yarn.lock b/yarn.lock index 4274d0d3c..723276d5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,6 +32,46 @@ "@typescript/vfs" "^1.4.0" typescript "4.5.2" +"@dprint/darwin-arm64@0.47.2": + version "0.47.2" + resolved "https://registry.yarnpkg.com/@dprint/darwin-arm64/-/darwin-arm64-0.47.2.tgz#dea8bfa146159e565e510266a2f1d7ebd2676090" + integrity sha512-mVPFBJsXxGDKHHCAY8wbqOyS4028g1bN15H9tivCnPAjwaZhkUimZHXWejXADjhGn+Xm2SlakugY9PY/68pH3Q== + +"@dprint/darwin-x64@0.47.2": + version "0.47.2" + resolved "https://registry.yarnpkg.com/@dprint/darwin-x64/-/darwin-x64-0.47.2.tgz#9e03a7ebb1a38ffcd46fbade96e98e8326d4c77c" + integrity sha512-T7wzlc+rBV+6BRRiBjoqoy5Hj4TR2Nv2p2s9+ycyPGs10Kj/JXOWD8dnEHeBgUr2r4qe/ZdcxmsFQ5Hf2n0WuA== + +"@dprint/linux-arm64-glibc@0.47.2": + version "0.47.2" + resolved "https://registry.yarnpkg.com/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.47.2.tgz#7d6c70b1c097d8dd8756cb4cdff40afdde4d42f3" + integrity sha512-B0m1vT5LdVtrNOVdkqpLPrSxuCD+l5bTIgRzPaDoIB1ChWQkler9IlX8C+RStpujjPj6SYvwo5vTzjQSvRdQkA== + +"@dprint/linux-arm64-musl@0.47.2": + version "0.47.2" + resolved "https://registry.yarnpkg.com/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.47.2.tgz#76158f3400848d6d00023559c7b1fbf1cf1198c9" + integrity sha512-zID6wZZqpg2/Q2Us+ERQkbhLwlW3p3xaeEr00MPf49bpydmEjMiPuSjWPkNv+slQSIyIsVovOxF4lbNZjsdtvw== + +"@dprint/linux-x64-glibc@0.47.2": + version "0.47.2" + resolved "https://registry.yarnpkg.com/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.47.2.tgz#1c30261e7a085bcbd6d673c7ac4064a4e50c1a02" + integrity sha512-rB3WXMdINnRd33DItIp7mObS7dzHW90ZzeJSsoKJLPp+Z7wXjjb27UUowfqVI4baa/1pd7sdbX54DPohMtfu/A== + +"@dprint/linux-x64-musl@0.47.2": + version "0.47.2" + resolved "https://registry.yarnpkg.com/@dprint/linux-x64-musl/-/linux-x64-musl-0.47.2.tgz#27d50baca893bbaa8d5ff6448621a1d68d5eba1b" + integrity sha512-E0+TNbzYdTXJ/jCVjUctVxkda/faw++aDQLfyWGcmdMJnbM7NZz+W4fUpDXzMPsjy+zTWxXcPK7/q2DZz2gnbg== + +"@dprint/win32-arm64@0.47.2": + version "0.47.2" + resolved "https://registry.yarnpkg.com/@dprint/win32-arm64/-/win32-arm64-0.47.2.tgz#eb7eb2b4acd17d8221ae85c835c80aa1b6b3110c" + integrity sha512-K1EieTCFjfOCmyIhw9zFSduE6qVCNHEveupqZEfbSkVGw5T9MJQ1I9+n7MDb3RIDYEUk0enJ58/w82q8oDKCyA== + +"@dprint/win32-x64@0.47.2": + version "0.47.2" + resolved "https://registry.yarnpkg.com/@dprint/win32-x64/-/win32-x64-0.47.2.tgz#117c4b22de19dd11991851f27424ccc332d2266a" + integrity sha512-LhizWr8VrhHvq4ump8HwOERyFmdLiE8C6A42QSntGXzKdaa2nEOq20x/o56ZIiDcesiV+1TmosMKimPcOZHa+Q== + "@esbuild/aix-ppc64@0.19.12": version "0.19.12" resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz#d1bc06aedb6936b3b6d313bf809a5a40387d2b7f" @@ -1336,11 +1376,6 @@ buffer-crc32@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-1.0.0.tgz#a10993b9055081d55304bd9feb4a072de179f405" integrity sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w== -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -1981,13 +2016,19 @@ domutils@^3.0.1: domelementtype "^2.3.0" domhandler "^5.0.3" -dprint@=0.35.3: - version "0.35.3" - resolved "https://registry.yarnpkg.com/dprint/-/dprint-0.35.3.tgz#be89ff5e76b46c21d5db84015ee9232e82e9bc14" - integrity sha512-BWFdr2Ury2dtqyjaTI9P5vCpb1yn5laLfO3Yo5egrrDlK2A2mv6CSpe/oK2cuOPESMY1JT2dubMv2dPDiJfMnA== - dependencies: - https-proxy-agent "=5.0.1" - yauzl "=2.10.0" +dprint@^0.47.2: + version "0.47.2" + resolved "https://registry.yarnpkg.com/dprint/-/dprint-0.47.2.tgz#f3aca518324b9948066652c87e4c4a3bc509869d" + integrity sha512-geUcVIIrmLaY+YtuOl4gD7J/QCjsXZa5gUqre9sO6cgH0X/Fa9heBN3l/AWVII6rKPw45ATuCSDWz1pyO+HkPQ== + optionalDependencies: + "@dprint/darwin-arm64" "0.47.2" + "@dprint/darwin-x64" "0.47.2" + "@dprint/linux-arm64-glibc" "0.47.2" + "@dprint/linux-arm64-musl" "0.47.2" + "@dprint/linux-x64-glibc" "0.47.2" + "@dprint/linux-x64-musl" "0.47.2" + "@dprint/win32-arm64" "0.47.2" + "@dprint/win32-x64" "0.47.2" eastasianwidth@^0.2.0: version "0.2.0" @@ -2463,13 +2504,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== - dependencies: - pend "~1.2.0" - file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -2758,7 +2792,7 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" -https-proxy-agent@=5.0.1, https-proxy-agent@^5.0.0: +https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== @@ -3559,11 +3593,6 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== - periscopic@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/periscopic/-/periscopic-3.1.0.tgz#7e9037bf51c5855bd33b48928828db4afa79d97a" @@ -4634,14 +4663,6 @@ yaml@^1.10.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yauzl@=2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"