Skip to content

Commit 1777546

Browse files
pkg: Update all non-major dependencies (#3333)
* pkg: Update all non-major dependencies * fix: TypeScript 5.7 support --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nathaniel Tucker <[email protected]>
1 parent cbbb2e4 commit 1777546

File tree

13 files changed

+164
-138
lines changed

13 files changed

+164
-138
lines changed

.changeset/perfect-walls-admire.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@data-client/rest': patch
3+
---
4+
5+
Resource.extend() compatibility with TypeScript 5
6+
7+
Previously [extending existing members](https://dataclient.io/rest/api/resource#extend-override) with no
8+
typed overrides (like [path](https://dataclient.io/rest/api/resource#path)) would not work starting with
9+
TypeScript 5.7.
10+
11+
```ts
12+
const UserResource = UserResourceBase.extend({
13+
partialUpdate: {
14+
getOptimisticResponse(snap, params, body) {
15+
params.id;
16+
params.group;
17+
// @ts-expect-error
18+
params.nothere;
19+
return {
20+
id: params.id,
21+
...body,
22+
};
23+
},
24+
},
25+
});
26+
```

examples/coin-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@types/react": "*",
3737
"@types/react-dom": "*",
3838
"react-refresh": "*",
39-
"typescript": "5.6",
39+
"typescript": "5.7",
4040
"webpack": "*",
4141
"webpack-cli": "*"
4242
},

examples/github-app/package-lock.json

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/github-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@data-client/react": "^0.14.0",
5555
"@data-client/rest": "^0.14.0",
5656
"@js-temporal/polyfill": "^0.4.4",
57-
"antd": "5.22.5",
57+
"antd": "5.22.7",
5858
"parse-link-header": "^2.0.0",
5959
"react": "19.0.0",
6060
"react-dom": "19.0.0",

examples/nextjs/package-lock.json

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@types/react": "19.0.2",
2323
"@types/react-dom": "19.0.2",
2424
"clsx": "^2.1.1",
25-
"next": "15.1.2",
25+
"next": "15.1.3",
2626
"react": "19.0.0",
2727
"react-dom": "19.0.0",
2828
"tar-fs": "^3.0.6",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"rollup-plugin-replace": "^2.2.0",
110110
"rollup-plugin-terser": "^7.0.2",
111111
"ts-node": "10.9.2",
112-
"typescript": "5.6",
112+
"typescript": "5.7",
113113
"whatwg-fetch": "3.0.0"
114114
},
115115
"resolutions": {

packages/rest/src/resourceExtendable.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ export interface Extendable<
6969
};
7070
extend<
7171
R extends ResourceInterface,
72-
Get extends PartialRestGenerics = any,
73-
GetList extends PartialRestGenerics = any,
74-
Update extends PartialRestGenerics = any,
75-
PartialUpdate extends PartialRestGenerics = any,
76-
Delete extends PartialRestGenerics = any,
72+
Get extends PartialRestGenerics = {},
73+
GetList extends PartialRestGenerics = {},
74+
Update extends PartialRestGenerics = {},
75+
PartialUpdate extends PartialRestGenerics = {},
76+
Delete extends PartialRestGenerics = {},
7777
>(
7878
this: R,
7979
options: ResourceEndpointExtensions<

packages/rest/src/resourceExtensionTypes.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ export type ExtendedResource<
5959

6060
export interface ResourceEndpointExtensions<
6161
R extends ResourceInterface,
62-
Get extends PartialRestGenerics = any,
63-
GetList extends PartialRestGenerics = any,
64-
Update extends PartialRestGenerics = any,
65-
PartialUpdate extends PartialRestGenerics = any,
66-
Delete extends PartialRestGenerics = any,
62+
Get extends PartialRestGenerics = {},
63+
GetList extends PartialRestGenerics = {},
64+
Update extends PartialRestGenerics = {},
65+
PartialUpdate extends PartialRestGenerics = {},
66+
Delete extends PartialRestGenerics = {},
6767
> {
6868
readonly get?: RestEndpointOptions<
6969
unknown extends Get ? EndpointToFunction<R['get']>

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"react-dom": "^19.0.0",
5757
"react-json-tree": "0.19.0",
5858
"react-live": "^4.0.0",
59-
"typescript": "5.6",
59+
"typescript": "5.7",
6060
"uuid": "^11.0.0"
6161
},
6262
"browserslist": [

0 commit comments

Comments
 (0)