Repository navigation
SDK 0.4.0: typed records, React and CommonJS entries, pinned CDN URLs - #9
Merged
Merged
Conversation
Types - ChurchRecord.fields is a typed ChurchFields (string | null, string[], ServiceTimes with slots), so apps read fields without casts. New types: ChurchFields, ChurchField, ServiceTimes, ServiceSlot. - Types resolve under every moduleResolution, including node10, through top-level main/types and typesVersions. The type test now installs the package into a throwaway app and checks bundler, node16, nodenext and node10. - React 19: onchurch-* event props are typed, HTML props come from React's own types, and fieldMap/strings/lookup are typed. Unknown camelCase props such as maxResults are now type errors. Vue templates get typed @Church-* events; global JSX (React 18, Preact) gets typed on<event> props. Entries - @heresmychurch/lookup/react exports useChurchLookup (React is an optional peer). The registry hook is now generated from it. - Every entry also builds to .cjs with .d.cts types behind a require condition, so Jest loads it without transforms. Client and element - timeout option (15 s default) fails with LookupError code "timeout"; a caller's abort still rejects with AbortError. - On local dev hosts, warn once when client is unset or a chosen church found no fields to fill. - Core size budget is now 5.5 KB gzipped (was 5 KB). Publishing - Each release is also served at /sdk/<version>/, immutable for a year. copy-assets writes it once and never replaces it; site/sdk/0.3.0 and 0.4.0 are committed so pinned versions stay deployed. Docs use the pinned URL, and a test keeps it matching the package version. - package.json gains repository, homepage, bugs, keywords, engines and publishConfig.access; LICENSE and CHANGELOG ship in the tarball. - CI workflow runs pnpm test and pnpm typecheck. Docs: README events, properties, client options and React/Vue usage; widget docs get React 19, React 18 and Vue tabs; README sizes corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…isolated storage On Linux CI, the edge cache's put in waitUntil outlived a test and left a .sqlite-shm file, failing isolated storage cleanup. No test depends on a cache hit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Makes
@heresmychurch/lookupeasier to set up in apps, ahead of publishing it to npm.What changed
Types
ChurchRecord.fieldsis now a typedChurchFields, sorecord.fields.cityisstring | nullwith no casts. It matches whatworker/src/record.tsreturns.moduleResolution, includingnode10, which used to fail with TS2307. The type test now installs the package into a throwaway app and checks bundler, node16, nodenext and node10.onchurch-*event props, HTML props andfieldMap/strings/lookupare typed. Vue templates get typed@church-*events.Entries
@heresmychurch/lookup/reactexportsuseChurchLookup, with React as an optional peer dependency. The registry hook is now generated from it..cjsbuild with.d.ctstypes, so Jest loads the package without transforms.Client and element
timeoutoption (15 s by default). A timed-out request fails with aLookupErrorwhosecodeis"timeout"; a caller's own abort still rejects withAbortError.clientisn't set, or when a chosen church found no fields to fill.Publishing
/sdk/<version>/, served as immutable for a year.copy-assetswrites each version once and never replaces it.publishConfig.access), LICENSE and CHANGELOG in the tarball, and a CI workflow.For reviewers
<church-lookup>, such asmaxResults, are now type errors in React 19. Usemax-results.site/sdk/0.3.0/andsite/sdk/0.4.0/are committed on purpose. A deploy serves only what's insite/, so old pinned versions have to stay in git.wrangler devfails at startup. That's not caused by this branch: workerd rejects theATTRIBUTIONconst exported fromworker/src/index.ts. Please check/sdk/0.4.0/element.jsand its cache headers after deploying.Testing
pnpm test: registry check, 207 Worker tests and 188 SDK tests, all passing.pnpm typecheckpasses, and the shadcn demo type-checks./sdk/0.4.0/strings-es.js, and the two setup warnings each printed once.🤖 Generated with Claude Code