Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/codspeed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- run: pnpm i

- uses: CodSpeedHQ/action@v4
- uses: CodSpeedHQ/action@v5
with:
mode: simulation
run: pnpm run bench
6 changes: 3 additions & 3 deletions apps/content/blume.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { posthog } from 'blume/analytics'
import { cloudflare } from 'blume/deploy'
import { filesystem } from 'blume/sources'

import { serverSourcemapsPlugin } from './dev/server-sourcemaps.ts'
import { searchCodeIndexPlugin } from './search/code-index.ts'
import { sponsorAdsInjectPlugin } from './sponsors/inject.ts'
import { serverSourcemapsPlugin } from './dev/server-sourcemaps'
import { searchCodeIndexPlugin } from './search/code-index'
import { sponsorAdsInjectPlugin } from './sponsors/inject'

export default defineConfig({
title: 'oRPC',
Expand Down
2 changes: 1 addition & 1 deletion apps/content/sponsors/ads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* the sponsor wall's data has no business in the browser bundle — slots.ts
* carries only the handful of sponsors that bought a position.
*/
import slots from './slots.ts'
import slots from './slots'

export interface AdSponsor {
name: string
Expand Down
4 changes: 2 additions & 2 deletions apps/content/sponsors/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { AdSponsor } from './ads.ts'
import { relAttribute, soldSponsors, tintStyle } from './ads.ts'
import type { AdSponsor } from './ads'
import { relAttribute, soldSponsors, tintStyle } from './ads'

// Only the inline slots rotate. The grid is static and carries no
// [data-sponsor-slot], so nothing here touches it.
Expand Down
2 changes: 1 addition & 1 deletion apps/content/sponsors/data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The GitHub Sponsors wall behind the landing page and the /sponsors table.
// Paid ad slots are a separate concern and live in ads.ts.
import sponsors from './sponsors.ts'
import sponsors from './sponsors'

export const GITHUB_SPONSORS_URL = 'https://github.com/sponsors/dinwwwh'
export const OPEN_COLLECTIVE_URL = 'https://opencollective.com/middleapi'
Expand Down
1 change: 0 additions & 1 deletion apps/content/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"module": "preserve",
"types": ["node"]
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion benches/openapi-link-handler.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
EVENTS_10KB,
handlers,
PAYLOAD_10KB,
} from './__shared__/payloads.ts'
} from './__shared__/payloads'

const serializer = new OpenAPISerializer({ handlers })

Expand Down
2 changes: 1 addition & 1 deletion benches/openapi-serializer.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
PAYLOAD_5MB,
PAYLOAD_5MB_WITH_FILES,
PAYLOAD_100KB,
} from './__shared__/payloads.ts'
} from './__shared__/payloads'

const serializer = new OpenAPISerializer({ handlers })

Expand Down
2 changes: 1 addition & 1 deletion benches/rpc-link-handler.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
EVENTS_10KB,
handlers,
PAYLOAD_10KB,
} from './__shared__/payloads.ts'
} from './__shared__/payloads'

const serializer = new RPCSerializer({ handlers })

Expand Down
2 changes: 1 addition & 1 deletion benches/rpc-serializer.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
PAYLOAD_5MB,
PAYLOAD_5MB_WITH_FILES,
PAYLOAD_100KB,
} from './__shared__/payloads.ts'
} from './__shared__/payloads'

const serializer = new RPCSerializer({ handlers })

Expand Down
2 changes: 1 addition & 1 deletion benches/static-file-handler.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { RPCHandlerCodec, StandardHandler } from '@orpc/server/standard'
import type { StandardLazyRequest } from '@standard-server/core'
import { bench } from 'vitest'

import { drainBody } from './__shared__/payloads.ts'
import { drainBody } from './__shared__/payloads'

const rootDir = mkdtempSync(path.join(tmpdir(), 'orpc-static-file-bench-'))

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@
"crossws": "^0.4.17",
"github-slugger": "^2.0.0",
"jsdom": "^29.1.1",
"oxfmt": "^0.76.0",
"oxlint": "^1.91.0",
"oxlint-tsgolint": "^7.0.2005",
"oxfmt": "^0.77.0",
"oxlint": "^1.92.0",
"oxlint-tsgolint": "^7.0.2006",
"pino": "^10.4.0",
"pkg-pr-new": "^0.0.93",
"react": "^19.3.1",
"sherif": "^1.13.0",
"supertest": "^7.3.1",
"tsdown": "^0.23.7",
"typescript": "^7.0.2",
"typescript-6": "npm:typescript@^6.0.3",
"valibot": "^1.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}
},
"scripts": {
"prepack": "tsc"
"prepack": "tsdown"
},
"dependencies": {
"@orpc/client": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-sdk/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
it('exports createToolFactory', async () => {
expect(Object.keys(await import('./index.ts'))).toContain('createToolFactory')
expect(Object.keys(await import('./index'))).toContain('createToolFactory')
})
4 changes: 2 additions & 2 deletions packages/ai-sdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './tool.ts'
export * from './tool-meta.ts'
export * from './tool'
export * from './tool-meta'
2 changes: 1 addition & 1 deletion packages/ai-sdk/src/tool-meta.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { asyncIteratorObject, oc } from '@orpc/contract'
import { os } from '@orpc/server'
import { z } from 'zod'

import { aiSdkTool } from './tool-meta.ts'
import { aiSdkTool } from './tool-meta'

describe('aiSdkTool meta', () => {
it('infer input and output types from the contract', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-sdk/src/tool-meta.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { oc } from '@orpc/contract'

import { aiSdkTool, getAiSdkToolMeta } from './tool-meta.ts'
import { aiSdkTool, getAiSdkToolMeta } from './tool-meta'

describe('aiSdkTool meta', () => {
it('returns a plugin with name ~ai-sdk/tool', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-sdk/src/tool-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
import type { Lazy } from '@orpc/server'
import type { JSONValue, Tool } from 'ai'

import type { ToolOutput } from './tool.ts'
import type { ToolOutput } from './tool'

/**
* The [function tool](https://ai-sdk.dev/docs/foundations/tools) member of the AI SDK `Tool` union,
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-sdk/src/tool.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { InferToolInput, InferToolOutput } from 'ai'
import { generateText } from 'ai'
import { z } from 'zod'

import { createToolFactory, implementToolFactory } from './tool.ts'
import { createToolFactory, implementToolFactory } from './tool'

describe('implementToolFactory', () => {
it('can use as a tool', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/ai-sdk/src/tool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { generateText } from 'ai'
import { MockLanguageModelV4 } from 'ai/test'
import * as z from 'zod'

import { aiSdkTool } from './tool-meta.ts'
import { createToolFactory, implementToolFactory } from './tool.ts'
import { createToolFactory, implementToolFactory } from './tool'
import { aiSdkTool } from './tool-meta'

function toolCallModel(toolName: string, args: unknown) {
return new MockLanguageModelV4({
Expand Down
4 changes: 2 additions & 2 deletions packages/ai-sdk/src/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import {
import type { FlexibleSchema, JSONValue, Tool, ToolResultPart } from 'ai'
import { tool } from 'ai'

import type { FunctionTool } from './tool-meta.ts'
import { getAiSdkToolMeta } from './tool-meta.ts'
import type { FunctionTool } from './tool-meta'
import { getAiSdkToolMeta } from './tool-meta'

const ANY_SCHEMA: FlexibleSchema = {
'~standard': {
Expand Down
2 changes: 1 addition & 1 deletion packages/arktype/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
},
"scripts": {
"prepack": "tsc"
"prepack": "tsdown"
},
"dependencies": {
"@orpc/json-schema": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/arktype/src/converter.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type } from 'arktype'
import * as z from 'zod'

import { ArkTypeToJsonSchemaConverter } from './converter.ts'
import { ArkTypeToJsonSchemaConverter } from './converter'

describe('arkTypeToJsonSchemaConverter', () => {
const converter = new ArkTypeToJsonSchemaConverter()
Expand Down
2 changes: 1 addition & 1 deletion packages/arktype/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
it('exports ArkTypeToJsonSchemaConverter', async () => {
await expect(import('./index.ts')).resolves.toMatchObject({
await expect(import('./index')).resolves.toMatchObject({
ArkTypeToJsonSchemaConverter: expect.any(Function),
})
})
2 changes: 1 addition & 1 deletion packages/arktype/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './converter.ts'
export * from './converter'

export type { JsonSchema } from '@orpc/json-schema'
2 changes: 1 addition & 1 deletion packages/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
},
"scripts": {
"prepack": "tsc -p tsconfig.build.json",
"prepack": "tsdown",
"test": "bun --env-file=../../.env test",
"test:coverage": "bun --env-file=../../.env test --coverage"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/bun/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, it } from 'bun:test'

it('exports BunRedisRateLimiter, BunRedisPublisher, experimental_BunRedisLocker', async () => {
await expect(import('./index.ts')).resolves.toMatchObject({
await expect(import('./index')).resolves.toMatchObject({
BunRedisRateLimiter: expect.any(Function),
BunRedisPublisher: expect.any(Function),
experimental_BunRedisLocker: expect.any(Function),
Expand Down
6 changes: 3 additions & 3 deletions packages/bun/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './redis-lock.ts'
export * from './redis-publisher.ts'
export * from './redis-ratelimit.ts'
export * from './redis-lock'
export * from './redis-publisher'
export * from './redis-ratelimit'
2 changes: 1 addition & 1 deletion packages/bun/src/redis-lock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { LockTimeoutError } from '@orpc/experimental-lock'
import { promiseWithResolvers, sleep } from '@orpc/shared'
import { RedisClient } from 'bun'

import { experimental_BunRedisLocker as BunRedisLocker } from './redis-lock.ts'
import { experimental_BunRedisLocker as BunRedisLocker } from './redis-lock'

const REDIS_URL = Bun.env.REDIS_URL

Expand Down
6 changes: 3 additions & 3 deletions packages/bun/src/redis-publisher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { getOrBind, promiseWithResolvers, sleep } from '@orpc/shared'
import { getEventMeta, withEventMeta } from '@standard-server/core'
import { RedisClient } from 'bun'

import { waitFor } from '../tests/__shared__/utils.ts'
import type { BunRedisPublisherOptions } from './redis-publisher.ts'
import { BunRedisPublisher } from './redis-publisher.ts'
import { waitFor } from '../tests/__shared__/utils'
import type { BunRedisPublisherOptions } from './redis-publisher'
import { BunRedisPublisher } from './redis-publisher'

const REDIS_URL = process.env.REDIS_URL

Expand Down
2 changes: 1 addition & 1 deletion packages/bun/src/redis-ratelimit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { afterAll, beforeAll, describe, expect, it } from 'bun:test'
import { sleep } from '@orpc/shared'
import { RedisClient } from 'bun'

import { BunRedisRateLimiter } from './redis-ratelimit.ts'
import { BunRedisRateLimiter } from './redis-ratelimit'

const REDIS_URL = Bun.env.REDIS_URL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { promiseWithResolvers } from '@orpc/shared'
import { RedisClient } from 'bun'
import { createClient } from 'redis'

import { experimental_BunRedisLocker as BunRedisLocker } from '../src/index.ts'
import { experimental_BunRedisLocker as BunRedisLocker } from '../src/index'

const REDIS_URL = Bun.env.REDIS_URL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { getEventMeta, withEventMeta } from '@standard-server/core'
import { RedisClient } from 'bun'
import { createClient } from 'redis'

import { BunRedisPublisher } from '../src/redis-publisher.ts'
import { waitFor } from './__shared__/utils.ts'
import { BunRedisPublisher } from '../src/redis-publisher'
import { waitFor } from './__shared__/utils'

const REDIS_URL = process.env.REDIS_URL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { RedisRateLimiter } from '@orpc/ratelimit/redis'
import { RedisClient } from 'bun'
import { createClient } from 'redis'

import { BunRedisRateLimiter } from '../src/index.ts'
import { BunRedisRateLimiter } from '../src/index'

const REDIS_URL = Bun.env.REDIS_URL

Expand Down
4 changes: 2 additions & 2 deletions packages/bun/tests/rpc/__shared__/client-server.bun-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { createORPCClient } from '@orpc/client'
import { RPCLink } from '@orpc/client/fetch'
import { RPCHandler } from '@orpc/server/fetch'

import type { CreateClientServerTest } from './client-server.ts'
import { defaultSerializer } from './client-server.ts'
import type { CreateClientServerTest } from './client-server'
import { defaultSerializer } from './client-server'

export const createBunFetchClientServerTest: CreateClientServerTest = (
router,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { createORPCClient } from '@orpc/client'
import { RPCLink } from '@orpc/client/websocket'
import { RPCHandler } from '@orpc/server/websocket'

import type { CreateClientServerTest } from './client-server.ts'
import { defaultSerializer } from './client-server.ts'
import type { CreateClientServerTest } from './client-server'
import { defaultSerializer } from './client-server'

export const createBunWebSocketClientServerTest: CreateClientServerTest = (
router,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
ResponseCompressionHandlerPlugin,
} from '@orpc/server/plugins'

import type { CreateClientServerTest } from './client-server.ts'
import { defaultSerializer } from './client-server.ts'
import type { CreateClientServerTest } from './client-server'
import { defaultSerializer } from './client-server'

export const createCompressionBunFetchClientServerTest: CreateClientServerTest = (
router,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
} from '@orpc/server/plugins'
import { RPCHandler } from '@orpc/server/websocket'

import type { CreateClientServerTest } from './client-server.ts'
import { defaultSerializer } from './client-server.ts'
import type { CreateClientServerTest } from './client-server'
import { defaultSerializer } from './client-server'

export const createCompressionBunWebSocketClientServerTest: CreateClientServerTest = (
router,
Expand Down
8 changes: 4 additions & 4 deletions packages/bun/tests/rpc/cancel-and-abort.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { AsyncIteratorClass, os } from '@orpc/server'
import { sleep } from 'bun'
import { z } from 'zod'

import { createBunFetchClientServerTest } from './__shared__/client-server.bun-fetch.ts'
import { createBunWebSocketClientServerTest } from './__shared__/client-server.bun-websocket.ts'
import { createCompressionBunFetchClientServerTest } from './__shared__/client-server.compression-bun-fetch.ts'
import { createCompressionBunWebSocketClientServerTest } from './__shared__/client-server.compression-bun-websocket.ts'
import { createBunFetchClientServerTest } from './__shared__/client-server.bun-fetch'
import { createBunWebSocketClientServerTest } from './__shared__/client-server.bun-websocket'
import { createCompressionBunFetchClientServerTest } from './__shared__/client-server.compression-bun-fetch'
import { createCompressionBunWebSocketClientServerTest } from './__shared__/client-server.compression-bun-websocket'

describe.each([
['bun-fetch', createBunFetchClientServerTest],
Expand Down
12 changes: 6 additions & 6 deletions packages/bun/tests/rpc/data-transfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { os } from '@orpc/server'
import { promiseWithResolvers } from '@orpc/shared'
import { z } from 'zod'

import { builtInRPCSupportDataTypes } from './__shared__/built-in-support-data-types.ts'
import { createBunFetchClientServerTest } from './__shared__/client-server.bun-fetch.ts'
import { createBunWebSocketClientServerTest } from './__shared__/client-server.bun-websocket.ts'
import { createCompressionBunFetchClientServerTest } from './__shared__/client-server.compression-bun-fetch.ts'
import { createCompressionBunWebSocketClientServerTest } from './__shared__/client-server.compression-bun-websocket.ts'
import { Person } from './__shared__/client-server.ts'
import { builtInRPCSupportDataTypes } from './__shared__/built-in-support-data-types'
import { Person } from './__shared__/client-server'
import { createBunFetchClientServerTest } from './__shared__/client-server.bun-fetch'
import { createBunWebSocketClientServerTest } from './__shared__/client-server.bun-websocket'
import { createCompressionBunFetchClientServerTest } from './__shared__/client-server.compression-bun-fetch'
import { createCompressionBunWebSocketClientServerTest } from './__shared__/client-server.compression-bun-websocket'

describe.each([
['bun-fetch', createBunFetchClientServerTest],
Expand Down
6 changes: 0 additions & 6 deletions packages/bun/tsconfig.build.json

This file was deleted.

Loading
Loading