Skip to content

docs: add bundle size and JSON Schema 2020-12 badges - #13

Merged
zhawtof merged 3 commits into
mainfrom
claude/quirky-easley-a4a7f8
May 16, 2026
Merged

docs: add bundle size and JSON Schema 2020-12 badges#13
zhawtof merged 3 commits into
mainfrom
claude/quirky-easley-a4a7f8

Conversation

@zhawtof

@zhawtof zhawtof commented May 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a bundle size badge (bundlejs) next to the npm version — directly relevant to the README's existing notes about Ajv weighing 50–60 KB gzipped and the Cloudflare Worker bundle considerations.
  • Add a JSON Schema 2020-12 badge — the schema draft this package targets is a defining property worth surfacing.

Test plan

  • README renders correctly on GitHub (badges resolve and link to the right places).
  • bundlejs.com size badge populates once npm sees the published package.

🤖 Generated with Claude Code

zhawtof and others added 3 commits May 15, 2026 16:15
The emitted ESM in 0.1.0-alpha.0 worked under bundler resolution but
broke under Node's native ESM resolver (used by vitest in consumer
repos). Three fixes:

- Append .js extensions to all relative imports in src/. tsc preserves
  source paths verbatim, so the emitted .js needs the extensions to
  match Node ESM's strict resolution rules.
- Add `with { type: "json" }` import attributes to the schema import
  and re-export so Node accepts JSON modules under ESM.
- Add .js to the ajv subpath import (`ajv/dist/2020.js`).
- Bump tsconfig `module` from ES2022 to ESNext so TypeScript accepts
  import attributes.
Surfaces two distinctive package properties up front: the gzipped
bundle size (relevant given the README's Cloudflare Worker notes) and
the JSON Schema draft version the schema targets.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves conflicts in package.json (version bump), src/index.ts, and
src/validate-block-kit.ts by taking main's side — the conflict files
were refactored on main (helpers consolidated into helpers.ts,
formatAjvErrors extracted) and this branch only contributed README
badges. README auto-merged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zhawtof
zhawtof merged commit b668fc3 into main May 16, 2026
3 checks passed
@zhawtof
zhawtof deleted the claude/quirky-easley-a4a7f8 branch May 16, 2026 02:59
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