Skip to content

chore: workspace dependency hygiene + CI/release pipeline - #1

Merged
ExorTek merged 8 commits into
masterfrom
chore/workspace-hygiene
Aug 6, 2026
Merged

chore: workspace dependency hygiene + CI/release pipeline#1
ExorTek merged 8 commits into
masterfrom
chore/workspace-hygiene

Conversation

@ExorTek

@ExorTek ExorTek commented Aug 6, 2026

Copy link
Copy Markdown
Owner

What & why

Repo hygiene pass that reorganizes dependency declarations, adds a CI/release pipeline, and documents security + contribution conventions. No library source (packages/*/src) changes — behaviour is unchanged; all unit (176) and integration (87) tests pass.

Changes

Dependencies

  • Hoist test framework versions to the workspace root. The express/express4 and fastify/fastify4 aliases (+@types/express) were declared in each publishable package's devDependencies. They are test-only tooling, so they now live once in the root package.json; the package tests resolve them through workspace hoisting. test-servers keeps its own copies (private workspace, runtime imports).
  • Resolve the core dependency via workspace:^. express/fastify pinned @exortek/nosql-sanitize-core at a hardcoded ^3.0.0; workspace:^ lets yarn substitute the current core version as a caret range at publish time (verified: packed manifest resolves to ^3.0.0). This requires publishing through yarn, so the publish:* scripts move to yarn ... npm publish and publish:all publishes topologically.
  • Bump fastify-plugin to v6.

Tooling & CI

  • format:check (read-only prettier gate) + verify (format:check + test + test:servers) scripts.
  • .github/workflows/ci.yml — runs yarn verify on push/PR/dispatch, --immutable install, concurrency-guarded.
  • .github/workflows/codeql.yml (+ config) — scans packages/*/src only.
  • .github/workflows/release.yml — manual, gated on tests, topological publish via OIDC Trusted Publishing + provenance.

Docs

  • SECURITY.md — supported versions, private advisory flow, disclosure timeline, sanitizer hardening invariants.
  • CONTRIBUTING.md — setup, root-hoisted framework versions, commit conventions, the yarn verify gate.

Follow-up / setup needed

  • Regenerated yarn.lock — it was committed empty (0 bytes), which would break yarn install --immutable in CI. Now populated.
  • Release workflow needs one-time setup: configure an npm Trusted Publisher for each of the three @exortek/* packages (repo ExorTek/nosql-sanitize, workflow release.yml), or switch the workflow to an NPM_TOKEN secret.

ExorTek added 8 commits August 6, 2026 13:14
The express/fastify version aliases (express/express4, fastify/fastify4)
and @types/express were declared in each publishable package's
devDependencies. They are test-only tooling: the package tests require
both framework majors to assert parity across them. Declaring them once
at the workspace root keeps the published packages free of dev-only
framework aliases and lets the tests resolve them through hoisting.

test-servers keeps its own express4/5 + fastify4/5 because it is a
private workspace that imports them at runtime.
express and fastify pinned @exortek/nosql-sanitize-core at a hardcoded
^3.0.0, so every core version bump had to be mirrored by hand. Switching
to workspace:^ lets yarn substitute the current core version as a caret
range at publish time (verified: the packed manifest resolves to
^3.0.0), so the range tracks the core version automatically.

This requires publishing through yarn (npm publish leaves the literal
workspace:^ string in the tarball), so the publish scripts move from
raw npm publish to yarn workspace ... npm publish, and publish:all now
publishes topologically (core before express/fastify) via foreach.
Tracks the current major of fastify-plugin. The plugin wrapper API used
by the sanitizer (fp(plugin, meta)) is unchanged across the major, and
the Fastify 4/5 integration suites pass on it.
format:check is the read-only prettier gate CI runs (the existing format
script writes). verify chains format:check + test + test:servers into a
single local mirror of the CI pipeline, so contributors can reproduce
the gate before pushing.
Runs on push to master, every PR, and manual dispatch. Installs with
--immutable and runs yarn verify (format:check + unit tests + the
Express 4/5 and Fastify 4/5 integration servers). Concurrency-guarded so
a new push cancels the in-flight run for the same ref.
Scans the shipped library source only (packages/*/src, scoped in
codeql-config.yml) so tests, examples, benchmarks, and the test servers
are never reported on. Runs on push/PR to master, a weekly schedule, and
manual dispatch; docs-only changes skip the run.
Manual (workflow_dispatch) publish with a dry_run toggle. Gates on the
full test suite, then publishes the public packages topologically (core
before express/fastify) via yarn npm publish, which substitutes the
workspace:^ range. Uses OIDC Trusted Publishing + provenance rather than
a stored NPM_TOKEN; each package needs a trusted publisher configured on
npmjs.com first.
SECURITY.md documents supported versions, private advisory reporting,
disclosure timeline, and the sanitizer's hardening invariants (operator
stripping, prototype-pollution defence, no regex lastIndex leakage,
bounded recursion). CONTRIBUTING.md covers setup, the root-hoisted
framework versions, commit conventions, and the yarn verify gate.
Copilot AI lite review requested due to automatic review settings August 6, 2026 10:19

This comment was marked as abuse.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@ExorTek
ExorTek merged commit 76cc958 into master Aug 6, 2026
3 checks passed
@ExorTek
ExorTek deleted the chore/workspace-hygiene branch August 6, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants