Skip to content

Reproducible npm tarballs #1545

Closed
Closed
@Krinkle

Description

@Krinkle

We currently have a reproducible qunit.js release artifact.

It is byte-for-byte identical between what one can independently generate using npm run build (release doc), and what we have published to the npm registry and on code.jquery.com CDN.

As a next step, I'd like for downstream tarball created by npm to also be reproducible, and for the verification process to be automated from a nighly Travis CI cronjob (e.g. build latest release tag, and compare against downloaded tarball).

Some pointers to get going:

  • npm tarballs are available from the URL pattern https://registry.npmjs.org/NAME/-/NAME-VERSION.tgz such as https://registry.npmjs.org/oojs/-/oojs-5.0.0.tgz for [email protected]
  • Probably the only thing that might be non-deterministic is file timestamps and compression file order. However, I think both of these were already made deterministic by npm for other projects. I'm seeing all files consistenly have a timestamp in the year 1985, and the compression order appears to be consistently alphabetical. We just have to verify this, but otherwise probably nothing to do.
  • See Travis CI - Cron jobs docs for setting up a nighly job.
  • You can use git tag --sort=v:refname --list '[0-9]*' to find the latest tag, as sorted by SemVer.
  • diffoscope might be of use.

See also:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions