mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
Avoid import.meta.dirname to be backwards compatible to Node.js 18+ (#1058)
This commit is contained in:
parent
53753f0455
commit
e717c51aa1
5 changed files with 20 additions and 10 deletions
|
|
@ -19,9 +19,11 @@
|
|||
|
||||
import { execSync } from 'child_process';
|
||||
import { existsSync, mkdirSync, writeFileSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
import { dirname, join } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const root = join(import.meta.dirname, '..');
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const root = join(__dirname, '..');
|
||||
const generatedDir = join(root, 'packages/cli/src/generated');
|
||||
const gitCommitFile = join(generatedDir, 'git-commit.ts');
|
||||
let gitCommitInfo = 'N/A';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue