Phase 9: Publish prep - bundle Action, license, README, package metadata - #9
Merged
Conversation
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).
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.
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/actioninto a single committeddist/index.jsvia esbuild (swapped in after@vercel/ncccouldn't resolve@actions/core's modern conditional exports map)..gitignorenow carves out an exception forpackages/action/distspecifically, 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
.wasmfiles are resolved fromnode_modulesat 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, zeronode_modules) that this failed outright before the fix. Fixed by havinggrammar-loader.tscheck for the wasm files sitting next to the current module first (same conventionweb-tree-sitter's ownParser.init()already uses), falling back to normalnode_modulesresolution for everyone else - plus ascripts/copy-wasm.mjsbuild step that copies the five required files intodist/, 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/distagainst 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: addedbranding(required for Marketplace listing)LICENSE(MIT) at repo root, copied intopackages/core/packages/cli(npm only auto-includes a LICENSE that exists inside the package being published)packages/cli/packages/corepackage.json: addedlicense/repository/bugs/keywords/homepage; pinned@seal/cli's dependency on@seal/corefrom"*"to"^0.1.0"(harmless locally, wrong for real npm consumers)packages/cli/README.md: focused install/usage doc for the actual npm package pageREADME.md: replaced the placeholder with real setup instructions and a condensed summary ofTESTING.md's accuracy resultsTest plan
npm run lint/typecheck/buildall passnpm publish --dry-runinspected by hand for both packages - correct files, correct LICENSE/README inclusion, correct package sizenode_modulesanywhere) and confirmed real code parsing succeeds@seal/core/@seal/cliparsing still works unchanged after thegrammar-loader.tschangenpm publish, GitHub Marketplace listing, demo video - deliberately out of scope, left to the user