Skip to content

Commit

Permalink
[kv/composite] filenames weren't interpolated correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jcayzac committed Oct 8, 2024
1 parent 50e1424 commit 0289f35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spicy-points-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@copepod/kv": patch
---

Filenames were not interpolated correctly in **fs-composite**.
2 changes: 1 addition & 1 deletion packages/kv/src/fs-composite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class CompositeStore implements Store<object> {
for (const interpolator of this.interpolators) {
interpolated.push(interpolator === '__hash' ? await hash(key) : extract(key, interpolator) ?? '')
}
return paths.join(this.root, String.raw({ raw: this.raws }, interpolated))
return paths.join(this.root, String.raw({ raw: this.raws }, ...interpolated))
}

async get(key: object): Promise<Uint8Array | undefined> {
Expand Down

0 comments on commit 0289f35

Please sign in to comment.