ds300/patch-package

Patch file parse error react-native+0.72.17.patch

Closed this issue · 3 comments

Issue
get ViewPropTypes(): $FlowFixMe {
console.error(
'ViewPropTypes will be removed from React Native, along with all ' +
'other PropTypes. We recommend that you migrate away from PropTypes ' +
'and switch to a type system like TypeScript. If you need to ' +
'continue using ViewPropTypes, migrate to the ' +
"'deprecated-react-native-prop-types' package.",
);
return require('deprecated-react-native-prop-types').ViewPropTypes;
},

file name: react-native+0.72.17.patch

Solution:

diff --git a/node_modules/react-native/ReactCommon/React-bridging.podspec b/node_modules/react-native/ReactCommon/React-bridging.podspec
index 5255c13..52a8eb0 100644
--- a/node_modules/react-native/ReactCommon/React-bridging.podspec
+++ b/node_modules/react-native/ReactCommon/React-bridging.podspec
@@ -30,7 +30,7 @@ Pod::Spec.new do |s|
s.source = source
s.source_files = "react/bridging/**/*.{cpp,h}"
s.exclude_files = "react/bridging/tests"

  • s.header_dir = "react/bridging"
  • s.header_dir = "."
    s.header_mappings_dir = "."
    s.compiler_flags = folly_compiler_flags
    s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => ""$(PODS_ROOT)/RCT-Folly"",
    diff --git a/node_modules/react-native/index.js b/node_modules/react-native/index.js
    index d59ba34..349b4dd 100644
    --- a/node_modules/react-native/index.js
    +++ b/node_modules/react-native/index.js
    @@ -435,32 +435,16 @@ module.exports = {
    },
    // Deprecated Prop Types
    get ColorPropType(): $FlowFixMe {
  • console.error(
  •  'ColorPropType will be removed from React Native, along with all ' +
    
  •    'other PropTypes. We recommend that you migrate away from PropTypes ' +
    
  •    'and switch to a type system like TypeScript. If you need to ' +
    
  •    'continue using ColorPropType, migrate to the ' +
    
  •    "'deprecated-react-native-prop-types' package.",
    
  • );
  • return require('deprecated-react-native-prop-types').ColorPropType
    },
    get EdgeInsetsPropType(): $FlowFixMe {
  • console.error(
  •  'EdgeInsetsPropType will be removed from React Native, along with all ' +
    
  •    'other PropTypes. We recommend that you migrate away from PropTypes ' +
    
  •    'and switch to a type system like TypeScript. If you need to ' +
    
  •    'continue using EdgeInsetsPropType, migrate to the ' +
    
  •    "'deprecated-react-native-prop-types' package.",
    
  • );
  • return require('deprecated-react-native-prop-types').EdgeInsetsPropType
    },
    get PointPropType(): $FlowFixMe {
  • console.error(
  •  'PointPropType will be removed from React Native, along with all ' +
    
  •    'other PropTypes. We recommend that you migrate away from PropTypes ' +
    
  •    'and switch to a type system like TypeScript. If you need to ' +
    
  •    'continue using PointPropType, migrate to the ' +
    
  •    "'deprecated-react-native-prop-types' package.",
    
  • );
  • return require('deprecated-react-native-prop-types').PointPropType
    },
    get ViewPropTypes(): $FlowFixMe {
  • console.error(
  •  'ViewPropTypes will be removed from React Native, along with all ' +
    
  •    'other PropTypes. We recommend that you migrate away from PropTypes ' +
    
  •    'and switch to a type system like TypeScript. If you need to ' +
    
  •    'continue using ViewPropTypes, migrate to the ' +
    
  •    "'deprecated-react-native-prop-types' package.",
    
  • );
  • return require('deprecated-react-native-prop-types').ViewPropTypes
    },
    };

Pls provide me patch file for this solution I already setup modification

Providing developers with specific patches is out of the scope of patch-package. patch-package provides you with the means to create and apply a patch to your dependencies. You can see the documentation on how to achieve this.

I apply a patch locally, Thanks for the support