Skip to content

Commit 2ab70c5

Browse files
nik13claude
andcommitted
build(examples): commit the TanStack AI example's package-lock.json
The example installs outside the pnpm workspace and had no lockfile, so every transitive version floated (a fresh install had already picked an @tanstack/openai-base that needs a newer @tanstack/ai). Commit the npm lockfile, generated with npm 10.9.3 on Node 22.18.0 against the pinned set and the overrides (@tanstack/ai 0.64.0, @tanstack/ai-openai 0.26.0, @tanstack/openai-base 0.12.2, openai 6.49.0, sdk-trace-node 2.11.0), and un-ignore it in .gitignore, which ignores **/package-lock.json for the pnpm workspace. README and the contract test now say `npm ci`. `npm ci` installs clean (npm ls exit 0); contract 15 passed, node --test 12/12. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 9ee8a33 commit 2ab70c5

4 files changed

Lines changed: 1170 additions & 4 deletions

File tree

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ output/
6262
*.log
6363
.DS_Store
6464
**/package-lock.json
65+
# Standalone npm example (outside the pnpm workspace): its lockfile pins the tested dependency set.
66+
!typescript/examples/tanstack-ai/package-lock.json
6567
**/tsconfig.tsbuildinfo
6668
**/.fi
6769
**/.pytest_cache

‎typescript/examples/tanstack-ai/README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Pinned: `@tanstack/ai` 0.64.0, `@tanstack/ai-openai` 0.26.0,
1010
`@tanstack/openai-base` 0.12.2: `@tanstack/ai-openai` 0.26.0 asks for
1111
`^0.12.2`, and every later 0.12.x needs a newer `@tanstack/ai` than 0.64.0
1212
(0.12.6 needs `^0.66.0` and `openai` 7), so an unpinned install mixes
13-
versions this example was not tested with. Node `>=20.6.0`, the
13+
versions this example was not tested with. `package-lock.json` (generated on
14+
Node 22 against this set) pins every transitive version; `npm ci` installs it. Node `>=20.6.0`, the
1415
floor of the pinned OpenTelemetry SDK 2.11.0 on the Node 20 line. The
1516
contract test and `node --test` suite (see "Contract test") pass on Node
1617
20.20.2, 22.23.3 and 26.8.1.
@@ -26,7 +27,7 @@ vendored and not a dependency of any traceAI package.
2627

2728
```bash
2829
cd typescript/examples/tanstack-ai
29-
npm install
30+
npm ci # installs the exact tested set from package-lock.json
3031

3132
export FI_API_KEY="YOUR_API_KEY" # sent as X-Api-Key
3233
export FI_SECRET_KEY="YOUR_SECRET_KEY" # sent as X-Secret-Key

0 commit comments

Comments
 (0)