@tinacms/schema-tools 1.4.18 → 1.4.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { Schema, Collection, Template, Collectable, CollectionTemplateable, TinaField } from '../types/index';
1
+ import type { Schema, Collection, Template, Collectable, CollectionTemplateable, TinaField } from '../types/index';
2
2
  declare type Version = {
3
3
  fullVersion: string;
4
4
  major: string;
@@ -41,7 +41,7 @@ export declare class TinaSchema {
41
41
  }) => Template<true>;
42
42
  transformPayload: (collectionName: string, payload: object) => {
43
43
  [x: string]: {
44
- [x: string]: {};
44
+ [key: string]: unknown;
45
45
  };
46
46
  };
47
47
  private transformCollectablePayload;
@@ -76,6 +76,6 @@ export declare class TinaSchema {
76
76
  matchFiles({ collection, files, }: {
77
77
  collection: string | Collection;
78
78
  files: string[];
79
- }): any;
79
+ }): string[];
80
80
  }
81
81
  export {};
@@ -1,14 +1,14 @@
1
1
  /**
2
2
 
3
3
  */
4
- import { TinaField } from '../types/index';
5
- import { TinaSchema } from './TinaSchema';
4
+ import type { TinaField } from '../types/index';
5
+ import type { TinaSchema } from './TinaSchema';
6
6
  /**
7
7
  * Turns a field the schema (schema.{js,ts} file) into a valid front end FieldConfig
8
8
  */
9
9
  export declare const resolveField: (field: TinaField<true>, schema: TinaSchema) => {
10
10
  [key: string]: unknown;
11
11
  name: string;
12
- component: TinaField<true>['ui']['component'];
12
+ component: NonNullable<TinaField<true>['ui']>['component'];
13
13
  type: string;
14
14
  };
@@ -333,6 +333,7 @@ export interface AuthProvider {
333
333
  getLoginScreen: () => FC<LoginScreenProps> | null;
334
334
  getSessionProvider: () => FC<{
335
335
  basePath?: string;
336
+ children?: React.ReactNode;
336
337
  }>;
337
338
  }
338
339
  interface AuthHooks {
@@ -1,7 +1,7 @@
1
1
  import type { Schema } from '../types/index';
2
2
  export { validateTinaCloudSchemaConfig } from './tinaCloudSchemaConfig';
3
3
  export declare class TinaSchemaValidationError extends Error {
4
- constructor(message: any);
4
+ constructor(message: string);
5
5
  }
6
6
  export declare const validateSchema: ({ schema }: {
7
7
  schema: Schema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/schema-tools",
3
- "version": "1.4.18",
3
+ "version": "1.4.19",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -23,14 +23,16 @@
23
23
  ]
24
24
  },
25
25
  "devDependencies": {
26
+ "@types/jest": "^29.5.12",
26
27
  "@types/micromatch": "^4.0.2",
27
- "@types/react": "17.0.2",
28
+ "@types/react": "^18.3.3",
28
29
  "@types/yup": "^0.29.10",
29
30
  "jest": "^29.5.0",
30
- "react": "17.0.2",
31
+ "react": "^18.3.1",
32
+ "ts-jest": "^29.2.3",
31
33
  "typescript": "4.6.4",
32
34
  "yup": "^0.32.0",
33
- "@tinacms/scripts": "1.1.5"
35
+ "@tinacms/scripts": "1.1.6"
34
36
  },
35
37
  "peerDependencies": {
36
38
  "react": ">=16.14.0",
@@ -50,7 +52,7 @@
50
52
  },
51
53
  "scripts": {
52
54
  "build": "tinacms-scripts build",
53
- "test": "jest --passWithNoTests",
55
+ "test": "jest --config jest.config.js",
54
56
  "types": "pnpm tsc",
55
57
  "test-watch": "jest --passWithNoTests --watch",
56
58
  "generate:schema": "pnpm node scripts/generateSchema.js"