Skip to content

feat: add the tstyche/tag entry point#665

Merged
mrazauskas merged 11 commits intomainfrom
add-tstyche/cmd
Jan 27, 2026
Merged

feat: add the tstyche/tag entry point#665
mrazauskas merged 11 commits intomainfrom
add-tstyche/cmd

Conversation

@mrazauskas
Copy link
Member

@mrazauskas mrazauskas commented Jan 25, 2026

This PR is introducing zx inspired programatic usage of tstyche command with better ergonomics (via the tstyche/tag entry point):

import tstyche from "tstyche/tag";

await tstyche`query-params --only multiple`;

Differently from zx, a child process is not created. TSTyche runs in the same process and reports to sdterr / stdout.

All command line flags can be used:

import tstyche from "tstyche/tag";

await tstyche`--showConfig`;

Substitution is supported as well:

import test from "node:test";
import tstyche from "tstyche/tag";

test("generate types", async () => {
  const fixtureName = "gen-types";

  // ...

  await tstyche`fixtures/${fixtureName} --quiet`;
});

test("generate types on start", async () => {
  const fixtureName = "auto-gen-types";

  // ...

  await tstyche`fixtures/${fixtureName} --quiet`;
});

@codacy-production
Copy link

codacy-production bot commented Jan 25, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.44% (target: -1.00%) 26.67% (target: 85.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c3733b5) 7264 7167 98.66%
Head commit (44dbaa3) 7304 (+40) 7174 (+7) 98.22% (-0.44%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#665) 45 12 26.67%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@mrazauskas mrazauskas changed the title feat: add the tstyche/cmd entry point feat: add the tstyche/tag entry point Jan 25, 2026
@mrazauskas mrazauskas marked this pull request as ready for review January 27, 2026 10:45
@mrazauskas mrazauskas merged commit 3a06229 into main Jan 27, 2026
21 of 22 checks passed
@mrazauskas mrazauskas deleted the add-tstyche/cmd branch January 27, 2026 10:45
@mrazauskas
Copy link
Member Author

Have to figure out why coverage is not collected. Out of scope for this PR.

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