Skip to content

Commit d85bff5

Browse files
pkg: Update validation packages (#3640)
* pkg: Update validation packages * internal: Formatting of code --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nathaniel Tucker <[email protected]>
1 parent 0bee61b commit d85bff5

File tree

15 files changed

+194
-170
lines changed

15 files changed

+194
-170
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
"devDependencies": {
5656
"@anansi/babel-preset": "^6.2.19",
5757
"@anansi/browserslist-config": "1.7.3",
58-
"@anansi/eslint-plugin": "1.0.56",
59-
"@anansi/jest-preset": "0.11.26",
58+
"@anansi/eslint-plugin": "1.0.58",
59+
"@anansi/jest-preset": "0.11.27",
6060
"@babel/cli": "7.28.3",
6161
"@babel/core": "7.28.5",
6262
"@babel/node": "7.28.0",
@@ -91,7 +91,7 @@
9191
"mkdirp": "^3.0.0",
9292
"nock": "13.3.1",
9393
"npm-run-all": "^4.1.5",
94-
"prettier": "3.6.2",
94+
"prettier": "3.7.2",
9595
"react": "19.2.0",
9696
"react-dom": "19.2.0",
9797
"react-native": "patch:react-native@npm:0.82.0-rc.0#~/.yarn/patches/react-native-npm-0.81.0-612367b09d.patch",

packages/core/src/manager/SubscriptionManager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ export interface SubscriptionConstructable {
3333
*/
3434
export default class SubscriptionManager<
3535
S extends SubscriptionConstructable = SubscriptionConstructable,
36-
> implements Manager<Actions>
37-
{
36+
> implements Manager<Actions> {
3837
protected subscriptions: {
3938
[key: string]: InstanceType<S>;
4039
} = {};

packages/core/src/middlewareTypes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ export type Dispatch<Actions = ActionTypes> = (value: Actions) => Promise<void>;
55

66
export interface MiddlewareAPI extends Controller<Dispatch<ActionTypes>> {}
77

8-
export interface MiddlewareController<Actions = ActionTypes>
9-
extends Controller<Dispatch<Actions>> {}
8+
export interface MiddlewareController<Actions = ActionTypes> extends Controller<
9+
Dispatch<Actions>
10+
> {}
1011

1112
/** @see https://dataclient.io/docs/api/Manager#middleware */
1213
export type Middleware<Actions = ActionTypes> = <

packages/endpoint/src/interface.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ export interface SchemaSimple<T = any, Args extends readonly any[] = any> {
4444
): any;
4545
}
4646

47-
export interface SchemaClass<T = any, Args extends readonly any[] = any>
48-
extends SchemaSimple<T, Args> {
47+
export interface SchemaClass<
48+
T = any,
49+
Args extends readonly any[] = any,
50+
> extends SchemaSimple<T, Args> {
4951
// this is not an actual member, but is needed for the recursive NormalizeNullable<> type algo
5052
_normalizeNullable(): any;
5153
// this is not an actual member, but is needed for the recursive DenormalizeNullable<> type algo
@@ -83,8 +85,10 @@ export interface Mergeable {
8385
}
8486

8587
/** Represents Array or Values */
86-
export interface PolymorphicInterface<T = any, Args extends any[] = any[]>
87-
extends SchemaSimple<T, Args> {
88+
export interface PolymorphicInterface<
89+
T = any,
90+
Args extends any[] = any[],
91+
> extends SchemaSimple<T, Args> {
8892
readonly schema: any;
8993
schemaKey(): string;
9094
// this is not an actual member, but is needed for the recursive NormalizeNullable<> type algo

packages/endpoint/src/schema.d.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ export class Array<S extends Schema = Schema> implements SchemaClass {
9999
*/
100100
export class All<
101101
S extends EntityMap | EntityInterface = EntityMap | EntityInterface,
102-
> implements SchemaClass
103-
{
102+
> implements SchemaClass {
104103
/**
105104
* Retrieves all entities in cache
106105
*
@@ -153,9 +152,9 @@ export class All<
153152
* Represents objects with statically known members
154153
* @see https://dataclient.io/rest/api/Object
155154
*/
156-
export class Object<O extends Record<string, any> = Record<string, any>>
157-
implements SchemaClass
158-
{
155+
export class Object<
156+
O extends Record<string, any> = Record<string, any>,
157+
> implements SchemaClass {
159158
/**
160159
* Represents objects with statically known members
161160
* @see https://dataclient.io/rest/api/Object
@@ -242,9 +241,8 @@ export interface UnionConstructor {
242241
*/
243242
export interface UnionInstance<
244243
Choices extends EntityMap = any,
245-
Args extends EntityFields<
246-
AbstractInstanceType<Choices[keyof Choices]>
247-
> = EntityFields<AbstractInstanceType<Choices[keyof Choices]>>,
244+
Args extends EntityFields<AbstractInstanceType<Choices[keyof Choices]>> =
245+
EntityFields<AbstractInstanceType<Choices[keyof Choices]>>,
248246
> {
249247
define(definition: Schema): void;
250248
inferSchema: SchemaAttributeFunction<Choices[keyof Choices]>;

packages/endpoint/src/schemas/Collection.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ export default class CollectionSchema<
5555
S extends PolymorphicInterface = any,
5656
Args extends any[] = DefaultArgs,
5757
Parent = any,
58-
> implements Mergeable
59-
{
58+
> implements Mergeable {
6059
declare protected nestKey: (parent: any, key: string) => Record<string, any>;
6160

6261
declare protected argsKey?: (...args: any) => Record<string, any>;

packages/endpoint/src/schemas/EntityTypes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,9 @@ export type EntityOptions<TInstance extends {}> = {
240240
>]?: IEntityClass<abstract new (...args: any[]) => TInstance>[K];
241241
};
242242

243-
export interface RequiredPKOptions<TInstance extends {}>
244-
extends EntityOptions<TInstance> {
243+
export interface RequiredPKOptions<
244+
TInstance extends {},
245+
> extends EntityOptions<TInstance> {
245246
readonly pk:
246247
| ((
247248
value: TInstance,

packages/endpoint/src/schemas/Invalidate.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export default class Invalidate<
1616
E extends EntityInterface & {
1717
process: any;
1818
},
19-
> implements SchemaSimple
20-
{
19+
> implements SchemaSimple {
2120
declare protected _entity: E;
2221

2322
/**

packages/endpoint/src/schemas/Query.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import type { Denormalize, NormalizeNullable, SchemaArgs } from '../normal.js';
99
export default class Query<
1010
S extends Queryable | { [k: string]: Queryable },
1111
P extends (entries: Denormalize<S>, ...args: any) => any,
12-
> implements SchemaSimple<ReturnType<P> | undefined, ProcessParameters<P, S>>
13-
{
12+
> implements SchemaSimple<ReturnType<P> | undefined, ProcessParameters<P, S>> {
1413
declare schema: S;
1514
declare process: P;
1615

packages/img/src/Img.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ type Props<
1111
> = React.ComponentProps<C> & { component?: C };
1212

1313
export default function Img<
14-
C extends
15-
| keyof JSX.IntrinsicElements
16-
| React.JSXElementConstructor<any> = 'img',
14+
C extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any> =
15+
'img',
1716
>({ component = 'img', ...rest }: Props<C>): React.ReactElement {
1817
useSuspense(getImage, rest.src ? { src: rest.src } : null);
1918
return React.createElement(component, rest);

0 commit comments

Comments
 (0)