Skip to content

Commit

Permalink
fix: drop .get / set the sha cache in the operation
Browse files Browse the repository at this point in the history
  • Loading branch information
reggi committed Dec 6, 2024
1 parent 47b26a2 commit c41dc4c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion cli/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ const main = async ({loglevel, releases: rawReleases, useCurrent, navPath, conte
releases.map(r => extractRelease(r, {cache, contentPath, baseNav: navData, prerelease})),
).then(r => r.filter(Boolean))

updates.forEach(r => cache.set(r.id, r.sha))
await cache.save()

await updateNav(updates, {nav: navDoc, path: navPath})
Expand Down
4 changes: 0 additions & 4 deletions cli/lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ class CacheVersionSha {
return this
}

get(id) {
return this.cache[id]
}

set(id, sha) {
this.cache[id] = sha
return this
Expand Down
3 changes: 2 additions & 1 deletion cli/lib/extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ const unpackRelease = async (release, {cache, contentPath, baseNav, prerelease =
return
}

cache.set(release.id, sha)

if (release.prerelease && !prerelease) {
log.info(`Skipping ${release.id} due to prerelease ${release.version}`)
return
Expand Down Expand Up @@ -225,7 +227,6 @@ const unpackRelease = async (release, {cache, contentPath, baseNav, prerelease =
return {
...release,
nav: nav.children,
sha,
}
}

Expand Down

0 comments on commit c41dc4c

Please sign in to comment.