mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Merge branch 'deno-2.2.0' into 'main'
Upgrade Deno to v2.2.0 See merge request soapbox-pub/ditto!679
This commit is contained in:
commit
f86d1f1cad
4 changed files with 4 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
image: denoland/deno:2.1.10
|
image: denoland/deno:2.2.0
|
||||||
|
|
||||||
default:
|
default:
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
deno 2.1.10
|
deno 2.2.0
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM denoland/deno:2.1.10
|
FROM denoland/deno:2.2.0
|
||||||
ENV PORT 5000
|
ENV PORT 5000
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import Module from 'node:module';
|
|
||||||
import os from 'node:os';
|
import os from 'node:os';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
|
||||||
|
|
@ -354,7 +353,7 @@ export class DittoConf {
|
||||||
|
|
||||||
/** Absolute path to the data directory used by Ditto. */
|
/** Absolute path to the data directory used by Ditto. */
|
||||||
get dataDir(): string {
|
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. */
|
/** Absolute path of the Deno directory. */
|
||||||
|
|
@ -465,12 +464,3 @@ export class DittoConf {
|
||||||
return Number(this.env.get('STREAK_WINDOW') || 129600);
|
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);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue