found-pixel 0.6.1 → 0.6.2-alpha.98

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.
Files changed (2) hide show
  1. package/README.md +24 -0
  2. package/package.json +7 -1
package/README.md CHANGED
@@ -229,6 +229,30 @@ npm run build # tsc → dist/
229
229
  npm run typecheck # tsc --noEmit
230
230
  ```
231
231
 
232
+ ### Publishing
233
+
234
+ Both paths below are handled by [.github/workflows/publish.yml](.github/workflows/publish.yml) and publish via npm [trusted publishing](https://docs.npmjs.com/trusted-publishers) (OIDC through the `npm` GitHub environment) — there is no npm token stored in the repo.
235
+
236
+ **Alpha prerelease, from a PR.** Put `[publish]` anywhere in the PR's *head commit message*:
237
+
238
+ ```bash
239
+ git commit --allow-empty -m "[publish] trigger alpha"
240
+ git push
241
+ ```
242
+
243
+ The workflow publishes `<package.json version>-alpha.<run_number>` under the dist-tag `alpha-<branch-slug>`, then upserts a comment on the PR with the exact version and a ready-to-run `npx` line. The branch slug is `head_ref` lowercased with every run of non-alphanumeric characters collapsed to `-`, so `feat/Big_Thing` becomes `alpha-feat-big-thing`. Consume it downstream with the tag rather than the version, so each new push is picked up:
244
+
245
+ ```bash
246
+ npm install --save-dev found-pixel@alpha-<branch-slug>
247
+ ```
248
+
249
+ Two gates apply, and both bite silently when they fail:
250
+
251
+ 1. **Path filter** — the PR must change at least one file matching the workflow's `paths:` list (`src/**`, `patches/**`, `package.json`, `package-lock.json`). A docs- or test-only PR never starts the workflow at all, so there is no skipped job to notice.
252
+ 2. **Head commit only** — only `HEAD` is checked, not the whole PR. `[publish]` in an earlier commit does nothing; amend or add a new commit to re-publish. Each push increments `run_number`, so every alpha gets a distinct version.
253
+
254
+ **Release, on merge to main.** Bump `version` in `package.json` as part of the PR. Once it lands on `main` the workflow compares the version against `HEAD~1` — if it changed, it publishes to the `latest` tag, pushes a `v<version>` tag, and creates a GitHub release with generated notes. If the version is untouched, the run succeeds and publishes nothing, which is what makes dependency-only and refactor-only merges safe.
255
+
232
256
  ### Comment format changes
233
257
 
234
258
  The comment generator has snapshot tests that write rendered markdown to `test/snapshots/*.md`. The `.md` files are committed so diffs are reviewable inline when the format changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "found-pixel",
3
- "version": "0.6.1",
3
+ "version": "0.6.2-alpha.98",
4
4
  "description": "Storybook visual regression workflow for Buildkite: build, upload, diff, visually regress, upsert PR comment.",
5
5
  "license": "MIT",
6
6
  "author": "Healthengine",
@@ -58,5 +58,11 @@
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=20"
61
+ },
62
+ "overrides": {
63
+ "axios": "^1.18.0",
64
+ "esbuild": "^0.28.1",
65
+ "form-data": "^4.0.6",
66
+ "minimatch": "^3.1.4"
61
67
  }
62
68
  }