| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 543493c commit 891368c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,6 @@ | |||
| 2 | 2 | // Usage: tools/update-timezone.mjs | |
| 3 | 3 | import { execSync } from 'node:child_process'; | |
| 4 | 4 | import { renameSync, readdirSync, rmSync } from 'node:fs'; | |
| 5 | - import { exit } from 'node:process'; | ||
| 6 | 5 | ||
| 7 | 6 | const fileNames = [ | |
| 8 | 7 | 'zoneinfo64.res', | |
@@ -15,14 +14,8 @@ const availableVersions = readdirSync('icu-data/tzdata/icunew', { withFileTypes: | |||
| 15 | 14 | .filter((dirent) => dirent.isDirectory()) | |
| 16 | 15 | .map((dirent) => dirent.name); | |
| 17 | 16 | ||
| 18 | - const currentVersion = process.versions.tz; | ||
| 19 | 17 | const latestVersion = availableVersions.sort().at(-1); | |
| 20 | 18 | ||
| 21 | - if (latestVersion === currentVersion) { | ||
| 22 | - console.log(`Terminating early, tz version is latest @ ${currentVersion}`); | ||
| 23 | - exit(); | ||
| 24 | - } | ||
| 25 | - | ||
| 26 | 19 | execSync('bzip2 -d deps/icu-small/source/data/in/icudt*.dat.bz2'); | |
| 27 | 20 | fileNames.forEach((file) => { | |
| 28 | 21 | renameSync(`icu-data/tzdata/icunew/${latestVersion}/44/le/${file}`, `deps/icu-small/source/data/in/${file}`); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments