/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tools/dep_updaters/update-timezone.mjs
26 строк
910 B
Antoine du Hamel
tools: do not run `test-linux` on unrelated tools changes
01 май 2026, 19:18
Не верифицирован
01 май 2026, 19:18
69a970f
Код
Авторство
О чём код?
#!/usr/bin/env node import { execSync } from 'node:child_process'; import { renameSync, readdirSync, rmSync } from 'node:fs'; const fileNames = [ 'zoneinfo64.res', 'windowsZones.res', 'timezoneTypes.res', 'metaZones.res', ]; const availableVersions = readdirSync('icu-data/tzdata/icunew', { withFileTypes: true }) .filter((dirent) => dirent.isDirectory()) .map((dirent) => dirent.name); const latestVersion = availableVersions.sort().at(-1); execSync('bzip2 -d deps/icu-small/source/data/in/icudt*.dat.bz2'); fileNames.forEach((file) => { renameSync(`icu-data/tzdata/icunew/${latestVersion}/44/le/${file}`, `deps/icu-small/source/data/in/${file}`); execSync(`icupkg -a ${file} icudt*.dat`, { cwd: 'deps/icu-small/source/data/in/' }); rmSync(`deps/icu-small/source/data/in/${file}`); }); execSync('bzip2 -z deps/icu-small/source/data/in/icudt*.dat'); rmSync('icu-data', { recursive: true });