build(deps): update latest
BREAKING CHANGE: peerDependencies: `react@>=18.2.0`
This commit is contained in:
parent
85eb53d60c
commit
69f12002c7
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: 'actions/checkout@v3.3.0'
|
- uses: 'actions/checkout@v3.5.0'
|
||||||
|
|
||||||
- name: 'Use Node.js'
|
- name: 'Use Node.js'
|
||||||
uses: 'actions/setup-node@v3.6.0'
|
uses: 'actions/setup-node@v3.6.0'
|
||||||
|
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: 'actions/checkout@v3.3.0'
|
- uses: 'actions/checkout@v3.5.0'
|
||||||
|
|
||||||
- name: 'Use Node.js'
|
- name: 'Use Node.js'
|
||||||
uses: 'actions/setup-node@v3.6.0'
|
uses: 'actions/setup-node@v3.6.0'
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: 'actions/checkout@v3.3.0'
|
- uses: 'actions/checkout@v3.5.0'
|
||||||
|
|
||||||
- name: 'Use Node.js'
|
- name: 'Use Node.js'
|
||||||
uses: 'actions/setup-node@v3.6.0'
|
uses: 'actions/setup-node@v3.6.0'
|
||||||
|
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: 'actions/checkout@v3.3.0'
|
- uses: 'actions/checkout@v3.5.0'
|
||||||
|
|
||||||
- name: 'Use Node.js'
|
- name: 'Use Node.js'
|
||||||
uses: 'actions/setup-node@v3.6.0'
|
uses: 'actions/setup-node@v3.6.0'
|
||||||
@ -27,10 +27,10 @@ jobs:
|
|||||||
test-e2e:
|
test-e2e:
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: 'actions/checkout@v3.0.0'
|
- uses: 'actions/checkout@v3.5.0'
|
||||||
|
|
||||||
- name: 'Use Node.js'
|
- name: 'Use Node.js'
|
||||||
uses: 'actions/setup-node@v3.1.0'
|
uses: 'actions/setup-node@v3.6.0'
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Static, Type } from '@sinclair/typebox'
|
import type { Static } from '@sinclair/typebox'
|
||||||
|
import { Type } from '@sinclair/typebox'
|
||||||
|
|
||||||
export const userSchema = {
|
export const userSchema = {
|
||||||
name: Type.String({ minLength: 3, maxLength: 10 }),
|
name: Type.String({ minLength: 3, maxLength: 10 }),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const nextTranslate = require('next-translate')
|
const nextTranslate = require('next-translate-plugin')
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
|
1189
example/package-lock.json
generated
1189
example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,27 +11,28 @@
|
|||||||
"test:dev": "start-server-and-test \"dev\" \"http://127.0.0.1:3000\" \"cypress open\""
|
"test:dev": "start-server-and-test \"dev\" \"http://127.0.0.1:3000\" \"cypress open\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sinclair/typebox": "0.25.20",
|
"@sinclair/typebox": "0.26.8",
|
||||||
"clsx": "1.2.1",
|
"clsx": "1.2.1",
|
||||||
"next": "13.1.1",
|
"next": "13.2.4",
|
||||||
"next-themes": "0.2.1",
|
"next-themes": "0.2.1",
|
||||||
"next-translate": "1.6.0",
|
"next-translate": "2.0.4",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-component-form": "file:..",
|
"react-component-form": "file:..",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/strictest": "1.0.2",
|
"@tsconfig/strictest": "2.0.0",
|
||||||
"@types/node": "18.11.18",
|
"@types/node": "18.15.11",
|
||||||
"@types/react": "18.0.26",
|
"@types/react": "18.0.32",
|
||||||
"@types/react-dom": "18.0.10",
|
"@types/react-dom": "18.0.11",
|
||||||
"autoprefixer": "10.4.13",
|
"autoprefixer": "10.4.14",
|
||||||
"cypress": "12.3.0",
|
"cypress": "12.9.0",
|
||||||
"eslint": "8.31.0",
|
"eslint": "8.37.0",
|
||||||
"eslint-config-next": "13.1.1",
|
"eslint-config-next": "13.2.4",
|
||||||
|
"next-translate-plugin": "2.0.4",
|
||||||
"postcss": "8.4.21",
|
"postcss": "8.4.21",
|
||||||
"start-server-and-test": "1.15.2",
|
"start-server-and-test": "2.0.0",
|
||||||
"tailwindcss": "3.2.4",
|
"tailwindcss": "3.3.1",
|
||||||
"typescript": "4.9.4"
|
"typescript": "5.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,17 +3,30 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"lib": ["dom", "dom.iterable", "ESNext"],
|
"lib": [
|
||||||
|
"dom",
|
||||||
|
"dom.iterable",
|
||||||
|
"ESNext"
|
||||||
|
],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"types": ["cypress"],
|
"types": [
|
||||||
|
"cypress"
|
||||||
|
],
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"exactOptionalPropertyTypes": false
|
"exactOptionalPropertyTypes": false,
|
||||||
|
"verbatimModuleSyntax": false,
|
||||||
|
"isolatedModules": true
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
"include": [
|
||||||
"exclude": ["node_modules"]
|
"next-env.d.ts",
|
||||||
|
"**/*.ts",
|
||||||
|
"**/*.tsx"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
5987
package-lock.json
generated
5987
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
52
package.json
52
package.json
@ -29,47 +29,47 @@
|
|||||||
"lint:commit": "commitlint",
|
"lint:commit": "commitlint",
|
||||||
"lint:editorconfig": "editorconfig-checker",
|
"lint:editorconfig": "editorconfig-checker",
|
||||||
"lint:markdown": "markdownlint-cli2",
|
"lint:markdown": "markdownlint-cli2",
|
||||||
"lint:eslint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
|
"lint:eslint": "eslint \".\"",
|
||||||
"lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
|
"lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
|
||||||
"release": "semantic-release"
|
"release": "semantic-release"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=16"
|
"react": ">=18.2.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sinclair/typebox": "0.25.20",
|
"@sinclair/typebox": "0.26.8",
|
||||||
"ajv": "8.12.0",
|
"ajv": "8.12.0",
|
||||||
"ajv-formats": "2.1.1"
|
"ajv-formats": "2.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "17.4.1",
|
"@commitlint/cli": "17.5.1",
|
||||||
"@commitlint/config-conventional": "17.4.0",
|
"@commitlint/config-conventional": "17.4.4",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "14.0.0",
|
||||||
"@tsconfig/strictest": "1.0.2",
|
"@tsconfig/strictest": "2.0.0",
|
||||||
"@types/jest": "29.2.5",
|
"@types/jest": "29.5.0",
|
||||||
"@types/react": "18.0.26",
|
"@types/react": "18.0.32",
|
||||||
"@types/react-dom": "18.0.10",
|
"@types/react-dom": "18.0.11",
|
||||||
"@typescript-eslint/eslint-plugin": "5.48.1",
|
"@typescript-eslint/eslint-plugin": "5.57.0",
|
||||||
"@typescript-eslint/parser": "5.48.1",
|
"@typescript-eslint/parser": "5.57.0",
|
||||||
"editorconfig-checker": "4.0.2",
|
"editorconfig-checker": "5.0.1",
|
||||||
"esbuild": "0.16.16",
|
"esbuild": "0.17.15",
|
||||||
"esbuild-jest": "0.5.0",
|
"esbuild-jest": "0.5.0",
|
||||||
"eslint": "8.31.0",
|
"eslint": "8.37.0",
|
||||||
"eslint-config-conventions": "6.0.0",
|
"eslint-config-conventions": "8.0.0",
|
||||||
"eslint-config-prettier": "8.6.0",
|
"eslint-config-prettier": "8.8.0",
|
||||||
"eslint-plugin-import": "2.26.0",
|
"eslint-plugin-import": "2.27.5",
|
||||||
"eslint-plugin-prettier": "4.2.1",
|
"eslint-plugin-prettier": "4.2.1",
|
||||||
"eslint-plugin-promise": "6.1.1",
|
"eslint-plugin-promise": "6.1.1",
|
||||||
"eslint-plugin-unicorn": "45.0.2",
|
"eslint-plugin-unicorn": "46.0.0",
|
||||||
"jest": "29.3.1",
|
"jest": "29.5.0",
|
||||||
"jest-environment-jsdom": "29.3.1",
|
"jest-environment-jsdom": "29.5.0",
|
||||||
"markdownlint-cli2": "0.6.0",
|
"markdownlint-cli2": "0.6.0",
|
||||||
"markdownlint-rule-relative-links": "1.1.1",
|
"markdownlint-rule-relative-links": "1.1.2",
|
||||||
"prettier": "2.8.2",
|
"prettier": "2.8.7",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"semantic-release": "20.0.2",
|
"semantic-release": "21.0.1",
|
||||||
"tsup": "6.5.0",
|
"tsup": "6.7.0",
|
||||||
"typescript": "4.9.4"
|
"typescript": "5.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ import { handleCheckboxBoolean } from '../utils/handleCheckboxBoolean'
|
|||||||
import { handleOptionalEmptyStringToNull } from '../utils/handleOptionalEmptyStringToNull'
|
import { handleOptionalEmptyStringToNull } from '../utils/handleOptionalEmptyStringToNull'
|
||||||
|
|
||||||
export interface Schema {
|
export interface Schema {
|
||||||
[property: string]: any
|
[property: string | symbol]: any
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Error = ErrorObject
|
export type Error = ErrorObject
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import type { TObject } from '@sinclair/typebox'
|
import type { TObject } from '@sinclair/typebox'
|
||||||
|
|
||||||
import type { ObjectAny } from './types'
|
import type { Schema } from '../hooks/useForm'
|
||||||
|
|
||||||
export const handleCheckboxBoolean = (
|
export const handleCheckboxBoolean = (
|
||||||
object: ObjectAny,
|
object: Schema,
|
||||||
validateSchemaObject: TObject<ObjectAny>
|
validateSchemaObject: TObject<Schema>
|
||||||
): ObjectAny => {
|
): Schema => {
|
||||||
const booleanProperties: string[] = []
|
const booleanProperties: string[] = []
|
||||||
for (const property in validateSchemaObject.properties) {
|
for (const property in validateSchemaObject.properties) {
|
||||||
const rule = validateSchemaObject.properties[property]
|
const rule = validateSchemaObject.properties[property]
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
export const handleOptionalEmptyStringToNull = <K>(
|
import type { Schema } from '../hooks/useForm'
|
||||||
|
|
||||||
|
export const handleOptionalEmptyStringToNull = <K extends Schema>(
|
||||||
object: K,
|
object: K,
|
||||||
required: string[] = []
|
required: string[] = []
|
||||||
): K => {
|
): K => {
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface ObjectAny {
|
|
||||||
[key: string]: any
|
|
||||||
}
|
|
Reference in New Issue
Block a user