Skip to content

The library pack's bytes depend on the builder's time zone #51

Closed

Description

@alekswebnet

The first weekly refresh since the pack was split (#48) rewrote all 106 archives — the 105 parts and libraries.h5p — with no library changed: its change list is empty.

Cause. build-libraries.mjs and packages/libraries/scripts/parts.mjs write every entry with lastModDate: new Date(Date.UTC(2000, 0, 1)). A zip records a wall-clock time with no zone, and zip.js takes it from the Date's local fields (getHours()). The committed pack was built at UTC+2, so its entries say 02:00; CI builds in UTC and writes 00:00. Every entry's name, CRC, sizes, method and extra field are the same in both, checked archive by archive.

Also. The workflow's change list keeps only lines starting with H5P, so a new version of FontAwesome, jQuery.ui, flowplayer, Shepherd or TimelineJS would show an empty list too. And when no library changed it still opens a pull request saying the hub changed.

Fix. A wall-clock date that writes what pack 1.0.0 shipped (2000-01-01 02:00) in any time zone, so no release is needed for this; a test that builds in two time zones; the change list matching every library; and the workflow stopping, rather than opening a pull request, when files changed and no library did. #48 is then closed unmerged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions