From a348214834232bcb5d2ed32b818e3589e054387c Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Tue, 23 Aug 2022 17:39:35 +0200 Subject: [PATCH 01/22] Install Typescript and babel plugin --- package/package-lock.json | 3 ++- package/package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package/package-lock.json b/package/package-lock.json index 2a65c510..418060ce 100644 --- a/package/package-lock.json +++ b/package/package-lock.json @@ -13,6 +13,7 @@ "@babel/cli": "^7.8.4", "@babel/core": "^7.12.9", "@babel/preset-flow": "^7.9.0", + "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", "babel-jest": "^26.6.3", @@ -28,7 +29,7 @@ "react-native": "^0.69.1", "react-native-windows": "^0.69.1", "react-test-renderer": "^18.0.0", - "typescript": "^4.6.3" + "typescript": "^4.7.4" } }, "node_modules/@ampproject/remapping": { diff --git a/package/package.json b/package/package.json index 842ed99b..0cd11e3c 100644 --- a/package/package.json +++ b/package/package.json @@ -25,6 +25,7 @@ "@babel/cli": "^7.8.4", "@babel/core": "^7.12.9", "@babel/preset-flow": "^7.9.0", + "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", "babel-jest": "^26.6.3", @@ -40,7 +41,7 @@ "react-native": "^0.69.1", "react-native-windows": "^0.69.1", "react-test-renderer": "^18.0.0", - "typescript": "^4.6.3" + "typescript": "^4.7.4" }, "repository": { "type": "git", From a3a87a28c569bd3cfe9306e262dd6642f3bc528e Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Tue, 23 Aug 2022 17:41:06 +0200 Subject: [PATCH 02/22] Rename all source files to ts --- ...ativeComponent.js => RNCSliderNativeComponent.ts} | 0 ...ponent.web.js => RNCSliderNativeComponent.web.ts} | 0 package/src/{Slider.js => Slider.ts} | 12 ------------ package/src/{index.js => index.ts} | 0 4 files changed, 12 deletions(-) rename package/src/{RNCSliderNativeComponent.js => RNCSliderNativeComponent.ts} (100%) rename package/src/{RNCSliderNativeComponent.web.js => RNCSliderNativeComponent.web.ts} (100%) rename package/src/{Slider.js => Slider.ts} (97%) rename package/src/{index.js => index.ts} (100%) diff --git a/package/src/RNCSliderNativeComponent.js b/package/src/RNCSliderNativeComponent.ts similarity index 100% rename from package/src/RNCSliderNativeComponent.js rename to package/src/RNCSliderNativeComponent.ts diff --git a/package/src/RNCSliderNativeComponent.web.js b/package/src/RNCSliderNativeComponent.web.ts similarity index 100% rename from package/src/RNCSliderNativeComponent.web.js rename to package/src/RNCSliderNativeComponent.web.ts diff --git a/package/src/Slider.js b/package/src/Slider.ts similarity index 97% rename from package/src/Slider.js rename to package/src/Slider.ts index 9d7a7211..2c2ad3cd 100644 --- a/package/src/Slider.js +++ b/package/src/Slider.ts @@ -1,15 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - import React from 'react'; import { Image, diff --git a/package/src/index.js b/package/src/index.ts similarity index 100% rename from package/src/index.js rename to package/src/index.ts From 675ff04bc51ab7736b82568d6708e4fcc9c30360 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Tue, 23 Aug 2022 23:37:37 +0200 Subject: [PATCH 03/22] Use TSX for Slider component --- package/src/RNCSliderNativeComponent.ts | 69 ++++++------- package/src/{Slider.ts => Slider.tsx} | 132 ++++++------------------ package/src/index.ts | 1 - 3 files changed, 59 insertions(+), 143 deletions(-) rename package/src/{Slider.ts => Slider.tsx} (71%) diff --git a/package/src/RNCSliderNativeComponent.ts b/package/src/RNCSliderNativeComponent.ts index 2075818b..e798afe0 100644 --- a/package/src/RNCSliderNativeComponent.ts +++ b/package/src/RNCSliderNativeComponent.ts @@ -1,17 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - import type {HostComponent} from 'react-native'; -import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; +import { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet'; import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; @@ -21,38 +9,39 @@ import type { WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; -type Event = $ReadOnly<{| - value: ?Float, - fromUser?: ?boolean, -|}>; +type Event = Readonly<{ + value: Float, + fromUser?: boolean, +}>; -type NativeProps = $ReadOnly<{| - ...ViewProps, +type NativeProps = ViewProps & Readonly<{ accessibilityUnits?: string, - accessibilityIncrements?: $ReadOnlyArray, + accessibilityIncrements?: ReadonlyArray, disabled?: WithDefault, enabled?: WithDefault, inverted?: WithDefault, - vertical?: ?boolean, + vertical?: boolean, tapToSeek?: WithDefault, - maximumTrackImage?: ?ImageSource, - maximumTrackTintColor?: ?ColorValue, - maximumValue?: ?Float, - minimumTrackImage?: ?ImageSource, - minimumTrackTintColor?: ?ColorValue, - minimumValue?: ?Float, - onChange?: ?BubblingEventHandler, - onRNCSliderSlidingStart?: ?BubblingEventHandler, - onRNCSliderSlidingComplete?: ?BubblingEventHandler, - onRNCSliderValueChange?: ?BubblingEventHandler, - step?: ?Float, - testID?: ?string, - thumbImage?: ?ImageSource, - thumbTintColor?: ?ColorValue, - trackImage?: ?ImageSource, - value?: ?Float, -|}>; + maximumTrackImage?: ImageSource, + maximumTrackTintColor?: ColorValue, + maximumValue?: Float, + minimumTrackImage?: ImageSource, + minimumTrackTintColor?: ColorValue, + minimumValue?: Float, + onChange?: BubblingEventHandler, + onRNCSliderSlidingStart?: BubblingEventHandler, + onRNCSliderSlidingComplete?: BubblingEventHandler, + onRNCSliderValueChange?: BubblingEventHandler, + step?: Float, + testID?: string, + thumbImage?: ImageSource, + thumbTintColor?: ColorValue, + trackImage?: ImageSource, + value?: Float, +}>; + +const VIEW_MANAGER_NAME = 'RNCSlider'; export default (codegenNativeComponent( - 'RNCSlider', -): HostComponent); + VIEW_MANAGER_NAME, +) as HostComponent); diff --git a/package/src/Slider.ts b/package/src/Slider.tsx similarity index 71% rename from package/src/Slider.ts rename to package/src/Slider.tsx index 2c2ad3cd..1c511562 100644 --- a/package/src/Slider.ts +++ b/package/src/Slider.tsx @@ -16,53 +16,49 @@ import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTyp import type {SyntheticEvent} from 'react-native/Libraries/Types/CoreEventTypes'; type Event = SyntheticEvent< - $ReadOnly<{| + Readonly<{ value: number, /** * Android Only. */ fromUser?: boolean, - |}>, + }> >; -type WindowsProps = $ReadOnly<{| +type WindowsProps = Readonly<{ /** * If true the slider will be inverted. * Default value is false. */ - vertical?: ?boolean, -|}>; + vertical?: boolean, +}>; -type IOSProps = $ReadOnly<{| +type IOSProps = Readonly<{ /** * Assigns a single image for the track. Only static images are supported. * The center pixel of the image will be stretched to fill the track. */ - trackImage?: ?ImageSource, + trackImage?: ImageSource, /** * Assigns a minimum track image. Only static images are supported. The * rightmost pixel of the image will be stretched to fill the track. */ - minimumTrackImage?: ?ImageSource, + minimumTrackImage?: ImageSource, /** * Assigns a maximum track image. Only static images are supported. The * leftmost pixel of the image will be stretched to fill the track. */ - maximumTrackImage?: ?ImageSource, -|}>; - -type Props = $ReadOnly<{| - ...ViewProps, - ...IOSProps, - ...WindowsProps, + maximumTrackImage?: ImageSource, +}>; +type Props = ViewProps & IOSProps & WindowsProps & Readonly<{ /** * Used to style and layout the `Slider`. See `StyleSheet.js` and * `DeprecatedViewStylePropTypes.js` for more info. */ - style?: ?ViewStyleProp, + style?: ViewStyleProp, /** * Write-only property representing the value of the slider. @@ -75,52 +71,52 @@ type Props = $ReadOnly<{| * This is not a controlled component, you don't need to update the * value during dragging. */ - value?: ?number, + value?: number, /** * Step value of the slider. The value should be * between 0 and (maximumValue - minimumValue). * Default value is 0. */ - step?: ?number, + step?: number, /** * Initial minimum value of the slider. Default value is 0. */ - minimumValue?: ?number, + minimumValue?: number, /** * Initial maximum value of the slider. Default value is 1. */ - maximumValue?: ?number, + maximumValue?: number, /** * The color used for the track to the left of the button. * Overrides the default blue gradient image on iOS. */ - minimumTrackTintColor?: ?ColorValue, + minimumTrackTintColor?: ColorValue, /** * The color used for the track to the right of the button. * Overrides the default blue gradient image on iOS. */ - maximumTrackTintColor?: ?ColorValue, + maximumTrackTintColor?: ColorValue, /** * The color used to tint the default thumb images on iOS, or the * color of the foreground switch grip on Android. */ - thumbTintColor?: ?ColorValue, + thumbTintColor?: ColorValue, /** * If true the user won't be able to move the slider. * Default value is false. */ - disabled?: ?boolean, + disabled?: boolean, /** * Callback continuously called while the user is dragging the slider. */ - onValueChange?: ?(value: number) => void, + onValueChange?: (value: number) => void, /** * Callback that is called when the user touches the slider, @@ -128,30 +124,30 @@ type Props = $ReadOnly<{| * as an argument to the callback handler. */ - onSlidingStart?: ?(value: number) => void, + onSlidingStart?: (value: number) => void, /** * Callback that is called when the user releases the slider, * regardless if the value has changed. The current value is passed * as an argument to the callback handler. */ - onSlidingComplete?: ?(value: number) => void, + onSlidingComplete?: (value: number) => void, /** * Used to locate this view in UI automation tests. */ - testID?: ?string, + testID?: string, /** * Sets an image for the thumb. Only static images are supported. */ - thumbImage?: ?ImageSource, + thumbImage?: ImageSource, /** * If true the slider will be inverted. * Default value is false. */ - inverted?: ?boolean, + inverted?: boolean, /** * A string of one or more words to be announced by the screen reader. @@ -168,71 +164,11 @@ type Props = $ReadOnly<{| * The number of elements must be the same as `maximumValue`. */ accessibilityIncrements?: Array, -|}>; - -/** - * A component used to select a single value from a range of values. - * - * ### Usage - * - * The example below shows how to use `Slider` to change - * a value used by `Text`. The value is stored using - * the state of the root component (`App`). The same component - * subscribes to the `onValueChange` of `Slider` and changes - * the value using `setState`. - * - *``` - * import React from 'react'; - * import { StyleSheet, Text, View, Slider } from 'react-native'; - * - * export default class App extends React.Component { - * constructor(props) { - * super(props); - * this.state = { - * value: 50 - * } - * } - * - * change(value) { - * this.setState(() => { - * return { - * value: parseFloat(value) - * }; - * }); - * } - * - * render() { - * const {value} = this.state; - * return ( - * - * {String(value)} - * - * - * ); - * } - * } - * - * const styles = StyleSheet.create({ - * container: { - * flex: 1, - * flexDirection: 'column', - * justifyContent: 'center' - * }, - * text: { - * fontSize: 50, - * textAlign: 'center' - * } - * }); - *``` - * - */ +}>; + const SliderComponent = ( props: Props, - forwardedRef?: ?Ref, + forwardedRef?: Ref, ) => { const style = StyleSheet.compose(styles.slider, props.style); @@ -303,10 +239,6 @@ const SliderComponent = ( const SliderWithRef = React.forwardRef(SliderComponent); -/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error - * found when Flow v0.89 was deployed. To see the error, delete this comment - * and run Flow. */ - SliderWithRef.defaultProps = { value: 0, minimumValue: 0, @@ -329,8 +261,4 @@ if (Platform.OS === 'ios') { }); } -/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error - * found when Flow v0.89 was deployed. To see the error, delete this comment - * and run Flow. */ -const Slider = (SliderWithRef: Class>); -export default Slider; +export default SliderWithRef; diff --git a/package/src/index.ts b/package/src/index.ts index 81033322..ebd6e915 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -1,4 +1,3 @@ -// @flow const RNCSlider = require('./RNCSliderNativeComponent').default; export default RNCSlider; From 56fa6153df1d45391f230a614f87a723fdc280d2 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Wed, 24 Aug 2022 01:26:01 +0200 Subject: [PATCH 04/22] Configure TS for package compilation with Babel --- package/babel.config.js | 2 +- package/package-lock.json | 77 +++++++++++++++++++++++++++++++++++++++ package/package.json | 3 +- package/tsconfig.json | 23 ++++++++++++ 4 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 package/tsconfig.json diff --git a/package/babel.config.js b/package/babel.config.js index 84ea4e9f..9efa30ce 100644 --- a/package/babel.config.js +++ b/package/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: ['@babel/preset-flow', 'module:metro-react-native-babel-preset'], + presets: ['@babel/preset-typescript', 'module:metro-react-native-babel-preset'], }; diff --git a/package/package-lock.json b/package/package-lock.json index 418060ce..5131c131 100644 --- a/package/package-lock.json +++ b/package/package-lock.json @@ -16,6 +16,7 @@ "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", + "@types/react-native": "^0.69.5", "babel-jest": "^26.6.3", "babel-plugin-module-resolver": "3.1.3", "copyfiles": "^2.4.1", @@ -5617,6 +5618,38 @@ "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", "dev": true }, + "node_modules/@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "dev": true + }, + "node_modules/@types/react": { + "version": "18.0.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.17.tgz", + "integrity": "sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==", + "dev": true, + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-native": { + "version": "0.69.5", + "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.69.5.tgz", + "integrity": "sha512-mSUCuGUsW2kJlZiu4GmdYVDKZX/52iyC9rm6dxAmflJj1b7kSO/CMSDy5WbcfS8QerxTqbYGTrIwHD0GnXHzbQ==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "dev": true + }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -7818,6 +7851,12 @@ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true }, + "node_modules/csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "dev": true + }, "node_modules/data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", @@ -22371,6 +22410,38 @@ "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", "dev": true }, + "@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "dev": true + }, + "@types/react": { + "version": "18.0.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.17.tgz", + "integrity": "sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==", + "dev": true, + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "@types/react-native": { + "version": "0.69.5", + "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.69.5.tgz", + "integrity": "sha512-mSUCuGUsW2kJlZiu4GmdYVDKZX/52iyC9rm6dxAmflJj1b7kSO/CMSDy5WbcfS8QerxTqbYGTrIwHD0GnXHzbQ==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "dev": true + }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -23995,6 +24066,12 @@ } } }, + "csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "dev": true + }, "data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", diff --git a/package/package.json b/package/package.json index 0cd11e3c..e993c2a4 100644 --- a/package/package.json +++ b/package/package.json @@ -16,7 +16,7 @@ "slider" ], "scripts": { - "prepare": "babel --out-dir dist src", + "prepare": "babel --extensions \".ts,.tsx\" --out-dir dist src", "lint": "npx eslint src", "test": "npx jest src", "postinstall": "npx copyfiles \"./../README.md\" ./README.md" @@ -28,6 +28,7 @@ "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", + "@types/react-native": "^0.69.5", "babel-jest": "^26.6.3", "babel-plugin-module-resolver": "3.1.3", "copyfiles": "^2.4.1", diff --git a/package/tsconfig.json b/package/tsconfig.json new file mode 100644 index 00000000..61ce3606 --- /dev/null +++ b/package/tsconfig.json @@ -0,0 +1,23 @@ +{ + "include": ["./src/**/*"], + "exclude": ["./src/RNCSliderNativeComponent.web.ts"], + + "compilerOptions": { + "jsx": "react", + + /* Language and Environment */ + "target": "ESNext", + "lib": ["ESNext"], + + /* Modules */ + "module": "esnext", + + /* Interop Constraints */ + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + + /* Type Checking */ + "strict": true, + "skipLibCheck": true + } +} From 710d524282887999d38c8e118391db52ca9bba3a Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Wed, 24 Aug 2022 01:28:01 +0200 Subject: [PATCH 05/22] Fix syntax and typechecking for mobile sources --- package/src/RNCSliderNativeComponent.ts | 13 ++++----- package/src/Slider.tsx | 36 ++++++++++++------------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/package/src/RNCSliderNativeComponent.ts b/package/src/RNCSliderNativeComponent.ts index e798afe0..26ea4561 100644 --- a/package/src/RNCSliderNativeComponent.ts +++ b/package/src/RNCSliderNativeComponent.ts @@ -1,7 +1,4 @@ -import type {HostComponent} from 'react-native'; -import { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet'; -import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; +import type {ColorValue, HostComponent, ImageSourcePropType, ViewProps} from 'react-native'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { Float, @@ -22,10 +19,10 @@ type NativeProps = ViewProps & Readonly<{ inverted?: WithDefault, vertical?: boolean, tapToSeek?: WithDefault, - maximumTrackImage?: ImageSource, + maximumTrackImage?: ImageSourcePropType, maximumTrackTintColor?: ColorValue, maximumValue?: Float, - minimumTrackImage?: ImageSource, + minimumTrackImage?: ImageSourcePropType, minimumTrackTintColor?: ColorValue, minimumValue?: Float, onChange?: BubblingEventHandler, @@ -34,9 +31,9 @@ type NativeProps = ViewProps & Readonly<{ onRNCSliderValueChange?: BubblingEventHandler, step?: Float, testID?: string, - thumbImage?: ImageSource, + thumbImage?: ImageSourcePropType, thumbTintColor?: ColorValue, - trackImage?: ImageSource, + trackImage?: ImageSourcePropType, value?: Float, }>; diff --git a/package/src/Slider.tsx b/package/src/Slider.tsx index 1c511562..61491e0a 100644 --- a/package/src/Slider.tsx +++ b/package/src/Slider.tsx @@ -1,19 +1,17 @@ -import React from 'react'; +import React, { SyntheticEvent } from 'react'; import { Image, Platform, StyleSheet, AccessibilityActionEvent, + ViewProps, + ViewStyle, + ColorValue, + ImageSourcePropType, } from 'react-native'; import RCTSliderNativeComponent from './index'; import type {Ref} from 'react'; -import type {NativeComponent} from 'react-native/Libraries/Renderer/shims/ReactNative'; -import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; -import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; -import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; -import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import type {SyntheticEvent} from 'react-native/Libraries/Types/CoreEventTypes'; type Event = SyntheticEvent< Readonly<{ @@ -38,19 +36,21 @@ type IOSProps = Readonly<{ * Assigns a single image for the track. Only static images are supported. * The center pixel of the image will be stretched to fill the track. */ - trackImage?: ImageSource, + trackImage?: ImageSourcePropType, /** * Assigns a minimum track image. Only static images are supported. The * rightmost pixel of the image will be stretched to fill the track. */ - minimumTrackImage?: ImageSource, + minimumTrackImage?: ImageSourcePropType, /** * Assigns a maximum track image. Only static images are supported. The * leftmost pixel of the image will be stretched to fill the track. */ - maximumTrackImage?: ImageSource, + maximumTrackImage?: ImageSourcePropType, + + tapToSeek?: boolean, }>; type Props = ViewProps & IOSProps & WindowsProps & Readonly<{ @@ -58,7 +58,7 @@ type Props = ViewProps & IOSProps & WindowsProps & Readonly<{ * Used to style and layout the `Slider`. See `StyleSheet.js` and * `DeprecatedViewStylePropTypes.js` for more info. */ - style?: ViewStyleProp, + style?: ViewStyle, /** * Write-only property representing the value of the slider. @@ -141,7 +141,7 @@ type Props = ViewProps & IOSProps & WindowsProps & Readonly<{ /** * Sets an image for the thumb. Only static images are supported. */ - thumbImage?: ImageSource, + thumbImage?: ImageSourcePropType, /** * If true the slider will be inverted. @@ -182,7 +182,7 @@ const SliderComponent = ( const onValueChangeEvent = onValueChange ? (event: Event) => { - onValueChange(event.nativeEvent.value); + onValueChange(event.currentTarget.value); } : null; @@ -199,17 +199,17 @@ const SliderComponent = ( const onChangeEvent = onValueChangeEvent; const onSlidingStartEvent = onSlidingStart ? (event: Event) => { - onSlidingStart(event.nativeEvent.value); + onSlidingStart(event.currentTarget.value); } : null; const onSlidingCompleteEvent = onSlidingComplete ? (event: Event) => { - onSlidingComplete(event.nativeEvent.value); + onSlidingComplete(event.currentTarget.value); } : null; const onAccessibilityActionEvent = onAccessibilityAction ? (event: AccessibilityActionEvent) => { - onAccessibilityAction(event.nativeEvent.value); + onAccessibilityAction(event); } : null; @@ -220,7 +220,7 @@ const SliderComponent = ( thumbImage={ Platform.OS === 'web' ? props.thumbImage - : Image.resolveAssetSource(props.thumbImage) + : props.thumbImage ? Image.resolveAssetSource(props.thumbImage) : undefined } ref={forwardedRef} style={style} @@ -248,7 +248,7 @@ SliderWithRef.defaultProps = { tapToSeek: false, }; -let styles; +let styles: any; if (Platform.OS === 'ios') { styles = StyleSheet.create({ slider: { From 2198fdeea183100232a8525282f25bed8954db3a Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Wed, 24 Aug 2022 21:26:14 +0200 Subject: [PATCH 06/22] Use native event instead of synthetic event --- package/src/Slider.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/package/src/Slider.tsx b/package/src/Slider.tsx index 61491e0a..ac6e38d5 100644 --- a/package/src/Slider.tsx +++ b/package/src/Slider.tsx @@ -1,4 +1,4 @@ -import React, { SyntheticEvent } from 'react'; +import React from 'react'; import { Image, Platform, @@ -8,12 +8,13 @@ import { ViewStyle, ColorValue, ImageSourcePropType, + NativeSyntheticEvent, } from 'react-native'; import RCTSliderNativeComponent from './index'; import type {Ref} from 'react'; -type Event = SyntheticEvent< +type Event = NativeSyntheticEvent< Readonly<{ value: number, /** @@ -123,7 +124,6 @@ type Props = ViewProps & IOSProps & WindowsProps & Readonly<{ * regardless if the value has changed. The current value is passed * as an argument to the callback handler. */ - onSlidingStart?: (value: number) => void, /** @@ -182,7 +182,7 @@ const SliderComponent = ( const onValueChangeEvent = onValueChange ? (event: Event) => { - onValueChange(event.currentTarget.value); + onValueChange(event.nativeEvent.value); } : null; @@ -196,15 +196,14 @@ const SliderComponent = ( ? {...props.accessibilityState, disabled: props.disabled} : props.accessibilityState; - const onChangeEvent = onValueChangeEvent; const onSlidingStartEvent = onSlidingStart ? (event: Event) => { - onSlidingStart(event.currentTarget.value); + onSlidingStart(event.nativeEvent.value); } : null; const onSlidingCompleteEvent = onSlidingComplete ? (event: Event) => { - onSlidingComplete(event.currentTarget.value); + onSlidingComplete(event.nativeEvent.value); } : null; const onAccessibilityActionEvent = onAccessibilityAction @@ -224,7 +223,7 @@ const SliderComponent = ( } ref={forwardedRef} style={style} - onChange={onChangeEvent} + onChange={onValueChangeEvent} onRNCSliderSlidingStart={onSlidingStartEvent} onRNCSliderSlidingComplete={onSlidingCompleteEvent} onRNCSliderValueChange={onValueChangeEvent} From 9081fb55a792e6c0078e2af971878006c2c631ca Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Wed, 24 Aug 2022 21:27:32 +0200 Subject: [PATCH 07/22] Add docs for tapToSeek property --- package/src/Slider.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/src/Slider.tsx b/package/src/Slider.tsx index ac6e38d5..6be324f8 100644 --- a/package/src/Slider.tsx +++ b/package/src/Slider.tsx @@ -51,6 +51,10 @@ type IOSProps = Readonly<{ */ maximumTrackImage?: ImageSourcePropType, + /** + * Permits tapping on the slider track to set the thumb position. + * Defaults to false on iOS. No effect on Android or Windows. + */ tapToSeek?: boolean, }>; From 3f048dfecfccb6839166592f1d4aad40d62b9036 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Wed, 24 Aug 2022 21:28:31 +0200 Subject: [PATCH 08/22] Update example lockfile for packages --- example/package-lock.json | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/example/package-lock.json b/example/package-lock.json index c09ad767..ab0078d0 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -43,8 +43,10 @@ "@babel/cli": "^7.8.4", "@babel/core": "^7.12.9", "@babel/preset-flow": "^7.9.0", + "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", + "@types/react-native": "^0.69.5", "babel-jest": "^26.6.3", "babel-plugin-module-resolver": "3.1.3", "copyfiles": "^2.4.1", @@ -58,7 +60,7 @@ "react-native": "^0.69.1", "react-native-windows": "^0.69.1", "react-test-renderer": "^18.0.0", - "typescript": "^4.6.3" + "typescript": "^4.7.4" } }, "../package/node_modules/@ampproject/remapping": { @@ -30136,8 +30138,10 @@ "@babel/cli": "^7.8.4", "@babel/core": "^7.12.9", "@babel/preset-flow": "^7.9.0", + "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", + "@types/react-native": "^0.69.5", "babel-jest": "^26.6.3", "babel-plugin-module-resolver": "3.1.3", "copyfiles": "^2.4.1", @@ -30151,7 +30155,36 @@ "react-native": "^0.69.1", "react-native-windows": "^0.69.1", "react-test-renderer": "^18.0.0", - "typescript": "^4.6.3" + "typescript": "^4.7.4" + } + }, + "@react-native-windows/cli": { + "version": "0.69.1", + "resolved": "https://registry.npmjs.org/@react-native-windows/cli/-/cli-0.69.1.tgz", + "integrity": "sha512-kfDJay2mx1GagNNYjcnm0eY7pOuhxDb5SKuUrtaOq6hs0IZ+VF0mBfr+6stqK9UX/lMF2ocLf0IsBxzkLY8D7Q==", + "requires": { + "@react-native-windows/fs": "0.69.0", + "@react-native-windows/package-utils": "0.69.0", + "@react-native-windows/telemetry": "0.69.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "@xmldom/xmldom": "^0.7.5", + "chalk": "^4.1.0", + "cli-spinners": "^2.2.0", + "envinfo": "^7.5.0", + "find-up": "^4.1.0", + "glob": "^7.1.1", + "lodash": "^4.17.15", + "mustache": "^4.0.1", + "ora": "^3.4.0", + "prompts": "^2.4.1", + "semver": "^7.3.2", + "shelljs": "^0.8.4", + "username": "^5.1.0", + "uuid": "^3.3.2", + "xml-formatter": "^2.4.0", + "xml-parser": "^1.2.1", + "xpath": "^0.0.27" }, "dependencies": { "@ampproject/remapping": { From e5d85e2595f9a354cc640b16a8baebd4f523be13 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Thu, 25 Aug 2022 19:11:06 +0200 Subject: [PATCH 09/22] Convert web module into JSX file and translate into TS --- ...eb.ts => RNCSliderNativeComponent.web.tsx} | 290 ++++++------------ package/tsconfig.json | 1 - 2 files changed, 88 insertions(+), 203 deletions(-) rename package/src/{RNCSliderNativeComponent.web.ts => RNCSliderNativeComponent.web.tsx} (55%) diff --git a/package/src/RNCSliderNativeComponent.web.ts b/package/src/RNCSliderNativeComponent.web.tsx similarity index 55% rename from package/src/RNCSliderNativeComponent.web.ts rename to package/src/RNCSliderNativeComponent.web.tsx index 95a6aa6d..5095ba82 100644 --- a/package/src/RNCSliderNativeComponent.web.ts +++ b/package/src/RNCSliderNativeComponent.web.tsx @@ -1,136 +1,35 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - import ReactDOM from 'react-dom'; -import React, {useCallback} from 'react'; -import {View, StyleSheet} from 'react-native'; - -// import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; -// import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; -// import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -// import type {SyntheticEvent} from 'react-native/Libraries/Types/CoreEventTypes'; - -// type Props = $ReadOnly<{| -// ...ViewProps, - -// /** -// * Set to true to animate values with default 'timing' animation type -// */ -// animateTransitions?: ?boolean, - -// /** -// * Used to configure the animation parameters. These are the same parameters in the Animated library. -// */ -// animationConfig?: ?any, - -// /** -// * Custom Animation type. 'spring' or 'timing'. -// */ -// animationType?: 'spring' | 'timing' | undefined, - -// /** -// * If true the user won't be able to move the slider. -// * Default value is false. -// */ -// disabled?: ?boolean, - -// /** -// * Used to style and layout the `Slider`. See `StyleSheet.js` and -// * `DeprecatedViewStylePropTypes.js` for more info. -// */ -// style?: ?ViewStyleProp, - -// /** -// * Initial value of the slider. The value should be between minimumValue -// * and maximumValue, which default to 0 and 1 respectively. -// * Default value is 0. -// * -// * *This is not a controlled component*, you don't need to update the -// * value during dragging. -// */ -// value?: ?number, - -// /** -// * Step value of the slider. The value should be -// * between 0 and (maximumValue - minimumValue). -// * Default value is 0. -// */ -// step?: ?number, - -// /** -// * Initial minimum value of the slider. Default value is 0. -// */ -// minimumValue?: ?number, - -// /** -// * Initial maximum value of the slider. Default value is 1. -// */ -// maximumValue?: ?number, - -// /** -// * The color used for the track to the left of the button. -// * Overrides the default blue gradient image on iOS. -// */ -// minimumTrackTintColor?: ?ColorValue, - -// /** -// * The color used for the track to the right of the button. -// * Overrides the default blue gradient image on iOS. -// */ -// maximumTrackTintColor?: ?ColorValue, -// /** -// * The color used to tint the default thumb images on iOS, or the -// * color of the foreground switch grip on Android. -// */ -// thumbTintColor?: ?ColorValue, - -// /** -// * If true the user won't be able to move the slider. -// * Default value is false. -// */ -// disabled?: ?boolean, - -// /** -// * Callback continuously called while the user is dragging the slider. -// */ -// onValueChange?: ?(value: number) => void, - -// /** -// * Callback that is called when the user touches the slider, -// * regardless if the value has changed. The current value is passed -// * as an argument to the callback handler. -// */ - -// onSlidingStart?: ?(value: number) => void, - -// /** -// * Callback that is called when the user releases the slider, -// * regardless if the value has changed. The current value is passed -// * as an argument to the callback handler. -// */ -// onSlidingComplete?: ?(value: number) => void, - -// /** -// * Used to locate this view in UI automation tests. -// */ -// testID?: ?string, - -// /** -// * Sets an image for the thumb. Only static images are supported. -// */ -// thumbImage?: ?ImageSource, - -// /** -// * If true the slider will be inverted. -// * Default value is false. -// */ -// inverted?: ?boolean, -// |}>; +import React, {RefObject, useCallback} from 'react'; +import {View, StyleSheet, ColorValue, ViewStyle, NativeSyntheticEvent, GestureResponderEvent, LayoutChangeEvent} from 'react-native'; + +type Event = NativeSyntheticEvent< + Readonly<{ + value: number, + /** + * Android Only. + */ + fromUser?: boolean, + }> +>; + +export interface Props { + value: number, + minimumValue: number, + maximumValue: number, + step: number, + minimumTrackTintColor: ColorValue, + maximumTrackTintColor: ColorValue, + thumbTintColor: ColorValue, + thumbStyle: ViewStyle, + style: ViewStyle, + inverted: boolean, + enabled: boolean, + trackHeight: number, + thumbSize: number, + onRNCSliderSlidingStart: (value: number) => void, + onRNCSliderSlidingComplete: (value: number) => void, + onRNCSliderValueChange: (value: number) => void, +} const RCTSliderWebComponent = React.forwardRef( ( @@ -143,47 +42,70 @@ const RCTSliderWebComponent = React.forwardRef( maximumTrackTintColor = '#939393', thumbTintColor = '#009688', thumbStyle = {}, - style = [], + style = {}, inverted = false, enabled = true, trackHeight = 4, thumbSize = 20, - onRNCSliderSlidingStart = () => {}, - onRNCSliderSlidingComplete = () => {}, - onRNCSliderValueChange = () => {}, + onRNCSliderSlidingStart = (_: number) => {}, + onRNCSliderSlidingComplete = (_: number) => {}, + onRNCSliderValueChange = (_: number) => {}, ...others - }, + }: Props, forwardedRef, ) => { + const containerSize = React.useRef({width: 0, height: 0}); + const containerPositionX = React.useRef(0); + const containerRef = forwardedRef || React.createRef(); + const hasBeenResized = React.useRef(false); + const [value, setValue] = React.useState(initialValue || minimumValue); + const onValueChange = useCallback( - (value) => { + (value: number) => { onRNCSliderValueChange && - onRNCSliderValueChange({nativeEvent: {fromUser: true, value}}); + onRNCSliderValueChange(value); }, [onRNCSliderValueChange], ); const onSlidingStart = useCallback( - (value) => { + (value: number) => { onRNCSliderSlidingStart && - onRNCSliderSlidingStart({nativeEvent: {fromUser: true, value}}); + onRNCSliderSlidingStart(value); }, [onRNCSliderSlidingStart], ); const onSlidingComplete = useCallback( - (value) => { + (value: number) => { onRNCSliderSlidingComplete && - onRNCSliderSlidingComplete({nativeEvent: {fromUser: true, value}}); + onRNCSliderSlidingComplete(value); }, [onRNCSliderSlidingComplete], ); + const updateValue = useCallback( + (newValue: number) => { + // Ensure that the value is correctly rounded + const hardRounded = + decimalPrecision.current < 20 + ? Number.parseFloat(newValue.toFixed(decimalPrecision.current)) + : newValue; + + // Ensure that the new value is still between the bounds + const withinBounds = Math.max( + minimumValue, + Math.min(hardRounded, maximumValue), + ); + if (value !== withinBounds) { + setValue(withinBounds); + onValueChange(withinBounds); + return withinBounds; + } + return hardRounded; + }, + [minimumValue, maximumValue, value, onValueChange], + ); - const containerSize = React.useRef({width: 0, height: 0}); - const containerPositionX = React.useRef(0); - const containerRef = forwardedRef || React.createRef(); - const hasBeenResized = React.useRef(false); - const [value, setValue] = React.useState(initialValue || minimumValue); React.useLayoutEffect(() => { updateValue(initialValue); }, [initialValue, updateValue]); @@ -197,9 +119,11 @@ const RCTSliderWebComponent = React.forwardRef( hasBeenResized.current = true; }; React.useEffect(() => { + //@ts-ignore window.addEventListener('resize', onResize); return () => { + //@ts-ignore window.removeEventListener('resize', onResize); }; }, []); @@ -210,9 +134,7 @@ const RCTSliderWebComponent = React.forwardRef( flexShrink: 1, flexBasis: 'auto', flexDirection: 'row', - userSelect: 'none', alignItems: 'center', - cursor: 'pointer', }, style, ); @@ -249,7 +171,6 @@ const RCTSliderWebComponent = React.forwardRef( zIndex: 1, borderRadius: thumbSize / 2, overflow: 'hidden', - userSelect: 'none', }, thumbStyle, ); @@ -266,36 +187,15 @@ const RCTSliderWebComponent = React.forwardRef( }, [maximumValue, minimumValue, step]); const updateContainerPositionX = () => { + //@ts-ignore const positionX = ReactDOM.findDOMNode( - containerRef.current, - )?.getBoundingClientRect()?.x; + (containerRef as RefObject).current, + //@ts-ignore + ).getBoundingClientRect()?.x; containerPositionX.current = positionX ?? 0; }; - const updateValue = useCallback( - (newValue) => { - // Ensure that the value is correctly rounded - const hardRounded = - decimalPrecision.current < 20 - ? Number.parseFloat(newValue.toFixed(decimalPrecision.current)) - : newValue; - - // Ensure that the new value is still between the bounds - const withinBounds = Math.max( - minimumValue, - Math.min(hardRounded, maximumValue), - ); - if (value !== withinBounds) { - setValue(withinBounds); - onValueChange(withinBounds); - return withinBounds; - } - return hardRounded; - }, - [minimumValue, maximumValue, value, onValueChange], - ); - - const getValueFromNativeEvent = ({pageX}) => { + const getValueFromNativeEvent = (pageX: number) => { const {width = 1} = containerSize.current; if (hasBeenResized.current) { @@ -318,16 +218,16 @@ const RCTSliderWebComponent = React.forwardRef( } }; - const onTouchEnd = ({nativeEvent}) => { - const newValue = updateValue(getValueFromNativeEvent(nativeEvent)); + const onTouchEnd = (nativeEvent: GestureResponderEvent) => { + const newValue = updateValue(getValueFromNativeEvent(nativeEvent.currentTarget)); onSlidingComplete(newValue); }; - const onMove = ({nativeEvent}) => { - updateValue(getValueFromNativeEvent(nativeEvent)); + const onMove = (nativeEvent: GestureResponderEvent) => { + updateValue(getValueFromNativeEvent(nativeEvent.currentTarget)); }; - const accessibilityActions = (event) => { + const accessibilityActions = (event: any) => { const tenth = (maximumValue - minimumValue) / 10; switch (event.nativeEvent.actionName) { case 'increment': @@ -338,23 +238,11 @@ const RCTSliderWebComponent = React.forwardRef( break; } }; - const handleAccessibilityKeys = (key) => { - switch (key) { - case 'ArrowUp': - case 'ArrowRight': - accessibilityActions({nativeEvent: {actionName: 'increment'}}); - break; - case 'ArrowDown': - case 'ArrowLeft': - accessibilityActions({nativeEvent: {actionName: 'decrement'}}); - break; - } - }; React.useImperativeHandle( forwardedRef, () => ({ - updateValue: (val) => { + updateValue: (val: number) => { updateValue(val); }, }), @@ -363,10 +251,10 @@ const RCTSliderWebComponent = React.forwardRef( return ( { - containerSize.current = nativeEvent.layout; - if (containerRef.current) { + onLayout={(nativeEvent: LayoutChangeEvent) => { + containerSize.current.height = nativeEvent.currentTarget; + containerSize.current.width = nativeEvent.currentTarget; + if ((containerRef as RefObject).current) { updateContainerPositionX(); } }} @@ -376,7 +264,6 @@ const RCTSliderWebComponent = React.forwardRef( ]} onAccessibilityAction={accessibilityActions} accessible={true} - accessibleValue={value} accessibilityRole={'adjustable'} style={containerStyle} onStartShouldSetResponder={() => enabled} @@ -384,7 +271,6 @@ const RCTSliderWebComponent = React.forwardRef( onResponderGrant={() => onSlidingStart(value)} onResponderRelease={onTouchEnd} onResponderMove={onMove} - onKeyDown={({nativeEvent: {key}}) => handleAccessibilityKeys(key)} {...others}> @@ -395,7 +281,7 @@ const RCTSliderWebComponent = React.forwardRef( ); // We should round number with the same precision as the min, max or step values if provided -function calculatePrecision(minimumValue, maximumValue, step) { +function calculatePrecision(minimumValue: number, maximumValue: number, step: number) { if (!step) { return Infinity; } else { diff --git a/package/tsconfig.json b/package/tsconfig.json index 61ce3606..7163632b 100644 --- a/package/tsconfig.json +++ b/package/tsconfig.json @@ -1,6 +1,5 @@ { "include": ["./src/**/*"], - "exclude": ["./src/RNCSliderNativeComponent.web.ts"], "compilerOptions": { "jsx": "react", From 25d5eb318675f4f06b0a9aa9d3a50fe0042bb15a Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Thu, 25 Aug 2022 19:14:54 +0200 Subject: [PATCH 10/22] Include typechecking during CI workflow --- .github/workflows/ReactNativeSlider-CI.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ReactNativeSlider-CI.yml b/.github/workflows/ReactNativeSlider-CI.yml index 7815c777..6098ec52 100644 --- a/.github/workflows/ReactNativeSlider-CI.yml +++ b/.github/workflows/ReactNativeSlider-CI.yml @@ -21,7 +21,7 @@ jobs: key: ${{ hashFiles('./package/package.json') }} - lint: + verify-package-sources: name: Lint the sources runs-on: ubuntu-latest needs: install @@ -39,6 +39,9 @@ jobs: - name: Run ESLint on the sources run: cd package && npx eslint src + - name: Run ESLint on the sources + run: cd package && npx tsc --noEmit + test: name: Run the unit tests @@ -59,7 +62,7 @@ jobs: run: cd package && npx jest src - verify: + verify-example-sources: name: Verify example app sources runs-on: ubuntu-latest @@ -77,7 +80,7 @@ jobs: build-android-app: name: Build example app Android runs-on: ubuntu-latest - needs: [verify] + needs: [verify-example-sources] steps: - uses: actions/checkout@v3 @@ -97,7 +100,7 @@ jobs: build-iOS-app: name: Build example app iOS runs-on: macos-latest - needs: [verify] + needs: [verify-example-sources] steps: - uses: actions/checkout@v3 From 40fc65818b7f8e50bac157e33538a58875a508ed Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Thu, 25 Aug 2022 19:17:12 +0200 Subject: [PATCH 11/22] Update snapshots regarding new TS files --- package/src/__tests__/__snapshots__/Slider.test.js.snap | 6 ------ 1 file changed, 6 deletions(-) diff --git a/package/src/__tests__/__snapshots__/Slider.test.js.snap b/package/src/__tests__/__snapshots__/Slider.test.js.snap index b3f859f2..4c0c44b8 100644 --- a/package/src/__tests__/__snapshots__/Slider.test.js.snap +++ b/package/src/__tests__/__snapshots__/Slider.test.js.snap @@ -26,7 +26,6 @@ exports[` accessibilityState disabled sets disabled={true} 1`] = ` } } tapToSeek={false} - thumbImage={null} value={0} /> `; @@ -57,7 +56,6 @@ exports[` disabled prop overrides accessibilityState.disabled 1`] = ` } } tapToSeek={false} - thumbImage={null} value={0} /> `; @@ -88,7 +86,6 @@ exports[` disabled prop overrides accessibilityState.enabled 1`] = ` } } tapToSeek={false} - thumbImage={null} value={0} /> `; @@ -116,7 +113,6 @@ exports[` renders a slider with custom props 1`] = ` } } tapToSeek={false} - thumbImage={null} thumbTintColor="green" value={0.5} /> @@ -148,7 +144,6 @@ exports[` renders disabled slider 1`] = ` } } tapToSeek={false} - thumbImage={null} value={0} /> `; @@ -174,7 +169,6 @@ exports[` renders enabled slider 1`] = ` } } tapToSeek={false} - thumbImage={null} value={0} /> `; From 484d66fc07ecff62a8f957540887546f5eb3a8d0 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Thu, 1 Sep 2022 14:21:13 +0200 Subject: [PATCH 12/22] Update tests to use TS with JSX syntax --- package/package-lock.json | 529 ++++++++++++++++++ package/package.json | 1 + .../{Slider.test.js => Slider.test.tsx} | 3 +- ...ider.test.js.snap => Slider.test.tsx.snap} | 0 4 files changed, 531 insertions(+), 2 deletions(-) rename package/src/__tests__/{Slider.test.js => Slider.test.tsx} (99%) rename package/src/__tests__/__snapshots__/{Slider.test.js.snap => Slider.test.tsx.snap} (100%) diff --git a/package/package-lock.json b/package/package-lock.json index 5131c131..157364bf 100644 --- a/package/package-lock.json +++ b/package/package-lock.json @@ -16,6 +16,7 @@ "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", + "@types/jest": "^28.1.8", "@types/react-native": "^0.69.5", "babel-jest": "^26.6.3", "babel-plugin-module-resolver": "3.1.3", @@ -1976,6 +1977,27 @@ "node": ">= 10.14.2" } }, + "node_modules/@jest/expect-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", + "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", + "dev": true, + "dependencies": { + "jest-get-type": "^28.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect-utils/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, "node_modules/@jest/fake-timers": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", @@ -2139,6 +2161,18 @@ "node": ">=8" } }, + "node_modules/@jest/schemas": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, "node_modules/@jest/source-map": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", @@ -5477,6 +5511,12 @@ "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", "dev": true }, + "node_modules/@sinclair/typebox": { + "version": "0.24.28", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.28.tgz", + "integrity": "sha512-dgJd3HLOkLmz4Bw50eZx/zJwtBq65nms3N9VBYu5LTjJ883oBFkTyXRlCB/ZGGwqYpJJHA5zW2Ibhl5ngITfow==", + "dev": true + }, "node_modules/@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -5584,6 +5624,261 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/jest": { + "version": "28.1.8", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.8.tgz", + "integrity": "sha512-8TJkV++s7B6XqnDrzR1m/TT0A0h948Pnl/097veySPN67VRAgQ4gZ7n2KfJo2rVq6njQjdxU3GCCyDvAeuHoiw==", + "dev": true, + "dependencies": { + "expect": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/types": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@types/jest/node_modules/@types/yargs": { + "version": "17.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.11.tgz", + "integrity": "sha512-aB4y9UDUXTSMxmM4MH+YnuR0g5Cph3FLQBoWoMB21DSvFVAxRVEHEMx3TLh+zUZYMCQtKiqazz0Q4Rre31f/OA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/jest/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@types/jest/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@types/jest/node_modules/ci-info": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", + "dev": true + }, + "node_modules/@types/jest/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@types/jest/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@types/jest/node_modules/diff-sequences": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@types/jest/node_modules/expect": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@types/jest/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@types/jest/node_modules/jest-diff": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", + "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-matcher-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", + "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-message-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", + "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@types/jest/node_modules/pretty-format": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", + "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "dev": true, + "dependencies": { + "@jest/schemas": "^28.1.3", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@types/jest/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@types/jest/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/@types/jest/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@types/jest/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -19742,6 +20037,23 @@ "jest-mock": "^26.6.2" } }, + "@jest/expect-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", + "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.2" + }, + "dependencies": { + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + } + } + }, "@jest/fake-timers": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", @@ -19869,6 +20181,15 @@ } } }, + "@jest/schemas": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, "@jest/source-map": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", @@ -22272,6 +22593,12 @@ "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", "dev": true }, + "@sinclair/typebox": { + "version": "0.24.28", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.28.tgz", + "integrity": "sha512-dgJd3HLOkLmz4Bw50eZx/zJwtBq65nms3N9VBYu5LTjJ883oBFkTyXRlCB/ZGGwqYpJJHA5zW2Ibhl5ngITfow==", + "dev": true + }, "@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -22376,6 +22703,208 @@ "@types/istanbul-lib-report": "*" } }, + "@types/jest": { + "version": "28.1.8", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.8.tgz", + "integrity": "sha512-8TJkV++s7B6XqnDrzR1m/TT0A0h948Pnl/097veySPN67VRAgQ4gZ7n2KfJo2rVq6njQjdxU3GCCyDvAeuHoiw==", + "dev": true, + "requires": { + "expect": "^28.0.0", + "pretty-format": "^28.0.0" + }, + "dependencies": { + "@jest/types": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "dev": true, + "requires": { + "@jest/schemas": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.11.tgz", + "integrity": "sha512-aB4y9UDUXTSMxmM4MH+YnuR0g5Cph3FLQBoWoMB21DSvFVAxRVEHEMx3TLh+zUZYMCQtKiqazz0Q4Rre31f/OA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "ci-info": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "diff-sequences": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", + "dev": true + }, + "expect": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", + "dev": true, + "requires": { + "@jest/expect-utils": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-diff": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", + "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + } + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "jest-matcher-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", + "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + } + }, + "jest-message-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", + "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", + "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.1.3", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", diff --git a/package/package.json b/package/package.json index e993c2a4..0a2adfa2 100644 --- a/package/package.json +++ b/package/package.json @@ -28,6 +28,7 @@ "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", + "@types/jest": "^28.1.8", "@types/react-native": "^0.69.5", "babel-jest": "^26.6.3", "babel-plugin-module-resolver": "3.1.3", diff --git a/package/src/__tests__/Slider.test.js b/package/src/__tests__/Slider.test.tsx similarity index 99% rename from package/src/__tests__/Slider.test.js rename to package/src/__tests__/Slider.test.tsx index 76ec95f1..d0f54990 100644 --- a/package/src/__tests__/Slider.test.js +++ b/package/src/__tests__/Slider.test.tsx @@ -1,6 +1,5 @@ -/* @flow */ - import * as React from 'react'; +//@ts-ignore import renderer from 'react-test-renderer'; import Slider from '../Slider'; diff --git a/package/src/__tests__/__snapshots__/Slider.test.js.snap b/package/src/__tests__/__snapshots__/Slider.test.tsx.snap similarity index 100% rename from package/src/__tests__/__snapshots__/Slider.test.js.snap rename to package/src/__tests__/__snapshots__/Slider.test.tsx.snap From 23a5094578487283fbb8cf631deefb942fea1758 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Thu, 1 Sep 2022 14:45:52 +0200 Subject: [PATCH 13/22] Update sources to new prettier parsing option --- example/package-lock.json | 2 + package/package.json | 3 +- package/src/RNCSliderNativeComponent.ts | 66 +++--- package/src/RNCSliderNativeComponent.web.tsx | 71 ++++--- package/src/Slider.tsx | 213 ++++++++++--------- package/typings/index.d.ts | 24 ++- 6 files changed, 202 insertions(+), 177 deletions(-) diff --git a/example/package-lock.json b/example/package-lock.json index ab0078d0..67e69b61 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -46,6 +46,7 @@ "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", + "@types/jest": "^28.1.8", "@types/react-native": "^0.69.5", "babel-jest": "^26.6.3", "babel-plugin-module-resolver": "3.1.3", @@ -30141,6 +30142,7 @@ "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "2.0.0", + "@types/jest": "^28.1.8", "@types/react-native": "^0.69.5", "babel-jest": "^26.6.3", "babel-plugin-module-resolver": "3.1.3", diff --git a/package/package.json b/package/package.json index 0a2adfa2..d929aba4 100644 --- a/package/package.json +++ b/package/package.json @@ -60,8 +60,7 @@ "singleQuote": true, "trailingComma": "all", "bracketSpacing": false, - "jsxBracketSameLine": true, - "parser": "flow" + "jsxBracketSameLine": true }, "codegenConfig": { "libraries": [ diff --git a/package/src/RNCSliderNativeComponent.ts b/package/src/RNCSliderNativeComponent.ts index 26ea4561..41cc1773 100644 --- a/package/src/RNCSliderNativeComponent.ts +++ b/package/src/RNCSliderNativeComponent.ts @@ -1,4 +1,9 @@ -import type {ColorValue, HostComponent, ImageSourcePropType, ViewProps} from 'react-native'; +import type { + ColorValue, + HostComponent, + ImageSourcePropType, + ViewProps, +} from 'react-native'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { Float, @@ -7,38 +12,39 @@ import type { } from 'react-native/Libraries/Types/CodegenTypes'; type Event = Readonly<{ - value: Float, - fromUser?: boolean, + value: Float; + fromUser?: boolean; }>; -type NativeProps = ViewProps & Readonly<{ - accessibilityUnits?: string, - accessibilityIncrements?: ReadonlyArray, - disabled?: WithDefault, - enabled?: WithDefault, - inverted?: WithDefault, - vertical?: boolean, - tapToSeek?: WithDefault, - maximumTrackImage?: ImageSourcePropType, - maximumTrackTintColor?: ColorValue, - maximumValue?: Float, - minimumTrackImage?: ImageSourcePropType, - minimumTrackTintColor?: ColorValue, - minimumValue?: Float, - onChange?: BubblingEventHandler, - onRNCSliderSlidingStart?: BubblingEventHandler, - onRNCSliderSlidingComplete?: BubblingEventHandler, - onRNCSliderValueChange?: BubblingEventHandler, - step?: Float, - testID?: string, - thumbImage?: ImageSourcePropType, - thumbTintColor?: ColorValue, - trackImage?: ImageSourcePropType, - value?: Float, -}>; +type NativeProps = ViewProps & + Readonly<{ + accessibilityUnits?: string; + accessibilityIncrements?: ReadonlyArray; + disabled?: WithDefault; + enabled?: WithDefault; + inverted?: WithDefault; + vertical?: boolean; + tapToSeek?: WithDefault; + maximumTrackImage?: ImageSourcePropType; + maximumTrackTintColor?: ColorValue; + maximumValue?: Float; + minimumTrackImage?: ImageSourcePropType; + minimumTrackTintColor?: ColorValue; + minimumValue?: Float; + onChange?: BubblingEventHandler; + onRNCSliderSlidingStart?: BubblingEventHandler; + onRNCSliderSlidingComplete?: BubblingEventHandler; + onRNCSliderValueChange?: BubblingEventHandler; + step?: Float; + testID?: string; + thumbImage?: ImageSourcePropType; + thumbTintColor?: ColorValue; + trackImage?: ImageSourcePropType; + value?: Float; + }>; const VIEW_MANAGER_NAME = 'RNCSlider'; -export default (codegenNativeComponent( +export default codegenNativeComponent( VIEW_MANAGER_NAME, -) as HostComponent); +) as HostComponent; diff --git a/package/src/RNCSliderNativeComponent.web.tsx b/package/src/RNCSliderNativeComponent.web.tsx index 5095ba82..fbf21400 100644 --- a/package/src/RNCSliderNativeComponent.web.tsx +++ b/package/src/RNCSliderNativeComponent.web.tsx @@ -1,34 +1,43 @@ +//@ts-ignore import ReactDOM from 'react-dom'; import React, {RefObject, useCallback} from 'react'; -import {View, StyleSheet, ColorValue, ViewStyle, NativeSyntheticEvent, GestureResponderEvent, LayoutChangeEvent} from 'react-native'; +import { + View, + StyleSheet, + ColorValue, + ViewStyle, + NativeSyntheticEvent, + GestureResponderEvent, + LayoutChangeEvent, +} from 'react-native'; type Event = NativeSyntheticEvent< Readonly<{ - value: number, + value: number; /** * Android Only. */ - fromUser?: boolean, + fromUser?: boolean; }> >; export interface Props { - value: number, - minimumValue: number, - maximumValue: number, - step: number, - minimumTrackTintColor: ColorValue, - maximumTrackTintColor: ColorValue, - thumbTintColor: ColorValue, - thumbStyle: ViewStyle, - style: ViewStyle, - inverted: boolean, - enabled: boolean, - trackHeight: number, - thumbSize: number, - onRNCSliderSlidingStart: (value: number) => void, - onRNCSliderSlidingComplete: (value: number) => void, - onRNCSliderValueChange: (value: number) => void, + value: number; + minimumValue: number; + maximumValue: number; + step: number; + minimumTrackTintColor: ColorValue; + maximumTrackTintColor: ColorValue; + thumbTintColor: ColorValue; + thumbStyle: ViewStyle; + style: ViewStyle; + inverted: boolean; + enabled: boolean; + trackHeight: number; + thumbSize: number; + onRNCSliderSlidingStart: (value: number) => void; + onRNCSliderSlidingComplete: (value: number) => void; + onRNCSliderValueChange: (value: number) => void; } const RCTSliderWebComponent = React.forwardRef( @@ -52,7 +61,7 @@ const RCTSliderWebComponent = React.forwardRef( onRNCSliderValueChange = (_: number) => {}, ...others }: Props, - forwardedRef, + forwardedRef: any, ) => { const containerSize = React.useRef({width: 0, height: 0}); const containerPositionX = React.useRef(0); @@ -62,24 +71,21 @@ const RCTSliderWebComponent = React.forwardRef( const onValueChange = useCallback( (value: number) => { - onRNCSliderValueChange && - onRNCSliderValueChange(value); + onRNCSliderValueChange && onRNCSliderValueChange(value); }, [onRNCSliderValueChange], ); const onSlidingStart = useCallback( (value: number) => { - onRNCSliderSlidingStart && - onRNCSliderSlidingStart(value); + onRNCSliderSlidingStart && onRNCSliderSlidingStart(value); }, [onRNCSliderSlidingStart], ); const onSlidingComplete = useCallback( (value: number) => { - onRNCSliderSlidingComplete && - onRNCSliderSlidingComplete(value); + onRNCSliderSlidingComplete && onRNCSliderSlidingComplete(value); }, [onRNCSliderSlidingComplete], ); @@ -190,8 +196,7 @@ const RCTSliderWebComponent = React.forwardRef( //@ts-ignore const positionX = ReactDOM.findDOMNode( (containerRef as RefObject).current, - //@ts-ignore - ).getBoundingClientRect()?.x; + ).getBoundingClientRect()?.x; containerPositionX.current = positionX ?? 0; }; @@ -219,7 +224,9 @@ const RCTSliderWebComponent = React.forwardRef( }; const onTouchEnd = (nativeEvent: GestureResponderEvent) => { - const newValue = updateValue(getValueFromNativeEvent(nativeEvent.currentTarget)); + const newValue = updateValue( + getValueFromNativeEvent(nativeEvent.currentTarget), + ); onSlidingComplete(newValue); }; @@ -281,7 +288,11 @@ const RCTSliderWebComponent = React.forwardRef( ); // We should round number with the same precision as the min, max or step values if provided -function calculatePrecision(minimumValue: number, maximumValue: number, step: number) { +function calculatePrecision( + minimumValue: number, + maximumValue: number, + step: number, +) { if (!step) { return Infinity; } else { diff --git a/package/src/Slider.tsx b/package/src/Slider.tsx index 6be324f8..9f53735b 100644 --- a/package/src/Slider.tsx +++ b/package/src/Slider.tsx @@ -16,11 +16,11 @@ import type {Ref} from 'react'; type Event = NativeSyntheticEvent< Readonly<{ - value: number, + value: number; /** * Android Only. */ - fromUser?: boolean, + fromUser?: boolean; }> >; @@ -29,7 +29,7 @@ type WindowsProps = Readonly<{ * If true the slider will be inverted. * Default value is false. */ - vertical?: boolean, + vertical?: boolean; }>; type IOSProps = Readonly<{ @@ -37,138 +37,141 @@ type IOSProps = Readonly<{ * Assigns a single image for the track. Only static images are supported. * The center pixel of the image will be stretched to fill the track. */ - trackImage?: ImageSourcePropType, + trackImage?: ImageSourcePropType; /** * Assigns a minimum track image. Only static images are supported. The * rightmost pixel of the image will be stretched to fill the track. */ - minimumTrackImage?: ImageSourcePropType, + minimumTrackImage?: ImageSourcePropType; /** * Assigns a maximum track image. Only static images are supported. The * leftmost pixel of the image will be stretched to fill the track. */ - maximumTrackImage?: ImageSourcePropType, + maximumTrackImage?: ImageSourcePropType; /** * Permits tapping on the slider track to set the thumb position. * Defaults to false on iOS. No effect on Android or Windows. */ - tapToSeek?: boolean, + tapToSeek?: boolean; }>; -type Props = ViewProps & IOSProps & WindowsProps & Readonly<{ - /** - * Used to style and layout the `Slider`. See `StyleSheet.js` and - * `DeprecatedViewStylePropTypes.js` for more info. - */ - style?: ViewStyle, +type Props = ViewProps & + IOSProps & + WindowsProps & + Readonly<{ + /** + * Used to style and layout the `Slider`. See `StyleSheet.js` and + * `DeprecatedViewStylePropTypes.js` for more info. + */ + style?: ViewStyle; - /** - * Write-only property representing the value of the slider. - * Can be used to programmatically control the position of the thumb. - * Entered once at the beginning still acts as an initial value. - * The value should be between minimumValue and maximumValue, - * which default to 0 and 1 respectively. - * Default value is 0. - * - * This is not a controlled component, you don't need to update the - * value during dragging. - */ - value?: number, + /** + * Write-only property representing the value of the slider. + * Can be used to programmatically control the position of the thumb. + * Entered once at the beginning still acts as an initial value. + * The value should be between minimumValue and maximumValue, + * which default to 0 and 1 respectively. + * Default value is 0. + * + * This is not a controlled component, you don't need to update the + * value during dragging. + */ + value?: number; - /** - * Step value of the slider. The value should be - * between 0 and (maximumValue - minimumValue). - * Default value is 0. - */ - step?: number, + /** + * Step value of the slider. The value should be + * between 0 and (maximumValue - minimumValue). + * Default value is 0. + */ + step?: number; - /** - * Initial minimum value of the slider. Default value is 0. - */ - minimumValue?: number, + /** + * Initial minimum value of the slider. Default value is 0. + */ + minimumValue?: number; - /** - * Initial maximum value of the slider. Default value is 1. - */ - maximumValue?: number, + /** + * Initial maximum value of the slider. Default value is 1. + */ + maximumValue?: number; - /** - * The color used for the track to the left of the button. - * Overrides the default blue gradient image on iOS. - */ - minimumTrackTintColor?: ColorValue, + /** + * The color used for the track to the left of the button. + * Overrides the default blue gradient image on iOS. + */ + minimumTrackTintColor?: ColorValue; - /** - * The color used for the track to the right of the button. - * Overrides the default blue gradient image on iOS. - */ - maximumTrackTintColor?: ColorValue, - /** - * The color used to tint the default thumb images on iOS, or the - * color of the foreground switch grip on Android. - */ - thumbTintColor?: ColorValue, + /** + * The color used for the track to the right of the button. + * Overrides the default blue gradient image on iOS. + */ + maximumTrackTintColor?: ColorValue; + /** + * The color used to tint the default thumb images on iOS, or the + * color of the foreground switch grip on Android. + */ + thumbTintColor?: ColorValue; - /** - * If true the user won't be able to move the slider. - * Default value is false. - */ - disabled?: boolean, + /** + * If true the user won't be able to move the slider. + * Default value is false. + */ + disabled?: boolean; - /** - * Callback continuously called while the user is dragging the slider. - */ - onValueChange?: (value: number) => void, + /** + * Callback continuously called while the user is dragging the slider. + */ + onValueChange?: (value: number) => void; - /** - * Callback that is called when the user touches the slider, - * regardless if the value has changed. The current value is passed - * as an argument to the callback handler. - */ - onSlidingStart?: (value: number) => void, + /** + * Callback that is called when the user touches the slider, + * regardless if the value has changed. The current value is passed + * as an argument to the callback handler. + */ + onSlidingStart?: (value: number) => void; - /** - * Callback that is called when the user releases the slider, - * regardless if the value has changed. The current value is passed - * as an argument to the callback handler. - */ - onSlidingComplete?: (value: number) => void, + /** + * Callback that is called when the user releases the slider, + * regardless if the value has changed. The current value is passed + * as an argument to the callback handler. + */ + onSlidingComplete?: (value: number) => void; - /** - * Used to locate this view in UI automation tests. - */ - testID?: string, + /** + * Used to locate this view in UI automation tests. + */ + testID?: string; - /** - * Sets an image for the thumb. Only static images are supported. - */ - thumbImage?: ImageSourcePropType, + /** + * Sets an image for the thumb. Only static images are supported. + */ + thumbImage?: ImageSourcePropType; - /** - * If true the slider will be inverted. - * Default value is false. - */ - inverted?: boolean, + /** + * If true the slider will be inverted. + * Default value is false. + */ + inverted?: boolean; - /** - * A string of one or more words to be announced by the screen reader. - * Otherwise, it will announce the value as a percentage. - * Requires passing a value to `accessibilityIncrements` to work correctly. - * Should be a plural word, as singular units will be handled. - */ - accessibilityUnits?: string, + /** + * A string of one or more words to be announced by the screen reader. + * Otherwise, it will announce the value as a percentage. + * Requires passing a value to `accessibilityIncrements` to work correctly. + * Should be a plural word, as singular units will be handled. + */ + accessibilityUnits?: string; - /** - * An array of values that represent the different increments displayed - * by the slider. All the values passed into this prop must be strings. - * Requires passing a value to `accessibilityUnits` to work correctly. - * The number of elements must be the same as `maximumValue`. - */ - accessibilityIncrements?: Array, -}>; + /** + * An array of values that represent the different increments displayed + * by the slider. All the values passed into this prop must be strings. + * Requires passing a value to `accessibilityUnits` to work correctly. + * The number of elements must be the same as `maximumValue`. + */ + accessibilityIncrements?: Array; + }>; const SliderComponent = ( props: Props, @@ -223,7 +226,9 @@ const SliderComponent = ( thumbImage={ Platform.OS === 'web' ? props.thumbImage - : props.thumbImage ? Image.resolveAssetSource(props.thumbImage) : undefined + : props.thumbImage + ? Image.resolveAssetSource(props.thumbImage) + : undefined } ref={forwardedRef} style={style} diff --git a/package/typings/index.d.ts b/package/typings/index.d.ts index 1937039f..0a0d5578 100644 --- a/package/typings/index.d.ts +++ b/package/typings/index.d.ts @@ -1,10 +1,9 @@ -import * as React from "react"; -import * as ReactNative from "react-native"; +import * as React from 'react'; +import * as ReactNative from 'react-native'; -type SliderReferenceType = ( - React.MutableRefObject & - React.LegacyRef -) | undefined; +type SliderReferenceType = + | (React.MutableRefObject & React.LegacyRef) + | undefined; export interface SliderPropsAndroid extends ReactNative.ViewProps { /** @@ -56,8 +55,10 @@ export interface SliderPropsWindows extends ReactNative.ViewProps { vertical?: boolean; } - -export interface SliderProps extends SliderPropsIOS, SliderPropsAndroid, SliderPropsWindows { +export interface SliderProps + extends SliderPropsIOS, + SliderPropsAndroid, + SliderPropsWindows { /** * If true the user won't be able to move the slider. * Default value is false. @@ -158,9 +159,10 @@ export interface SliderProps extends SliderPropsIOS, SliderPropsAndroid, SliderP } /** -* A component used to select a single value from a range of values. -*/ + * A component used to select a single value from a range of values. + */ declare class SliderComponent extends React.Component {} -declare const SliderBase: ReactNative.Constructor & typeof SliderComponent; +declare const SliderBase: ReactNative.Constructor & + typeof SliderComponent; export default class Slider extends SliderBase {} export type SliderIOS = Slider; From d8f3b75819fc3deda79003816e3572720dc7c080 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 2 Sep 2022 11:47:55 +0200 Subject: [PATCH 14/22] Use interface for NativeProps instead of type --- package/src/RNCSliderNativeComponent.ts | 64 +++++++++++-------------- 1 file changed, 29 insertions(+), 35 deletions(-) diff --git a/package/src/RNCSliderNativeComponent.ts b/package/src/RNCSliderNativeComponent.ts index 41cc1773..5c0d8f47 100644 --- a/package/src/RNCSliderNativeComponent.ts +++ b/package/src/RNCSliderNativeComponent.ts @@ -1,10 +1,7 @@ -import type { - ColorValue, - HostComponent, - ImageSourcePropType, - ViewProps, -} from 'react-native'; +import type {ColorValue, HostComponent, ViewProps} from 'react-native'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +//@ts-ignore +import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; import type { Float, BubblingEventHandler, @@ -16,35 +13,32 @@ type Event = Readonly<{ fromUser?: boolean; }>; -type NativeProps = ViewProps & - Readonly<{ - accessibilityUnits?: string; - accessibilityIncrements?: ReadonlyArray; - disabled?: WithDefault; - enabled?: WithDefault; - inverted?: WithDefault; - vertical?: boolean; - tapToSeek?: WithDefault; - maximumTrackImage?: ImageSourcePropType; - maximumTrackTintColor?: ColorValue; - maximumValue?: Float; - minimumTrackImage?: ImageSourcePropType; - minimumTrackTintColor?: ColorValue; - minimumValue?: Float; - onChange?: BubblingEventHandler; - onRNCSliderSlidingStart?: BubblingEventHandler; - onRNCSliderSlidingComplete?: BubblingEventHandler; - onRNCSliderValueChange?: BubblingEventHandler; - step?: Float; - testID?: string; - thumbImage?: ImageSourcePropType; - thumbTintColor?: ColorValue; - trackImage?: ImageSourcePropType; - value?: Float; - }>; - -const VIEW_MANAGER_NAME = 'RNCSlider'; +export interface NativeProps extends ViewProps { + accessibilityUnits?: string; + accessibilityIncrements?: ReadonlyArray; + disabled?: WithDefault; + enabled?: WithDefault; + inverted?: WithDefault; + vertical?: boolean; + tapToSeek?: WithDefault; + maximumTrackImage?: ImageSource; + maximumTrackTintColor?: ColorValue; + maximumValue?: Float; + minimumTrackImage?: ImageSource; + minimumTrackTintColor?: ColorValue; + minimumValue?: Float; + onChange?: BubblingEventHandler; + onRNCSliderSlidingStart?: BubblingEventHandler; + onRNCSliderSlidingComplete?: BubblingEventHandler; + onRNCSliderValueChange?: BubblingEventHandler; + step?: Float; + testID?: string; + thumbImage?: ImageSource; + thumbTintColor?: ColorValue; + trackImage?: ImageSource; + value?: Float; +} export default codegenNativeComponent( - VIEW_MANAGER_NAME, + 'RNCSlider', ) as HostComponent; From 3ba2bc1df2384fa66fc83d8ecd29ceaf1fcb4676 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 2 Sep 2022 11:48:16 +0200 Subject: [PATCH 15/22] Use ImageSource as a type for image instead of URI based --- package/src/Slider.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package/src/Slider.tsx b/package/src/Slider.tsx index 9f53735b..c270cbd8 100644 --- a/package/src/Slider.tsx +++ b/package/src/Slider.tsx @@ -7,10 +7,11 @@ import { ViewProps, ViewStyle, ColorValue, - ImageSourcePropType, NativeSyntheticEvent, } from 'react-native'; import RCTSliderNativeComponent from './index'; +//@ts-ignore +import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; import type {Ref} from 'react'; @@ -37,19 +38,19 @@ type IOSProps = Readonly<{ * Assigns a single image for the track. Only static images are supported. * The center pixel of the image will be stretched to fill the track. */ - trackImage?: ImageSourcePropType; + trackImage?: ImageSource; /** * Assigns a minimum track image. Only static images are supported. The * rightmost pixel of the image will be stretched to fill the track. */ - minimumTrackImage?: ImageSourcePropType; + minimumTrackImage?: ImageSource; /** * Assigns a maximum track image. Only static images are supported. The * leftmost pixel of the image will be stretched to fill the track. */ - maximumTrackImage?: ImageSourcePropType; + maximumTrackImage?: ImageSource; /** * Permits tapping on the slider track to set the thumb position. @@ -148,7 +149,7 @@ type Props = ViewProps & /** * Sets an image for the thumb. Only static images are supported. */ - thumbImage?: ImageSourcePropType; + thumbImage?: ImageSource; /** * If true the slider will be inverted. From ffd32536c0d83ac51abd9ae57d173d1243a04992 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 2 Sep 2022 14:08:34 +0200 Subject: [PATCH 16/22] Use JSON for Babel config instead of JS --- package/babel.config.js | 3 --- package/babel.config.json | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 package/babel.config.js create mode 100644 package/babel.config.json diff --git a/package/babel.config.js b/package/babel.config.js deleted file mode 100644 index 9efa30ce..00000000 --- a/package/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - presets: ['@babel/preset-typescript', 'module:metro-react-native-babel-preset'], -}; diff --git a/package/babel.config.json b/package/babel.config.json new file mode 100644 index 00000000..d05c558c --- /dev/null +++ b/package/babel.config.json @@ -0,0 +1,3 @@ +{ + "presets": ["@babel/preset-typescript", "module:metro-react-native-babel-preset"] +} From 6a5b65fe7b96fe416b50e947b471ef29bd30ada7 Mon Sep 17 00:00:00 2001 From: Bartosz Klonowski <70535775+BartoszKlonowski@users.noreply.github.com> Date: Mon, 5 Sep 2022 12:38:33 +0200 Subject: [PATCH 17/22] Rename TypeScript check to avoid copy-paste error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michał Pierzchała --- .github/workflows/ReactNativeSlider-CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ReactNativeSlider-CI.yml b/.github/workflows/ReactNativeSlider-CI.yml index 6098ec52..ea2842c4 100644 --- a/.github/workflows/ReactNativeSlider-CI.yml +++ b/.github/workflows/ReactNativeSlider-CI.yml @@ -39,7 +39,7 @@ jobs: - name: Run ESLint on the sources run: cd package && npx eslint src - - name: Run ESLint on the sources + - name: Run TypeScript on the sources run: cd package && npx tsc --noEmit From 0b89f0a194b7aed8a298181abf158b9c5e5dd5fd Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Thu, 8 Sep 2022 22:31:02 +0200 Subject: [PATCH 18/22] Cover review remarks --- package/src/RNCSliderNativeComponent.ts | 12 ++++++------ package/src/Slider.tsx | 20 ++++++-------------- package/typings/index.d.ts | 3 +-- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/package/src/RNCSliderNativeComponent.ts b/package/src/RNCSliderNativeComponent.ts index 5c0d8f47..a0771b1f 100644 --- a/package/src/RNCSliderNativeComponent.ts +++ b/package/src/RNCSliderNativeComponent.ts @@ -4,8 +4,8 @@ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNati import type {ImageSource} from 'react-native/Libraries/Image/ImageSource'; import type { Float, - BubblingEventHandler, WithDefault, + DirectEventHandler, } from 'react-native/Libraries/Types/CodegenTypes'; type Event = Readonly<{ @@ -19,7 +19,7 @@ export interface NativeProps extends ViewProps { disabled?: WithDefault; enabled?: WithDefault; inverted?: WithDefault; - vertical?: boolean; + vertical?: WithDefault; tapToSeek?: WithDefault; maximumTrackImage?: ImageSource; maximumTrackTintColor?: ColorValue; @@ -27,10 +27,10 @@ export interface NativeProps extends ViewProps { minimumTrackImage?: ImageSource; minimumTrackTintColor?: ColorValue; minimumValue?: Float; - onChange?: BubblingEventHandler; - onRNCSliderSlidingStart?: BubblingEventHandler; - onRNCSliderSlidingComplete?: BubblingEventHandler; - onRNCSliderValueChange?: BubblingEventHandler; + onChange?: DirectEventHandler; + onRNCSliderSlidingStart?: DirectEventHandler; + onRNCSliderSlidingComplete?: DirectEventHandler; + onRNCSliderValueChange?: DirectEventHandler; step?: Float; testID?: string; thumbImage?: ImageSource; diff --git a/package/src/Slider.tsx b/package/src/Slider.tsx index c270cbd8..66b63c1d 100644 --- a/package/src/Slider.tsx +++ b/package/src/Slider.tsx @@ -8,6 +8,7 @@ import { ViewStyle, ColorValue, NativeSyntheticEvent, + StyleProp, } from 'react-native'; import RCTSliderNativeComponent from './index'; //@ts-ignore @@ -67,7 +68,7 @@ type Props = ViewProps & * Used to style and layout the `Slider`. See `StyleSheet.js` and * `DeprecatedViewStylePropTypes.js` for more info. */ - style?: ViewStyle; + style?: StyleProp; /** * Write-only property representing the value of the slider. @@ -178,7 +179,7 @@ const SliderComponent = ( props: Props, forwardedRef?: Ref, ) => { - const style = StyleSheet.compose(styles.slider, props.style); + const style = StyleSheet.compose(props.style, styles.slider); const { onValueChange, @@ -257,17 +258,8 @@ SliderWithRef.defaultProps = { tapToSeek: false, }; -let styles: any; -if (Platform.OS === 'ios') { - styles = StyleSheet.create({ - slider: { - height: 40, - }, - }); -} else { - styles = StyleSheet.create({ - slider: {}, - }); -} +let styles = StyleSheet.create( + Platform.OS === 'ios' ? {slider: {height: 40}} : {slider: {}}, +); export default SliderWithRef; diff --git a/package/typings/index.d.ts b/package/typings/index.d.ts index 0a0d5578..b34f0f68 100644 --- a/package/typings/index.d.ts +++ b/package/typings/index.d.ts @@ -162,7 +162,6 @@ export interface SliderProps * A component used to select a single value from a range of values. */ declare class SliderComponent extends React.Component {} -declare const SliderBase: ReactNative.Constructor & - typeof SliderComponent; +declare const SliderBase: ReactNative.Constructor & typeof SliderComponent; export default class Slider extends SliderBase {} export type SliderIOS = Slider; From 194781f12992eb37820af04e080071affb013b5c Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 9 Sep 2022 09:27:22 +0200 Subject: [PATCH 19/22] Keep using bubbling events for continous change --- package/src/RNCSliderNativeComponent.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/src/RNCSliderNativeComponent.ts b/package/src/RNCSliderNativeComponent.ts index a0771b1f..3d3e28a1 100644 --- a/package/src/RNCSliderNativeComponent.ts +++ b/package/src/RNCSliderNativeComponent.ts @@ -6,6 +6,7 @@ import type { Float, WithDefault, DirectEventHandler, + BubblingEventHandler, } from 'react-native/Libraries/Types/CodegenTypes'; type Event = Readonly<{ @@ -27,10 +28,10 @@ export interface NativeProps extends ViewProps { minimumTrackImage?: ImageSource; minimumTrackTintColor?: ColorValue; minimumValue?: Float; - onChange?: DirectEventHandler; + onChange?: BubblingEventHandler; onRNCSliderSlidingStart?: DirectEventHandler; onRNCSliderSlidingComplete?: DirectEventHandler; - onRNCSliderValueChange?: DirectEventHandler; + onRNCSliderValueChange?: BubblingEventHandler; step?: Float; testID?: string; thumbImage?: ImageSource; From a9a66e9530db46835952d5f81af7be058fb20b97 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Tue, 13 Sep 2022 17:25:59 +0200 Subject: [PATCH 20/22] Update lockfiles after recent main changes --- example/package-lock.json | 29 - package/package-lock.json | 1340 +++++++++++++++++++++++++++++++------ 2 files changed, 1149 insertions(+), 220 deletions(-) diff --git a/example/package-lock.json b/example/package-lock.json index 67e69b61..35f96a6c 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -30158,35 +30158,6 @@ "react-native-windows": "^0.69.1", "react-test-renderer": "^18.0.0", "typescript": "^4.7.4" - } - }, - "@react-native-windows/cli": { - "version": "0.69.1", - "resolved": "https://registry.npmjs.org/@react-native-windows/cli/-/cli-0.69.1.tgz", - "integrity": "sha512-kfDJay2mx1GagNNYjcnm0eY7pOuhxDb5SKuUrtaOq6hs0IZ+VF0mBfr+6stqK9UX/lMF2ocLf0IsBxzkLY8D7Q==", - "requires": { - "@react-native-windows/fs": "0.69.0", - "@react-native-windows/package-utils": "0.69.0", - "@react-native-windows/telemetry": "0.69.0", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "@xmldom/xmldom": "^0.7.5", - "chalk": "^4.1.0", - "cli-spinners": "^2.2.0", - "envinfo": "^7.5.0", - "find-up": "^4.1.0", - "glob": "^7.1.1", - "lodash": "^4.17.15", - "mustache": "^4.0.1", - "ora": "^3.4.0", - "prompts": "^2.4.1", - "semver": "^7.3.2", - "shelljs": "^0.8.4", - "username": "^5.1.0", - "uuid": "^3.3.2", - "xml-formatter": "^2.4.0", - "xml-parser": "^1.2.1", - "xpath": "^0.0.27" }, "dependencies": { "@ampproject/remapping": { diff --git a/package/package-lock.json b/package/package-lock.json index 157364bf..ff1aec96 100644 --- a/package/package-lock.json +++ b/package/package-lock.json @@ -178,9 +178,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz", - "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", + "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==", "dev": true, "engines": { "node": ">=6.9.0" @@ -217,12 +217,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.9.tgz", - "integrity": "sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", + "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", "dev": true, "dependencies": { - "@babel/types": "^7.18.9", + "@babel/types": "^7.19.0", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -270,12 +270,12 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz", - "integrity": "sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", + "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.18.8", + "@babel/compat-data": "^7.19.0", "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.20.2", "semver": "^6.3.0" @@ -309,9 +309,9 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", - "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", + "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", @@ -325,15 +325,13 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", - "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", "resolve": "^1.14.2", @@ -365,13 +363,13 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "dev": true, "dependencies": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -414,9 +412,9 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz", - "integrity": "sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", @@ -424,9 +422,9 @@ "@babel/helper-simple-access": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -445,24 +443,24 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz", - "integrity": "sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz", - "integrity": "sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ==", + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-wrap-function": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -523,6 +521,15 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", @@ -542,15 +549,15 @@ } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz", - "integrity": "sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz", + "integrity": "sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -585,9 +592,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.9.tgz", - "integrity": "sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", + "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -596,15 +603,49 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz", - "integrity": "sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w==", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", "dev": true, + "peer": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", + "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.19.0.tgz", + "integrity": "sha512-nhEByMUTx3uZueJ/QkJuSlCfN4FGg+xy+vRsfGQGzSauq5ks2Deid2+05Q3KhfaUjvec1IGhw/Zm3cFm8JigTQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-remap-async-to-generator": "^7.18.9", "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { @@ -630,6 +671,41 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-proposal-class-static-block": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-proposal-export-default-from": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.18.6.tgz", @@ -646,6 +722,57 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", + "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", @@ -662,6 +789,23 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.18.9", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz", @@ -714,6 +858,59 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -750,6 +947,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", @@ -777,6 +990,19 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-flow": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz", @@ -792,6 +1018,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", + "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -903,6 +1145,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -996,16 +1254,17 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.9.tgz", - "integrity": "sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz", + "integrity": "sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.19.0", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-replace-supers": "^7.18.9", "@babel/helper-split-export-declaration": "^7.18.6", "globals": "^11.1.0" @@ -1033,10 +1292,43 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", + "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.9.tgz", - "integrity": "sha512-p5VCYNddPLkZTq4XymQIaIfZNJwT9YsjkPOhkVEqt6QIpQFZVM9IltqqYpOEkJoN1DPznmxUDyZ5CTZs/ZCuHA==", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", "dev": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.18.9" }, @@ -1141,6 +1433,24 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-modules-commonjs": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", @@ -1159,22 +1469,75 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.0.tgz", + "integrity": "sha512-x9aiR0WXAWmOWsqcsnrzGR+ieaTMVyGyffPVA7F8cXAGt/UxefYv6uSHZLkAFChN5M5Iy1+wjE+xJuPt22H39A==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-identifier": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", - "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", "dev": true, + "peer": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-module-transforms": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.0.tgz", + "integrity": "sha512-HDSuqOQzkU//kfGdiHBt71/hkDTApw4U/cMVgKgX7PqfB3LOaK+2GtCEsBu1dL9CkswDm0Gwehht1dCr421ULQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + }, "peerDependencies": { "@babel/core": "^7.0.0" } }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-object-super": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", @@ -1285,6 +1648,39 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "regenerator-transform": "^0.15.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-runtime": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.6.tgz", @@ -1321,12 +1717,12 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.9.tgz", - "integrity": "sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" }, "engines": { @@ -1366,6 +1762,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-typescript": { "version": "7.18.8", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.8.tgz", @@ -1383,6 +1795,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", + "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-unicode-regex": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", @@ -1399,6 +1827,109 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/preset-env": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.19.0.tgz", + "integrity": "sha512-1YUju1TAFuzjIQqNM9WsF4U6VbD/8t3wEAlw3LFYuuEr+ywqLRcSXxFKz4DCEj+sN94l/XTDiUXYRrsvMpz9WQ==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/compat-data": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.19.0", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.9", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.9", + "@babel/plugin-transform-classes": "^7.19.0", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.13", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.19.0", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.0", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.8", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.19.0", + "babel-plugin-polyfill-corejs2": "^0.3.2", + "babel-plugin-polyfill-corejs3": "^0.5.3", + "babel-plugin-polyfill-regenerator": "^0.4.0", + "core-js-compat": "^3.22.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/preset-flow": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.18.6.tgz", @@ -1416,6 +1947,23 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/preset-typescript": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", @@ -1465,33 +2013,33 @@ } }, "node_modules/@babel/template": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", - "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.9.tgz", - "integrity": "sha512-LcPAnujXGwBgv3/WHv01pHtb2tihcyW1XuL9wd7jqh1Z8AQkTd+QVjMrMijrln0T7ED3UXLIy36P9Ao7W75rYg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", + "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.9", + "@babel/generator": "^7.19.0", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.9", - "@babel/types": "^7.18.9", + "@babel/parser": "^7.19.0", + "@babel/types": "^7.19.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1500,11 +2048,12 @@ } }, "node_modules/@babel/types": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.9.tgz", - "integrity": "sha512-WwMLAg2MvJmt/rKEVQBBhIVffMmnilX4oe0sRe7iPOHIGsqpruFHHdrfj4O1CMMtgMtCU4oPafZjDPCRgO57Wg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", "dev": true, "dependencies": { + "@babel/helper-string-parser": "^7.18.10", "@babel/helper-validator-identifier": "^7.18.6", "to-fast-properties": "^2.0.0" }, @@ -7060,13 +7609,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", - "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.3.1", + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", "semver": "^6.1.1" }, "peerDependencies": { @@ -7074,12 +7623,12 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", - "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.3.tgz", + "integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.1", + "@babel/helper-define-polyfill-provider": "^0.3.2", "core-js-compat": "^3.21.0" }, "peerDependencies": { @@ -15865,6 +16414,16 @@ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "dev": true }, + "node_modules/regenerator-transform": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", + "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, "node_modules/regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -18763,9 +19322,9 @@ } }, "@babel/compat-data": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz", - "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", + "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==", "dev": true }, "@babel/core": { @@ -18792,12 +19351,12 @@ } }, "@babel/generator": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.9.tgz", - "integrity": "sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", + "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", "dev": true, "requires": { - "@babel/types": "^7.18.9", + "@babel/types": "^7.19.0", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -18835,12 +19394,12 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz", - "integrity": "sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", + "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", "dev": true, "requires": { - "@babel/compat-data": "^7.18.8", + "@babel/compat-data": "^7.19.0", "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.20.2", "semver": "^6.3.0" @@ -18862,9 +19421,9 @@ } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", - "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", + "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.18.6", @@ -18872,15 +19431,13 @@ } }, "@babel/helper-define-polyfill-provider": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", - "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", "dev": true, "requires": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", "resolve": "^1.14.2", @@ -18903,13 +19460,13 @@ } }, "@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "dev": true, "requires": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" } }, "@babel/helper-hoist-variables": { @@ -18940,9 +19497,9 @@ } }, "@babel/helper-module-transforms": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz", - "integrity": "sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.18.9", @@ -18950,9 +19507,9 @@ "@babel/helper-simple-access": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" } }, "@babel/helper-optimise-call-expression": { @@ -18965,21 +19522,21 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz", - "integrity": "sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", "dev": true }, "@babel/helper-remap-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz", - "integrity": "sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ==", + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-wrap-function": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" } }, "@babel/helper-replace-supers": { @@ -19022,6 +19579,12 @@ "@babel/types": "^7.18.6" } }, + "@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true + }, "@babel/helper-validator-identifier": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", @@ -19035,15 +19598,15 @@ "dev": true }, "@babel/helper-wrap-function": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz", - "integrity": "sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz", + "integrity": "sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" } }, "@babel/helpers": { @@ -19069,20 +19632,42 @@ } }, "@babel/parser": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.9.tgz", - "integrity": "sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", + "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==", "dev": true }, - "@babel/plugin-proposal-async-generator-functions": { + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz", - "integrity": "sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w==", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", "dev": true, + "peer": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", + "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.18.9" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.19.0.tgz", + "integrity": "sha512-nhEByMUTx3uZueJ/QkJuSlCfN4FGg+xy+vRsfGQGzSauq5ks2Deid2+05Q3KhfaUjvec1IGhw/Zm3cFm8JigTQ==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-remap-async-to-generator": "^7.18.9", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, @@ -19096,6 +19681,29 @@ "@babel/helper-plugin-utils": "^7.18.6" } }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, "@babel/plugin-proposal-export-default-from": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.18.6.tgz", @@ -19106,6 +19714,39 @@ "@babel/plugin-syntax-export-default-from": "^7.18.6" } }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", + "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, "@babel/plugin-proposal-nullish-coalescing-operator": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", @@ -19116,6 +19757,17 @@ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, "@babel/plugin-proposal-object-rest-spread": { "version": "7.18.9", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz", @@ -19150,6 +19802,41 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, + "@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -19177,6 +19864,16 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", @@ -19195,6 +19892,16 @@ "@babel/helper-plugin-utils": "^7.18.6" } }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, "@babel/plugin-syntax-flow": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz", @@ -19204,6 +19911,16 @@ "@babel/helper-plugin-utils": "^7.18.6" } }, + "@babel/plugin-syntax-import-assertions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", + "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, "@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -19285,6 +20002,16 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, "@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -19342,16 +20069,17 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.9.tgz", - "integrity": "sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz", + "integrity": "sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.19.0", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-replace-supers": "^7.18.9", "@babel/helper-split-export-declaration": "^7.18.6", "globals": "^11.1.0" @@ -19367,10 +20095,31 @@ } }, "@babel/plugin-transform-destructuring": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", + "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-duplicate-keys": { "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.9.tgz", - "integrity": "sha512-p5VCYNddPLkZTq4XymQIaIfZNJwT9YsjkPOhkVEqt6QIpQFZVM9IltqqYpOEkJoN1DPznmxUDyZ5CTZs/ZCuHA==", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", "dev": true, + "peer": true, "requires": { "@babel/helper-plugin-utils": "^7.18.9" } @@ -19433,6 +20182,18 @@ "@babel/helper-plugin-utils": "^7.18.6" } }, + "@babel/plugin-transform-modules-amd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, "@babel/plugin-transform-modules-commonjs": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", @@ -19445,13 +20206,48 @@ "babel-plugin-dynamic-import-node": "^2.3.3" } }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.0.tgz", + "integrity": "sha512-x9aiR0WXAWmOWsqcsnrzGR+ieaTMVyGyffPVA7F8cXAGt/UxefYv6uSHZLkAFChN5M5Iy1+wjE+xJuPt22H39A==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-identifier": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.0.tgz", + "integrity": "sha512-HDSuqOQzkU//kfGdiHBt71/hkDTApw4U/cMVgKgX7PqfB3LOaK+2GtCEsBu1dL9CkswDm0Gwehht1dCr421ULQ==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0" + } + }, + "@babel/plugin-transform-new-target": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", - "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", "dev": true, + "peer": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" } }, @@ -19523,6 +20319,27 @@ "@babel/helper-plugin-utils": "^7.18.6" } }, + "@babel/plugin-transform-regenerator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "regenerator-transform": "^0.15.0" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, "@babel/plugin-transform-runtime": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.6.tgz", @@ -19547,12 +20364,12 @@ } }, "@babel/plugin-transform-spread": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.9.tgz", - "integrity": "sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" } }, @@ -19574,6 +20391,16 @@ "@babel/helper-plugin-utils": "^7.18.9" } }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, "@babel/plugin-transform-typescript": { "version": "7.18.8", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.8.tgz", @@ -19585,6 +20412,16 @@ "@babel/plugin-syntax-typescript": "^7.18.6" } }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", + "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, "@babel/plugin-transform-unicode-regex": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", @@ -19595,6 +20432,102 @@ "@babel/helper-plugin-utils": "^7.18.6" } }, + "@babel/preset-env": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.19.0.tgz", + "integrity": "sha512-1YUju1TAFuzjIQqNM9WsF4U6VbD/8t3wEAlw3LFYuuEr+ywqLRcSXxFKz4DCEj+sN94l/XTDiUXYRrsvMpz9WQ==", + "dev": true, + "peer": true, + "requires": { + "@babel/compat-data": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.19.0", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.9", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.9", + "@babel/plugin-transform-classes": "^7.19.0", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.13", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.19.0", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.0", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.8", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.19.0", + "babel-plugin-polyfill-corejs2": "^0.3.2", + "babel-plugin-polyfill-corejs3": "^0.5.3", + "babel-plugin-polyfill-regenerator": "^0.4.0", + "core-js-compat": "^3.22.1", + "semver": "^6.3.0" + }, + "dependencies": { + "babel-plugin-polyfill-regenerator": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.3" + } + } + } + }, "@babel/preset-flow": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.18.6.tgz", @@ -19606,6 +20539,20 @@ "@babel/plugin-transform-flow-strip-types": "^7.18.6" } }, + "@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, "@babel/preset-typescript": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", @@ -19640,40 +20587,41 @@ } }, "@babel/template": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", - "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" } }, "@babel/traverse": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.9.tgz", - "integrity": "sha512-LcPAnujXGwBgv3/WHv01pHtb2tihcyW1XuL9wd7jqh1Z8AQkTd+QVjMrMijrln0T7ED3UXLIy36P9Ao7W75rYg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", + "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.9", + "@babel/generator": "^7.19.0", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.9", - "@babel/types": "^7.18.9", + "@babel/parser": "^7.19.0", + "@babel/types": "^7.19.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.9.tgz", - "integrity": "sha512-WwMLAg2MvJmt/rKEVQBBhIVffMmnilX4oe0sRe7iPOHIGsqpruFHHdrfj4O1CMMtgMtCU4oPafZjDPCRgO57Wg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", "dev": true, "requires": { + "@babel/helper-string-parser": "^7.18.10", "@babel/helper-validator-identifier": "^7.18.6", "to-fast-properties": "^2.0.0" } @@ -23742,23 +24690,23 @@ } }, "babel-plugin-polyfill-corejs2": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", - "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", "dev": true, "requires": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.3.1", + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", "semver": "^6.1.1" } }, "babel-plugin-polyfill-corejs3": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", - "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.3.tgz", + "integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.1", + "@babel/helper-define-polyfill-provider": "^0.3.2", "core-js-compat": "^3.21.0" } }, @@ -30550,6 +31498,16 @@ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "dev": true }, + "regenerator-transform": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", + "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", + "dev": true, + "peer": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", From c8475adc99f50907f7932e4f4b9e3b1b16f0320b Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Tue, 13 Sep 2022 17:28:17 +0200 Subject: [PATCH 21/22] Fix typing for react-test-renderer by adding @types --- package/package-lock.json | 39 +++++++++++++++++---------- package/package.json | 3 +++ package/src/__tests__/Slider.test.tsx | 1 - 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/package/package-lock.json b/package/package-lock.json index ff1aec96..032a0d00 100644 --- a/package/package-lock.json +++ b/package/package-lock.json @@ -9,6 +9,9 @@ "version": "4.3.1", "hasInstallScript": true, "license": "MIT", + "dependencies": { + "@types/react-test-renderer": "^18.0.0" + }, "devDependencies": { "@babel/cli": "^7.8.4", "@babel/core": "^7.12.9", @@ -6465,14 +6468,12 @@ "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "dev": true + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, "node_modules/@types/react": { "version": "18.0.17", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.17.tgz", "integrity": "sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==", - "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -6488,11 +6489,18 @@ "@types/react": "*" } }, + "node_modules/@types/react-test-renderer": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-18.0.0.tgz", + "integrity": "sha512-C7/5FBJ3g3sqUahguGi03O79b8afNeSD6T8/GU50oQrJCU0bVCCGQHaGKUbg2Ce8VQEEqTw8/HiS6lXHHdgkdQ==", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/scheduler": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "dev": true + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, "node_modules/@types/stack-utils": { "version": "2.0.1", @@ -8698,8 +8706,7 @@ "node_modules/csstype": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "dev": true + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" }, "node_modules/data-urls": { "version": "2.0.0", @@ -23890,14 +23897,12 @@ "@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "dev": true + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, "@types/react": { "version": "18.0.17", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.17.tgz", "integrity": "sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==", - "dev": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -23913,11 +23918,18 @@ "@types/react": "*" } }, + "@types/react-test-renderer": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-18.0.0.tgz", + "integrity": "sha512-C7/5FBJ3g3sqUahguGi03O79b8afNeSD6T8/GU50oQrJCU0bVCCGQHaGKUbg2Ce8VQEEqTw8/HiS6lXHHdgkdQ==", + "requires": { + "@types/react": "*" + } + }, "@types/scheduler": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "dev": true + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, "@types/stack-utils": { "version": "2.0.1", @@ -25546,8 +25558,7 @@ "csstype": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "dev": true + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" }, "data-urls": { "version": "2.0.0", diff --git a/package/package.json b/package/package.json index d929aba4..6a347fe1 100644 --- a/package/package.json +++ b/package/package.json @@ -70,5 +70,8 @@ "jsSrcsDir": "src" } ] + }, + "dependencies": { + "@types/react-test-renderer": "^18.0.0" } } diff --git a/package/src/__tests__/Slider.test.tsx b/package/src/__tests__/Slider.test.tsx index d0f54990..2b03376d 100644 --- a/package/src/__tests__/Slider.test.tsx +++ b/package/src/__tests__/Slider.test.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -//@ts-ignore import renderer from 'react-test-renderer'; import Slider from '../Slider'; From 096013db77d64000857cd990318065c76511ca05 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Tue, 13 Sep 2022 17:45:03 +0200 Subject: [PATCH 22/22] Check for Example app typechecking and fix leftover mistakes --- .github/workflows/ReactNativeSlider-CI.yml | 2 ++ example/SliderExample.tsx | 2 +- example/tsconfig.json | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ReactNativeSlider-CI.yml b/.github/workflows/ReactNativeSlider-CI.yml index ea2842c4..ee8c8e4a 100644 --- a/.github/workflows/ReactNativeSlider-CI.yml +++ b/.github/workflows/ReactNativeSlider-CI.yml @@ -76,6 +76,8 @@ jobs: - name: Run ESLint on the sources run: cd example && npx eslint . + - name: Run TypeScript on the sources + run: cd example && npx tsc --noEmit build-android-app: name: Build example app Android diff --git a/example/SliderExample.tsx b/example/SliderExample.tsx index a7678005..87ddf1db 100644 --- a/example/SliderExample.tsx +++ b/example/SliderExample.tsx @@ -174,7 +174,7 @@ export const examples = [ { title: 'Vertical slider', platform: 'windows', - render(): Element { + render() { return ; }, }, diff --git a/example/tsconfig.json b/example/tsconfig.json index 0cc9cdd6..94692879 100644 --- a/example/tsconfig.json +++ b/example/tsconfig.json @@ -1,5 +1,6 @@ // prettier-ignore { + "include": ["./SliderExample.tsx", "./App.tsx", "./index.tsx"], "extends": "@tsconfig/react-native/tsconfig.json", /* Recommended React Native TSConfig base */ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */