Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Commit

Permalink
update dependencies (#437)
Browse files Browse the repository at this point in the history
* update dependencies

* fix typings
  • Loading branch information
lwojcik authored May 25, 2021
1 parent 70089f4 commit 4e2d313
Show file tree
Hide file tree
Showing 14 changed files with 300 additions and 317 deletions.
377 changes: 193 additions & 184 deletions package-lock.json

Large diffs are not rendered by default.

31 changes: 15 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,40 @@
"private": true,
"homepage": "./",
"dependencies": {
"@craco/craco": "5.9.0",
"@craco/craco": "6.1.2",
"@testing-library/jest-dom": "5.12.0",
"@testing-library/react": "10.4.9",
"@testing-library/user-event": "13.1.8",
"@types/classnames": "2.3.0",
"@testing-library/react": "11.2.7",
"@testing-library/user-event": "13.1.9",
"@types/jest": "26.0.23",
"@types/node": "^15.0.1",
"@types/react": "17.0.3",
"@types/node": "^15.6.1",
"@types/react": "17.0.7",
"@types/react-beautiful-dnd": "13.0.0",
"@types/react-dom": "17.0.3",
"@types/react-dom": "17.0.5",
"@types/react-router-dom": "5.1.7",
"@types/react-tabs": "2.3.2",
"@types/react-timeago": "4.1.2",
"@types/yup": "0.29.11",
"bestzip": "2.2.0",
"classnames": "2.3.1",
"formik": "2.2.6",
"formik": "2.2.8",
"jest-fetch-mock": "3.0.3",
"node-sass": "4.14.1",
"node-sass": "5.0.0",
"pre-commit": "1.2.2",
"query-string": "6.14.1",
"react": "16.14.0",
"query-string": "7.0.0",
"react": "17.0.2",
"react-beautiful-dnd": "13.1.0",
"react-dom": "16.14.0",
"react-dom": "17.0.2",
"react-router-dom": "5.2.0",
"react-scripts": "4.0.3",
"react-stroller": "1.8.0",
"react-tabs": "3.2.2",
"react-timeago": "4.4.0",
"react-timeago": "6.1.1",
"react-twitch-ext-onauthorized": "2.0.3",
"starcraft2-api": "1.5.1",
"starcraft2-api": "2.0.0",
"swr": "0.5.6",
"typeface-lato": "0.0.75",
"typeface-lato": "1.1.13",
"typescript": "4.2.4",
"yup": "0.31.1"
"yup": "0.32.9"
},
"scripts": {
"start": "craco start",
Expand Down
4 changes: 2 additions & 2 deletions src/components/ConfigFormPanel/ConfigFormPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Schema } from 'yup';
import { SchemaOf } from 'yup';
import { ConfigFormValues } from 'helpers/submitConfig/submitConfig';
import { FormikHelpers, FormikValues } from 'formik';
import classnames from 'classnames/bind';
Expand All @@ -19,7 +19,7 @@ const cx = classnames.bind(styles);

interface ConfigFormPanelProps {
initialValues: ConfigData;
validationSchema: ({ profiles: Schema<ConfigData> });
validationSchema: ({ profiles: SchemaOf<ConfigData> });
maxProfiles: number;
onSubmit: (values: ConfigFormValues, actions: FormikHelpers<FormikValues>) => Promise<void>;
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/FormikWrapper/FormikWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { ReactElement } from 'react';
import { Formik, FormikProps, FormikHelpers, FormikValues } from 'formik';
import * as Yup from 'yup';
import { ObjectShape } from 'yup/lib/object';

interface FormStateProviderProps {
initialValues: FormikValues,
Expand Down Expand Up @@ -30,7 +31,7 @@ const FormikWrapper = ({
onSubmit(values, actions);
actions.resetForm(values);
}}
validationSchema={Yup.object().shape(validationSchema)}
validationSchema={Yup.object().shape(validationSchema as ObjectShape)}
>
{formikBag => children(formikBag)}
</Formik>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,58 @@

exports[`adds validation method correctly 1`] = `
ArraySchema {
"_blacklist": RefSet {
"_blacklist": ReferenceSet {
"list": Set {},
"refs": Map {},
},
"_conditions": Array [],
"_deps": Array [],
"_exclusive": Object {
"unique": false,
},
"_mutate": undefined,
"_options": Object {
"abortEarly": true,
"recursive": true,
},
"_subType": StringSchema {
"_blacklist": RefSet {
"list": Set {},
"refs": Map {},
},
"_conditions": Array [],
"_deps": Array [],
"_exclusive": Object {},
"_mutate": undefined,
"_options": Object {
"abortEarly": true,
"recursive": true,
},
"_type": "string",
"_typeError": [Function],
"_whitelist": RefSet {
"list": Set {},
"refs": Map {},
},
"tests": Array [],
"transforms": Array [
[Function],
],
"type": "string",
},
"_type": "array",
"_blacklistError": undefined,
"_typeError": [Function],
"_whitelist": RefSet {
"_whitelist": ReferenceSet {
"list": Set {},
"refs": Map {},
},
"_whitelistError": undefined,
"conditions": Array [],
"deps": Array [],
"exclusiveTests": Object {
"unique": false,
},
"innerType": StringSchema {
"_blacklist": RefSet {
"_blacklist": ReferenceSet {
"list": Set {},
"refs": Map {},
},
"_conditions": Array [],
"_deps": Array [],
"_exclusive": Object {},
"_mutate": undefined,
"_options": Object {
"abortEarly": true,
"recursive": true,
},
"_type": "string",
"_typeError": [Function],
"_whitelist": RefSet {
"_whitelist": ReferenceSet {
"list": Set {},
"refs": Map {},
},
"conditions": Array [],
"deps": Array [],
"exclusiveTests": Object {},
"spec": Object {
"abortEarly": true,
"nullable": false,
"presence": "optional",
"recursive": true,
"strict": false,
"strip": false,
},
"tests": Array [],
"transforms": Array [
[Function],
],
"type": "string",
},
"spec": Object {
"abortEarly": true,
"nullable": false,
"presence": "optional",
"recursive": true,
"strict": false,
"strip": false,
},
"tests": Array [
[Function],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

exports[`adds validation method correctly 1`] = `
Object {
"ArraySchema": [Function],
"BaseSchema": [Function],
"BooleanSchema": [Function],
"DateSchema": [Function],
"MixedSchema": [Function],
"NumberSchema": [Function],
"ObjectSchema": [Function],
"StringSchema": [Function],
"ValidationError": [Function],
"__esModule": true,
"addMethod": [Function],
"array": [Function],
"bool": [Function],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,81 +3,48 @@
exports[`returns valid validation schema 1`] = `
Object {
"profiles": ArraySchema {
"_blacklist": RefSet {
"_blacklist": ReferenceSet {
"list": Set {},
"refs": Map {},
},
"_conditions": Array [],
"_deps": Array [],
"_exclusive": Object {
"unique": false,
"_blacklistError": undefined,
"_typeError": [Function],
"_whitelist": ReferenceSet {
"list": Set {},
"refs": Map {},
},
"_mutate": undefined,
"_options": Object {
"abortEarly": true,
"recursive": true,
"_whitelistError": undefined,
"conditions": Array [],
"deps": Array [],
"exclusiveTests": Object {
"unique": false,
},
"_subType": StringSchema {
"_blacklist": RefSet {
"innerType": StringSchema {
"_blacklist": ReferenceSet {
"list": Set {},
"refs": Map {},
},
"_conditions": Array [],
"_default": "",
"_deps": Array [],
"_exclusive": Object {
"matches": false,
"min": true,
},
"_mutate": undefined,
"_options": Object {
"abortEarly": true,
"recursive": true,
},
"_type": "string",
"_blacklistError": undefined,
"_typeError": [Function],
"_whitelist": RefSet {
"_whitelist": ReferenceSet {
"list": Set {},
"refs": Map {},
},
"tests": Array [
[Function],
[Function],
],
"transforms": Array [
[Function],
[Function],
],
"type": "string",
},
"_type": "array",
"_typeError": [Function],
"_whitelist": RefSet {
"list": Set {},
"refs": Map {},
},
"innerType": StringSchema {
"_blacklist": RefSet {
"list": Set {},
"refs": Map {},
},
"_conditions": Array [],
"_default": "",
"_deps": Array [],
"_exclusive": Object {
"_whitelistError": undefined,
"conditions": Array [],
"deps": Array [],
"exclusiveTests": Object {
"matches": false,
"min": true,
},
"_mutate": undefined,
"_options": Object {
"spec": Object {
"abortEarly": true,
"default": "",
"nullable": false,
"presence": "optional",
"recursive": true,
},
"_type": "string",
"_typeError": [Function],
"_whitelist": RefSet {
"list": Set {},
"refs": Map {},
"strict": false,
"strip": false,
},
"tests": Array [
[Function],
Expand All @@ -89,6 +56,14 @@ Object {
],
"type": "string",
},
"spec": Object {
"abortEarly": true,
"nullable": false,
"presence": "optional",
"recursive": true,
"strict": false,
"strip": false,
},
"tests": Array [
[Function],
],
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/addValidationSchema/addValidationSchema.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { YupInstance } from 'yup';
import StarCraft2API from 'starcraft2-api';
import { StarCraft2API } from 'starcraft2-api';
import isProfileListUnique from 'helpers/isProfileListUnique/isProfileListUnique';

const addValidationSchema = (yup: YupInstance) => ({
Expand Down
5 changes: 4 additions & 1 deletion src/helpers/constructProfileUrls/constructProfileUrls.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import StarCraft2API, { PlayerObject } from 'starcraft2-api';
import {
StarCraft2API,
PlayerObject,
} from 'starcraft2-api';

const constructProfileUrls = (profiles: PlayerObject[]) =>
profiles.map((profile: PlayerObject) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

exports[`returns Yup-compatible validator instance 1`] = `
Object {
"ArraySchema": [Function],
"BaseSchema": [Function],
"BooleanSchema": [Function],
"DateSchema": [Function],
"MixedSchema": [Function],
"NumberSchema": [Function],
"ObjectSchema": [Function],
"StringSchema": [Function],
"ValidationError": [Function],
"__esModule": true,
"addMethod": [Function],
"array": [Function],
"bool": [Function],
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/stringifyProfiles/stringifyProfiles.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import StarCraft2API from 'starcraft2-api';
import { StarCraft2API } from 'starcraft2-api';

const stringifyProfiles = (urls: string[], includeLocale = false) =>
urls.map((profileUrl: string) =>
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/unpackProfileUrls/unpackProfileUrls.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import StarCraft2API from 'starcraft2-api';
import { StarCraft2API } from 'starcraft2-api';

const unpackProfileUrls = (urls: string[], includeLocale = false) =>
urls.map((profileUrl: string) =>
Expand Down
2 changes: 1 addition & 1 deletion src/yupAddons.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Yup from 'yup';

declare module 'yup' {
export interface NotRequiredArraySchema {
export interface ArraySchema {
unique(message?: TestOptionsMessage, mapperFn: Function): Yup.Schema<any>;
}

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react",
"jsx": "react-jsx",
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"removeComments": true
Expand Down

0 comments on commit 4e2d313

Please sign in to comment.