refactor(ci): migrate i18n change script to esm

This commit is contained in:
yyh 2026-04-08 18:22:50 +08:00
parent ad03f95687
commit 416da39d90
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
const { execFileSync } = require('node:child_process')
const fs = require('node:fs')
const path = require('node:path')
import { execFileSync } from 'node:child_process'
import fs from 'node:fs'
import path from 'node:path'
const repoRoot = process.cwd()
const baseSha = process.env.BASE_SHA || ''

View File

@ -68,7 +68,7 @@ jobs:
" web/i18n-config/languages.ts | sed 's/[[:space:]]*$//')
generate_changes_json() {
node .github/scripts/generate-i18n-changes.cjs
node .github/scripts/generate-i18n-changes.mjs
}
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then

View File

@ -42,7 +42,7 @@ jobs:
fi
export BASE_SHA HEAD_SHA CHANGED_FILES
node .github/scripts/generate-i18n-changes.cjs
node .github/scripts/generate-i18n-changes.mjs
if [ -n "$CHANGED_FILES" ]; then
echo "has_changes=true" >> "$GITHUB_OUTPUT"