blitz-pdf 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -1
- package/package.json +1 -1
- package/wasm/blitz_pdf_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -315,7 +315,7 @@ npm pack
|
|
|
315
315
|
The wasm-bindgen CLI version must match `Cargo.lock`. Dependencies and upstream
|
|
316
316
|
commits are locked. `npm pack` verifies artifacts and renders a PDF before making
|
|
317
317
|
the tarball; it does not publish. Install locally using
|
|
318
|
-
`npm install ./blitz-pdf
|
|
318
|
+
`npm install ./blitz-pdf-<version>.tgz`.
|
|
319
319
|
|
|
320
320
|
The pinned Stylo source in `vendor/stylo` enables paged-media properties in the
|
|
321
321
|
Servo build; `vendor/README.md` records the small patch. Its MPL-2.0 source is
|
|
@@ -328,6 +328,42 @@ For browser verification, run `npm run test:browser` and open
|
|
|
328
328
|
`http://127.0.0.1:4173`. CI builds WASM, runs Bun and Node tests, validates the
|
|
329
329
|
captured PDFs with veraPDF, benchmarks, and packs an npm artifact.
|
|
330
330
|
|
|
331
|
+
## Publishing releases
|
|
332
|
+
|
|
333
|
+
Push a tag matching the package version, such as `v0.1.1`, to start
|
|
334
|
+
[Publish to npm](https://github.com/iteufel/blitz-pdf/actions/workflows/publish.yml).
|
|
335
|
+
The workflow checks that the tag, npm manifests, and root Rust package versions
|
|
336
|
+
agree. It then builds WASM from source, runs the Bun and Node tests, validates
|
|
337
|
+
PDF/A-3u with veraPDF, runs benchmarks, and publishes the verified archive.
|
|
338
|
+
Release builds do not restore dependency or compiler caches.
|
|
339
|
+
|
|
340
|
+
Publishing uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/)
|
|
341
|
+
with GitHub OIDC and provenance. The npm trust must permit direct publishing from
|
|
342
|
+
`iteufel/blitz-pdf`, workflow `publish.yml`, with no environment restriction.
|
|
343
|
+
No `NPM_TOKEN` repository secret is needed. Stable versions use the npm `latest`
|
|
344
|
+
tag; prereleases use `next`. After publishing, the workflow checks that npm serves
|
|
345
|
+
the exact archive it built, comparing SHA-512 integrity.
|
|
346
|
+
|
|
347
|
+
For the next patch release:
|
|
348
|
+
|
|
349
|
+
1. Run `npm version patch --no-git-tag-version` to update both npm manifests.
|
|
350
|
+
2. Set the same version in `Cargo.toml` and the `blitz-pdf-wasm` entry in
|
|
351
|
+
`Cargo.lock`.
|
|
352
|
+
3. Commit the changes, create the matching Git tag, and push both:
|
|
353
|
+
|
|
354
|
+
```sh
|
|
355
|
+
git add package.json package-lock.json Cargo.toml Cargo.lock
|
|
356
|
+
RELEASE_VERSION=$(node -p "require('./package.json').version")
|
|
357
|
+
git commit -m "chore: release $RELEASE_VERSION"
|
|
358
|
+
git tag "v$RELEASE_VERSION"
|
|
359
|
+
git push origin main "v$RELEASE_VERSION"
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
To retry a failed release, rerun its GitHub Actions run or use
|
|
363
|
+
`gh workflow run publish.yml --ref v0.1.1`. Manual runs require a matching version
|
|
364
|
+
tag too. Published npm versions cannot be overwritten; subsequent releases need
|
|
365
|
+
a new version.
|
|
366
|
+
|
|
331
367
|
## Performance benchmarks
|
|
332
368
|
|
|
333
369
|
```sh
|
package/package.json
CHANGED
package/wasm/blitz_pdf_bg.wasm
CHANGED
|
Binary file
|