From f6fcfc05305a22da6606b232b770cd9a2236f640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacy=20=C5=81=C4=85tka?= Date: Fri, 13 Sep 2024 10:56:12 +0200 Subject: [PATCH 01/12] [tvOS] Fix tvOS not building because of `LongPressGestureHandler` (#3090) ## Description When building a React Native app for TvOS, the following error is being thrown: ![image](https://github.com/user-attachments/assets/b7b75b92-90ab-45a5-9c1f-416ed414bd92) This PR fixes this issue by wrapping `numberOfPointersRequired` in a platform specific clause to fix the build error. closes: #3089 ## Test plan Try building `TvOS` before and after this change --- apple/Handlers/RNLongPressHandler.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apple/Handlers/RNLongPressHandler.m b/apple/Handlers/RNLongPressHandler.m index 8f2d24c74f..35dec5aee4 100644 --- a/apple/Handlers/RNLongPressHandler.m +++ b/apple/Handlers/RNLongPressHandler.m @@ -233,10 +233,12 @@ - (void)configure:(NSDictionary *)config recognizer.allowableMovement = [RCTConvert CGFloat:prop]; } +#if !TARGET_OS_TV prop = config[@"numberOfPointers"]; if (prop != nil) { recognizer.numberOfTouchesRequired = [RCTConvert CGFloat:prop]; } +#endif } #if !TARGET_OS_OSX From 329b2b2f923c0e7d6b886cbf26f2a169468f84c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacy=20=C5=81=C4=85tka?= Date: Fri, 13 Sep 2024 15:32:29 +0200 Subject: [PATCH 02/12] Fix `Pressable` styling by removing unnecessary wrapping `View` (#3087) ## Description This PR removes outer `View` from `Pressable` which was previously used for applying props, which were otherwise unavailable on `NativeButton`. All such props have been either manually implemented, or have turned out to be available to use directly in `NativeButton`, so the outer `View` can be safely removed. closes #3085 ## Test plan - paste the provided code in place of the `EmptyExample` - open the `EmptyExample` - see how both the boxes on the left, and the ones on the right behave identically ## Verifying accessibility - platform specific setup - `[iOS]` Turn on `smart inverted colors mode` - `[Android]` Turn on `talkback` - paste the provided code in place of the `EmptyExample` - open the `EmptyExample` - platform specific steps - `[iOS]` See how the `Nested box model styling` section has regular colors - `[Android]` Press the `Nested box model styling` and hear how it says `Accessibility is working` note: Most accessibility styles are not implemented on `web`, but you can verify that accessibility is working on web by inspecting the `Pressable` and looking for `role="button"` prop in the HTML, it is an accessibility prop that i found to be working on web. ## Code
Collapsed code ```tsx import React from 'react'; import { StyleSheet, Text, View, Pressable as RNPressable } from 'react-native'; import { Pressable as GHPressable, PressableProps, } from 'react-native-gesture-handler'; function Pressables(props: PressableProps) { const onPressInGH = () => console.log('GH press'); const onPressInRN = () => console.log('RN press'); return ( {props.children ?? Gesture Handler!} {props.children ?? React Native!} ); } export default function EmptyExample() { return ( Padding GH nested pressable Gesture Handler RN nested pressable React Native 2 nested pressables GH RN Nested box model styling Hello World! Flex view in a fixed size Pressable Pressable! Flex view in a formless size Pressable Pressable! Standalone pressable Pressable! ); } const styles = StyleSheet.create({ header: { fontSize: 16, fontWeight: 'bold', textAlign: 'center', }, multirow: { flex: 1, flexDirection: 'column', }, container: { flexDirection: 'row', justifyContent: 'space-around', gap: 30, margin: 30, marginTop: 5, }, pressable: { backgroundColor: 'tomato', borderWidth: 1, maxWidth: '30%', }, textWrapper: { flex: 1, justifyContent: 'center', alignItems: 'center', }, }); ```
--- src/components/Pressable/Pressable.tsx | 45 +++++++++--------------- src/components/Pressable/utils.ts | 48 +------------------------- 2 files changed, 17 insertions(+), 76 deletions(-) diff --git a/src/components/Pressable/Pressable.tsx b/src/components/Pressable/Pressable.tsx index 9315b55ab9..ccb80436ad 100644 --- a/src/components/Pressable/Pressable.tsx +++ b/src/components/Pressable/Pressable.tsx @@ -9,7 +9,6 @@ import { View, ViewStyle, processColor, - StyleSheet, } from 'react-native'; import NativeButton from '../GestureHandlerButton'; import { @@ -18,7 +17,6 @@ import { isTouchWithinInset, gestureTouchToPressableEvent, addInsets, - splitStyles, } from './utils'; import { PressabilityDebugView } from '../../handlers/PressabilityDebugView'; import { GestureTouchEvent } from '../../handlers/gestureHandlerCommon'; @@ -386,33 +384,22 @@ export default function Pressable(props: PressableProps) { ? children({ pressed: pressedState }) : children; - const flattenedStyles = StyleSheet.flatten(styleProp ?? {}); - - const [innerStyles, outerStyles] = splitStyles(flattenedStyles); - return ( - - - - {childrenProp} - {__DEV__ ? ( - - ) : null} - - - + + + {childrenProp} + {__DEV__ ? ( + + ) : null} + + ); } diff --git a/src/components/Pressable/utils.ts b/src/components/Pressable/utils.ts index 37752b417f..b5a2ddbd40 100644 --- a/src/components/Pressable/utils.ts +++ b/src/components/Pressable/utils.ts @@ -1,4 +1,4 @@ -import { Insets, ViewStyle } from 'react-native'; +import { Insets } from 'react-native'; import { LongPressGestureHandlerEventPayload } from '../../handlers/GestureHandlerEventPayload'; import { TouchData, @@ -125,56 +125,10 @@ const gestureTouchToPressableEvent = ( }; }; -type StylePropKeys = (keyof ViewStyle)[]; - -// Source: -// - From ViewStyle extracted FlexStyle sub-interface which contains all of the box-model manipulating props. -// - From FlexStyle handpicked those styles, which act on the inner part of the box-model. -const innerStyleKeys = new Set([ - 'alignContent', - 'alignItems', - 'flexBasis', - 'flexDirection', - 'flexWrap', - 'rowGap', - 'gap', - 'columnGap', - 'justifyContent', - 'overflow', - 'padding', - 'paddingBottom', - 'paddingEnd', - 'paddingHorizontal', - 'paddingLeft', - 'paddingRight', - 'paddingStart', - 'paddingTop', - 'paddingVertical', - 'start', - 'end', - 'direction', // iOS only -] as StylePropKeys); - -const splitStyles = (from: ViewStyle): [ViewStyle, ViewStyle] => { - const outerStyles: Record = {}; - const innerStyles: Record = {}; - - for (const key in from) { - if (innerStyleKeys.has(key as keyof ViewStyle)) { - innerStyles[key] = from[key as keyof ViewStyle]; - } else { - outerStyles[key] = from[key as keyof ViewStyle]; - } - } - - return [innerStyles, outerStyles]; -}; - export { numberAsInset, addInsets, isTouchWithinInset, gestureToPressableEvent, gestureTouchToPressableEvent, - splitStyles, }; From 915fa95bdb45cd943ac73b8bfd6b6a6188685d99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:08:38 +0200 Subject: [PATCH 03/12] Bump serve-static from 1.14.1 to 1.16.2 (#3094) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [serve-static](https://github.com/expressjs/serve-static) from 1.14.1 to 1.16.2.
Release notes

Sourced from serve-static's releases.

1.16.0

What's Changed

New Contributors

Full Changelog: https://github.com/expressjs/serve-static/compare/v1.15.0...1.16.0

1.15.0

  • deps: send@0.18.0
    • Fix emitted 416 error missing headers property
    • Limit the headers removed for 304 response
    • deps: depd@2.0.0
    • deps: destroy@1.2.0
    • deps: http-errors@2.0.0
    • deps: on-finished@2.4.1
    • deps: statuses@2.0.1

1.14.2

  • deps: send@0.17.2
    • deps: http-errors@1.8.1
    • deps: ms@2.1.3
    • pref: ignore empty http tokens
Changelog

Sourced from serve-static's changelog.

1.16.2 / 2024-09-11

  • deps: encodeurl@~2.0.0

1.16.1 / 2024-09-11

  • deps: send@0.19.0

1.16.0 / 2024-09-10

  • Remove link renderization in html while redirecting

1.15.0 / 2022-03-24

  • deps: send@0.18.0
    • Fix emitted 416 error missing headers property
    • Limit the headers removed for 304 response
    • deps: depd@2.0.0
    • deps: destroy@1.2.0
    • deps: http-errors@2.0.0
    • deps: on-finished@2.4.1
    • deps: statuses@2.0.1

1.14.2 / 2021-12-15

  • deps: send@0.17.2
    • deps: http-errors@1.8.1
    • deps: ms@2.1.3
    • pref: ignore empty http tokens
Commits
Maintainer changes

This version was pushed to npm by wesleytodd, a new releaser for serve-static since your current version.


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serve-static&package-manager=npm_and_yarn&previous-version=1.14.1&new-version=1.16.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/software-mansion/react-native-gesture-handler/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 96 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 38 deletions(-) diff --git a/yarn.lock b/yarn.lock index 10b006c603..ab296b29cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5994,9 +5994,10 @@ denodeify@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== dependency-tree@^9.0.0: version "9.0.0" @@ -6020,9 +6021,10 @@ deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detect-newline@^3.0.0: version "3.1.0" @@ -6294,6 +6296,11 @@ encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + encoding@^0.1.11: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -7726,15 +7733,16 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: - depd "~1.1.2" + depd "2.0.0" inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" http2-wrapper@^1.0.0-beta.4.8: version "1.0.0-beta.5.2" @@ -9842,15 +9850,11 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" -ms@^2.1.1: +ms@2.1.3, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -10144,6 +10148,13 @@ object.values@^1.1.5: define-properties "^1.1.3" es-abstract "^1.19.1" +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -11550,23 +11561,24 @@ semver@^7.3.7: dependencies: lru-cache "^6.0.0" -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== dependencies: debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" + depd "2.0.0" + destroy "1.2.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" fresh "0.5.2" - http-errors "~1.7.2" + http-errors "2.0.0" mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" + ms "2.1.3" + on-finished "2.4.1" range-parser "~1.2.1" - statuses "~1.5.0" + statuses "2.0.1" serialize-error@^2.1.0: version "2.1.0" @@ -11574,13 +11586,14 @@ serialize-error@^2.1.0: integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go= serve-static@^1.13.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== dependencies: - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.17.1" + send "0.19.0" set-blocking@^2.0.0: version "2.0.0" @@ -11600,9 +11613,10 @@ setimmediate@^1.0.5: resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== shallow-clone@^3.0.0: version "3.0.1" @@ -11852,7 +11866,12 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" @@ -12236,9 +12255,10 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== ts-graphviz@^1.5.0: version "1.8.2" From 7b2346435f89c7269abef878c1e24072f0bcc6cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:08:58 +0200 Subject: [PATCH 04/12] Bump fast-xml-parser from 4.3.6 to 4.4.1 in /example (#3084) Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.3.6 to 4.4.1.
Changelog

Sourced from fast-xml-parser's changelog.

Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.

4.4.1 / 2024-07-28

  • v5 fix: maximum length limit to currency value
  • fix #634: build attributes with oneListGroup and attributesGroupName (#653)(By Andreas Naziris)
  • fix: get oneListGroup to work as expected for array of strings (#662)(By Andreas Naziris)

4.4.0 / 2024-05-18

  • fix #654: parse attribute list correctly for self closing stop node.
  • fix: validator bug when closing tag is not opened. (#647) (By Ryosuke Fukatani)
  • fix #581: typings; return type of tagValueProcessor & attributeValueProcessor (#582) (By monholm)

4.3.6 / 2024-03-16

4.3.5 / 2024-02-24

  • code for v5 is added for experimental use

4.3.4 / 2024-01-10

  • fix: Don't escape entities in CDATA sections (#633) (By wackbyte)

4.3.3 / 2024-01-10

  • Remove unnecessary regex

4.3.2 / 2023-10-02

4.3.1 / 2023-09-24

  • revert back "Fix typings for builder and parser to make return type generic" to avoid failure of existing projects. Need to decide a common approach.

4.3.0 / 2023-09-20

4.2.7 / 2023-07-30

  • Fix: builder should set text node correctly when only textnode is present (#589) (By qianqing)
  • Fix: Fix for null and undefined attributes when building xml (#585) (#598). A null or undefined value should be ignored. (By Eugenio Ceschia)

4.2.6 / 2023-07-17

4.2.5 / 2023-06-22

  • change code implementation

4.2.4 / 2023-06-06

  • fix security bug

4.2.3 / 2023-06-05

  • fix security bug

... (truncated)

Commits
  • d40e29c update package detail and browser bundles
  • d0bfe8a fix maxlength for currency value
  • 2c14fcf Update bug-report-or-unexpected-output.md
  • acf610f fix #634: build attributes with oneListGroup and attributesGroupName (#653)
  • 931e910 fix: get oneListGroup to work as expected for array of strings (#662)
  • b8e40c8 Update ISSUE_TEMPLATE.md
  • a6265ba chore: add trend image (#658)
  • db1c548 redesign README.md
  • 338a2c6 Rename 1.Getting Started.md to 1.GettingStarted.md
  • c762537 Rename v5 docs filenames (#659)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=fast-xml-parser&package-manager=npm_and_yarn&previous-version=4.3.6&new-version=4.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/software-mansion/react-native-gesture-handler/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- example/yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example/yarn.lock b/example/yarn.lock index 61964e75bd..5ffa53ca36 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -4122,9 +4122,9 @@ fast-loops@^1.1.3: integrity sha512-8dbd3XWoKCTms18ize6JmQF1SFnnfj5s0B7rRry22EofgMu7B6LKHVh+XfFqFGsqnbH54xgeO83PzpKI+ODhlg== fast-xml-parser@^4.0.12, fast-xml-parser@^4.2.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.3.6.tgz#190f9d99097f0c8f2d3a0e681a10404afca052ff" - integrity sha512-M2SovcRxD4+vC493Uc2GZVcZaj66CCJhWurC4viynVSTvrpErCShNcDz1lAho6n9REQKvL/ll4A4/fw6Y9z8nw== + version "4.4.1" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz#86dbf3f18edf8739326447bcaac31b4ae7f6514f" + integrity sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw== dependencies: strnum "^1.0.5" @@ -7065,7 +7065,7 @@ react-is@^17.0.1: integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== "react-native-gesture-handler@link:..": - version "2.17.1" + version "2.19.0" dependencies: "@egjs/hammerjs" "^2.0.17" hoist-non-react-statics "^3.3.0" From bf3ddd3e4df61e266b2a6982dfd8b5215784f429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bert?= <63123542+m-bert@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:12:58 +0200 Subject: [PATCH 05/12] [iOS] Prevent crash when setting `cursor` style (#3097) ## Description If you try to set `cursor` style in our buttons on `iOS` you'll get `unrecognized selector` error. This PR sets `cursor` value to be undefined on `iOS`, so apps no longer crash. Fixes #3081 ## Test plan
Tested on the following code: ```tsx import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import { RectButton } from 'react-native-gesture-handler'; export default function EmptyExample() { return ( Hello World! ); } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, }); ```
--- src/components/GestureButtons.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/GestureButtons.tsx b/src/components/GestureButtons.tsx index 6a3738e296..8737e903f2 100644 --- a/src/components/GestureButtons.tsx +++ b/src/components/GestureButtons.tsx @@ -120,12 +120,13 @@ class InnerBaseButton extends React.Component { }; render() { - const { rippleColor, ...rest } = this.props; + const { rippleColor, style, ...rest } = this.props; return ( Date: Mon, 16 Sep 2024 16:21:03 +0200 Subject: [PATCH 06/12] [Web] Remove `TouchEventManager` (#3101) ## Description While working on `stylus` support I've noticed that events from `stylus` are being sent twice. This is because `pen` also sends `TouchEvents`. Our code has the following check: ```tsx if (event.changedTouches[i].touchType === 'stylus') { continue; } ``` The problem with this approach is that `touchType` is [only supported on mobile Safari](https://developer.mozilla.org/en-US/docs/Web/API/Touch#browser_compatibility). Given that `TouchEvents` that we send to handlers are constructed manually from data taken from `PointerTracker` (see [this function](https://github.com/software-mansion/react-native-gesture-handler/blob/329b2b2f923c0e7d6b886cbf26f2a169468f84c1/src/web/handlers/GestureHandler.ts#L421)) I think it is better to remove `TouchEventManager` than trying to find some weird ways to block it from sending `stylus` events. ## Test plan Verified that our examples work as they should --- src/web/handlers/GestureHandler.ts | 2 +- src/web/interfaces.ts | 3 - src/web/tools/EventManager.ts | 6 +- src/web/tools/GestureHandlerWebDelegate.ts | 2 - src/web/tools/PointerEventManager.ts | 23 --- src/web/tools/TouchEventManager.ts | 175 --------------------- 6 files changed, 3 insertions(+), 208 deletions(-) delete mode 100644 src/web/tools/TouchEventManager.ts diff --git a/src/web/handlers/GestureHandler.ts b/src/web/handlers/GestureHandler.ts index d8c643d4ea..ab4bd2e3f7 100644 --- a/src/web/handlers/GestureHandler.ts +++ b/src/web/handlers/GestureHandler.ts @@ -507,7 +507,7 @@ export default abstract class GestureHandler implements IGestureHandler { nativeEvent: { handlerTag: this.handlerTag, state: this.currentState, - eventType: event.touchEventType ?? eventType, + eventType: eventType, changedTouches: changed, allTouches: all, numberOfTouches: numberOfTouches, diff --git a/src/web/interfaces.ts b/src/web/interfaces.ts index 8f4cd39a0b..aaa4a1fdbf 100644 --- a/src/web/interfaces.ts +++ b/src/web/interfaces.ts @@ -142,9 +142,6 @@ export interface AdaptedEvent { pointerType: PointerType; time: number; button?: MouseButton; - allTouches?: TouchList; - changedTouches?: TouchList; - touchEventType?: TouchEventType; } export enum EventTypes { diff --git a/src/web/tools/EventManager.ts b/src/web/tools/EventManager.ts index 17c9fbaf72..2f8bf3cccc 100644 --- a/src/web/tools/EventManager.ts +++ b/src/web/tools/EventManager.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-empty-function */ -import { AdaptedEvent, EventTypes, TouchEventType } from '../interfaces'; +import { AdaptedEvent, EventTypes } from '../interfaces'; type PointerEventCallback = (event: AdaptedEvent) => void; @@ -18,9 +18,7 @@ export default abstract class EventManager { protected abstract mapEvent( event: Event, - eventType: EventTypes, - index?: number, - touchEventType?: TouchEventType + eventType: EventTypes ): AdaptedEvent; protected onPointerDown(_event: AdaptedEvent): void {} diff --git a/src/web/tools/GestureHandlerWebDelegate.ts b/src/web/tools/GestureHandlerWebDelegate.ts index 5929e44f73..2dc166c5ba 100644 --- a/src/web/tools/GestureHandlerWebDelegate.ts +++ b/src/web/tools/GestureHandlerWebDelegate.ts @@ -5,7 +5,6 @@ import { MeasureResult, } from './GestureHandlerDelegate'; import PointerEventManager from './PointerEventManager'; -import TouchEventManager from './TouchEventManager'; import { State } from '../../State'; import { isPointerInBounds } from '../utils'; import EventManager from './EventManager'; @@ -58,7 +57,6 @@ export class GestureHandlerWebDelegate this.setContextMenu(config.enabled); this.eventManagers.push(new PointerEventManager(this.view)); - this.eventManagers.push(new TouchEventManager(this.view)); this.eventManagers.push(new KeyboardEventManager(this.view)); this.eventManagers.forEach((manager) => diff --git a/src/web/tools/PointerEventManager.ts b/src/web/tools/PointerEventManager.ts index c9d59de800..1690cba91b 100644 --- a/src/web/tools/PointerEventManager.ts +++ b/src/web/tools/PointerEventManager.ts @@ -35,9 +35,6 @@ export default class PointerEventManager extends EventManager { } private pointerDownCallback = (event: PointerEvent) => { - if (event.pointerType === PointerTypes.Touch) { - return; - } if (!isPointerInBounds(this.view, { x: event.clientX, y: event.clientY })) { return; } @@ -61,10 +58,6 @@ export default class PointerEventManager extends EventManager { }; private pointerUpCallback = (event: PointerEvent) => { - if (event.pointerType === PointerTypes.Touch) { - return; - } - // When we call reset on gesture handlers, it also resets their event managers // In some handlers (like RotationGestureHandler) reset is called before all pointers leave view // This means, that activePointersCounter will be set to 0, while there are still remaining pointers on view @@ -92,10 +85,6 @@ export default class PointerEventManager extends EventManager { }; private pointerMoveCallback = (event: PointerEvent) => { - if (event.pointerType === PointerTypes.Touch) { - return; - } - // Stylus triggers `pointermove` event when it detects changes in pressure. Since it is very sensitive to those changes, // it constantly sends events, even though there was no change in position. To fix that we check whether // pointer has actually moved and if not, we do not send event. @@ -161,10 +150,6 @@ export default class PointerEventManager extends EventManager { }; private pointerCancelCallback = (event: PointerEvent) => { - if (event.pointerType === PointerTypes.Touch) { - return; - } - const adaptedEvent: AdaptedEvent = this.mapEvent(event, EventTypes.CANCEL); this.onPointerCancel(adaptedEvent); @@ -174,20 +159,12 @@ export default class PointerEventManager extends EventManager { }; private pointerEnterCallback = (event: PointerEvent) => { - if (event.pointerType === PointerTypes.Touch) { - return; - } - const adaptedEvent: AdaptedEvent = this.mapEvent(event, EventTypes.ENTER); this.onPointerMoveOver(adaptedEvent); }; private pointerLeaveCallback = (event: PointerEvent) => { - if (event.pointerType === PointerTypes.Touch) { - return; - } - const adaptedEvent: AdaptedEvent = this.mapEvent(event, EventTypes.LEAVE); this.onPointerMoveOut(adaptedEvent); diff --git a/src/web/tools/TouchEventManager.ts b/src/web/tools/TouchEventManager.ts deleted file mode 100644 index ff2f221e99..0000000000 --- a/src/web/tools/TouchEventManager.ts +++ /dev/null @@ -1,175 +0,0 @@ -import { AdaptedEvent, EventTypes, TouchEventType } from '../interfaces'; -import EventManager from './EventManager'; -import { calculateViewScale, isPointerInBounds } from '../utils'; -import { PointerType } from '../../PointerType'; - -export default class TouchEventManager extends EventManager { - private touchStartCallback = (event: TouchEvent): void => { - for (let i = 0; i < event.changedTouches.length; ++i) { - const adaptedEvent: AdaptedEvent = this.mapEvent( - event, - EventTypes.DOWN, - i, - TouchEventType.DOWN - ); - - // Here we skip stylus, because in case of anything different than touch we want to handle it by using PointerEvents - // If we leave stylus to send touch events, handlers will receive every action twice - if ( - !isPointerInBounds(this.view, { - x: adaptedEvent.x, - y: adaptedEvent.y, - }) || - // @ts-ignore touchType field does exist - event.changedTouches[i].touchType === 'stylus' - ) { - continue; - } - - this.markAsInBounds(adaptedEvent.pointerId); - - if (++this.activePointersCounter > 1) { - adaptedEvent.eventType = EventTypes.ADDITIONAL_POINTER_DOWN; - this.onPointerAdd(adaptedEvent); - } else { - this.onPointerDown(adaptedEvent); - } - } - }; - - private touchMoveCallback = (event: TouchEvent): void => { - for (let i = 0; i < event.changedTouches.length; ++i) { - const adaptedEvent: AdaptedEvent = this.mapEvent( - event, - EventTypes.MOVE, - i, - TouchEventType.MOVE - ); - // @ts-ignore touchType field does exist - if (event.changedTouches[i].touchType === 'stylus') { - continue; - } - - const inBounds: boolean = isPointerInBounds(this.view, { - x: adaptedEvent.x, - y: adaptedEvent.y, - }); - - const pointerIndex: number = this.pointersInBounds.indexOf( - adaptedEvent.pointerId - ); - - if (inBounds) { - if (pointerIndex < 0) { - adaptedEvent.eventType = EventTypes.ENTER; - this.onPointerEnter(adaptedEvent); - this.markAsInBounds(adaptedEvent.pointerId); - } else { - this.onPointerMove(adaptedEvent); - } - } else { - if (pointerIndex >= 0) { - adaptedEvent.eventType = EventTypes.LEAVE; - this.onPointerLeave(adaptedEvent); - this.markAsOutOfBounds(adaptedEvent.pointerId); - } else { - this.onPointerOutOfBounds(adaptedEvent); - } - } - } - }; - - private touchEndCallback = (event: TouchEvent): void => { - for (let i = 0; i < event.changedTouches.length; ++i) { - // When we call reset on gesture handlers, it also resets their event managers - // In some handlers (like RotationGestureHandler) reset is called before all pointers leave view - // This means, that activePointersCounter will be set to 0, while there are still remaining pointers on view - // Removing them will end in activePointersCounter going below 0, therefore handlers won't behave properly - if (this.activePointersCounter === 0) { - break; - } - - // @ts-ignore touchType field does exist - if (event.changedTouches[i].touchType === 'stylus') { - continue; - } - - const adaptedEvent: AdaptedEvent = this.mapEvent( - event, - EventTypes.UP, - i, - TouchEventType.UP - ); - - this.markAsOutOfBounds(adaptedEvent.pointerId); - - if (--this.activePointersCounter > 0) { - adaptedEvent.eventType = EventTypes.ADDITIONAL_POINTER_UP; - this.onPointerRemove(adaptedEvent); - } else { - this.onPointerUp(adaptedEvent); - } - } - }; - - private touchCancelCallback = (event: TouchEvent): void => { - for (let i = 0; i < event.changedTouches.length; ++i) { - const adaptedEvent: AdaptedEvent = this.mapEvent( - event, - EventTypes.CANCEL, - i, - TouchEventType.CANCELLED - ); - - // @ts-ignore touchType field does exist - if (event.changedTouches[i].touchType === 'stylus') { - continue; - } - - this.onPointerCancel(adaptedEvent); - this.markAsOutOfBounds(adaptedEvent.pointerId); - this.activePointersCounter = 0; - } - }; - - public registerListeners(): void { - this.view.addEventListener('touchstart', this.touchStartCallback); - this.view.addEventListener('touchmove', this.touchMoveCallback); - this.view.addEventListener('touchend', this.touchEndCallback); - this.view.addEventListener('touchcancel', this.touchCancelCallback); - } - - public unregisterListeners(): void { - this.view.removeEventListener('touchstart', this.touchStartCallback); - this.view.removeEventListener('touchmove', this.touchMoveCallback); - this.view.removeEventListener('touchend', this.touchEndCallback); - this.view.removeEventListener('touchcancel', this.touchCancelCallback); - } - - protected mapEvent( - event: TouchEvent, - eventType: EventTypes, - index: number, - touchEventType: TouchEventType - ): AdaptedEvent { - const rect = this.view.getBoundingClientRect(); - const clientX = event.changedTouches[index].clientX; - const clientY = event.changedTouches[index].clientY; - - const { scaleX, scaleY } = calculateViewScale(this.view); - - return { - x: clientX, - y: clientY, - offsetX: (clientX - rect.left) / scaleX, - offsetY: (clientY - rect.top) / scaleY, - pointerId: event.changedTouches[index].identifier, - eventType: eventType, - pointerType: PointerType.TOUCH, - time: event.timeStamp, - allTouches: event.touches, - changedTouches: event.changedTouches, - touchEventType: touchEventType, - }; - } -} From a3a4b9bb23dd511d204d1aad7701c999fbb62c7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:27:40 +0200 Subject: [PATCH 07/12] Bump serve-static from 1.15.0 to 1.16.2 in /example (#3103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [serve-static](https://github.com/expressjs/serve-static) from 1.15.0 to 1.16.2.
Release notes

Sourced from serve-static's releases.

1.16.0

What's Changed

New Contributors

Full Changelog: https://github.com/expressjs/serve-static/compare/v1.15.0...1.16.0

Changelog

Sourced from serve-static's changelog.

1.16.2 / 2024-09-11

  • deps: encodeurl@~2.0.0

1.16.1 / 2024-09-11

  • deps: send@0.19.0

1.16.0 / 2024-09-10

  • Remove link renderization in html while redirecting
Commits
Maintainer changes

This version was pushed to npm by wesleytodd, a new releaser for serve-static since your current version.


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serve-static&package-manager=npm_and_yarn&previous-version=1.15.0&new-version=1.16.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/software-mansion/react-native-gesture-handler/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- example/yarn.lock | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/example/yarn.lock b/example/yarn.lock index 5ffa53ca36..43fb11b110 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -3565,6 +3565,11 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -7509,7 +7514,26 @@ semver@^7.2.1, semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.3, semve resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== -send@0.18.0, send@^0.18.0: +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +send@^0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== @@ -7534,14 +7558,14 @@ serialize-error@^2.1.0: integrity sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw== serve-static@^1.13.1: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== dependencies: - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.18.0" + send "0.19.0" set-blocking@^2.0.0: version "2.0.0" From ce786f0b8b1e11f6f7dfff670b55428de7d2d9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= <40713406+tjzel@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:29:35 +0200 Subject: [PATCH 08/12] chore: Remove unused env variable (#3091) Seems to be unused ![image](https://github.com/user-attachments/assets/2b32f19c-8a3c-469b-9e17-d735cd36288d) --- android/build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 2b8aeeaffc..51b75b0aa3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -118,8 +118,7 @@ android { externalNativeBuild { cmake { cppFlags "-O2", "-frtti", "-fexceptions", "-Wall", "-Werror", "-std=c++20", "-DANDROID" - arguments "-DAPP_BUILD_DIR=${appProject.buildDir}", - "-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}", + arguments "-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}", "-DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION}", "-DANDROID_STL=c++_shared" abiFilters (*reactNativeArchitectures()) From 60a39018bb64a0d0a5880261576fb4776b1a94c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:34:16 +0200 Subject: [PATCH 09/12] Bump express from 4.19.2 to 4.21.0 in /e2e/web-tests (#3102) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.21.0.
Release notes

Sourced from express's releases.

4.21.0

What's Changed

New Contributors

Full Changelog: https://github.com/expressjs/express/compare/4.20.0...4.21.0

4.20.0

What's Changed

Important

  • IMPORTANT: The default depth level for parsing URL-encoded data is now 32 (previously was Infinity)
  • Remove link renderization in html while using res.redirect

Other Changes

... (truncated)

Changelog

Sourced from express's changelog.

4.21.0 / 2024-09-11

  • Deprecate res.location("back") and res.redirect("back") magic string
  • deps: serve-static@1.16.2
    • includes send@0.19.0
  • deps: finalhandler@1.3.1
  • deps: qs@6.13.0

4.20.0 / 2024-09-10

  • deps: serve-static@0.16.0
    • Remove link renderization in html while redirecting
  • deps: send@0.19.0
    • Remove link renderization in html while redirecting
  • deps: body-parser@0.6.0
    • add depth option to customize the depth level in the parser
    • IMPORTANT: The default depth level for parsing URL-encoded data is now 32 (previously was Infinity)
  • Remove link renderization in html while using res.redirect
  • deps: path-to-regexp@0.1.10
    • Adds support for named matching groups in the routes using a regex
    • Adds backtracking protection to parameters without regexes defined
  • deps: encodeurl@~2.0.0
    • Removes encoding of \, |, and ^ to align better with URL spec
  • Deprecate passing options.maxAge and options.expires to res.clearCookie
    • Will be ignored in v5, clearCookie will set a cookie with an expires in the past to instruct clients to delete the cookie
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=express&package-manager=npm_and_yarn&previous-version=4.19.2&new-version=4.21.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/software-mansion/react-native-gesture-handler/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- e2e/web-tests/yarn.lock | 214 +++++++++++++++++++++++++++++----------- 1 file changed, 156 insertions(+), 58 deletions(-) diff --git a/e2e/web-tests/yarn.lock b/e2e/web-tests/yarn.lock index 917f45b643..d5824e79f5 100644 --- a/e2e/web-tests/yarn.lock +++ b/e2e/web-tests/yarn.lock @@ -3010,10 +3010,10 @@ bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" -body-parser@1.20.2: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== +body-parser@1.20.3: + version "1.20.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== dependencies: bytes "3.1.2" content-type "~1.0.5" @@ -3023,7 +3023,7 @@ body-parser@1.20.2: http-errors "2.0.0" iconv-lite "0.4.24" on-finished "2.4.1" - qs "6.11.0" + qs "6.13.0" raw-body "2.5.2" type-is "~1.6.18" unpipe "1.0.0" @@ -3184,13 +3184,16 @@ cacache@^18.0.2: tar "^6.1.11" unique-filename "^3.0.0" -call-bind@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" caller-callsite@^2.0.0: version "2.0.0" @@ -3837,6 +3840,15 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" @@ -4020,6 +4032,11 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -4077,6 +4094,18 @@ errorhandler@^1.5.1: accepts "~1.3.7" escape-html "~1.0.3" +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-module-lexer@^1.2.1: version "1.3.1" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.1.tgz#c1b0dd5ada807a3b3155315911f364dc4e909db1" @@ -4291,36 +4320,36 @@ exponential-backoff@^3.1.1: integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== express@^4.17.3: - version "4.19.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" - integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== + version "4.21.0" + resolved "https://registry.yarnpkg.com/express/-/express-4.21.0.tgz#d57cb706d49623d4ac27833f1cbc466b668eb915" + integrity sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng== dependencies: accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.20.2" + body-parser "1.20.3" content-disposition "0.5.4" content-type "~1.0.4" cookie "0.6.0" cookie-signature "1.0.6" debug "2.6.9" depd "2.0.0" - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "1.2.0" + finalhandler "1.3.1" fresh "0.5.2" http-errors "2.0.0" - merge-descriptors "1.0.1" + merge-descriptors "1.0.3" methods "~1.1.2" on-finished "2.4.1" parseurl "~1.3.3" - path-to-regexp "0.1.7" + path-to-regexp "0.1.10" proxy-addr "~2.0.7" - qs "6.11.0" + qs "6.13.0" range-parser "~1.2.1" safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" + send "0.19.0" + serve-static "1.16.2" setprototypeof "1.2.0" statuses "2.0.1" type-is "~1.6.18" @@ -4457,13 +4486,13 @@ finalhandler@1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== dependencies: debug "2.6.9" - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" on-finished "2.4.1" parseurl "~1.3.3" @@ -4647,6 +4676,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" @@ -4657,15 +4691,16 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== dependencies: - function-bind "^1.1.1" - has "^1.0.3" + es-errors "^1.3.0" + function-bind "^1.1.2" has-proto "^1.0.1" has-symbols "^1.0.3" + hasown "^2.0.0" get-port@^3.2.0: version "3.2.0" @@ -4795,6 +4830,13 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -4832,6 +4874,13 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" @@ -4849,6 +4898,13 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.0, he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -5832,10 +5888,10 @@ memory-cache@~0.2.0: resolved "https://registry.yarnpkg.com/memory-cache/-/memory-cache-0.2.0.tgz#7890b01d52c00c8ebc9d533e1f8eb17e3034871a" integrity sha512-OcjA+jzjOYzKmKS6IQVALHLVz+rNTMPoJvCztFaZxwG14wtAW7VRZjwTQu06vKCYOxh4jVnik7ya0SXTB0W+xA== -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== merge-stream@^2.0.0: version "2.0.0" @@ -6386,10 +6442,10 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.13.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" @@ -6662,10 +6718,10 @@ path-scurry@^1.11.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== path-type@^4.0.0: version "4.0.0" @@ -7136,12 +7192,12 @@ qrcode-terminal@0.11.0: resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.11.0.tgz#ffc6c28a2fc0bfb47052b47e23f4f446a5fbdb9e" integrity sha512-Uu7ii+FQy4Qf82G4xu7ShHhjhGahEpCWc3x8UavY3CTcWV+ufmmCtwkr7ZKsX42jdL0kr1B5FKUeqJvAn51jzQ== -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== +qs@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== dependencies: - side-channel "^1.0.4" + side-channel "^1.0.6" querystring@^0.2.1: version "0.2.1" @@ -7712,6 +7768,25 @@ send@0.18.0, send@^0.18.0: range-parser "~1.2.1" statuses "2.0.1" +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + serialize-error@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz" @@ -7737,7 +7812,17 @@ serve-index@^1.9.1: mime-types "~2.1.17" parseurl "~1.3.2" -serve-static@1.15.0, serve-static@^1.13.1: +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== + dependencies: + encodeurl "~2.0.0" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.19.0" + +serve-static@^1.13.1: version "1.15.0" resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== @@ -7752,6 +7837,18 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" @@ -7803,14 +7900,15 @@ shell-quote@^1.6.1, shell-quote@^1.7.3: resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.4.tgz" integrity sha512-8o/QEhSSRb1a5i7TFR0iM4G16Z0vYB2OQVs4G3aAFXjn3T6yEx8AZxy1PgDF7I00LZHYA3WxaSYIf5e5sAX8Rw== -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" From 195221ea771006c779b69fc24de6856637f4a955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= <74975508+kacperzolkiewski@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:41:53 +0200 Subject: [PATCH 10/12] [Android] Fix border styles for touchable components with transparent background color (#3096) ## Description This PR addresses an issue where border styles are not visible on touchable components when the `backgroundColor` is set to transparent in Android. Fixes #3088 ## Test plan Tested on the example app and on the code from the issue. --- .../RNGestureHandlerButtonViewManager.kt | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt index e47f115bfb..97dc50efe8 100644 --- a/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +++ b/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt @@ -286,22 +286,11 @@ class RNGestureHandlerButtonViewManager : ViewGroupManager(), R return false } - private fun updateBackgroundColor(backgroundColor: Int, selectable: Drawable?) { + private fun updateBackgroundColor(backgroundColor: Int, borderDrawable: Drawable, selectable: Drawable?) { val colorDrawable = PaintDrawable(backgroundColor) - val borderDrawable = PaintDrawable(Color.TRANSPARENT) if (hasBorderRadii) { colorDrawable.setCornerRadii(buildBorderRadii()) - borderDrawable.setCornerRadii(buildBorderRadii()) - } - - if (borderWidth > 0f) { - borderDrawable.paint.apply { - style = Paint.Style.STROKE - strokeWidth = borderWidth - color = borderColor ?: Color.BLACK - pathEffect = buildBorderStyle() - } } val layerDrawable = LayerDrawable(if (selectable != null) arrayOf(colorDrawable, selectable, borderDrawable) else arrayOf(colorDrawable, borderDrawable)) @@ -324,6 +313,7 @@ class RNGestureHandlerButtonViewManager : ViewGroupManager(), R } val selectable = createSelectableDrawable() + val borderDrawable = createBorderDrawable() if (hasBorderRadii && selectable is RippleDrawable) { val mask = PaintDrawable(Color.WHITE) @@ -334,13 +324,32 @@ class RNGestureHandlerButtonViewManager : ViewGroupManager(), R if (useDrawableOnForeground && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { foreground = selectable if (_backgroundColor != Color.TRANSPARENT) { - updateBackgroundColor(_backgroundColor, null) + updateBackgroundColor(_backgroundColor, borderDrawable, null) } } else if (_backgroundColor == Color.TRANSPARENT && rippleColor == null) { - background = selectable + background = LayerDrawable(arrayOf(selectable, borderDrawable)) } else { - updateBackgroundColor(_backgroundColor, selectable) + updateBackgroundColor(_backgroundColor, borderDrawable, selectable) + } + } + + private fun createBorderDrawable(): Drawable { + val borderDrawable = PaintDrawable(Color.TRANSPARENT) + + if (hasBorderRadii) { + borderDrawable.setCornerRadii(buildBorderRadii()) + } + + if (borderWidth > 0f) { + borderDrawable.paint.apply { + style = Paint.Style.STROKE + strokeWidth = borderWidth + color = borderColor ?: Color.BLACK + pathEffect = buildBorderStyle() + } } + + return borderDrawable } private fun createSelectableDrawable(): Drawable? { From 6bacf33493272675af82cfd946583a7c81615447 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Tue, 17 Sep 2024 12:21:48 +0200 Subject: [PATCH 11/12] Fix button padding not being applied correctly on the new arch (#3106) ## Description Fixes https://github.com/software-mansion/react-native-gesture-handler/issues/3100 Updates the logic for applying the layout metrics, which needs to be customized due to nested structure of the button on the new architecture - instead of being just a button view, it's a button view inside a custom `ViewComponentView`. Previously all metrics were applied to the wrapper view (including padding and border insets) which caused the button to be offset in the wrapper and it's content was offset again (due to children being mounted under the button instead of the wrapper and their layout metrics containing frame position). This PR changes that so that insets are not applied to the wrapper view at all and the button always fills the container. This way the layout of the children remains correct. ## Test plan Tested on the FabricExample app and on the reproducer from the issue. --- apple/RNGestureHandlerButtonComponentView.mm | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/apple/RNGestureHandlerButtonComponentView.mm b/apple/RNGestureHandlerButtonComponentView.mm index ad9ff3e066..b593c8be52 100644 --- a/apple/RNGestureHandlerButtonComponentView.mm +++ b/apple/RNGestureHandlerButtonComponentView.mm @@ -50,6 +50,41 @@ - (void)unmountChildComponentView:(UIView *)childCompo [_buttonView unmountChildComponentView:childComponentView index:index]; } +- (LayoutMetrics)buildWrapperMetrics:(const LayoutMetrics &)metrics +{ + LayoutMetrics result = metrics; + result.borderWidth = EdgeInsets::ZERO; + result.contentInsets = EdgeInsets::ZERO; + return result; +} + +- (LayoutMetrics)buildButtonMetrics:(const LayoutMetrics &)metrics +{ + LayoutMetrics result = metrics; + result.frame.origin = {0, 0}; + return result; +} + +- (void)updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetrics + oldLayoutMetrics:(const facebook::react::LayoutMetrics &)oldLayoutMetrics +{ + // due to nested structure of Button and ComponentView, layout metrics for both + // need to be modified: + // - wrapper shouldn't have any insets as they should be applied to the button + // so that it can intercept touches on padding and borders, applying them + // twice breaks expected layout + // - frame origin needs to be zeroes on metrics of the button as it should fill + // the entirety of the wrapper component + const LayoutMetrics wrapperMetrics = [self buildWrapperMetrics:layoutMetrics]; + const LayoutMetrics oldWrapperMetrics = [self buildWrapperMetrics:oldLayoutMetrics]; + + const LayoutMetrics buttonMetrics = [self buildButtonMetrics:layoutMetrics]; + const LayoutMetrics oldbuttonMetrics = [self buildButtonMetrics:oldLayoutMetrics]; + + [super updateLayoutMetrics:wrapperMetrics oldLayoutMetrics:oldWrapperMetrics]; + [_buttonView updateLayoutMetrics:buttonMetrics oldLayoutMetrics:oldbuttonMetrics]; +} + #pragma mark - RCTComponentViewProtocol + (ComponentDescriptorProvider)componentDescriptorProvider From 56008d234ba3e05e899a4b053e84eb746f9c39a4 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Tue, 17 Sep 2024 12:22:08 +0200 Subject: [PATCH 12/12] Add chevron to the example app and center labels (#3108) ## Description I noticed the button labels were off-center, so I fixed them and added a chevron at the same time as it was looking kind of empty. Screenshot 2024-09-17 at 11 27 33 --- example/App.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/example/App.tsx b/example/App.tsx index 725fec0961..45b57ad5f6 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -14,6 +14,7 @@ import { StackScreenProps, } from '@react-navigation/stack'; import { NavigationContainer, ParamListBase } from '@react-navigation/native'; +import Entypo from '@expo/vector-icons/Entypo'; import { GestureHandlerRootView, RectButton, @@ -323,6 +324,7 @@ function MainScreenItem({ name, onPressItem }: MainScreenItemProps) { return ( onPressItem(name)}> {name} + ); } @@ -354,7 +356,10 @@ const styles = StyleSheet.create({ flex: 1, height: 50, padding: 10, + flexDirection: 'row', backgroundColor: '#fff', + alignItems: 'center', + justifyContent: 'space-between', }, buttonContent: { flex: 1,