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
7 changes: 2 additions & 5 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"$schema": "https://unpkg.com/@changesets/config@4.0.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "TanStack/store", "disableThanks": true }
Expand All @@ -10,8 +10,5 @@
"updateInternalDependencies": "patch",
"fixed": [],
"linked": [],
"ignore": ["@tanstack/store-example-*"],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
"ignore": []
}
6 changes: 3 additions & 3 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
uses: TanStack/config/.github/setup@7bbdf583c2fc1a7f596283cd01e0e44c43f574f2 # main
- name: Fix formatting
run: pnpm format
- name: Generate Docs
run: pnpm generate-docs
- name: Apply fixes
uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8
uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4
with:
commit-message: 'ci: apply automated fixes and generate docs'
16 changes: 8 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Start Nx Agents
run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
- name: Setup Tools
uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
uses: TanStack/config/.github/setup@7bbdf583c2fc1a7f596283cd01e0e44c43f574f2 # main
- name: Get base and head commits for `nx affected`
uses: nrwl/nx-set-shas@3e9ad7370203c1e93d109be57f3b72eb0eb511b1 # v4.4.0
uses: nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1 # v5.0.1
with:
main-branch-name: main
- name: Run Checks
Expand All @@ -44,11 +44,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
uses: TanStack/config/.github/setup@7bbdf583c2fc1a7f596283cd01e0e44c43f574f2 # main
- name: Build Packages
run: pnpm run build:all
- name: Publish Previews
Expand All @@ -58,10 +58,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
uses: TanStack/config/.github/setup@7bbdf583c2fc1a7f596283cd01e0e44c43f574f2 # main
- name: Changeset Preview
uses: TanStack/config/.github/changeset-preview@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
uses: TanStack/config/.github/changeset-preview@7bbdf583c2fc1a7f596283cd01e0e44c43f574f2 # main
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
uses: TanStack/config/.github/setup@7bbdf583c2fc1a7f596283cd01e0e44c43f574f2 # main
- name: Run Tests
run: pnpm run test:ci
- name: Run Changesets (version or publish)
id: changesets
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish
commit: 'ci: Version Packages'
title: 'ci: Version Packages'
- name: Comment on PRs about release
if: steps.changesets.outputs.published == 'true'
uses: TanStack/config/.github/comment-on-release@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
uses: TanStack/config/.github/comment-on-release@7bbdf583c2fc1a7f596283cd01e0e44c43f574f2 # main
with:
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
4 changes: 2 additions & 2 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run zizmor
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4
with:
advanced-security: false
annotations: true
15 changes: 1 addition & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dist
.env.test.local
.env.production.local
.next
.angular/*
.angular/
.cache/*

npm-debug.log*
Expand All @@ -43,16 +43,3 @@ stats.html

vite.config.js.timestamp-*
vite.config.ts.timestamp-*

examples/angular/atoms/.angular/cache/*
examples/angular/atoms/.angular/cache/21.2.7/atoms/angular-compiler.db
examples/angular/atoms/.angular/cache/21.2.7/atoms/angular-compiler.db-lock
examples/angular/store-actions/.angular/cache/21.2.7/store-actions/.tsbuildinfo
examples/angular/store-actions/.angular/cache/21.2.7/store-actions/angular-compiler.db
examples/angular/store-actions/.angular/cache/21.2.7/store-actions/angular-compiler.db-lock
examples/angular/store-context/.angular/cache/21.2.7/store-context/.tsbuildinfo
examples/angular/store-context/.angular/cache/21.2.7/store-context/angular-compiler.db
examples/angular/store-context/.angular/cache/21.2.7/store-context/angular-compiler.db-lock
examples/angular/stores/.angular/cache/21.2.7/stores/.tsbuildinfo
examples/angular/stores/.angular/cache/21.2.7/stores/angular-compiler.db
examples/angular/stores/.angular/cache/21.2.7/stores/angular-compiler.db-lock
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.8.0
26.10.0
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ then compose them with existing hooks like [injectSelector](injectSelector.md),

`object`

### injectStoreContext()
### injectStoreContext

```ts
injectStoreContext: () => TValue;
Expand All @@ -42,7 +42,7 @@ injectStoreContext: () => TValue;

`TValue`

### provideStoreContext()
### provideStoreContext

```ts
provideStoreContext: (factory) => Provider;
Expand Down
4 changes: 2 additions & 2 deletions docs/framework/angular/reference/functions/injectSelector.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: injectSelector
```ts
function injectSelector<TState, TSelected>(
source,
selector,
selector?,
options?): Signal<TSelected>;
```

Expand All @@ -33,7 +33,7 @@ This is the primary Angular read hook for TanStack Store.

[`SelectionSource`](../type-aliases/SelectionSource.md)\<`TState`\>

### selector
### selector?

(`state`) => `TSelected`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Defined in: [packages/angular-store/src/injectSelector.ts:11](https://github.com

## Properties

### compare()?
### compare?

```ts
optional compare: (a, b) => boolean;
optional compare?: (a, b) => boolean;
```

Defined in: [packages/angular-store/src/injectSelector.ts:15](https://github.com/TanStack/store/blob/main/packages/angular-store/src/injectSelector.ts#L15)
Expand All @@ -44,10 +44,10 @@ Defined in: [packages/angular-store/src/injectSelector.ts:15](https://github.com
### debugName?

```ts
optional debugName: string;
optional debugName?: string;
```

Defined in: node\_modules/.pnpm/@angular+core@21.2.8\_@angular+compiler@21.2.8\_rxjs@7.8.2\_zone.js@0.16.1/node\_modules/@angular/core/types/\_chrome\_dev\_tools\_performance-chunk.d.ts:54
Defined in: node\_modules/.pnpm/@angular+core@22.2.2\_@angular+compiler@22.2.2\_rxjs@7.8.2\_zone.js@0.16.1/node\_modules/@angular/core/types/\_chrome\_dev\_tools\_performance-chunk.d.ts:54

A debug name for the signal. Used in Angular DevTools to identify the signal.

Expand All @@ -62,7 +62,7 @@ Omit.debugName
### injector?

```ts
optional injector: Injector;
optional injector?: Injector;
```

Defined in: [packages/angular-store/src/injectSelector.ts:16](https://github.com/TanStack/store/blob/main/packages/angular-store/src/injectSelector.ts#L16)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Defined in: [packages/angular-store/src/injectSelector.ts:19](https://github.com

## Properties

### get()
### get

```ts
get: () => T;
Expand All @@ -31,7 +31,7 @@ Defined in: [packages/angular-store/src/injectSelector.ts:20](https://github.com

***

### subscribe()
### subscribe

```ts
subscribe: (listener) => object;
Expand All @@ -49,7 +49,7 @@ Defined in: [packages/angular-store/src/injectSelector.ts:21](https://github.com

`object`

##### unsubscribe()
##### unsubscribe

```ts
unsubscribe: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: createStoreContext
function createStoreContext<TValue>(): object;
```

Defined in: [octane-store/src/createStoreContext.ts:44](https://github.com/TanStack/store/blob/main/packages/octane-store/src/createStoreContext.ts#L44)
Defined in: [createStoreContext.ts:44](https://github.com/TanStack/store/blob/main/packages/octane-store/src/createStoreContext.ts#L44)

Creates a typed Octane context for sharing a bundle of atoms and stores with
a subtree.
Expand Down Expand Up @@ -38,7 +38,7 @@ StoreProvider: ComponentBody<{
}>;
```

### useStoreContext()
### useStoreContext

```ts
useStoreContext: () => TValue;
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/octane/reference/functions/useAtom.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function useAtom<TValue>(
): [TValue, Atom<TValue>['set']];
```

Defined in: [octane-store/src/useAtom.ts:17](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useAtom.ts#L17)
Defined in: [useAtom.ts:17](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useAtom.ts#L17)

Returns the current atom value together with a stable setter.

Expand Down
4 changes: 2 additions & 2 deletions docs/framework/octane/reference/functions/useCreateAtom.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: useCreateAtom
function useCreateAtom<T>(getValue, options?): ReadonlyAtom<T>;
```

Defined in: [octane-store/src/useCreateAtom.ts:18](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateAtom.ts#L18)
Defined in: [useCreateAtom.ts:18](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateAtom.ts#L18)

Creates a stable atom instance for the lifetime of the component.

Expand Down Expand Up @@ -49,7 +49,7 @@ const countAtom = useCreateAtom(0)
function useCreateAtom<T>(initialValue, options?): Atom<T>;
```

Defined in: [octane-store/src/useCreateAtom.ts:22](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateAtom.ts#L22)
Defined in: [useCreateAtom.ts:22](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateAtom.ts#L22)

Creates a stable atom instance for the lifetime of the component.

Expand Down
6 changes: 3 additions & 3 deletions docs/framework/octane/reference/functions/useCreateStore.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: useCreateStore
function useCreateStore<T>(getValue): ReadonlyStore<T>;
```

Defined in: [octane-store/src/useCreateStore.ts:25](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateStore.ts#L25)
Defined in: [useCreateStore.ts:25](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateStore.ts#L25)

Creates a stable store instance for the lifetime of the component.

Expand Down Expand Up @@ -45,7 +45,7 @@ const counterStore = useCreateStore({ count: 0 })
function useCreateStore<T>(initialValue): Store<T>;
```

Defined in: [octane-store/src/useCreateStore.ts:28](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateStore.ts#L28)
Defined in: [useCreateStore.ts:28](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateStore.ts#L28)

Creates a stable store instance for the lifetime of the component.

Expand Down Expand Up @@ -81,7 +81,7 @@ const counterStore = useCreateStore({ count: 0 })
function useCreateStore<T, TActions>(initialValue, actions): Store<T, TActions>;
```

Defined in: [octane-store/src/useCreateStore.ts:29](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateStore.ts#L29)
Defined in: [useCreateStore.ts:29](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useCreateStore.ts#L29)

Creates a stable store instance for the lifetime of the component.

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/octane/reference/functions/useSelector.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function useSelector<TSource, TSelected>(
options?): TSelected;
```

Defined in: [octane-store/src/useSelector.ts:48](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useSelector.ts#L48)
Defined in: [useSelector.ts:48](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useSelector.ts#L48)

Selects a slice of state from an atom or store and subscribes the component
to that selection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: UseSelectorOptions
title: UseSelectorOptions
---

Defined in: [octane-store/src/useSelector.ts:5](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useSelector.ts#L5)
Defined in: [useSelector.ts:5](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useSelector.ts#L5)

## Type Parameters

Expand All @@ -13,13 +13,13 @@ Defined in: [octane-store/src/useSelector.ts:5](https://github.com/TanStack/stor

## Properties

### compare()?
### compare?

```ts
optional compare: (a, b) => boolean;
optional compare?: (a, b) => boolean;
```

Defined in: [octane-store/src/useSelector.ts:6](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useSelector.ts#L6)
Defined in: [useSelector.ts:6](https://github.com/TanStack/store/blob/main/packages/octane-store/src/useSelector.ts#L6)

#### Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: createStoreContext
function createStoreContext<TValue>(): object;
```

Defined in: [preact-store/src/createStoreContext.tsx:44](https://github.com/TanStack/store/blob/main/packages/preact-store/src/createStoreContext.tsx#L44)
Defined in: [createStoreContext.tsx:44](https://github.com/TanStack/store/blob/main/packages/preact-store/src/createStoreContext.tsx#L44)

Creates a typed Preact context for sharing a bundle of atoms and stores with
a subtree.
Expand All @@ -30,7 +30,7 @@ typed when read back with `useStoreContext()`.

`object`

### StoreProvider()
### StoreProvider

```ts
StoreProvider: (__namedParameters) => Element;
Expand All @@ -52,7 +52,7 @@ StoreProvider: (__namedParameters) => Element;

`Element`

### useStoreContext()
### useStoreContext

```ts
useStoreContext: () => TValue;
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/preact/reference/functions/useAtom.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: useAtom
function useAtom<TValue>(atom, options?): [TValue, (fn) => void & (value) => void];
```

Defined in: [preact-store/src/useAtom.ts:22](https://github.com/TanStack/store/blob/main/packages/preact-store/src/useAtom.ts#L22)
Defined in: [useAtom.ts:22](https://github.com/TanStack/store/blob/main/packages/preact-store/src/useAtom.ts#L22)

Returns the current atom value together with a stable setter.

Expand Down
Loading
Loading