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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ jobs:
- name: Test
run: pnpm test

- name: Test types
run: pnpm --filter typed-openapi test:types
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also test agains range of TypeScript versions. To be sure older version work as expected (if that is important). For example:

Suggested change
run: pnpm --filter typed-openapi test:types
run: pnpm --filter typed-openapi test:types --target '>=5.2'


- name: Release package
run: pnpm dlx pkg-pr-new publish './packages/typed-openapi'
2 changes: 1 addition & 1 deletion packages/typed-openapi/tests/integration.types.tstyche.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ describe("Example API Client", () => {

it("header specific typings are merged with overrides/HeadersInit", async () => {
// @ts-expect-error Property 'header' is missing in type
const result = await api.delete("/pet/{petId}", {
await api.delete("/pet/{petId}", {
path: { petId: 42 },
});

Expand Down
3 changes: 1 addition & 2 deletions packages/typed-openapi/tstyche.config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"$schema": "https://tstyche.org/schemas/config.json",
"checkSuppressedErrors": true,
"checkSourceFiles": true,
"tsconfig": "./tsconfig.ci.json",
"checkSourceFiles": false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkSourceFiles option is removed in the next major. It does way too much.

tsconfig.ci.json is not picked, because it does not include the test file. TSTyche default are used instead a they are rather strict.

Without tsconfig option set, packages/typed-openapi/tsconfig.json is loaded. I think that is right, or? Look for 'uses' line to see which TSConfig is loaded (documentation):

Image

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it should be fine!
btw how did you find out that I started using TSTyche?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw how did you find out that I started using TSTyche?

GitHub told me: https://github.com/tstyche/tstyche/network/dependents

(;

"testFileMatch": [
"tests/*.tstyche.ts"
]
Expand Down
Loading