Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update root dependencies #2492

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ module.exports = {
'@babel/preset-typescript',
'module:metro-react-native-babel-preset',
],
plugins: [
["@babel/plugin-transform-private-methods", { "loose": true }],
["@babel/plugin-transform-private-property-in-object", { "loose": true }],
]
};
26 changes: 10 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,22 @@
"lodash": "^4.17.21",
"prop-types": "^15.7.2"
},
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/lib/"
]
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/core": "^7.20.0",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@babel/preset-env": "^7.20.0",
"@babel/preset-typescript": "^7.12.7",
"@babel/runtime": "^7.12.5",
"@testing-library/jest-native": "^4.0.4",
"@testing-library/react-native": "^9.0.0",
"@babel/runtime": "^7.20.0",
"@testing-library/jest-native": "^5.4.2",
"@testing-library/react-native": "^12.1.2",
"@types/hammerjs": "^2.0.38",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/jest": "^27.0.3",
"@types/jest": "^29.0.0",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"babel-jest": "^26.6.3",
"babel-jest": "^29.2.1",
"clang-format": "^1.8.0",
"eslint": "^7.15.0",
"eslint-config-satya164": "^3.1.8",
Expand All @@ -95,17 +89,17 @@
"eslint-plugin-jest": "^26.0.0",
"expo": "^35.0.1",
"husky": "^8.0.1",
"jest": "^26.6.3",
"jest": "^29.2.1",
"lint-staged": "^12.3.2",
"metro-react-native-babel-preset": "^0.64.0",
"metro-react-native-babel-preset": "0.73.9",
"prettier": "^2.7.1",
"react": "18.2.0",
"react-dom": "^16.12.0",
"react-native": "0.71.0",
"react-native-builder-bob": "^0.17.1",
"react-native-reanimated": "^2.3.1",
"react-native-web": "^0.11.7",
"react-test-renderer": "17.0.2",
"react-test-renderer": "18.2.0",
"release-it": "^13.6.5",
"typescript": "^4.5.5"
},
Expand Down
2 changes: 1 addition & 1 deletion src/ActionType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const ActionType = {
} as const;

// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value
export type ActionType = typeof ActionType[keyof typeof ActionType];
export type ActionType = (typeof ActionType)[keyof typeof ActionType];
2 changes: 1 addition & 1 deletion src/Directions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const Directions = {
} as const;

// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value
export type Directions = typeof Directions[keyof typeof Directions];
export type Directions = (typeof Directions)[keyof typeof Directions];
2 changes: 1 addition & 1 deletion src/State.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export const State = {
} as const;

// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value
export type State = typeof State[keyof typeof State];
export type State = (typeof State)[keyof typeof State];
3 changes: 2 additions & 1 deletion src/TouchEventType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export const TouchEventType = {
} as const;

// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value
export type TouchEventType = typeof TouchEventType[keyof typeof TouchEventType];
export type TouchEventType =
(typeof TouchEventType)[keyof typeof TouchEventType];
2 changes: 1 addition & 1 deletion src/components/touchables/GenericTouchable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const TOUCHABLE_STATE = {
MOVED_OUTSIDE: 2,
} as const;

type TouchableState = typeof TOUCHABLE_STATE[keyof typeof TOUCHABLE_STATE];
type TouchableState = (typeof TOUCHABLE_STATE)[keyof typeof TOUCHABLE_STATE];

export interface GenericTouchableProps extends TouchableWithoutFeedbackProps {
// Decided to drop not used fields from RN's implementation.
Expand Down
2 changes: 2 additions & 0 deletions src/handlers/createHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,14 @@ export default function createHandler<
const actionType = (() => {
if (
this.props?.onGestureEvent &&
// @ts-ignore No, the right side of this expression cannot be a primitive value
'current' in this.props.onGestureEvent
) {
// Reanimated worklet
return ActionType.REANIMATED_WORKLET;
} else if (
this.props?.onGestureEvent &&
// @ts-ignore No, the right side of this expression cannot be a primitive value
'__isNative' in this.props.onGestureEvent
) {
// Animated.event with useNativeDriver: true
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/gestures/gesture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const CALLBACK_TYPE = {

// Allow using CALLBACK_TYPE as object and type
// eslint-disable-next-line @typescript-eslint/no-redeclare
export type CALLBACK_TYPE = typeof CALLBACK_TYPE[keyof typeof CALLBACK_TYPE];
export type CALLBACK_TYPE = (typeof CALLBACK_TYPE)[keyof typeof CALLBACK_TYPE];

export abstract class Gesture {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/web_hammer/GestureHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ abstract class GestureHandler {
'activeOffsetYStart',
'activeOffsetYEnd',
] as const;
configProps.forEach((prop: typeof configProps[number]) => {
configProps.forEach((prop: (typeof configProps)[number]) => {
if (typeof props[prop] === 'undefined') {
props[prop] = Number.NaN;
}
Expand Down
Loading