Skip to content

Refactor and add unit testing#7

Open
suhaotian wants to merge 206 commits intomainfrom
refator-and-add-unit-testing
Open

Refactor and add unit testing#7
suhaotian wants to merge 206 commits intomainfrom
refator-and-add-unit-testing

Conversation

@suhaotian
Copy link
Contributor

@suhaotian suhaotian commented Feb 23, 2025

The goals:

  • Refactor code
  • Export API SDK: Support ESM and CommonJS
  • Export API SDK: Support generating Vue Query hooks (Currently, supports SWR and React Query)
    • Support generating multiple libs hooks at the same time
    • Add Solidjs and Svelte TanStack Query support
  • Use script to extract API info from *.apiconf.ts (before using tsc to build JS from TS first then require, and it's slow)
  • Unit testing
    • tsdk
    • tsdk-server-adapters
    • tsdk/fe-sdk-template
  • Support valibot / zod/v4 / arktype with https://github.com/standard-schema/standard-schema
  • Export API SDK supports running on Web Workers
  • [ ] tsdk-server-adapters: more convenient setup API
  • Publish alpha (npm install tsdk@alpha tsdk-server-adapters@alpha)
  • E2E testing
    • Different bundlers and frameworks: Vite / Webpack / Next.js / Remix (React Router)
    • Different adapters: Express / Fastify / Hono / Socket.io
    • Hooks tests: SWR / Vue Query / React Query / Solidjs / Svelte
      • update data
      • query data
      • focus refresh
      • when key is undefined shouldn't update or query
      • disable focus refresh
      • socket.io adapter / fetch adapter(axios/xior)
  • tsdk shared folder and files name changing:
    - shared/ -> tsdk-shared/
    - shared/tsdk-helper.ts -> tsdk-shared/helpers.ts
    - shared/tsdk-types.ts -> tsdk-shared/types.ts
  • Starter (or templates)
    • frontend-sdk template — API SDK export-only template (No backend API development)
    • fullstack-forge template — Type-safe API development template (Express / Fastify / Hono / Socket.io)
  • dogfood tsdk
  • Support transform openapi.json to tsdk sdk
  • Add watch mode
  • [ ] Export API SDK: OpenAPI documentation generated
  • make unit tests and e2e tests make sense
  • [ ] Experiment: switch nest-cli to vite keep nest-cli
  • Better API SDK documentation
  • Better documentation
  • AI-friendly

@suhaotian suhaotian changed the title Refator and add unit testing Refactor and add unit testing Feb 24, 2025
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