[PR #1] [MERGED] Add CI (oxlint, oxfmt, vitest, tsc) and a dormant npm publish workflow #13

Closed
opened 2026-10-31 22:03:50 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-typescript-sdk/pull/1
Author: @wei-hai
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/15/2026
Merged by: @wei-hai

Base: main ← Head: ci/github-actions


📝 Commits (2)

  • 2a4141b Add CI pipeline, source stub, and a dormant npm publish workflow
  • a84c400 CI: drop Node 20 from the test matrix, require Node >=22

📊 Changes

7 files changed (+203 additions, -12 deletions)

View changed files

➕ .github/workflows/ci.yml (+53 -0)
➕ .github/workflows/publish.yml (+75 -0)
➕ .oxlintrc.json (+4 -0)
📝 README.md (+3 -3)
📝 package.json (+9 -9)
➕ src/index.test.ts (+15 -0)
➕ src/index.ts (+44 -0)

📄 Description

Summary

  • Adds .github/workflows/ci.yml: runs on pull requests and pushes to main, across a Node 20/22/24 matrix, using pnpm with a frozen lockfile install. Each run runs oxlint (lint), oxfmt --check (formatting), tsc --noEmit (type check), vitest run (test), and tsc (build).
  • Adds src/index.ts: a small Comfy client stub whose shape mirrors the Python SDK (constructor takes a base URL and an optional API key). run() currently throws "not implemented yet" — this repo's first job is getting CI and the package shape right; the real submit/poll/download logic is a follow-up.
  • Adds src/index.test.ts with two small passing vitest tests (construction, and that run() rejects with the expected message) so CI has something real to exercise.
  • Adds .oxlintrc.json (minimal, just ignores dist/coverage/node_modules).
  • Adds a dormant .github/workflows/publish.yml scaffold, mirroring the Python SDK's PR: it only triggers on manual workflow_dispatch, the job carries if: false, and it's gated behind a GitHub environment: npm for a future manual-approval step. A TODO block at the top spells out what's needed to turn it on (reserve the @comfyorg/sdk package on npm, set up npm's OIDC "Trusted Publishing" for this repo, create the npm environment with reviewers) — flipping if: false to true is the only change needed once that's done.

Tooling choices (and why)

This repo started completely empty, so the base commit on main (just before this PR) bootstraps a minimal skeleton: README.md, .gitignore, package.json, tsconfig.json, pnpm-lock.yaml.

For the package manager and linter/formatter, I checked the two closest sibling repos in the org:

  • Comfy-Org/ComfyUI_frontend uses pnpm (pinned via packageManager) and oxlint + oxfmt instead of a plain ESLint/Prettier setup (ESLint is layered on top for a few rules, but oxlint/oxfmt do the bulk of lint+format), plus vitest for unit tests.
  • Comfy-Org/comfy-cloud-mcp-server (closest small-package precedent by size) uses npm rather than pnpm, but the same oxlint + oxfmt + vitest + plain tsc combination, with dependency versions very close to what's pinned here (oxlint ^1.62, oxfmt ^0.45, vitest ^4.1, typescript ^5.8).

Since the task asked to prefer pnpm (the org's newer/larger-repo standard) while using the mcp-server repo as the nearest small-package precedent for everything else, this PR uses pnpm + oxlint + oxfmt + vitest + plain tsc for the build (no tsup — nothing in the org's repos currently uses it, and a stub package doesn't need dual ESM/CJS output; "type": "module" + plain tsc is enough and keeps the dependency list small).

Test plan

  • pnpm lint — passes
  • pnpm format:check — passes
  • pnpm typecheck — passes
  • pnpm test — 2 passed
  • pnpm build — produces dist/index.js + dist/index.d.ts
  • Validated both workflow YAML files parse (yaml.safe_load)
  • CI itself run on GitHub Actions (will run automatically once this PR is opened)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-typescript-sdk/pull/1 **Author:** [@wei-hai](https://github.com/wei-hai) **Created:** 7/15/2026 **Status:** ✅ Merged **Merged:** 7/15/2026 **Merged by:** [@wei-hai](https://github.com/wei-hai) **Base:** `main` ← **Head:** `ci/github-actions` --- ### 📝 Commits (2) - [`2a4141b`](https://github.com/Comfy-Org/comfy-typescript-sdk/commit/2a4141b20699d906bc71f02fb0ab9adce93bcbea) Add CI pipeline, source stub, and a dormant npm publish workflow - [`a84c400`](https://github.com/Comfy-Org/comfy-typescript-sdk/commit/a84c400423a4d782d2ab1b43563d4c56a6077835) CI: drop Node 20 from the test matrix, require Node >=22 ### 📊 Changes **7 files changed** (+203 additions, -12 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/ci.yml` (+53 -0) ➕ `.github/workflows/publish.yml` (+75 -0) ➕ `.oxlintrc.json` (+4 -0) 📝 `README.md` (+3 -3) 📝 `package.json` (+9 -9) ➕ `src/index.test.ts` (+15 -0) ➕ `src/index.ts` (+44 -0) </details> ### 📄 Description ## Summary - Adds `.github/workflows/ci.yml`: runs on pull requests and pushes to `main`, across a Node 20/22/24 matrix, using `pnpm` with a frozen lockfile install. Each run runs `oxlint` (lint), `oxfmt --check` (formatting), `tsc --noEmit` (type check), `vitest run` (test), and `tsc` (build). - Adds `src/index.ts`: a small `Comfy` client stub whose shape mirrors the [Python SDK](https://github.com/Comfy-Org/ComfyPythonSDK) (constructor takes a base URL and an optional API key). `run()` currently throws `"not implemented yet"` — this repo's first job is getting CI and the package shape right; the real submit/poll/download logic is a follow-up. - Adds `src/index.test.ts` with two small passing `vitest` tests (construction, and that `run()` rejects with the expected message) so CI has something real to exercise. - Adds `.oxlintrc.json` (minimal, just ignores `dist`/`coverage`/`node_modules`). - Adds a **dormant** `.github/workflows/publish.yml` scaffold, mirroring the Python SDK's PR: it only triggers on manual `workflow_dispatch`, the job carries `if: false`, and it's gated behind a GitHub `environment: npm` for a future manual-approval step. A `TODO` block at the top spells out what's needed to turn it on (reserve the `@comfyorg/sdk` package on npm, set up npm's OIDC "Trusted Publishing" for this repo, create the `npm` environment with reviewers) — flipping `if: false` to `true` is the only change needed once that's done. ## Tooling choices (and why) This repo started completely empty, so the base commit on `main` (just before this PR) bootstraps a minimal skeleton: `README.md`, `.gitignore`, `package.json`, `tsconfig.json`, `pnpm-lock.yaml`. For the package manager and linter/formatter, I checked the two closest sibling repos in the org: - `Comfy-Org/ComfyUI_frontend` uses **pnpm** (pinned via `packageManager`) and **oxlint** + **oxfmt** instead of a plain ESLint/Prettier setup (ESLint is layered on top for a few rules, but oxlint/oxfmt do the bulk of lint+format), plus **vitest** for unit tests. - `Comfy-Org/comfy-cloud-mcp-server` (closest small-package precedent by size) uses `npm` rather than `pnpm`, but the same **oxlint** + **oxfmt** + **vitest** + plain `tsc` combination, with dependency versions very close to what's pinned here (`oxlint ^1.62`, `oxfmt ^0.45`, `vitest ^4.1`, `typescript ^5.8`). Since the task asked to prefer `pnpm` (the org's newer/larger-repo standard) while using the mcp-server repo as the nearest small-package precedent for everything else, this PR uses `pnpm` + `oxlint` + `oxfmt` + `vitest` + plain `tsc` for the build (no `tsup` — nothing in the org's repos currently uses it, and a stub package doesn't need dual ESM/CJS output; `"type": "module"` + plain `tsc` is enough and keeps the dependency list small). ## Test plan - [x] `pnpm lint` — passes - [x] `pnpm format:check` — passes - [x] `pnpm typecheck` — passes - [x] `pnpm test` — 2 passed - [x] `pnpm build` — produces `dist/index.js` + `dist/index.d.ts` - [x] Validated both workflow YAML files parse (`yaml.safe_load`) - [ ] CI itself run on GitHub Actions (will run automatically once this PR is opened) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:03:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-typescript-sdk#13
No description provided.