Skip to content

Commit

Permalink
Update Deno, allow autocomplete on inputs
Browse files Browse the repository at this point in the history
Also fix Dockerfile for production deployment
  • Loading branch information
BrunoBernardino committed Jul 11, 2023
1 parent d01f412 commit 37dc11d
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .dvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.32.1
1.34.1
2 changes: 1 addition & 1 deletion .github/workflows/cron-check-subscriptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.32.1
deno-version: v1.34.1
- env:
POSTGRESQL_HOST: ${{ secrets.POSTGRESQL_HOST }}
POSTGRESQL_USER: ${{ secrets.POSTGRESQL_USER }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.32.1
deno-version: v1.34.1
- env:
POSTGRESQL_HOST: ${{ secrets.POSTGRESQL_HOST }}
POSTGRESQL_USER: ${{ secrets.POSTGRESQL_USER }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.32.1
deno-version: v1.34.1
- run: docker-compose pull
- uses: jpribyl/action-docker-layer-caching@v0.1.1
continue-on-error: true
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM denoland/deno:1.30.3
FROM denoland/deno:1.34.1

EXPOSE 8000

Expand All @@ -13,4 +13,4 @@ ADD . /app
# Compile the main app so that it doesn't need to be compiled each startup/entry.
RUN deno cache --reload main.ts

CMD ["make", "start"]
CMD ["run", "--allow-all", "main.ts"]
28 changes: 11 additions & 17 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"fmt": {
"options": {
"useTabs": false,
"lineWidth": 120,
"indentWidth": 2,
"singleQuote": true,
"proseWrap": "preserve"
},
"files": {
"exclude": [
"public/js/sweetalert.js"
]
}
"useTabs": false,
"lineWidth": 120,
"indentWidth": 2,
"singleQuote": true,
"proseWrap": "preserve",
"exclude": [
"public/js/sweetalert.js"
]
},
"lint": {
"rules": {
Expand All @@ -20,11 +16,9 @@
"no-window-prefix"
]
},
"files": {
"exclude": [
"public/js/sweetalert.js"
]
}
"exclude": [
"public/js/sweetalert.js"
]
},
"compilerOptions": {
"lib": [
Expand Down
2 changes: 1 addition & 1 deletion import_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"/": "./",
"./": "./",

"std/": "https://deno.land/std@0.180.0/"
"std/": "https://deno.land/std@0.190.0/"
}
}
9 changes: 1 addition & 8 deletions pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export function pageContent() {
<input
id="expense-description"
placeholder="Lunch"
autocomplete="off"
type="text"
data-automation="add-expense-description"
/>
Expand All @@ -139,7 +138,6 @@ export function pageContent() {
<input
id="expense-date"
placeholder="Today"
autocomplete="off"
type="date"
data-automation="add-expense-date"
/>
Expand Down Expand Up @@ -193,8 +191,7 @@ export function pageContent() {
<label for="edit-expense-description">Description</label>
<input
id="edit-expense-description"
placeholder="Volunteering"
autocomplete="off"
placeholder="Lunch"
type="text"
/>
</fieldset>
Expand All @@ -203,15 +200,13 @@ export function pageContent() {
<select
id="edit-expense-budget"
placeholder="Misc"
autocomplete="off"
></select>
</fieldset>
<fieldset class="input-wrapper">
<label for="edit-expense-date">Date</label>
<input
id="edit-expense-date"
placeholder="Today"
autocomplete="off"
type="date"
/>
</fieldset>
Expand Down Expand Up @@ -247,7 +242,6 @@ export function pageContent() {
<input
id="edit-budget-name"
placeholder="Food"
autocomplete="off"
type="text"
/>
</fieldset>
Expand All @@ -266,7 +260,6 @@ export function pageContent() {
<input
id="edit-budget-month"
placeholder="Today"
autocomplete="off"
type="date"
/>
</fieldset>
Expand Down
2 changes: 1 addition & 1 deletion routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const routes: Routes = {
try {
const fullFilePath = `public/${filePath}`;

const fileExtension = filePath.split('.').pop()?.toLowerCase();
const fileExtension = filePath!.split('.').pop()?.toLowerCase();

if (fileExtension === 'ts') {
return serveFileWithTs(request, fullFilePath);
Expand Down

0 comments on commit 37dc11d

Please sign in to comment.