Skip to content

Commit 891368c

Browse files
RaisinTenrichardlau
authored andcommitted
tools: remove faulty early termination logic from update-timezone.mjs
We do not build Node.js in the workflow so https://github.com/nodejs/node/blob/f4815fcd7691364d8139b44c1295dbc46f6ee4a8/tools/update-timezone.mjs#L18 is actually the version of `tzdata` in the Node.js in the runner instead of what's in `main`. The script is pretty fast even when the versions differ and there is an update, so this optimization doesn't seem to be worth having given the problem. Signed-off-by: Darshan Sen <[email protected]> PR-URL: #44870Fixes: #44865 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 543493c commit 891368c

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

‎tools/update-timezone.mjs‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Usage: tools/update-timezone.mjs
33
import{execSync}from'node:child_process';
44
import{renameSync,readdirSync,rmSync}from'node:fs';
5-
import{exit}from'node:process';
65

76
constfileNames=[
87
'zoneinfo64.res',
@@ -15,14 +14,8 @@ const availableVersions = readdirSync('icu-data/tzdata/icunew',{withFileTypes:
1514
.filter((dirent)=>dirent.isDirectory())
1615
.map((dirent)=>dirent.name);
1716

18-
constcurrentVersion=process.versions.tz;
1917
constlatestVersion=availableVersions.sort().at(-1);
2018

21-
if(latestVersion===currentVersion){
22-
console.log(`Terminating early, tz version is latest @ ${currentVersion}`);
23-
exit();
24-
}
25-
2619
execSync('bzip2 -d deps/icu-small/source/data/in/icudt*.dat.bz2');
2720
fileNames.forEach((file)=>{
2821
renameSync(`icu-data/tzdata/icunew/${latestVersion}/44/le/${file}`,`deps/icu-small/source/data/in/${file}`);

0 commit comments

Comments
(0)