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
2 changes: 1 addition & 1 deletion .github/workflows/docs-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: pnpm run build

- name: Generate Docs
run: pnpm docs:generate
run: pnpm generate-docs

- name: Check for changes
id: check_changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Generate Docs
if: steps.changesets.outputs.published == 'true'
run: pnpm docs:generate
run: pnpm generate-docs
- name: Commit Generated Docs
if: steps.changesets.outputs.published == 'true'
run: |
Expand Down
170 changes: 30 additions & 140 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,154 +1,44 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock
# See https://help.github.com/ignore-files/ for more about ignoring files.

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# dependencies
node_modules
package-lock.json
yarn.lock

# Coverage directory used by tools like istanbul
# builds
build
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity
dist

# dotenv environment variable files
# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.history
size-plugin.json
stats-hydration.json
stats.json
stats.html
.vscode/settings.json

# vuepress v2.x temp and cache directory
.temp
*.log
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
.DS_Store

# Added by Task Master AI
dev-debug.log
# Environment variables
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# OS specific
# Task files
tasks.json
tasks/

## Tanstack Start
.nitro
.output
.tanstack
.claude
package-lock.json
.nx/cache
.nx/workspace-data
.pnpm-store
.tsup
.svelte-kit

vite.config.js.timestamp-*
vite.config.ts.timestamp-*
tsconfig.vitest-temp.json
25 changes: 0 additions & 25 deletions .pnpmfile.cjs

This file was deleted.

50 changes: 13 additions & 37 deletions examples/react/projects/src/db/out/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,8 @@
"name": "projects_owner_id_users_id_fk",
"tableFrom": "projects",
"tableTo": "users",
"columnsFrom": [
"owner_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
Expand Down Expand Up @@ -147,25 +143,17 @@
"name": "todos_user_id_users_id_fk",
"tableFrom": "todos",
"tableTo": "users",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
"todos_project_id_projects_id_fk": {
"name": "todos_project_id_projects_id_fk",
"tableFrom": "todos",
"tableTo": "projects",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
Expand Down Expand Up @@ -265,12 +253,8 @@
"name": "accounts_user_id_users_id_fk",
"tableFrom": "accounts",
"tableTo": "users",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
Expand Down Expand Up @@ -340,12 +324,8 @@
"name": "sessions_user_id_users_id_fk",
"tableFrom": "sessions",
"tableTo": "users",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
Expand All @@ -355,9 +335,7 @@
"sessions_token_unique": {
"name": "sessions_token_unique",
"nullsNotDistinct": false,
"columns": [
"token"
]
"columns": ["token"]
}
},
"policies": {},
Expand Down Expand Up @@ -418,9 +396,7 @@
"users_email_unique": {
"name": "users_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
"columns": ["email"]
}
},
"policies": {},
Expand Down Expand Up @@ -488,4 +464,4 @@
"schemas": {},
"tables": {}
}
}
}
2 changes: 1 addition & 1 deletion examples/react/projects/src/db/out/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"breakpoints": true
}
]
}
}
28 changes: 2 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/tanstack/db.git"
"url": "git+https://github.com/TanStack/db.git"
},
"packageManager": "pnpm@10.24.0",
"type": "module",
Expand Down Expand Up @@ -50,6 +50,7 @@
"sherif": "^1.9.0",
"shx": "^0.4.0",
"tinyglobby": "^0.2.15",
"tsx": "^4.21.0",
"typescript": "^5.9.2",
"vite": "^7.2.6",
"vitest": "^3.2.4",
Expand All @@ -59,30 +60,5 @@
"*.{ts,tsx}": [
"eslint --fix"
]
},
"workspaces": [
Copy link
Collaborator

Choose a reason for hiding this comment

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

what happened here @lachlancollins ? Our workspaces and overrides are gone...

Copy link
Member Author

Choose a reason for hiding this comment

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

The only workspace config needed is in pnpm-workspace.yaml. pnpm also handles all overrides for local packages via linkWorkspacePackages: true and preferWorkspacePackages: true

Copy link
Collaborator

Choose a reason for hiding this comment

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

I added the explicit overrides because the examples weren't loading the workspace versions — we need package versions there so they're installable outside of the repo but inside the repo, they resolve the workspace version.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm that shouldn't be an issue, the examples should still load workspace versions if configured correctly - let me check!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I tested it some more and apparently the behavior is the workspace version is pulled in when it matches. There's perhaps other cases where it wasn't getting pulled into which I ran into before but in any case, yeah I think we're fine.

"packages/*",
"examples/*",
"examples/react/*"
],
"pnpm": {
"overrides": {
"@tanstack/angular-db": "workspace:*",
"@tanstack/db": "workspace:*",
"@tanstack/db-ivm": "workspace:*",
"@tanstack/electric-db-collection": "workspace:*",
"@tanstack/offline-transactions": "workspace:*",
"@tanstack/powersync-db-collection": "workspace:*",
"@tanstack/query-db-collection": "workspace:*",
"@tanstack/react-db": "workspace:*",
"@tanstack/rxdb-db-collection": "workspace:*",
"@tanstack/solid-db": "workspace:*",
"@tanstack/svelte-db": "workspace:*",
"@tanstack/trailbase-db-collection": "workspace:*",
"@tanstack/vue-db": "workspace:*"
}
},
"dependencies": {
"tsx": "^4.21.0"
}
}
Loading
Loading