Skip to content

ci: fail when generated registry types drift - #915

Merged
harlan-zw merged 1 commit into
mainfrom
ci/registry-types-drift
Sep 16, 2026
Merged

harlan-zw merged 1 commit into
mainfrom
ci/registry-types-drift

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

📚 Description

#907 changed a component JSDoc and merged without running pnpm generate:types. The docs tables read the committed registry-types.json, so they went stale. Every later pnpm run regenerated the file and left checkouts dirty, until another PR regenerated it by accident.

The lint job now regenerates the file after install and fails on any diff:

::error file=packages/script/src/registry-types.json::The generated registry types are out of date. Run `pnpm generate:types` and commit the result.

Heads-up: open PRs that change component props, emits, slots, or registry schemas may now fail this step, for example feat/maplibre-bounds-cluster-options. The fix is pnpm generate:types and a commit.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

PR #907 changed a component JSDoc without regenerating
registry-types.json. Main shipped a stale file that the docs read,
and later pnpm runs left checkouts dirty. The lint job now
regenerates the file and fails on any diff.
@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Checked by hand, since CI on this PR only shows the green path:

  • Three generator runs on a clean main gave identical output and zero diff, so the check is deterministic and starts green.
  • Editing the trigger JSDoc in ScriptCrisp.vue without regenerating made the step print the error annotation and exit 1. After restoring the file, it exits 0.

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scripts-playground Ready Ready Preview Sep 16, 2026 1:14pm UTC

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Sep 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/scripts@915

commit: 21b8fe1

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 98633301-746b-4159-9b96-a660418ef171

📥 Commits

Reviewing files that changed from the base of the PR and between 713ebe0 and 21b8fe1.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The CI lint job now runs pnpm generate:types. It checks packages/script/src/registry-types.json with git diff --exit-code. If the file changes, the job emits an error annotation and exits with code 1.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 21b8f

The lint job now catches stale generated registry types before they are merged, with no actionable merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: CI fails when generated registry types drift.
Description check ✅ Passed The description directly explains the registry type drift problem, the CI change, the failure behavior, and the required remediation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/registry-types-drift

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

📦 Package Size

No notable size changes

📚 22 runtime dependencies (no change)

All tracked output (25)
Package output Gzipped Raw
@nuxt/scripts-cli · runtime dependencies 72 kB 355 kB
@nuxt/scripts-cli · dependency magicast 72 kB 355 kB
@nuxt/scripts-cli · export . 3.4 kB 12 kB
@nuxt/scripts-cli · published payload 3.4 kB 12 kB
@nuxt/scripts · runtime dependencies 436 kB 1.92 MB
@nuxt/scripts · dependency @nuxt/devtools-kit 2.9 kB 7.7 kB
@nuxt/scripts · dependency @oxc-project/types 0 B 0 B
@nuxt/scripts · dependency @vueuse/core 174 kB 707 kB
@nuxt/scripts · dependency @vueuse/shared 39 kB 154 kB
@nuxt/scripts · dependency h3 34 kB 146 kB
@nuxt/scripts · dependency semver 25 kB 72 kB
@nuxt/scripts · dependency sirv 8.8 kB 21 kB
@nuxt/scripts · dependency unstorage 70 kB 225 kB
@nuxt/scripts · dependency valibot 82 kB 590 kB
@nuxt/scripts · dist/runtime 101 kB 298 kB
@nuxt/scripts · export . 26 kB 106 kB
@nuxt/scripts · export ./registry 29 kB 90 kB
@nuxt/scripts · export ./stats 13 kB 91 kB
@nuxt/scripts · export ./types-source 47 kB 239 kB
@nuxt/scripts · published payload 216 kB 824 kB
@nuxt/scripts · components runtime 2.5 kB 6.4 kB
@nuxt/scripts · composables runtime 7.5 kB 24 kB
@nuxt/scripts · registry runtime 45 kB 133 kB
@nuxt/scripts · server runtime 29 kB 87 kB
@nuxt/scripts · utils runtime 2.5 kB 7.4 kB
Runtime dependencies (22)
Package Dependency Requested Resolved Cost
@nuxt/scripts-cli magicast ^0.5.5 0.5.5 📦 72 kB gzip
@nuxt/scripts-cli pathe ^2.0.3 2.0.3 ♻️ free via Nuxt 4.5.2
@nuxt/scripts @nuxt/devtools-kit ^3.4.2 3.4.2 📦 2.9 kB gzip
@nuxt/scripts @oxc-project/types ^0.150.0 0.150.0 📦 0 B gzip
@nuxt/scripts @vueuse/core ^14.4.0 14.4.0 📦 174 kB gzip
@nuxt/scripts @vueuse/shared ^14.4.0 14.4.0 📦 39 kB gzip
@nuxt/scripts consola ^3.4.2 3.4.2 ♻️ free via Nuxt 4.5.2
@nuxt/scripts defu ^6.1.7 6.1.7 ♻️ free via Nuxt 4.5.2
@nuxt/scripts h3 ^1.15.11 1.15.11 📦 34 kB gzip
@nuxt/scripts magic-string ^1.4.1 1.4.1 ♻️ free via Nuxt 4.5.2
@nuxt/scripts ofetch ^1.5.1 1.5.1 ♻️ free via Nuxt 4.5.2
@nuxt/scripts ohash ^2.0.12 2.0.12 ♻️ free via Nuxt 4.5.2
@nuxt/scripts oxc-walker ^1.1.1 1.1.1 ♻️ free via Nuxt 4.5.2
@nuxt/scripts pathe ^2.0.3 2.0.3 ♻️ free via Nuxt 4.5.2
@nuxt/scripts semver ^7.8.5 7.8.5 📦 25 kB gzip
@nuxt/scripts sirv ^3.0.2 3.0.2 📦 8.8 kB gzip
@nuxt/scripts std-env ^4.2.0 4.2.0 ♻️ free via Nuxt 4.5.2
@nuxt/scripts ufo ^1.6.4 1.6.4 ♻️ free via Nuxt 4.5.2
@nuxt/scripts ultrahtml ^1.7.0 1.7.0 ♻️ free via Nuxt 4.5.2
@nuxt/scripts unplugin ^3.3.0 3.3.0 ♻️ free via Nuxt 4.5.2
@nuxt/scripts unstorage ^1.17.5 1.17.5 📦 70 kB gzip
@nuxt/scripts valibot ^1.5.0 1.5.0 📦 82 kB gzip

Baseline: main_@_713ebe0f___2026-09-16 · gzip is the comparison metric · changes below 16 B gzip are ignored

@harlan-zw harlan-zw added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 16, 2026
@harlan-zw

harlan-zw commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-09-16 13:47 UTC.

GitHub merged this pull request.

No material findings were recorded.

3288e7db-7bf9-4188-ae6b-5b249e10d384

@harlan-zw harlan-zw added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 16, 2026
@harlan-zw
harlan-zw merged commit 240a913 into main Sep 16, 2026
16 checks passed
@harlan-zw
harlan-zw deleted the ci/registry-types-drift branch September 16, 2026 13:45
@harlan-zw harlan-zw removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Sep 16, 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.

1 participant