@su-engineering/heic 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/CHANGELOG.md +6 -0
- package/CONTRIBUTING.md +7 -1
- package/README.md +3 -3
- package/docs/releasing.md +40 -25
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/CONTRIBUTING.md
CHANGED
|
@@ -17,7 +17,7 @@ pnpm test:package
|
|
|
17
17
|
pnpm test:unit
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
A source checkout can be used by building it and importing `dist/index.js`, or by installing a tarball created with `pnpm pack --pack-destination /tmp/heic-pack`. The WASM entry point is `dist/wasm.js`; its optional peer dependency must be available in the consuming project.
|
|
21
21
|
|
|
22
22
|
## Repository map
|
|
23
23
|
|
|
@@ -81,3 +81,9 @@ Do not commit `dist/`, browser reports, `node_modules/`, or the private photo co
|
|
|
81
81
|
## Community expectations
|
|
82
82
|
|
|
83
83
|
Be respectful, explain disagreements with evidence, and focus reviews on the work. Do not harass contributors or disclose private information. Report conduct concerns privately to hello@su.engineering. Use the [security policy](SECURITY.md) for vulnerabilities.
|
|
84
|
+
|
|
85
|
+
## Releases
|
|
86
|
+
|
|
87
|
+
Package changes use Changesets. Once merged into `master`, the release workflow
|
|
88
|
+
creates a version/changelog PR. Merging that PR publishes its new version after
|
|
89
|
+
validation using npm trusted publishing. See [the release guide](docs/releasing.md).
|
package/README.md
CHANGED
|
@@ -15,17 +15,17 @@ HEIC uploads need not force every visitor to download a software codec. This Typ
|
|
|
15
15
|
|
|
16
16
|
The project is at **0.1.0**. Test it with representative files and target devices before production use. The repository is named `heic-web`; the npm package name is `@su-engineering/heic`.
|
|
17
17
|
|
|
18
|
-
[API reference](docs/api.md) · [Compatibility and limitations](docs/compatibility.md) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md)
|
|
18
|
+
[API reference](docs/api.md) · [Compatibility and limitations](docs/compatibility.md) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [Release process](docs/releasing.md)
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Install the package:
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
25
|
npm install @su-engineering/heic
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
For a checkout
|
|
28
|
+
For a source checkout, see [local development](CONTRIBUTING.md#local-development). Decoding runs in a browser or browser worker. Node.js can run the container parser, but this package does not provide a Node.js pixel decoder.
|
|
29
29
|
|
|
30
30
|
## Quick start
|
|
31
31
|
|
package/docs/releasing.md
CHANGED
|
@@ -1,42 +1,57 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Releasing
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The initial package is `@su-engineering/heic@0.1.0`. The `/wasm` export ships in the same package. Ongoing releases use Changesets, validated GitHub Actions, and npm trusted publishing (OIDC); no npm publishing secret is required.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## One-time npm configuration
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- Confirm the MIT license and ownership; review optional codec license notices separately.
|
|
9
|
-
- Set the GitHub description, documentation homepage, and relevant topics. Keep visibility private until the owner chooses to open-source it.
|
|
10
|
-
- Enable issues and configure private vulnerability reporting if desired; ensure the security contact is monitored.
|
|
11
|
-
- Configure branch protection or a ruleset requiring the CI `check` and `browser` jobs, with appropriate maintainer access.
|
|
12
|
-
- Verify CI on the release commit and manually test platform HEVC and released Safari using representative, consented Apple photos, including grids.
|
|
7
|
+
In the npm package settings for `@su-engineering/heic`, add a GitHub Actions trusted publisher:
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
| Field | Value |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Organization or user | `su-engineering` |
|
|
12
|
+
| Repository | `heic-web` |
|
|
13
|
+
| Workflow filename | `release.yml` |
|
|
14
|
+
| Environment | Leave blank; this workflow does not use a GitHub environment. |
|
|
15
|
+
| Allowed actions | Enable direct `npm publish`. Stage-only permission does not support this workflow. |
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
The workflow file must exist on the default branch. The setting requires an interactive npm account/2FA operation. Never paste publishing credentials into an issue, pull request, or source file. Revoke the temporary initial-publish token after the launch.
|
|
18
|
+
|
|
19
|
+
See [npm's trusted-publishing documentation](https://docs.npmjs.com/trusted-publishers/). Publishing uses npm 11 on Node.js 24 and GitHub-hosted runners, with `id-token: write` scoped to the release job. The publish script explicitly invokes npm, rather than depending on a package manager's bundled publishing client.
|
|
20
|
+
|
|
21
|
+
GitHub Actions also needs permission to create pull requests. Under repository Settings → Actions → General, enable **Allow GitHub Actions to create and approve pull requests**. The workflow does not approve or auto-merge its own PRs.
|
|
22
|
+
|
|
23
|
+
## Normal release flow
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
1. Include a changeset with package changes: `pnpm exec changeset`. Choose patch, minor, or major and describe the observable change. Documentation/test-only changes can omit a changeset when no package release is needed.
|
|
26
|
+
2. Merge the contribution PR into `master` after CI passes.
|
|
27
|
+
3. `Release` runs the shared typecheck/build/package/unit and three-engine browser checks. If they pass, Changesets creates or updates a **Release: update package version** PR containing version/changelog changes.
|
|
28
|
+
4. The workflow explicitly dispatches CI on `changeset-release/master`. This is necessary because PRs created by `GITHUB_TOKEN` do not automatically trigger PR workflows. Verify the generated branch's successful checks before merging it.
|
|
29
|
+
5. Merge the version PR when ready. The release workflow validates that commit, publishes its new version publicly with provenance, and creates a `vX.Y.Z` tag and GitHub release.
|
|
30
|
+
|
|
31
|
+
Only the generated version PR determines a new package version; ordinary commits do not each publish. Never edit an already published version in place. Choose a new version through a changeset.
|
|
32
|
+
|
|
33
|
+
`tools/publish.mjs` queries the exact registry version and exits without publishing if it already exists. Unexpected registry errors fail closed. A newer `master` commit causes an older queued release to skip publishing so its successor can handle the release.
|
|
34
|
+
|
|
35
|
+
## Validation and package review
|
|
24
36
|
|
|
25
37
|
```sh
|
|
38
|
+
pnpm install --frozen-lockfile
|
|
39
|
+
pnpm test:all
|
|
26
40
|
mkdir -p /tmp/heic-pack
|
|
27
41
|
pnpm pack --pack-destination /tmp/heic-pack
|
|
28
42
|
```
|
|
29
43
|
|
|
30
|
-
Install the tarball
|
|
44
|
+
Install the tarball in a clean consumer. Verify ESM/types, the `heic.global.js` browser bundle, and lazy WASM integration. Published files must include built assets and documentation without private test photos or development dependencies.
|
|
31
45
|
|
|
32
|
-
`pnpm test:package`
|
|
46
|
+
`pnpm test:package` validates declared targets and creates a bundled browser consumer for default-adapter tests. `prepublishOnly` checks type safety, build/package targets, and unit tests; the release workflow runs the browser matrix before permitting publication.
|
|
33
47
|
|
|
34
|
-
|
|
48
|
+
CI does not establish released-Safari or hardware HEVC coverage. Test representative consented Apple photos, tiled grids, orientations, and color behavior on target devices before claiming device support. Record skipped tests.
|
|
35
49
|
|
|
36
|
-
|
|
50
|
+
## Recovery
|
|
37
51
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
- If npm rejects OIDC authentication, confirm the trusted-publisher fields exactly match this repository and `release.yml`, direct publishing is allowed, and the workflow uses a GitHub-hosted runner with Node/npm versions meeting npm's requirements.
|
|
53
|
+
- If npm publishing succeeds but tagging/release creation fails, do not republish or unpublish the version. Verify the registry's `gitHead`, create the missing `vX.Y.Z` tag on that commit, and create the GitHub release from its changelog.
|
|
54
|
+
- If a release run is interrupted before publishing, rerun `Release` on `master`. Already published versions are skipped.
|
|
55
|
+
- Rotate/revoke any fallback manual publishing token and keep it outside the repository. Trusted publishing needs no persistent npm token.
|
|
41
56
|
|
|
42
|
-
|
|
57
|
+
For an explicitly authorized emergency manual release, authenticate interactively and run `npm publish --access public` on the validated version commit. Create its tag/release afterward. Do not use the automated release script outside GitHub Actions.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@su-engineering/heic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Browser-first HEIC/HEIF decoder. Decodes Apple HEIC photos without unconditionally downloading a WebAssembly codec.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"dump": "node --experimental-strip-types tools/dump.ts",
|
|
41
41
|
"validate-corpus": "node --experimental-strip-types tools/validate-corpus.ts",
|
|
42
42
|
"prepublishOnly": "pnpm typecheck && pnpm build && pnpm test:package && pnpm test:unit",
|
|
43
|
-
"release": "
|
|
43
|
+
"release": "node tools/publish.mjs",
|
|
44
44
|
"test:package": "node tools/check-package.mjs"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|