Skip to content

chore(weave): Add scripts for typechecking against various tsconfigs#6912

Merged
drtangible merged 3 commits into
masterfrom
05-20-chore_weave_add_scripts_for_typechecking_against_various_tsconfigs
May 21, 2026
Merged

chore(weave): Add scripts for typechecking against various tsconfigs#6912
drtangible merged 3 commits into
masterfrom
05-20-chore_weave_add_scripts_for_typechecking_against_various_tsconfigs

Conversation

@drtangible
Copy link
Copy Markdown
Contributor

@drtangible drtangible commented May 20, 2026

Description

  • The examples in the sdks/node/examples/ directory have some type mismatches. eg:
Screenshot 2026-05-20 at 2 26 10 PM
  • These failures don't currently break the build or fail CI, but might as well make the examples accurate.

  • This change adds a few convenience scripts for typechecking against the various tsconfigs we have in the SDK:

    • pnpm typecheck:cjs
    • pnpm typecheck:esm
    • pnpm typecheck:examples
  • Will fix these failing example types in a subsequent PR:

Found 25 errors in 11 files.

Errors  Files
     2  examples/classesWithOps.ts:8
     1  examples/createDataset.ts:44
     2  examples/evaluate.ts:8
     2  examples/evaluateWithColumnMapping.ts:8
     1  examples/imageGeneration.ts:6
     1  examples/loggingVariousDataTypes.ts:28
     6  examples/openaiAgents.ts:10
     5  examples/openaiAgentsRealtime.ts:17
     1  examples/quickstart.ts:4
     3  examples/quickstartEvaluate.ts:30
     1  examples/streamFunctionCalls.ts:4

Copy link
Copy Markdown
Contributor Author

drtangible commented May 20, 2026

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@wandbot-3000
Copy link
Copy Markdown

wandbot-3000 Bot commented May 20, 2026

@drtangible drtangible marked this pull request as ready for review May 20, 2026 19:35
@drtangible drtangible requested a review from a team as a code owner May 20, 2026 19:35
@drtangible drtangible requested a review from a team May 20, 2026 19:36
"path": "../src/tsconfig.src.json"
}
]
"target": "es2022",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@chance-wnb can you confirm this is permissive enough?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AFAIK, this works.

However @drtangible do you think we should encourage users to adopt ESM as much as possible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, as long as something is surfacing the type issues in examples/ 👌. Will update the commonjs below.

Copy link
Copy Markdown
Contributor

@chance-wnb chance-wnb left a comment

Choose a reason for hiding this comment

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

Nice work!

@drtangible drtangible force-pushed the 05-20-chore_weave_add_scripts_for_typechecking_against_various_tsconfigs branch 2 times, most recently from 9ae5161 to 1af3976 Compare May 21, 2026 14:55
@drtangible drtangible force-pushed the 05-20-chore_weave_add_scripts_for_typechecking_against_various_tsconfigs branch from 1af3976 to 0083c71 Compare May 21, 2026 18:42
@drtangible drtangible merged commit d4b094d into master May 21, 2026
179 checks passed
@drtangible drtangible deleted the 05-20-chore_weave_add_scripts_for_typechecking_against_various_tsconfigs branch May 21, 2026 19:14
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants