Skip to content

Commit 0fce9d9

Browse files
committed
Merge branch 'main' into feat/devtools-client-poc
2 parents 0438765 + 288cdcc commit 0fce9d9

106 files changed

Lines changed: 3923 additions & 11746 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## 🎯 Changes
2+
3+
<!-- What changes are made in this PR? Describe the change and its motivation. -->
4+
5+
## ✅ Checklist
6+
7+
- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/config/blob/main/CONTRIBUTING.md).
8+
- [ ] I have tested this code locally with `pnpm test:pr`.
9+
10+
## 🚀 Release Impact
11+
12+
- [ ] This change affects published code, and I have generated a [changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).
13+
- [ ] This change is docs/CI/dev-only (no release).

.github/workflows/autofix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v4.2.2
21+
uses: actions/checkout@v5.0.0
2222
- name: Setup Tools
2323
uses: tanstack/config/.github/setup@main
2424
- name: Fix formatting
2525
run: pnpm prettier:write
2626
# - name: Regenerate docs
2727
# run: pnpm docs:generate
2828
- name: Apply fixes
29-
uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
29+
uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
3030
with:
3131
commit-message: 'ci: apply automated fixes'

.github/workflows/pr.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v4.2.2
26+
uses: actions/checkout@v5.0.0
2727
with:
2828
fetch-depth: 0
2929
- name: Setup Tools
3030
uses: tanstack/config/.github/setup@main
3131
- name: Get base and head commits for `nx affected`
32-
uses: nrwl/nx-set-shas@v4.3.0
32+
uses: nrwl/nx-set-shas@v4.3.3
3333
with:
3434
main-branch-name: main
3535
- name: Run Checks
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: ubuntu-latest
4040
steps:
4141
- name: Checkout
42-
uses: actions/checkout@v4.2.2
42+
uses: actions/checkout@v5.0.0
4343
with:
4444
fetch-depth: 0
4545
- name: Setup Tools
@@ -48,3 +48,15 @@ jobs:
4848
run: pnpm run build:all
4949
- name: Publish Previews
5050
run: pnpx pkg-pr-new publish --pnpm './packages/*' --template './examples/*/*'
51+
provenance:
52+
name: Provenance
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v5.0.0
57+
with:
58+
fetch-depth: 0
59+
- name: Check Provenance
60+
uses: danielroe/provenance-action@v0.1.1
61+
with:
62+
fail-on-downgrade: true

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v4.2.2
26+
uses: actions/checkout@v5.0.0
2727
with:
2828
fetch-depth: 0
2929
- name: Setup Tools
3030
uses: tanstack/config/.github/setup@main
3131
- name: Run Tests
3232
run: pnpm run test:ci
3333
- name: Run Changesets (version or publish)
34-
uses: changesets/action@v1.4.9
34+
uses: changesets/action@v1.5.3
3535
with:
3636
version: pnpm run changeset:version
3737
publish: pnpm run changeset:publish

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ stats.html
3737
.vscode/settings.json
3838
.idea
3939

40+
4041
*.log
4142
.DS_Store
4243
.cache
@@ -56,4 +57,5 @@ vite.config.ts.timestamp-*
5657

5758
.angular
5859
.nitro
59-
.sonda
60+
.sonda
61+

.npmrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
link-workspace-packages=true
2-
prefer-workspace-packages=true
31
provenance=true

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.12.0
1+
24.8.0

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ createRoot(document.getElementById('root')!).render(
106106
<App />
107107

108108
<TanStackDevtools
109-
config={{ hideUntilHover: true, }}
109+
config={{ hideUntilHover: true }}
110110
eventBusConfig={{ debug: true }}
111111
plugins={[
112112
{

docs/framework/react/guides/custom-plugins.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ This is our library code:
1414
counter.ts
1515
```tsx
1616
export function createCounter() {
17-
let count = 0;
18-
const history = [];
17+
let count = 0
18+
const history = []
1919

2020
return {
2121
getCount: () => count,
2222
increment: () => {
23-
history.push(count);
24-
count++;
23+
count++
24+
history.push(count)
2525
},
2626
decrement: () => {
27-
history.push(count);
28-
count--;
27+
count--
28+
history.push(count)
2929
},
3030
};
3131
}
@@ -49,11 +49,11 @@ import { EventClient } from '@tanstack/devtools-event-client'
4949
type EventMap = {
5050
// The key of the event map is a combination of {pluginId}:{eventSuffix}
5151
// The value is the expected type of the event payload
52-
'custom-devtools:counter-state': { count: number, history: number[], }
52+
'custom-devtools:counter-state': { count: number, history: number[] }
5353
}
5454

5555
class CustomEventClient extends EventClient<EventMap> {
56-
constructor() {
56+
constructor() {
5757
super({
5858
// The pluginId must match that of the event map key
5959
pluginId: 'custom-devtools',
@@ -82,20 +82,22 @@ export function createCounter() {
8282
return {
8383
getCount: () => count,
8484
increment: () => {
85+
count++
8586
history.push(count)
8687

8788
// The emit eventSuffix must match that of the EventMap defined in eventClient.ts
8889
DevtoolsEventClient.emit('counter-state', {
89-
count: count++,
90-
history: history,
90+
count,
91+
history,
9192
})
9293
},
9394
decrement: () => {
95+
count--
9496
history.push(count)
9597

9698
DevtoolsEventClient.emit('counter-state', {
97-
count: count--,
98-
history: history,
99+
count,
100+
history,
99101
})
100102
},
101103
}
@@ -115,19 +117,19 @@ DevtoolsPanel.ts
115117
import { DevtoolsEventClient } from './eventClient.ts'
116118

117119
export function DevtoolPanel() {
118-
const [state,setState] = useState();
120+
const [state, setState] = useState()
119121

120122
useEffect(() => {
121123
// subscribe to the emitted event
122-
const cleanup = client.on("counter-state", e => setState(e.payload)
124+
const cleanup = DevtoolsEventClient.on("counter-state", e => setState(e.payload))
123125
return cleanup
124-
}, []);
126+
}, [])
125127

126128
return (
127129
<div>
128130
<div>{state.count}</div>
129131
<div>{JSON.stringify(state.history)}</div>
130-
<div/>
132+
</div>
131133
)
132134
}
133135
```
@@ -160,7 +162,7 @@ createRoot(document.getElementById('root')!).render(
160162

161163
## Debugging
162164

163-
Both the TansTack `TanStackDevtools` component and the TanStack `EventClient` come with built in debug mode which will log to the console the emitted event as well as the EventClient status.
165+
Both the `TanStackDevtools` component and the TanStack `EventClient` come with built in debug mode which will log to the console the emitted event as well as the EventClient status.
164166

165167
TanStackDevtool's debugging mode can be activated like so:
166168
```tsx

docs/framework/solid/basic-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ render(() => (
6565
]}
6666
/>
6767
</>
68-
), document.getElementById('root')!);
68+
), document.getElementById('root')!)
6969
```
7070

7171
Finally add any additional configuration you desire to the `TanStackDevtools` component, more information can be found under the [TanStack Devtools Configuration](../../../configuration.md) section.

0 commit comments

Comments
 (0)