fix: export AttachmentMeta, add CI workflow#19
Merged
Conversation
AttachmentMeta is part of the public StackAdapter.getAttachmentMeta signature but was never added to the index.ts export list, so any consumer importing it by name (adapter-sqlite, adapter-api) fails to build with TS2305.
Runs on every push to main and every PR. Also fixes MockAdapter in packages/core/tests/stack.test.ts, which was missing getAttachmentMeta (required by StackAdapter) and the optional flush/close hooks the test suite assigns at runtime — typecheck was failing on main before this. format:check is left out for now since main currently has unrelated formatting drift across several files; can be added once that's cleaned up.
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
AttachmentMetafrompackages/core/src/index.ts— it's part of the publicStackAdapter.getAttachmentMetasignature but was never added to the package's export list, so any consumer importing it by name (adapter-sqlite,adapter-api) failed to build withTS2305. This has been silently broken since PR feat: add optional getAttachmentMeta to StackAdapter and SQLiteAdapter #14..github/workflows/ci.yml) that runsbuild,typecheck,lint, andtestacross all packages on every push tomainand every PR — there was no CI at all before this, which is exactly how the export bug above went unnoticed through two more merges.MockAdapterinpackages/core/tests/stack.test.ts, which was missinggetAttachmentMeta(required byStackAdapter) and the optionalflush/closehooks the test suite assigns at runtime.typecheckwas failing onmainbefore this fix — needed to make the new CI job actually pass.Notes
format:checkis intentionally left out of the CI workflow for now —maincurrently has pre-existing Prettier drift across 8 unrelated files (docs/spec.md, two READMEs,adapter-api/adapter-sqlitesource, etc.). Happy to add a follow-up PR to clean that up and turn the gate on, but didn't want to bundle a large, unrelated reformat into this fix.build,typecheck,lint, andtestall pass cleanly on this branch.Test plan
pnpm run buildpasses (previously failed foradapter-sqlite/adapter-api)pnpm run typecheckpasses (previously failed onpackages/core's own test suite)pnpm run lintpassespnpm run testpasses (248 tests across all packages)Generated by Claude Code