Skip to content

fix: build Swagger UI assets during releases - #295

Closed
Puppo wants to merge 1 commit into
fastify:mainfrom
Puppo:fix/release-build-assets
Closed

Puppo wants to merge 1 commit into
fastify:mainfrom
Puppo:fix/release-build-assets

Conversation

@Puppo

@Puppo Puppo commented Oct 7, 2026

Copy link
Copy Markdown
Member

The release workflow currently skips Swagger UI asset preparation: the repository sets ignore-scripts=true in .npmrc, and the shared workflow runs npm run --if-present release:build, but that script is missing. Automatic prepare and prepublishOnly hooks therefore do not generate the assets during publication. npm documents this behavior.

Adds "release:build": "npm run prepare" so the shared workflow explicitly generates static UI files, branding, OAuth redirect assets, and csp.json before publication. Explicit npm run commands still execute with scripts disabled. This changes only one line in package.json and preserves the existing hooks.

Addresses the review on #294. That PR has merged; this is a separate follow-up against current main.

Validation

Tested with Node.js 24.21.0 and npm 11.19.0:

  • npm install --ignore-scripts --no-audit --no-fund passed; confirmed no static assets were generated during installation.
  • npm config get ignore-scripts returned true.
  • npm run --if-present release:build passed and generated all 12 required nonempty static files.
  • npm pack --json --ignore-scripts passed; verified the tarball contains all 12 assets, runtime/declaration entry points, and valid csp.json.
  • npm run lint passed.
  • npm test passed: unit tests with 100% coverage and declaration tests. Local networking used per-process NODE_OPTIONS=--dns-result-order=ipv4first.

The separate Playwright browser E2E suite was not run locally. Package version remains 6.1.1. No release workflow was dispatched and no package was published.

@Puppo
Puppo marked this pull request as ready for review October 7, 2026 09:58
@ilteoood

ilteoood commented Oct 7, 2026

Copy link
Copy Markdown
Member

Closing this, it seems that has been merged somewhere else

@ilteoood ilteoood closed this Oct 7, 2026
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.

2 participants