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 .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{ "repo": "TanStack/optimistic" }
{ "repo": "TanStack/db" }
],
"commit": false,
"access": "public",
Expand Down
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## 🎯 Changes

<!-- What changes are made in this PR? Describe the change and its motivation. -->

## ✅ Checklist

- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/db/blob/main/CONTRIBUTING.md).
- [ ] I have tested this code locally with `pnpm test:pr`.

## 🚀 Release Impact

- [ ] This change affects published code, and I have generated a [changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).
- [ ] This change is docs/CI/dev-only (no release).
20 changes: 20 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"configMigration": true,
"extends": [
"config:recommended",
"group:allNonMajor",
"schedule:weekly",
":approveMajorUpdates",
":automergeMinor",
":disablePeerDependencies",
":maintainLockFilesMonthly",
":semanticCommits",
":semanticCommitTypeAll(chore)"
],
"ignorePresets": [":ignoreModulesAndTests"],
"labels": ["dependencies"],
"rangeStrategy": "bump",
"postUpdateOptions": ["pnpmDedupe"],
"ignoreDeps": ["@types/node", "node", "typescript"]
}
4 changes: 3 additions & 1 deletion .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Fix formatting
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Get base and head commits for `nx affected`
uses: nrwl/nx-set-shas@v4.3.0
uses: nrwl/nx-set-shas@v4.3.3
with:
main-branch-name: main
- name: Run Checks
Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup Tools
Expand All @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Build Packages
Expand All @@ -79,7 +79,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Build Packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Run Tests
run: pnpm run lint && pnpm run build && pnpm run test
- name: Run Changesets (version or publish)
uses: changesets/action@v1.4.9
uses: changesets/action@v1.5.3
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish
Expand Down
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
link-workspace-packages=true
prefer-workspace-packages=true
provenance=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.13.1
24.8.0
File renamed without changes.
34 changes: 6 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
{
"name": "@tanstack/db-monorepo",
"name": "root",
"private": true,
"description": "Reactive client queryable store for sync-first applications",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "https://github.com/tanstack/db.git"
},
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"packageManager": "pnpm@10.6.3",
"packageManager": "pnpm@10.17.0",
"type": "module",
"keywords": [],
"license": "MIT",
"scripts": {
"build": "pnpm --filter \"./packages/**\" build",
"changeset": "changeset",
Expand Down Expand Up @@ -43,42 +38,25 @@
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-react": "^7.37.5",
"fast-glob": "^3.3.3",
"husky": "^9.1.7",
"jsdom": "^26.1.0",
"knip": "^5.63.1",
"lint-staged": "^15.5.2",
"markdown-link-extractor": "^4.0.2",
"mitt": "^3.0.1",
"prettier": "^3.6.2",
"publint": "^0.3.12",
"publint": "^0.3.13",
"sherif": "^1.6.1",
"shx": "^0.4.0",
"tsup": "^8.5.0",
"tinyglobby": "^0.2.15",
"typescript": "^5.9.2",
"vite": "^6.3.6",
"vitest": "^3.2.4",
"zod": "^3.25.76"
},
"exports": {
"./package.json": "./package.json"
},
"files": [
"dist",
"src"
],
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix"
]
},
"workspaces": [
"packages/*",
"examples/*",
"examples/react/*"
],
"overrides": {
"@tanstack/db": "workspace:*",
"@tanstack/db-ivm": "workspace:*",
"@tanstack/react-db": "workspace:*",
"@tanstack/vue-db": "workspace:*"
}
}
4 changes: 2 additions & 2 deletions packages/electric-db-collection/src/electric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export function electricCollectionOptions(
const wrappedOnInsert = config.onInsert
? async (params: InsertMutationFnParams<any>) => {
// Runtime check (that doesn't follow type)
// eslint-disable-next-line

const handlerResult = (await config.onInsert!(params)) ?? {}
const txid = (handlerResult as { txid?: Txid | Array<Txid> }).txid

Expand All @@ -204,7 +204,7 @@ export function electricCollectionOptions(
const wrappedOnUpdate = config.onUpdate
? async (params: UpdateMutationFnParams<any>) => {
// Runtime check (that doesn't follow type)
// eslint-disable-next-line

const handlerResult = (await config.onUpdate!(params)) ?? {}
const txid = (handlerResult as { txid?: Txid | Array<Txid> }).txid

Expand Down
2 changes: 1 addition & 1 deletion packages/electric-db-collection/tests/electric.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe(`Electric collection type resolution tests`, () => {
query: (q) =>
q
.from({ user: usersCollection })
.where(({ user }) => eq(user.active, true) && gt(user.age, 18)) // eslint-disable-line @typescript-eslint/no-unnecessary-condition
.where(({ user }) => eq(user.active, true) && gt(user.age, 18))
.select(({ user }) => ({
id: user.id,
name: user.name,
Expand Down
1 change: 0 additions & 1 deletion packages/query-db-collection/src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ export function queryCollectionOptions(
throw new QueryClientRequiredError()
}

// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!getKey) {
throw new GetKeyRequiredError()
}
Expand Down
2 changes: 1 addition & 1 deletion packages/query-db-collection/tests/query.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe(`Query collection type resolution tests`, () => {
query: (q) =>
q
.from({ user: usersCollection })
.where(({ user }) => eq(user.active, true) && gt(user.age, 18)) // eslint-disable-line @typescript-eslint/no-unnecessary-condition
.where(({ user }) => eq(user.active, true) && gt(user.age, 18))
.select(({ user }) => ({
id: user.id,
name: user.name,
Expand Down
Loading
Loading