Skip to content

feat!: add verb signatures to forges/schema - #280

Draft
serhalp wants to merge 3 commits into
mainfrom
feat/verb-schemas
Draft

serhalp wants to merge 3 commits into
mainfrom
feat/verb-schemas

Conversation

@serhalp

@serhalp serhalp commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

N/A

🧭 Context

Currently, only "nouns" (more or less, i.e. the "models") are available in the published package.

The rest of the package's core public types are not available in the schemas: the operations ("verb"), their parameters, their results, and their options.

This PR adds the above.

The diff is big because I decided a single schema.json with top-level keys for models and verbs was cleanest, so the whole current file moved "down" a level into models.

As far as I can tell, this vocabulary of "models" and "verbs" is consistent with the package's current public API.

Context: I ran into this while building a forges http proxy service. The package exports almost everything I need, but for verbs I needed to write like... 600 lines of disgusting code to re-generate these schemas from TS.

BREAKING CHANGES

forges/schema now contains a top-level key models, previously named schemas.

// before
import { schemas } from 'forges/schema'
// after
import { models } from 'forges/schema'

The representation of binary values in forges/schema has changed. Values are now boxed in a $bytes type:

// Before
{
  "description": "...some binary field...",
  "x-forges-type": "Uint8Array"
}
// After
{
  "type": "object",
  "properties": {
    "$bytes": { "type": "string", "contentEncoding": "base64" }
  },
  "required": ["$bytes"],
  "additionalProperties": false
}

Potential breaking: A few fields were missing Date revivers. These are now included. (createdAfter, since, and until).

🧪 Testing

Added unit tests

📚 Docs

Added to forges/schemas API docs.

Currently, only "nouns" (more or less, i.e. the "models") are available in the published package.

The rest of the package's core public types are not available in the schemas: the operations
("verb"), their parameters, their results, and their options.

This PR adds the above.

The diff is big because I decided a single `schema.json` with top-level keys for `models` and
`verbs` was cleanest, so the whole current file moved "down" a level into `models`.

As far as I can tell, this vocabulary of "models" and "verbs" is consistent with the package's
current public API.
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
forges.link Ready Ready Preview Nov 11, 2026 9:48pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
Pre-merge checks: Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Description check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/danielroe/forges@280

commit: 887e1a3

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size

Browser entry bundles compared with the PR base. All sizes are in bytes. Lazy totals the minified chunks besides the entry, which load on demand or never.

Bundle Minified Gzip Lazy
forges 4,065 1,793 49,329
forges/github 141,683 42,817 → 42,816 (-1, -0.0%) 30,365
forges/gitlab 101,070 31,372 → 31,370 (-2, -0.0%) 10,037
forges/tangled 96,109 31,371 → 31,372 (+1, +0.0%) 11,787
forges/gitea 97,978 30,210 → 30,208 (-2, -0.0%) 8,414
forges/bitbucket 76,377 24,371 → 24,370 (-1, -0.0%) 3,936
forges/web 8,447 3,615 0

Size changes are informational. pnpm test:size checks entry chunks for webhook translation, and the provider-free bundle against its budget.

Measured for 887e1a3c425ceb97357b0f46b3adca5ebfa23bd9.

This branch was successfully deployed

1 active deployment
Preview — 887e1a3c Deployed Nov 11, 2026 by vercel[bot]
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