Skip to content

Commit

Permalink
rename to purge, bump to 2.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ikreymer committed Dec 14, 2024
1 parent 43fae29 commit 6fea1d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warcio",
"version": "2.4.2",
"version": "2.4.3",
"keywords": [
"WARC",
"web archiving"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/warcserializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type WARCSerializerOpts = {
export abstract class BaseSerializerBuffer {
abstract write(chunk: Uint8Array): void;
abstract readAll(): AsyncIterable<Uint8Array>;
abstract clear(): void;
abstract purge(): void;
}

// ===========================================================================
Expand All @@ -44,7 +44,7 @@ export class SerializerInMemBuffer extends BaseSerializerBuffer {
}
}

clear() {
purge() {
this.buffers = [];
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/node/warcserializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ export class TempFileBuffer extends warcserializer.SerializerInMemBuffer {
yield buff;
}

await this.clear();
await this.purge();
}

override async clear() {
override async purge() {
if (this.filename) {
await unlink(this.filename);
this.filename = "";
Expand Down

0 comments on commit 6fea1d4

Please sign in to comment.