Skip to content

Commit

Permalink
Use current date/time when no last modification date/time is provided…
Browse files Browse the repository at this point in the history
… when creating zip archive.

Bump version to 0.1.3.
  • Loading branch information
quentinadam committed Nov 13, 2024
1 parent ca9b237 commit 86c17e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quentinadam/zip",
"version": "0.1.2",
"version": "0.1.3",
"license": "MIT",
"exports": "./zip.ts",
"imports": {
Expand Down
6 changes: 3 additions & 3 deletions zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ export async function create(
return { data: file.data, compressed: false };
}
})();
const { lastModificationDate, lastModificationTime } = file.lastModification !== undefined
? serializeLastModification(file.lastModification)
: { lastModificationDate: 0, lastModificationTime: 0 };
const { lastModificationDate, lastModificationTime } = serializeLastModification(
file.lastModification ?? new Date(),
);
const entry = {
version: 45,
requiredVersion: 20,
Expand Down

0 comments on commit 86c17e1

Please sign in to comment.