verify-dist

โดย sentry

Regenerate and commit dist/index.js when source files or runtime deps change

npx skills add https://github.com/getsentry/action-release --skill verify-dist

Verify Dist Skill

action-release ships a bundled dist/index.js built by ncc. The verify-dist CI workflow (.github/workflows/verify-dist.yml) fails any PR where the committed bundle does not match the source. This skill keeps them in sync locally.

When to invoke

  • You changed anything under src/.
  • You bumped a runtime dep in package.json (anything under dependencies, not devDependencies).
  • CI posted "Detected uncommitted changes after build" on a PR.

Modes

--check (default)

Report whether dist/ is in sync with the current source tree. Do not modify anything.

yarn install --frozen-lockfile
yarn build
git diff --ignore-space-at-eol --stat dist/
  • If the diff is empty → dist/ is in sync. Done.
  • If the diff is non-empty → report the changed files and line counts, then ask the user whether to switch to --fix.

--fix

Rebuild and stage dist/.

yarn install
yarn build
git add dist/
git status --short dist/

Do not commit automatically — let the user review the bundle diff first. A reasonable follow-up commit message:

build: regenerate dist/index.js

Or, if tied to a source change:

<type>(<scope>): <summary>

Regenerates dist/index.js.

Before the user commits: pre-commit hook reminder

Whoever runs the follow-up commit needs the repo's pre-commit hooks installed. Verify with ls .git/hooks/pre-commit; if missing, run make (installs yarn deps + pre-commit install) or pre-commit install.

The set-docker-tag-from-branch hook will rewrite action.yml on the first commit of a branch and fail the commit. Recover by staging action.yml and committing again (never --amend — the hook-failed commit never landed):

git add action.yml
git commit -m "<same message>"

CI does not run pre-commit. CI's prepare-docker job rejects PRs where action.yml's Docker tag still matches a semver like 3.6.0, so keeping the tag in sync via the local hook is what prevents the CI failure.

Notes

  • The CI check runs git diff --ignore-space-at-eol dist/ — whitespace-only diffs pass, anything else fails. Match that locally.
  • yarn build shells out to ncc build src/main.ts -e @sentry/cli. @sentry/cli is deliberately excluded from the bundle because it ships its own native binaries at runtime.
  • The bundle diff can be large even for small source changes (minifier + bundler reshuffles). That is expected; just verify the intended symbols are present.
  • Never hand-edit dist/index.js. Always regenerate.

Related files

  • .github/workflows/verify-dist.yml — the CI check this skill satisfies.
  • package.jsonscripts.build — the canonical build command.
  • src/main.ts — the ncc entry point.

Skills เพิ่มเติมจาก sentry

generate-frontend-forms
sentry
คู่มือการสร้างฟอร์มโดยใช้ระบบฟอร์มใหม่ของ Sentry ใช้เมื่อต้องการสร้างฟอร์ม ฟิลด์ฟอร์ม การตรวจสอบความถูกต้อง หรือฟังก์ชันบันทึกอัตโนมัติ
official
sentry-snapshots-cocoa
sentry
การตั้งค่า Sentry Snapshots แบบสมบูรณ์สำหรับโปรเจกต์ Apple/Cocoa ใช้เมื่อถูกขอให้ "ตั้งค่า SnapshotPreviews", "ตั้งค่าการทดสอบ snapshot ของ Apple", "อัปโหลด snapshots ของ Apple ไปยัง…
official
architecture-review
sentry
การตรวจสอบสุขภาพโค้ดเบสระดับทีมงาน ค้นหาโมดูลขนาดใหญ่ที่รวมทุกอย่างไว้ด้วยกัน ความล้มเหลวที่ไม่มีสัญญาณเตือน ช่องว่างด้านความปลอดภัยของชนิดข้อมูล ช่องโหว่ของความครอบคลุมการทดสอบ และปัญหาที่เป็นมิตรกับ LLM
official
linear-type-labeler
sentry
จำแนกประเภทของ Linear issues และใช้ป้ายกำกับประเภทจากระบบป้ายกำกับของ Sentry workspace ตามเนื้อหาของชื่อและคำอธิบายของแต่ละ issue
official
sentry-flutter-sdk
sentry
การตั้งค่า Sentry SDK แบบเต็มสำหรับ Flutter และ Dart ใช้เมื่อถูกขอให้ "เพิ่ม Sentry ใน Flutter", "ติดตั้ง sentry_flutter", "ตั้งค่า Sentry ใน Dart" หรือกำหนดค่าข้อผิดพลาด...
official
sentry-svelte-sdk
sentry
การตั้งค่า Sentry SDK อย่างสมบูรณ์สำหรับ Svelte และ SvelteKit ใช้เมื่อถูกขอให้ "เพิ่ม Sentry ไปยัง Svelte", "เพิ่ม Sentry ไปยัง SvelteKit", "ติดตั้ง @sentry/sveltekit" หรือกำหนดค่า…
official
vercel-react-best-practices
sentry
แนวทางปฏิบัติที่ดีที่สุดในการเพิ่มประสิทธิภาพ React และ Next.js จากทีมวิศวกรรมของ Vercel ควรใช้ทักษะนี้เมื่อเขียน ตรวจสอบ หรือปรับโครงสร้าง React/Next.js…
official
sentry-tanstack-start-sdk
sentry
การตั้งค่า Sentry SDK แบบเต็มสำหรับ TanStack Start React ใช้เมื่อถูกขอให้ "เพิ่ม Sentry ไปยัง TanStack Start", "ติดตั้ง @sentry/tanstackstart-react" หรือกำหนดค่าข้อผิดพลาด…
official