verify-dist

द्वारा sentry

जब स्रोत फ़ाइलें या रनटाइम निर्भरताएँ बदलती हैं तो dist/index.js को पुनर्जनन करें और कमिट करें

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

Verify Dist Skill

action-release ships a bundle in dist/ 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.

dist/ is a directory, not a single file. Alongside dist/index.js, ncc emits code-split chunks (dist/319.index.js and friends) for every dynamic import() in a dependency. @opentelemetry/resources loads its per-platform getMachineId that way, so the chunks arrive with @sentry/node. index.js loads them at runtime with a relative require, so they must sit next to it and must all be committed.

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/
git ls-files --others --exclude-standard dist/   # new chunks show up here, not in git diff
  • If both commands print nothing → dist/ is in sync. Done.
  • If either prints something → 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.

If a hook modifies files, the commit fails. Recover by staging the modified files and committing again (never --amend, because the hook-failed commit never landed):

git add <modified files>
git commit -m "<same message>"

Notes

  • The CI check runs git diff --ignore-space-at-eol dist/ — whitespace-only diffs pass, anything else fails. Match that locally.
  • CI also fails on untracked files in dist/ via git ls-files --others --exclude-standard dist/. git diff alone never reports a brand-new chunk, so a missing chunk would otherwise pass CI and only break at runtime on whichever platform needs it.
  • 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 or any chunk. Always regenerate.

Related files

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

sentry की और Skills

add-ai-integration
sentry
Sentry JavaScript SDK में एक नया AI प्रदाता एकीकरण जोड़ें। नए AI इंस्ट्रुमेंटेशन (OpenAI, Anthropic, Vercel AI, LangChain, आदि) का योगदान करते समय उपयोग करें…
add-cdn-bundle
sentry
निर्दिष्ट सुविधाओं के साथ ब्राउज़र पैकेज के लिए एक नया CDN बंडल बनाएं
agent-prompt
sentry
प्रभावी एजेंट प्रॉम्प्ट और कौशल लिखने के लिए संदर्भ मार्गदर्शिका। नए कौशल बनाते समय, प्रॉम्प्ट गुणवत्ता की समीक्षा करते समय, या वार्डन के प्रॉम्प्ट को समझते समय उपयोग करें।
agents-md
sentry
यह कौशल तब उपयोग किया जाना चाहिए जब उपयोगकर्ता "AGENTS.md बनाएं", "AGENTS.md अपडेट करें", "एजेंट दस्तावेज़ बनाए रखें", "CLAUDE.md सेट अप करें" के लिए कहे, या एजेंट को अद्यतित रखने की आवश्यकता हो...
agents-md
sentry
एजेंट दस्तावेज़ीकरण को 60 पंक्तियों से कम में न्यूनतम और उच्च-सिग्नल बनाएं और बनाए रखें। एजेंट-उन्मुख दस्तावेज़ों के लिए शोध-समर्थित सर्वोत्तम प्रथाओं को लागू करता है; लंबाई बढ़ने पर निर्देश की गुणवत्ता घटती है। तीन मुख्य अनुभागों की आवश्यकता है: पैकेज मैनेजर, फ़ाइल-स्कोप्ड कमांड (प्रति फ़ाइल परीक्षण/लिंट/टाइपचेक), और एजेंट पहचान के साथ कमिट एट्रिब्यूशन। यह न
agents-md
sentry
यह कौशल तब उपयोग किया जाना चाहिए जब उपयोगकर्ता "AGENTS.md बनाएं", "AGENTS.md अपडेट करें", "एजेंट दस्तावेज़ बनाए रखें", "CLAUDE.md सेट अप करें" या एजेंट को बनाए रखने की आवश्यकता हो...
ai-sdk
sentry
ai-sdk — AI एजेंटों के लिए एक इंस्टॉल करने योग्य कौशल, getsentry/webvitals.com द्वारा प्रकाशित।
analytics
sentry
Sentry के फ्रंटएंड UI में analytics इवेंट्स को इंस्ट्रूमेंट और डिस्कवर करें। बटन, पेज, मोडल या कस्टम इंटरैक्शन में ट्रैकिंग जोड़ते समय, नए… परिभाषित करते समय उपयोग करें।