From bbf8683004a2ee7f3253707bf191130473e2bdcb Mon Sep 17 00:00:00 2001 From: Bruno Bernardino Date: Sat, 30 Nov 2024 08:13:22 +0000 Subject: [PATCH] Update Deno to 2.1 LTS! --- .do/deploy.template.yaml | 4 ++-- .dvmrc | 2 +- .github/workflows/build-docker-image.yml | 4 ++-- Dockerfile | 2 +- deno.json | 8 ++++---- docker-compose.yml | 2 +- lib/data/files.ts | 4 ++-- lib/feed.ts | 2 +- routes/login.tsx | 2 +- routes/settings.tsx | 2 +- routes/signup.tsx | 2 +- static/styles.css | 13 ++++++++----- 12 files changed, 25 insertions(+), 22 deletions(-) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index 59cff3f..2b9d2fa 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -35,9 +35,9 @@ spec: value: ${db.PORT} - key: POSTGRESQL_CAFILE scope: RUN_AND_BUILD_TIME - value: "" + value: '' databases: - name: db engine: PG production: false - version: "15" + version: '15' diff --git a/.dvmrc b/.dvmrc index a82727c..eca07e4 100644 --- a/.dvmrc +++ b/.dvmrc @@ -1 +1 @@ -1.46.3 +2.1.2 diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 537faab..e113a24 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -1,10 +1,10 @@ -name: "Build Docker Image" +name: 'Build Docker Image' on: workflow_dispatch: push: branches: - - "main" + - 'main' release: types: [published] diff --git a/Dockerfile b/Dockerfile index a00f264..584be99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM denoland/deno:ubuntu-1.46.3 +FROM denoland/deno:ubuntu-2.1.2 EXPOSE 8000 diff --git a/deno.json b/deno.json index 2da25f6..afcdce0 100644 --- a/deno.json +++ b/deno.json @@ -19,7 +19,7 @@ }, "exclude": ["./_fresh/*", "./node_modules/*", "**/_fresh/*"], "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" }, - "nodeModulesDir": true, + "nodeModulesDir": "auto", "imports": { "/": "./", "./": "./", @@ -31,9 +31,9 @@ "preact/": "https://esm.sh/preact@10.23.2/", "@preact/signals": "https://esm.sh/*@preact/signals@1.3.0", "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.8.0", - "tailwindcss": "npm:tailwindcss@3.4.9", - "tailwindcss/": "npm:/tailwindcss@3.4.9/", - "tailwindcss/plugin": "npm:/tailwindcss@3.4.9/plugin.js", + "tailwindcss": "npm:tailwindcss@3.4.15", + "tailwindcss/": "npm:/tailwindcss@3.4.15/", + "tailwindcss/plugin": "npm:/tailwindcss@3.4.15/plugin.js", "std/": "https://deno.land/std@0.224.0/", "$std/": "https://deno.land/std@0.224.0/" } diff --git a/docker-compose.yml b/docker-compose.yml index c675a0e..6543a88 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: ports: - 127.0.0.1:8000:8000 mem_limit: '256m' - user: "${UID}:${GID}" # if you run into issues with permissions for the data-files volume below, see other options at https://stackoverflow.com/a/56904335 + user: '${UID}:${GID}' # if you run into issues with permissions for the data-files volume below, see other options at https://stackoverflow.com/a/56904335 env_file: - path: .env required: true diff --git a/lib/data/files.ts b/lib/data/files.ts index 742609b..c5f95b9 100644 --- a/lib/data/files.ts +++ b/lib/data/files.ts @@ -69,7 +69,7 @@ async function getPathEntries(userId: string, path: string): Promise = { return createSessionResponse(request, user, { urlToRedirectTo: `/` }); } catch (error) { console.error(error); - return await context.render({ error: error.toString(), email, formData }); + return await context.render({ error: (error as Error).toString(), email, formData }); } }, }; diff --git a/routes/settings.tsx b/routes/settings.tsx index c37984a..3e2961f 100644 --- a/routes/settings.tsx +++ b/routes/settings.tsx @@ -169,7 +169,7 @@ export const handler: Handlers = { }); } catch (error) { console.error(error); - errorMessage = error.toString(); + errorMessage = (error as Error).toString(); errorTitle = `Failed to ${actionWords.get(action) || action}!`; return await context.render({ diff --git a/routes/signup.tsx b/routes/signup.tsx index ee0c8a9..263b066 100644 --- a/routes/signup.tsx +++ b/routes/signup.tsx @@ -76,7 +76,7 @@ export const handler: Handlers = { }); } catch (error) { console.error(error); - return await context.render({ error: error.toString(), email, formData }); + return await context.render({ error: (error as Error).toString(), email, formData }); } }, }; diff --git a/static/styles.css b/static/styles.css index 6caebfa..ccaf59f 100644 --- a/static/styles.css +++ b/static/styles.css @@ -7,7 +7,7 @@ h1 { } a { - @apply text-[#51A4FB] no-underline hover:underline font-semibold; + @apply text-[#51a4fb] no-underline hover:underline font-semibold; } main { @@ -19,7 +19,7 @@ form { } .button { - @apply inline-block rounded text-white bg-[#51A4FB] hover:bg-sky-400 hover:shadow-sm px-4 py-2; + @apply inline-block rounded text-white bg-[#51a4fb] hover:bg-sky-400 hover:shadow-sm px-4 py-2; } .button-secondary { @@ -31,10 +31,11 @@ form { } .input-field { - @apply block w-full p-2 rounded-md text-white bg-slate-700 border-transparent border focus:border-[#51A4FB] focus:bg-slate-700 outline-none focus:ring-0 shadow-sm; + @apply block w-full p-2 rounded-md text-white bg-slate-700 border-transparent border focus:border-[#51a4fb] + focus:bg-slate-700 outline-none focus:ring-0 shadow-sm; } -.input-field[type="range"] { +.input-field[type='range'] { @apply w-auto; } @@ -74,4 +75,6 @@ img.gray { filter: invert(30%) sepia(46%) saturate(356%) hue-rotate(174deg) brightness(90%) contrast(82%); } -details summary::-webkit-details-marker { display:none; } +details summary::-webkit-details-marker { + display: none; +}