@taraxvoid/voidflow 0.8.3 → 0.9.0

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 +32 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -43,11 +43,34 @@ jobs:
43
43
  runner: my-hosted-runner
44
44
  ```
45
45
 
46
+ ### pnpm sites, build env, extra e2e paths
47
+
48
+ ```yaml
49
+ jobs:
50
+ validate:
51
+ uses: taraxvoid/voidflow/.github/workflows/site-ci.yml@<sha> # <version>
52
+ with:
53
+ package-manager: pnpm # default: bun
54
+ e2e-extra-paths: '["wrangler.jsonc", "site.vars.json"]' # JSON array of globs
55
+ build-env: ${{ format('{{"PUBLIC_SITE_URL":"https://example.com","GIT_SHA":"{0}"}}', github.sha) }}
56
+ ```
57
+
58
+ With `pnpm`, the pnpm version comes from `packageManager` and Node from `volta`
59
+ or `engines` in `package.json`. The lockfile (`bun.lock` or `pnpm-lock.yaml`)
60
+ follows the package manager. `build-env` is a JSON object, visible in logs, so
61
+ no secrets.
62
+
46
63
  ## Workflow Types
47
64
 
48
65
  ### Validation / Checks
49
66
 
50
- Runs lint, typecheck, check for GPL licenses, e2e with Playwright
67
+ Runs lint, typecheck, check for GPL licenses, e2e with Playwright.
68
+
69
+ `site-ci.yml` runs these `package.json` scripts: `lint`, `check`, `build`,
70
+ `test:unit`, `check:licenses`, `test:e2e:full` (PRs into `main`),
71
+ `test:e2e:all` (PRs into `next` and `live`), `test:e2e:a11y` (`next` and
72
+ `live`), and `test:e2e:lighthouse` (`live`). A script the site does not define
73
+ is skipped with a notice, so none of them is required.
51
74
 
52
75
  ### Unlighthouse (performance / SEO budgets)
53
76
 
@@ -125,6 +148,11 @@ jobs:
125
148
  cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
126
149
  ```
127
150
 
151
+ Sites with a single production environment and per-PR previews (no `next` or
152
+ `live` branch) pass `with: { single-environment: true }` to `resolve-env.yml`
153
+ (or the same input on `actions/branch-env-map`). `main` then maps to `prod` and
154
+ `pull_request` events map to `preview`; any other ref fails.
155
+
128
156
  ### Versioning
129
157
 
130
158
  This project uses semver, released with [release-please](https://github.com/googleapis/release-please)
@@ -149,13 +177,13 @@ This repo validates its own workflows and composite actions (`.github/workflows/
149
177
 
150
178
  - **actionlint**: workflow schema/logic; also shellchecks `run:` steps in `.github/workflows/*.yml` automatically (`shellcheck` ships on `ubuntu-latest`)
151
179
  - **check-jsonschema**: schema-checks `actions/**/action.yml` and the workflow files against [SchemaStore](https://www.schemastore.org/)'s `github-action.json` / `github-workflow.json`
152
- - **shellcheck** (`scripts/shellcheck-actions.sh`): checks `run:` steps inside `actions/**/action.yml`, which actionlint doesn't reach
180
+ - **shellcheck** (`scripts/shellcheck-actions.ts`): checks `run:` steps inside `actions/**/action.yml`, which actionlint doesn't reach
153
181
  - **zizmor**: security audit (unpinned refs, script injection via `${{ }}` in `run:`, excess permissions, etc.)
154
182
 
155
183
  ### Local dev setup
156
184
 
157
185
  ```sh
158
- brew install just lefthook actionlint shellcheck yq act uv
186
+ brew install just lefthook actionlint shellcheck bun act uv
159
187
  lefthook install
160
188
  ```
161
189
 
@@ -166,6 +194,6 @@ lefthook install
166
194
 
167
195
  **Colima users:** `.actrc` already disables the docker-socket mount (`--container-daemon-socket -`). `act` binds `/var/run/docker.sock` by default, which doesn't exist under Colima and fails with `operation not supported`. None of these workflow steps need docker-in-docker, so this is safe.
168
196
 
169
- **Run `just dry-run` from a normal checkout, not a linked git worktree.** `act` copies the working tree via `docker cp` rather than a real clone, so a worktree's `.git` pointer back to the parent repo doesn't resolve inside the container, so `git ls-files`-based steps (schema validation, `scripts/shellcheck-actions.sh`) silently see zero files instead of erroring. Verified clean end-to-end (`🏁 Job succeeded`) from a plain clone.
197
+ **Run `just dry-run` from a normal checkout, not a linked git worktree.** `act` copies the working tree via `docker cp` rather than a real clone, so a worktree's `.git` pointer back to the parent repo doesn't resolve inside the container, so `git ls-files`-based steps (schema validation, `scripts/shellcheck-actions.ts`) silently see zero files instead of erroring. Verified clean end-to-end (`🏁 Job succeeded`) from a plain clone.
170
198
 
171
199
  Provided as is under the [MIT license](LICENSE). Issues and pull requests are welcome.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taraxvoid/voidflow",
3
- "version": "0.8.3",
3
+ "version": "0.9.0",
4
4
  "description": "Shared workflows, actions and tooling for @taraxvoid sites",
5
5
  "license": "MIT",
6
6
  "keywords": [