From 53ece7da3c457f53de3a50f48cb7c26ce4f274c5 Mon Sep 17 00:00:00 2001 From: Lubos Date: Sun, 19 Oct 2025 23:32:12 +0800 Subject: [PATCH] ci: correctly build and test examples --- .github/workflows/ci.yml | 4 ++-- .../openapi-ts/src/plugins/@hey-api/typescript/plugin.ts | 6 +----- packages/openapi-ts/src/plugins/valibot/plugin.ts | 6 +----- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1ae168fe..c50f87ce3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: - name: Build examples if: matrix.node-version == '24.10.0' && matrix.os == 'ubuntu-latest' - run: pnpm build --filter="@examples/**" + run: pnpm build --filter="@example/**" - name: Run linter run: pnpm lint @@ -52,7 +52,7 @@ jobs: - name: Test examples if: matrix.node-version == '24.10.0' && matrix.os == 'ubuntu-latest' - run: pnpm test --filter="@examples/**" + run: pnpm test --filter="@example/**" - name: Publish preview packages if: github.event_name == 'pull_request' && matrix.node-version == '24.10.0' && matrix.os == 'ubuntu-latest' diff --git a/packages/openapi-ts/src/plugins/@hey-api/typescript/plugin.ts b/packages/openapi-ts/src/plugins/@hey-api/typescript/plugin.ts index 6bc44cedc..78ac210c8 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/typescript/plugin.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/typescript/plugin.ts @@ -9,6 +9,7 @@ import { refToName } from '../../../utils/ref'; import { stringCase } from '../../../utils/stringCase'; import { fieldName } from '../../shared/utils/case'; import { createSchemaComment } from '../../shared/utils/schema'; +import type { SchemaWithType } from '../../zod/shared/types'; import { createClientOptions } from './clientOptions'; import { exportType } from './export'; import { operationToType } from './operation'; @@ -16,11 +17,6 @@ import type { HeyApiTypeScriptPlugin } from './types'; import { webhookToType } from './webhook'; import { createWebhooks } from './webhooks'; -interface SchemaWithType['type']> - extends Omit { - type: Extract['type'], T>; -} - const arrayTypeToIdentifier = ({ plugin, schema, diff --git a/packages/openapi-ts/src/plugins/valibot/plugin.ts b/packages/openapi-ts/src/plugins/valibot/plugin.ts index d473f1ad7..00cc6814d 100644 --- a/packages/openapi-ts/src/plugins/valibot/plugin.ts +++ b/packages/openapi-ts/src/plugins/valibot/plugin.ts @@ -10,6 +10,7 @@ import { jsonPointerToPath, refToName } from '../../utils/ref'; import { numberRegExp } from '../../utils/regexp'; import { pathToSymbolResourceType } from '../shared/utils/meta'; import { createSchemaComment } from '../shared/utils/schema'; +import type { SchemaWithType } from '../zod/shared/types'; import { identifiers } from './constants'; import { INTEGER_FORMATS, @@ -21,11 +22,6 @@ import { operationToValibotSchema } from './operation'; import type { ValibotPlugin } from './types'; import { webhookToValibotSchema } from './webhook'; -interface SchemaWithType['type']> - extends Omit { - type: Extract['type'], T>; -} - export interface State { circularReferenceTracker: Set; hasCircularReference: boolean; -- 2.51.2