Skip to content

Slim and enforce release packages - #305

Merged
jimhoyd merged 5 commits into
mainfrom
codex/release-package-audit
Sep 20, 2026
Merged

jimhoyd merged 5 commits into
mainfrom
codex/release-package-audit

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Core and extension releases carried source-only documents and broken development export targets, while ordinary installs also pulled TypeScript and the AWS SES SDK even when those optional features were unused. This change defines and enforces the published boundary for core, UI, auth, and admin, trims the archives, and makes TypeScript authoring and SES delivery explicit opt-ins.

The core archive falls from 879,484 to 465,690 packed bytes (47% smaller), from 3,215,580 to 2,047,081 unpacked bytes (36% smaller), and from 500 to 390 files. Default installs avoid roughly 24 MB of TypeScript and 15.5 MB of AWS/Smithy dependencies. Core keeps its executable examples, recipes, schemas, starter, agent skill, and consolidated llms-full.txt; extension archives keep built runtime code plus required usage, legal, security, and notice files.

npm run audit:packages discovers core plus every public workspace package and enforces reviewed allowlists, byte/file budgets, resolved export/bin targets, forbidden file classes, and optional-heavy-peer policy. The audit now runs in workspace verification, core package smoke tests, and extension release preparation, so a future extension cannot ship until its package policy is reviewed.

Validation:

  • npm run verify
  • npm run check
  • npm run typecheck
  • npm run audit:packages
  • npm run test:package:built

@jimhoyd
jimhoyd enabled auto-merge (squash) September 20, 2026 15:10
@jimhoyd
jimhoyd merged commit 410a23b into main Sep 20, 2026
20 checks passed
@jimhoyd
jimhoyd deleted the codex/release-package-audit branch September 20, 2026 15:56
jimhoyd added a commit that referenced this pull request Sep 30, 2026
… condition (#1056) (#1065)

docs/TYPESCRIPT.md said every export entry had a `development` condition
pointing at source; #305 had removed them because the package audit required
every export target to ship, and src/ never does. Workspace packages and tests
therefore read dist/, which went stale after merges until a rebuild.

- Core's and each add-on's exports list `development` first (ahead of `types`,
  so tsc resolves source through customConditions too), naming the .ts source.
- Packing strips the condition: publishedManifest drops it, add-ons are now
  packed from a staged copy with their published manifest like core, and
  workerd-parity packs the same way. The package audit reads the published
  manifest and refuses any export naming source.
- Add-on tsconfig.build.json clears customConditions so the emit (rootDir src)
  reads core's built declarations. The root tsconfig paths workaround for
  audit and the bench's audit prebuild are gone.
- create-extension scaffolds the same shape.
- Tests assert the manifests' shape, that the packed manifest has no source
  condition, and that packages/store resolves @jimhoyd/urlcode/sqlite and
  @jimhoyd/urlcode-audit to source in Node and tsc.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant