Repository navigation
fix(wasm): THIRD-PARTY-LICENSES.txt in the npm package, from cargo about - #61
Merged
Merged
Conversation
The package shipped its own two licence texts and nothing for the crates compiled into `sqzer_bg.wasm`, whose licences mostly ask that the notice travels with a binary. `pack.sh` now runs `cargo about generate` over the wasm32 dependency tree, with `about.toml` at the root carrying the allow-list of `deny.toml`, and `about.hbs` rendering plain text: one block per licence text with the crates under it and, for MPL-2.0, the repository. `libdeflate-sys` is clarified as Apache-2.0 AND MIT so the vendored C library's own notice is carried; `quantizr`, which names its licence by file alone, is clarified as MIT. A warning from `cargo about` fails the build, since a stale clarification is only a warning to it and would drop a notice silently, and the tarball test checks the file for the Eric Biggers line. The wasm job of `ci.yml` and `publish-npm.yml` install `cargo-about` from its release archive, as they do `wasm-pack`. Closes #54 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
… out, clarifications for what the scan misses The first file read "Copyright (c) <year> <copyright holders>" for 14 crates, the canonical text cargo about falls back to for a crate that ships no notice it recognises, and listed our own five crates. Scanned below a crate's root, it also took a C fuzzing harness in qoi and Rust source headers in kamadak-exif for licence texts. max-depth = 1 keeps the scan at the root. private.ignore drops sqzer-wasm, and the template skips the block of the published workspace crates on their repository. Five crates keep their notice under a name or in a form the scan does not read (libm, brotli-decompressor, exr, tsify, and quantizr already); they are clarified from the file in the crate. Ten ship no notice and keep one at the root of their repository; they are clarified from git at the commit they were published from. Every checksum pins a text, not a version. simd_helpers and zune-inflate stay on the bare text: no notice in the repository, and no repository named. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #54 for the npm package. The release archives are #62: a different dependency tree per target, under
native, and a different place to put the file (includeindist-workspace.toml).about.tomlat the repository root takes the allow-list ofdeny.tomlasaccepted, in the order a crate that offers a choice is taken, withtargets = ["wasm32-unknown-unknown"]and build and dev dependencies left out, since neither ships.crates/sqzer-wasm/about.hbsis the plain-text template; the default one is HTML.The first version of the file had four things wrong, which the config now handles:
Every checksum in
about.tomlpins a notice's text, not a crate version, so a bump keeps working until the notice itself changes. When it does,cargo aboutonly warns, drops that clarification and goes on, with--failor without it, and the notice would vanish with the build still green.pack.shfails on any warning fromcargo about, with the message, andtests/package.mjschecks the installed file forUsed by:,ravif,mozjpeg-rs,libdeflate-sys,Eric Biggersandavif-parse. Both checked by hand: a zeroed checksum failspack.shat that step, and the restored config packs and passes the tarball run.# the wasm job of ci.yml and publish-npm.yml install it next to wasm-pack, from the release archive cargo-about 0.9.2, MIT OR Apache-2.0Nothing in Rust changes, so the Rust checks are not affected;
pack.shran locally end to end, git fetches included.CONTRIBUTING.mdandCLAUDE.mdname the new tool next topack.sh, and the package README says what the file is for.For sqzer.dev: once this is released,
licenses.txtthere appendsTHIRD-PARTY-LICENSES.txtfrom the package instead of stopping atLICENSE-MITandLICENSE-APACHE.🤖 Generated with Claude Code