Skip to content

Phase 9: Publish prep - bundle Action, license, README, package metadata - #9

Merged
dakshcodez merged 1 commit into
mainfrom
phase-9/publish-and-polish
Aug 15, 2026
Merged

Phase 9: Publish prep - bundle Action, license, README, package metadata#9
dakshcodez merged 1 commit into
mainfrom
phase-9/publish-and-polish

Conversation

@dakshcodez

Copy link
Copy Markdown
Owner

Summary

Implements Phase 6 (publish and polish) - the parts that don't require external credentials or manual web UI steps. Actual npm publish, GitHub Marketplace listing, and the demo video are explicitly left to the user (agreed in conversation - I have no npm login, Marketplace listing isn't API-exposed, and I can't record video in this environment).

Bundled @seal/action into a single committed dist/index.js via esbuild (swapped in after @vercel/ncc couldn't resolve @actions/core's modern conditional exports map). .gitignore now carves out an exception for packages/action/dist specifically, since GitHub Actions consumes this directly from git with no install step.

This surfaced a real, would-have-been-fatal bug: tree-sitter's grammar/runtime .wasm files are resolved from node_modules at runtime, which doesn't exist for a bundled action installed in a third-party repo. Verified with a from-scratch isolation test (bundle in an empty directory, zero node_modules) that this failed outright before the fix. Fixed by having grammar-loader.ts check for the wasm files sitting next to the current module first (same convention web-tree-sitter's own Parser.init() already uses), falling back to normal node_modules resolution for everyone else - plus a scripts/copy-wasm.mjs build step that copies the five required files into dist/, resolved via @seal/core's own dependency tree so it's immune to npm's hoisting behavior. Re-verified the isolation test now succeeds, and normal (non-bundled) CLI/core usage is unaffected.

Also added a CI step that rebuilds and diffs packages/action/dist against what's committed, so a future change that forgets to rebuild the bundle fails loudly instead of silently shipping a stale action.

Other changes:

  • action.yml: added branding (required for Marketplace listing)
  • LICENSE (MIT) at repo root, copied into packages/core/packages/cli (npm only auto-includes a LICENSE that exists inside the package being published)
  • packages/cli/packages/core package.json: added license/repository/bugs/keywords/homepage; pinned @seal/cli's dependency on @seal/core from "*" to "^0.1.0" (harmless locally, wrong for real npm consumers)
  • packages/cli/README.md: focused install/usage doc for the actual npm package page
  • README.md: replaced the placeholder with real setup instructions and a condensed summary of TESTING.md's accuracy results

Test plan

  • npm run lint / typecheck / build all pass
  • npm publish --dry-run inspected by hand for both packages - correct files, correct LICENSE/README inclusion, correct package size
  • Wasm-bundling fix verified with a genuine from-scratch isolation test: copied the bundle + wasm files into an empty directory (no node_modules anywhere) and confirmed real code parsing succeeds
  • Confirmed normal (non-bundled) @seal/core/@seal/cli parsing still works unchanged after the grammar-loader.ts change
  • Actual npm publish, GitHub Marketplace listing, demo video - deliberately out of scope, left to the user

Implements Phase 6 (publish and polish) - the code/content parts that
don't require external credentials or manual web UI steps:

- Bundled @seal/action via esbuild (swapped in after @vercel/ncc
  turned out unable to resolve @actions/core's modern conditional
  exports map) into a single committed dist/index.js, since GitHub
  Actions checks this out directly with no install step. .gitignore
  now carves out an exception for packages/action/dist specifically -
  every other package's dist stays untracked build output, but this
  one IS the distributable.

  This surfaced a real, would-have-been-fatal bug: the tree-sitter
  grammar and runtime .wasm files are resolved from node_modules at
  runtime, which doesn't exist at all for a bundled action consumed
  by a third-party repo. Verified with a from-scratch isolation test
  (bundle copied to an empty directory, zero node_modules) that this
  failed outright before the fix. Fixed by having grammar-loader.ts
  check for the wasm files sitting next to the current module first
  (matching the same convention web-tree-sitter's own Parser.init()
  already uses for its runtime wasm), falling back to the existing
  node_modules resolution for everyone else - and added
  scripts/copy-wasm.mjs to the build step, which copies the five
  required wasm files into dist/ alongside index.js, resolved via
  @seal/core's own dependency tree so it's immune to however npm
  happened to hoist things. Re-verified the same isolation test now
  succeeds, and that normal (non-bundled) CLI/core usage still works
  unchanged.

  Also added a CI step that rebuilds and diffs packages/action/dist
  against what's committed, so a future change that forgets to
  rebuild the bundle fails loudly instead of silently shipping a
  stale action.

- action.yml: added the `branding` field (icon + color), required
  for GitHub Marketplace listing.
- Added LICENSE (MIT) at the repo root and copied into packages/core
  and packages/cli, since npm only auto-includes a LICENSE that
  actually exists inside the package being published, not one only
  at the repo root.
- packages/cli and packages/core package.json: added license,
  repository, bugs, keywords, homepage - metadata that matters once
  these are real, publicly-discoverable npm packages, not just local
  workspace members. Pinned @seal/cli's dependency on @seal/core from
  "*" to "^0.1.0" - the wildcard is harmless for local workspace
  resolution but wrong for what actually ships to real npm consumers.
- packages/cli/README.md: focused install/usage doc for what actually
  shows up on the npm package page, separate from the project root
  README aimed at GitHub visitors.
- README.md: replaced the placeholder with real setup instructions
  for both the CLI and the Action, and a condensed summary of the
  real-world accuracy results from TESTING.md.

Verified: full lint/typecheck/build passes; npm publish --dry-run for
both packages inspected by hand (correct files, correct LICENSE/
README inclusion, correct package size); the wasm-bundling fix
verified with a genuine from-scratch isolation test proving real
parsing works with zero node_modules present, not just that the
bundle "looks right."

Deliberately out of scope here, left to the user: the actual `npm
publish` (needs real npm login), the GitHub Marketplace listing
(a manual step when cutting a release, not exposed via API), and
the demo video (outside what can be produced in this environment).
@dakshcodez
dakshcodez merged commit 20d114a into main Aug 15, 2026
1 check passed
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