diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a00f97e..5ae8fcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Deno Setup uses: denoland/setup-deno@v1 with: - deno-version: "1.44.4" + deno-version: "1.45.3" - name: Build run: | diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1136bb3..04ebcf2 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -9,15 +9,11 @@ }, "type": "deno", "command": "task", - "args": [ - "build" - ], + "args": ["build"], "options": { "cwd": "${workspaceFolder}" }, - "problemMatcher": [ - "$deno" - ] + "problemMatcher": ["$deno"] }, { "label": "CodeGen", @@ -27,15 +23,11 @@ }, "type": "deno", "command": "task", - "args": [ - "codegen" - ], + "args": ["codegen"], "options": { "cwd": "${workspaceFolder}" }, - "problemMatcher": [ - "$deno" - ] + "problemMatcher": ["$deno"] }, { "label": "CodeGen Scraper", @@ -45,15 +37,11 @@ }, "type": "deno", "command": "task", - "args": [ - "codegen-scraper" - ], + "args": ["codegen-scraper"], "options": { "cwd": "${workspaceFolder}" }, - "problemMatcher": [ - "$deno" - ] + "problemMatcher": ["$deno"] }, { "label": "Run Doom Fire", @@ -63,15 +51,14 @@ }, "type": "deno", "command": "task", - "args": [ - "run:doom-fire" - ], + "args": ["run:doom-fire"], "options": { + "env": { + "GDK_BACKEND": "wayland" + }, "cwd": "${workspaceFolder}" }, - "problemMatcher": [ - "$deno" - ] + "problemMatcher": ["$deno"] }, { "label": "Run Hello World", @@ -81,15 +68,14 @@ }, "type": "deno", "command": "task", - "args": [ - "run:hello-world" - ], + "args": ["run:hello-world"], "options": { + "env": { + "GDK_BACKEND": "wayland" + }, "cwd": "${workspaceFolder}" }, - "problemMatcher": [ - "$deno" - ] + "problemMatcher": ["$deno"] }, { "label": "Run Hello World Async", @@ -99,15 +85,14 @@ }, "type": "deno", "command": "task", - "args": [ - "run:hello-world-async" - ], + "args": ["run:hello-world-async"], "options": { + "env": { + "GDK_BACKEND": "wayland" + }, "cwd": "${workspaceFolder}" }, - "problemMatcher": [ - "$deno" - ] + "problemMatcher": ["$deno"] }, { "label": "Run Renderer", @@ -117,15 +102,14 @@ }, "type": "deno", "command": "task", - "args": [ - "run:renderer" - ], + "args": ["run:renderer"], "options": { + "env": { + "GDK_BACKEND": "wayland" + }, "cwd": "${workspaceFolder}" }, - "problemMatcher": [ - "$deno" - ] + "problemMatcher": ["$deno"] }, { "label": "Run Same Game", @@ -135,25 +119,20 @@ }, "type": "deno", "command": "task", - "args": [ - "run:same-game" - ], + "args": ["run:same-game"], "options": { + "env": { + "GDK_BACKEND": "wayland" + }, "cwd": "${workspaceFolder}" }, - "problemMatcher": [ - "$deno" - ] + "problemMatcher": ["$deno"] }, { "type": "deno", "command": "task", - "args": [ - "test" - ], - "problemMatcher": [ - "$deno-test" - ], + "args": ["test"], + "problemMatcher": ["$deno-test"], "group": "test", "label": "Run Tests" } diff --git a/src/_platform.ts b/src/_platform.ts index 3a80d00..b2b2c7f 100644 --- a/src/_platform.ts +++ b/src/_platform.ts @@ -4,7 +4,7 @@ import { Platform } from "./_types.ts"; let platform: Platform | null = null; -if ("Deno" in window) { +if ("Deno" in globalThis) { platform = DenoPlatform; }