hieuvp / react-native-fingerprint-scanner

Provide Fingerprint, Touch ID, and Face ID Scanner for React Native (Compatible with both Android and iOS)
https://www.npmjs.com/package/react-native-fingerprint-scanner
870 stars 298 forks source link

React Native 0.69.0: warn Package react-native-fingerprint-scanner has been ignored because it contains invalid configuration. Reason: "dependency.assets" is not allowed #217

Open anija opened 1 year ago

anija commented 1 year ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-fingerprint-scanner@6.0.0 for the project I'm working on.

When I upgraded React Native to latest version (0.69.0), i started to see this warning: warn Package react-native-fingerprint-scanner has been ignored because it contains invalid configuration. Reason: "dependency.assets" is not allowed

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-fingerprint-scanner/react-native.config.js b/node_modules/react-native-fingerprint-scanner/react-native.config.js
index 5f794ab..c36ba55 100644
--- a/node_modules/react-native-fingerprint-scanner/react-native.config.js
+++ b/node_modules/react-native-fingerprint-scanner/react-native.config.js
@@ -4,8 +4,5 @@ module.exports = {
       ios: {},
       android: {},
     },
-    assets: [],
-    // hooks are considered anti-pattern, please avoid them
-    hooks: {},
   },
 };

This issue body was partially generated by patch-package.

mikehardy commented 1 year ago

Oh this one is really important as it the CLI fails the module configuration completely until they release a new version @anija do you think you could post a full PR for this instead of just the patch?

anija commented 1 year ago

Oh this one is really important as it the CLI fails the module configuration completely until they release a new version @anija do you think you could post a full PR for this instead of just the patch?

I can't do enough test at this moment to feel comfortable in posting a PR :(

mikehardy commented 1 year ago

That's okay in general I think - you post PR, and CI runs test, or then I have the ability to use github command line tool to easily pull the PR and run tests. No PR? No ability to use tools to do testing etc and integrating a patch for testing is manual process

mikehardy commented 1 year ago

Flagging a PR like that (like "Hey, I'm posting this but have not had time to test, sorry, hopefully it works or is easier for others to test/verify this way"). It's a human process :-)