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/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Fix formatting
run: pnpm prettier:write
- name: Generate Docs
run: pnpm docs:generate
run: pnpm generate-docs
- name: Apply fixes
uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
with:
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/angular/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ title: "@tanstack/angular-store"

## Functions

- [injectStore](../functions/injectStore.md)
- [injectStore](functions/injectStore.md)
4 changes: 2 additions & 2 deletions docs/framework/preact/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ title: "@tanstack/preact-store"

## Functions

- [shallow](../functions/shallow.md)
- [useStore](../functions/useStore.md)
- [shallow](functions/shallow.md)
- [useStore](functions/useStore.md)
4 changes: 2 additions & 2 deletions docs/framework/react/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ title: "@tanstack/react-store"

## Functions

- [shallow](../functions/shallow.md)
- [useStore](../functions/useStore.md)
- [shallow](functions/shallow.md)
- [useStore](functions/useStore.md)
4 changes: 2 additions & 2 deletions docs/framework/solid/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ title: "@tanstack/solid-store"

## Functions

- [shallow](../functions/shallow.md)
- [useStore](../functions/useStore.md)
- [shallow](functions/shallow.md)
- [useStore](functions/useStore.md)
4 changes: 2 additions & 2 deletions docs/framework/svelte/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ title: "@tanstack/svelte-store"

## Functions

- [shallow](../functions/shallow.md)
- [useStore](../functions/useStore.md)
- [shallow](functions/shallow.md)
- [useStore](functions/useStore.md)
4 changes: 2 additions & 2 deletions docs/framework/vue/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ title: "@tanstack/vue-store"

## Functions

- [shallow](../functions/shallow.md)
- [useStore](../functions/useStore.md)
- [shallow](functions/shallow.md)
- [useStore](functions/useStore.md)
8 changes: 4 additions & 4 deletions docs/reference/classes/Derived.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Defined in: [derived.ts:61](https://github.com/TanStack/store/blob/main/packages

### TArr

`TArr` *extends* `ReadonlyArray`\<`Derived`\<`any`\> \| [`Store`](../Store.md)\<`any`\>\> = `ReadonlyArray`\<`any`\>
`TArr` *extends* `ReadonlyArray`\<`Derived`\<`any`\> \| [`Store`](Store.md)\<`any`\>\> = `ReadonlyArray`\<`any`\>

## Constructors

Expand All @@ -31,7 +31,7 @@ Defined in: [derived.ts:96](https://github.com/TanStack/store/blob/main/packages

##### options

[`DerivedOptions`](../../interfaces/DerivedOptions.md)\<`TState`, `TArr`\>
[`DerivedOptions`](../interfaces/DerivedOptions.md)\<`TState`, `TArr`\>

#### Returns

Expand Down Expand Up @@ -183,7 +183,7 @@ Defined in: [derived.ts:105](https://github.com/TanStack/store/blob/main/package

readonly (
\| `Derived`\<`any`, readonly `any`[]\>
\| [`Store`](../Store.md)\<`any`, (`cb`) => `any`\>)[] = `...`
\| [`Store`](Store.md)\<`any`, (`cb`) => `any`\>)[] = `...`

#### Returns

Expand Down Expand Up @@ -231,7 +231,7 @@ Defined in: [derived.ts:147](https://github.com/TanStack/store/blob/main/package

readonly (
\| `Derived`\<`any`, readonly `any`[]\>
\| [`Store`](../Store.md)\<`any`, (`cb`) => `any`\>)[] = `...`
\| [`Store`](Store.md)\<`any`, (`cb`) => `any`\>)[] = `...`

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/classes/Store.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Defined in: [store.ts:37](https://github.com/TanStack/store/blob/main/packages/s

##### options?

[`StoreOptions`](../../interfaces/StoreOptions.md)\<`TState`, `TUpdater`\>
[`StoreOptions`](../interfaces/StoreOptions.md)\<`TState`, `TUpdater`\>

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/functions/isUpdaterFunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Type guard to check if updater is a function

### updater

[`Updater`](../../type-aliases/Updater.md)\<`T`\>
[`Updater`](../type-aliases/Updater.md)\<`T`\>

## Returns

Expand Down
26 changes: 13 additions & 13 deletions docs/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ title: "@tanstack/store"

## Classes

- [Derived](../classes/Derived.md)
- [Effect](../classes/Effect.md)
- [Store](../classes/Store.md)
- [Derived](classes/Derived.md)
- [Effect](classes/Effect.md)
- [Store](classes/Store.md)

## Interfaces

- [DerivedFnProps](../interfaces/DerivedFnProps.md)
- [DerivedOptions](../interfaces/DerivedOptions.md)
- [StoreOptions](../interfaces/StoreOptions.md)
- [DerivedFnProps](interfaces/DerivedFnProps.md)
- [DerivedOptions](interfaces/DerivedOptions.md)
- [StoreOptions](interfaces/StoreOptions.md)

## Type Aliases

- [UnwrapDerivedOrStore](../type-aliases/UnwrapDerivedOrStore.md)
- [Updater](../type-aliases/Updater.md)
- [UnwrapDerivedOrStore](type-aliases/UnwrapDerivedOrStore.md)
- [Updater](type-aliases/Updater.md)

## Variables

- [\_\_depsThatHaveWrittenThisTick](../variables/depsThatHaveWrittenThisTick.md)
- [\_\_derivedToStore](../variables/derivedToStore.md)
- [\_\_storeToDerived](../variables/storeToDerived.md)
- [\_\_depsThatHaveWrittenThisTick](variables/depsThatHaveWrittenThisTick.md)
- [\_\_derivedToStore](variables/derivedToStore.md)
- [\_\_storeToDerived](variables/storeToDerived.md)

## Functions

- [batch](../functions/batch.md)
- [isUpdaterFunction](../functions/isUpdaterFunction.md)
- [batch](functions/batch.md)
- [isUpdaterFunction](functions/isUpdaterFunction.md)
4 changes: 2 additions & 2 deletions docs/reference/interfaces/DerivedFnProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Defined in: [derived.ts:30](https://github.com/TanStack/store/blob/main/packages
### TArr

`TArr` *extends* `ReadonlyArray`\<
\| [`Derived`](../../classes/Derived.md)\<`any`\>
\| [`Store`](../../classes/Store.md)\<`any`\>\> = `ReadonlyArray`\<`any`\>
\| [`Derived`](../classes/Derived.md)\<`any`\>
\| [`Store`](../classes/Store.md)\<`any`\>\> = `ReadonlyArray`\<`any`\>

### TUnwrappedArr

Expand Down
8 changes: 4 additions & 4 deletions docs/reference/interfaces/DerivedOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Defined in: [derived.ts:45](https://github.com/TanStack/store/blob/main/packages
### TArr

`TArr` *extends* `ReadonlyArray`\<
\| [`Derived`](../../classes/Derived.md)\<`any`\>
\| [`Store`](../../classes/Store.md)\<`any`\>\> = `ReadonlyArray`\<`any`\>
\| [`Derived`](../classes/Derived.md)\<`any`\>
\| [`Store`](../classes/Store.md)\<`any`\>\> = `ReadonlyArray`\<`any`\>

## Properties

Expand Down Expand Up @@ -45,7 +45,7 @@ Values of the `deps` from before and after the current invocation of `fn`

##### props

[`DerivedFnProps`](../DerivedFnProps.md)\<`TArr`\>
[`DerivedFnProps`](DerivedFnProps.md)\<`TArr`\>

#### Returns

Expand All @@ -69,7 +69,7 @@ Defined in: [derived.ts:49](https://github.com/TanStack/store/blob/main/packages

##### derived

[`Derived`](../../classes/Derived.md)\<`TState`\>
[`Derived`](../classes/Derived.md)\<`TState`\>

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/interfaces/StoreOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Called when a listener subscribes to the store.

##### store

[`Store`](../../classes/Store.md)\<`TState`, `TUpdater`\>
[`Store`](../classes/Store.md)\<`TState`, `TUpdater`\>

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check

import { tanstackConfig } from '@tanstack/config/eslint'
import { tanstackConfig } from '@tanstack/eslint-config'

export default [...tanstackConfig]
4 changes: 4 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
]
},
"targetDefaults": {
"test:docs": {
"cache": true,
"inputs": ["{workspaceRoot}/docs/**/*"]
},
"test:knip": {
"cache": true,
"inputs": ["{workspaceRoot}/**/*"]
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"type": "git",
"url": "https://github.com/tanstack/store.git"
},
"packageManager": "pnpm@10.18.2",
"packageManager": "pnpm@10.24.0",
"type": "module",
"scripts": {
"clean": "pnpm --filter \"./packages/**\" run clean",
"preinstall": "node -e \"if(process.env.CI == 'true') {console.log('Skipping preinstall...')} else {process.exit(1)}\" || npx -y only-allow pnpm",
"test": "pnpm run test:ci",
"test:pr": "nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
"test:ci": "nx run-many --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
Expand All @@ -21,26 +20,30 @@
"test:build": "nx affected --target=test:build --exclude=examples/**",
"test:types": "nx affected --target=test:types --exclude=examples/**",
"test:knip": "knip",
"test:docs": "node scripts/verify-links.ts",
"build": "nx affected --target=build --exclude=examples/**",
"build:all": "nx run-many --target=build --exclude=examples/**",
"watch": "pnpm run build:all && nx watch --all -- pnpm run build:all",
"dev": "pnpm run watch",
"prettier": "prettier --experimental-cli --ignore-unknown '**/*'",
"prettier:write": "pnpm run prettier --write",
"docs:generate": "pnpm exec tsx scripts/generateDocs.ts",
"verify-links": "node scripts/verify-links.ts",
"generate-docs": "node scripts/generate-docs.ts",
"cipublish": "node scripts/publish.ts",
"cipublishforce": "CI=true pnpm cipublish"
},
"nx": {
"includedScripts": [
"test:docs",
"test:knip",
"test:sherif"
]
},
"devDependencies": {
"@eslint-react/eslint-plugin": "^1.53.1",
"@tanstack/config": "^0.22.1",
"@tanstack/eslint-config": "0.3.3",
"@tanstack/publish-config": "0.2.2",
"@tanstack/typedoc-config": "0.3.1",
"@tanstack/vite-config": "0.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^24.1.0",
Expand All @@ -57,7 +60,6 @@
"publint": "^0.3.15",
"sherif": "^1.9.0",
"tinyglobby": "^0.2.15",
"tsx": "^4.21.0",
"typescript": "5.6.3",
"typescript50": "npm:typescript@5.0",
"typescript51": "npm:typescript@5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/preact-store/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, mergeConfig } from 'vitest/config'
import { tanstackViteConfig } from '@tanstack/config/vite'
import { tanstackViteConfig } from '@tanstack/vite-config'
import preact from '@preact/preset-vite'
import packageJson from './package.json'

Expand Down
2 changes: 1 addition & 1 deletion packages/react-store/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, mergeConfig } from 'vitest/config'
import { tanstackViteConfig } from '@tanstack/config/vite'
import { tanstackViteConfig } from '@tanstack/vite-config'
import react from '@vitejs/plugin-react'
import packageJson from './package.json'

Expand Down
2 changes: 1 addition & 1 deletion packages/solid-store/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, mergeConfig } from 'vitest/config'
import { tanstackViteConfig } from '@tanstack/config/vite'
import { tanstackViteConfig } from '@tanstack/vite-config'
import solid from 'vite-plugin-solid'
import packageJson from './package.json'

Expand Down
2 changes: 1 addition & 1 deletion packages/store/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, mergeConfig } from 'vitest/config'
import { tanstackViteConfig } from '@tanstack/config/vite'
import { tanstackViteConfig } from '@tanstack/vite-config'
import packageJson from './package.json'

const config = defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-store/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, mergeConfig } from 'vitest/config'
import { tanstackViteConfig } from '@tanstack/config/vite'
import { tanstackViteConfig } from '@tanstack/vite-config'
import vue from '@vitejs/plugin-vue'
import packageJson from './package.json'

Expand Down
38 changes: 12 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading