Skip to content

Commit

Permalink
fix: don't include node-latest.tar.gz in subdirectories
Browse files Browse the repository at this point in the history
Signed-off-by: flakey5 <[email protected]>
  • Loading branch information
flakey5 committed Jan 28, 2025
1 parent adc816e commit a3acc3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions scripts/build-r2-symlinks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ const latestVersions = await getLatestVersionMapping(client, releases);
await writeFile(LATEST_VERSIONS_OUT, JSON.stringify(latestVersions));

// Filter the latest version map so we only have the `latest-*` directories
const latestVersionDirectories = Object.keys(latestVersions).map(version =>
version === 'node-latest.tar.gz' ? version : `${version}/`
);
const latestVersionDirectories = Object.keys(latestVersions)
.filter(version => version !== 'node-latest.tar.gz')
.map(version => `${version}/`);

// Create the complete listing of `nodejs/release/` by adding what R2 returned
// and the latest version directories (which are the symlinks)
Expand Down
2 changes: 0 additions & 2 deletions src/constants/cachedDirectories.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"latest-v8.x/",
"latest-v9.x/",
"latest/",
"node-latest.tar.gz",
"npm/",
"patch/",
"v0.1.100/",
Expand Down Expand Up @@ -1366,7 +1365,6 @@
"latest-v8.x/",
"latest-v9.x/",
"latest/",
"node-latest.tar.gz",
"npm/",
"patch/",
"v0.1.100/",
Expand Down

0 comments on commit a3acc3a

Please sign in to comment.