-
Notifications
You must be signed in to change notification settings - Fork 156
fix: auto-update example dependencies in Version Packages PR #1073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: 0 B Total Size: 89.5 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 3.35 kB ℹ️ View Unchanged
|
Problem
After each release, the examples in
examples/become out of sync with the published package versions. Since examples don't useworkspace:*(they need to be installable standalone via tools likegitpick),pnpm test:sherifflags version mismatches.For example, after a release:
@tanstack/dbin packages:0.5.16@tanstack/dbin angular example:^0.5.11❌Solution
Hook into the
changeset:versionscript to automatically update example dependencies when package versions are bumped. This means the "Version Packages" PR will now include:Changes
scripts/update-example-deps.ts- Reads package versions frompackages/*/package.jsonand updates any@tanstack/*dependencies inexamples/**/package.jsonto matchchangeset:versionscript to run the new script afterchangeset versionHow it works
The script:
@tanstack/*package names → versionspackage.jsonfiles inexamples/(skippingnode_modules,.output, etc.)^{version}Testing