Repository navigation
chore: use caret ranges in examples and stop committing their lockfiles - #254
Conversation
The examples are documentation and a starting point for customers, who resolve dependencies in their own project, so a pinned version and a committed lockfile per example only generate update churn here. - Change exact versions in every example's package.json, and the Deno example's imports, to caret ranges. - Delete the per-example package-lock.json and deno.lock files and ignore them. - Install with npm install instead of npm ci in Dockerfiles, READMEs and the Next.js Playwright workflow. - Raise @tanstack/ai to ^0.55.0 in tanstack-agent, which the current @tanstack/ai-openai 0.22 release requires as a peer. - Keep @tanstack/react-start and @tanstack/react-router exact in tanstack-start: each react-start release depends on one exact react-router release. - Remove overrides that a fresh install no longer needs, widen the rest to caret ranges, and rewrite OVERRIDES.md to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VerificationEach example was copied to its own scratch directory without a lockfile, installed with npm 11.6.4 (the repository's
Each override was checked by resolving the example from scratch with and without it ( Known issue: nuxt on npm 12Without a lockfile, |
There was a problem hiding this comment.
Arcjet Review — 🔴 High Risk
Decision: Cannot Assess
Rationale: Review failed due to an internal error: Step "step//./workflows/index//stepFetchPRDiff" failed after 3 retries: Sorry, the diff exceeded the maximum number of lines (20000): {"resource":"PullRequest","field":"diff","code":"too_large"} - https://docs.github.com/rest/pulls/pulls#get-a-pull-request. Escalating to human reviewers.
Review Steps
API Review
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
Data Flow Map
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
Dependency Audit
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
Docs Review
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
Historical ADR Review
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
Migration Safety
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
Security Review
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
Test Coverage
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
Zero Data Retention
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
WorkOS Audit Logging
| Relevancy | Outcome |
|---|---|
| none | ⏭️ Skipped |
Review: e164d43b | Powered by Arcjet Review
|
Caution Review the following alerts detected in dependencies. According to your organization's Security Policy, you must resolve all "Block" alerts before proceeding. It is recommended to resolve "Warn" alerts too. Learn more about Socket for GitHub.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The examples are documentation and a starting point for integrating Arcjet. A customer copies an example into their own project and resolves dependencies there, so our lockfiles never reach them. Exact versions and a committed lockfile per example only create update PRs here: almost every release of the SDK or a framework touches every example.
This changes each example's dependencies, and the Deno example's imports, to caret ranges, and stops committing per-example
package-lock.jsonanddeno.lockfiles. Dockerfiles and READMEs now usenpm installinstead ofnpm ci.CONTRIBUTING.mdandAGENTS.mddescribe the new update flow: a release inside a range needs no change, and a range's lower bound is raised only to require a fix or new API.Two examples needed more than a caret:
tanstack-agentraises@tanstack/aito^0.55.0, which the current@tanstack/ai-openairelease requires.tanstack-startkeeps@tanstack/react-startand@tanstack/react-routerexact. Eachreact-startrelease depends on one exactreact-routerrelease, so the two are updated together.Overrides were rechecked against a fresh install. Those the parent packages no longer need are removed:
multer,diff,sharp,adm-zip,nanoid,basic-ftp,http-proxy-agent,devalueinnuxt, and@modelcontextprotocol/server. The rest now use caret ranges, and OVERRIDES.md lists each one with the parent that needs it and when to remove it.🤖 Generated with Claude Code