Security follow-ups to 1.16.7: changelog, access guide, skills, API table, release gate, reference index
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
be2e6d52d9
commit
ccc6f85924
+18
-2
@@ -754,7 +754,8 @@ dev is running.
|
||||
pnpm build:starter && pnpm test:int && pnpm starter:gate` before every `npm publish`, so you cannot release a stale
|
||||
dist, a version with red tests or a starter that does not produce a working site
|
||||
(docs/project-starter.md; `pnpm clean && pnpm build` above is only a grep check before the commit). `prepare` (`pnpm build`) builds the package on install from git and on `pnpm install` in the repo.
|
||||
`typecheck` and `lint` are **not** in `prepublishOnly` — before a commit: `pnpm typecheck && pnpm lint &&
|
||||
`pnpm e2e:built` is **not** in `prepublishOnly` either (it needs the reference site's `.env` and database): it is a
|
||||
required step of §8.1. `typecheck` and `lint` are **not** in `prepublishOnly` — before a commit: `pnpm typecheck && pnpm lint &&
|
||||
pnpm test:int` (CI in `.gitea/workflows/ci.yml` runs typecheck, lint, test:int and build on push and PR).
|
||||
|
||||
### 8.1b The reference site (`reference/`) — part of every release
|
||||
@@ -769,7 +770,21 @@ done until the reference site uses it. Before `npm version`:
|
||||
- [ ] Local run green: `pnpm build` (plugin) → `pnpm --dir reference install --ignore-workspace` (refreshes the injected
|
||||
copy) → in `reference/`: `pnpm generate:types && pnpm generate:importmap` (no diff), `pnpm typecheck`,
|
||||
`pnpm seed` on a throwaway MongoDB, `pnpm build`, `ALLOW_LOCAL_MEDIA=1 PORT=3100 pnpm start`,
|
||||
`pnpm payload run e2e/create-test-admin.ts`, `pnpm test:e2e`.
|
||||
`pnpm test:e2e` (Playwright's global setup runs `e2e/create-test-admin.ts` first: test admins reset, stored 2FA
|
||||
attempt counts cleared, so the result does not depend on what ran before; the fresh-site spec on an EMPTY
|
||||
database: `E2E_SKIP_ADMIN_SETUP=1`).
|
||||
- [ ] **`pnpm e2e:built` green — required, no release without it.** It builds the reference site with webpack AND with
|
||||
Turbopack (with the late-staff fixture, `E2E_LATE_STAFF=1`) and runs, on each built site: the account rules of
|
||||
staff collections the project or a later plugin adds (`e2e/late-staff.spec.ts`), and "no package manifest among
|
||||
the public files". Unit tests run unminified code and cannot see what a bundle renames or publishes — two
|
||||
defects of the 1.16.7 review lived only in a built site. Needs `reference/.env` (local seeded MongoDB, `E2E_*`
|
||||
test admin); port from `E2E_BASE_URL`. Afterwards `git status` is clean (the command puts the reference site's
|
||||
generated types and import map back, also when it fails); rebuild the reference site without the fixture
|
||||
(`pnpm build` there) before other checks.
|
||||
- [ ] `pnpm version <x.y.z>` or `npm version <x.y.z> --no-git-tag-version` writes the version into `src/version.ts`
|
||||
as well (the `version` script; by hand: `node scripts/write-version.mjs`). **Not `pnpm --ignore-workspace
|
||||
version …`**: that runs the `version` script itself with the arguments and fails. `test/version.test.ts` fails
|
||||
when the constant differs from package.json.
|
||||
- [ ] `pnpm reference:index` → `docs/agent/reference-site/INDEX.md` committed (`test/referenceIndex.test.ts` fails otherwise;
|
||||
a new file in `reference/` needs its line in `scripts/reference-index.mjs` → `DESCRIPTIONS`).
|
||||
- [ ] CI job `reference` green (`.gitea/workflows/ci.yml`), the starter check included once `ipal-kit create` ships.
|
||||
@@ -790,6 +805,7 @@ The site uses the plugin as `file:..` with `dependenciesMeta.injected`, so the p
|
||||
| package contract | `test/exports.test.ts` | every `@intecion/ipal-kit/…` path from the docs exists in `exports` |
|
||||
| docs ↔ code | `test/docsConsistency.test.ts` | names imported in the docs exist in the entry points / `lib/content`; every public export is described in the docs |
|
||||
| e2e | `pnpm test:e2e` (Playwright) | `pnpm test` = `test:int` + `test:e2e` |
|
||||
| built site, both bundlers | `pnpm e2e:built` (`scripts/e2e-built.mjs`, the reference site) | what only a production bundle shows: nothing decided by a function's name, nothing private among the public files (§8.1) |
|
||||
|
||||
Rules: **every fixed bug = a regression test** (check that it fails on the old code);
|
||||
no network (`vi.spyOn(globalThis, 'fetch')`); env through `vi.stubEnv` + `unstubAllEnvs`;
|
||||
|
||||
Reference in New Issue
Block a user