Repository navigation
Publish to npm via Trusted Publishing with provenance - #44
Merged
mathiasbynens merged 2 commits intoOct 12, 2026
Merged
Conversation
added 2 commits
October 12, 2026 10:19
`npm ci` (and thus the `prepare` script) failed on a fresh checkout: Vite 8 ships an `exports`-only package.json, which TypeScript's legacy `moduleResolution: "node"` cannot resolve, so rollup-plugin-dts bailed out with TS2307 while generating `dist/index.d.ts`. Switch to `moduleResolution: "bundler"`, which matches `module: "ESNext"` and the rollup-based build. Also fix the DNS-rebinding test, which assumed that the plugin's middleware runs before Vite's built-in host validation (true on Vite 5/6, but not on Vite 8, where Vite answers the request first). Disable Vite's check in that test via `allowedHosts: true` so that it exercises the plugin's own Host-header check.
Wombat Dressing Room is deprecated and will be turned down in January 2027. Add a `publish-on-tag` GitHub Actions workflow that publishes the package via npm Trusted Publishing (OIDC) with provenance attestation whenever a tag is pushed, matching the trusted publisher configured for this repository on npmjs.com (workflow file `publish-on-tag.yml`). - Remove the Wombat `publishConfig.registry` from package.json, which would otherwise override the registry used by `npm publish`. - Add `.nvmrc` (Node 24, which bundles npm >= 11.5.1 as required for Trusted Publishing). - Document the new tag-based release flow in the README.
bmeurer
approved these changes
Oct 12, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This migrates the package to npm Trusted Publishing with provenance attestation via a
publish-on-tagGitHub Actions workflow. The trusted publisher for this repository has already been configured on npmjs.com (workflow filenamepublish-on-tag.yml, no environment).Changes
Publish to npm via Trusted Publishing with provenance
.github/workflows/publish-on-tag.yml(new): on tag push →npm ci→npm run build→npm test→npm publish --provenance --access public.id-token: writeis scoped to the publish job (top-level permissions are read-only) and both actions are pinned to commit SHAs, matchingChromeDevTools/chrome-devtools-mcp. Based on emoji-test-regex-pattern's workflow.package.json: drop the WombatpublishConfig.registry— it would override the registry used bynpm publish, so the OIDC exchange would never reach npmjs.org..nvmrc: Node 24, which bundles npm ≥ 11.5.1 (required for Trusted Publishing), so nonpm install -g npm@lateststep is needed.README.md: document the new tag-based release flow.Fix clean-checkout build and tests on Vite 8
Pre-existing on
main, but the workflow runs exactly these steps, so the first tagged release would otherwise fail before reachingnpm publish:tsconfig.json:moduleResolution: "node"→"bundler". Vite 8 ships anexports-onlypackage.json(no top-leveltypes), which node10 resolution cannot see, sorollup-plugin-dtsaborted thepreparescript withTS2307: Cannot find module 'vite'.test/index.test.ts: the DNS-rebinding test assumed the plugin's middleware runs before Vite's built-in host validation (true on Vite 5/6); on Vite 8 Vite registershostValidationMiddlewarebeforeconfigureServerhooks and answers the request itself. SettingallowedHosts: truein that test disables Vite's check so the test exercises the plugin's own Host-header guard.Verification
Clean room with Node 24.21 / npm 11.19:
rm -rf node_modules dist && npm ci✅ (fails onmain)npm run build✅ →dist/index.cjs,dist/index.d.ts,dist/index.mjsnpm test✅ 7/7 (6/7 onmain)npm pack --dry-run→ 6 files:LICENSE,README.md,dist/*,package.jsonThe OIDC exchange itself can only be exercised by a real tag push from this repository.
Releasing after this lands
Bump
versioninpackage.jsononmain, thengit tag vX.Y.Z && git push origin vX.Y.Z. The run's log should show the provenance/transparency-log entry, and npmjs.com will show the "Provenance" badge for the release.