Upgrade Deno to v2.2.0

This commit is contained in:
Alex Gleason 2025-02-18 20:03:03 -06:00
parent 3ed75434fe
commit 7deec54a2e
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
4 changed files with 4 additions and 14 deletions

View file

@ -1,4 +1,4 @@
image: denoland/deno:2.1.10
image: denoland/deno:2.2.0
default:
interruptible: true

View file

@ -1 +1 @@
deno 2.1.10
deno 2.2.0

View file

@ -1,4 +1,4 @@
FROM denoland/deno:2.1.10
FROM denoland/deno:2.2.0
ENV PORT 5000
WORKDIR /app

View file

@ -1,4 +1,3 @@
import Module from 'node:module';
import os from 'node:os';
import path from 'node:path';
@ -354,7 +353,7 @@ export class DittoConf {
/** Absolute path to the data directory used by Ditto. */
get dataDir(): string {
return this.env.get('DITTO_DATA_DIR') || path.join(cwd(), 'data');
return this.env.get('DITTO_DATA_DIR') || path.join(Deno.cwd(), 'data');
}
/** Absolute path of the Deno directory. */
@ -465,12 +464,3 @@ export class DittoConf {
return Number(this.env.get('STREAK_WINDOW') || 129600);
}
}
/**
* HACK: get cwd without read permissions.
* https://github.com/denoland/deno/issues/27080#issuecomment-2504150155
*/
function cwd() {
// @ts-ignore Internal method, but it does exist.
return Module._nodeModulePaths('a')[0].slice(0, -15);
}