mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
fix: support nodejs below v20.11 for generate_buildonly.js (#7214)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import url from 'node:url';
|
||||
|
||||
const __dirname = import.meta.dirname;
|
||||
const __filename = url.fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const obj = JSON.parse(
|
||||
fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user