flutterfire
flutterfire copied to clipboard
feat(web): update to `web: ^1.0.0`
Description
If you want to use this PR early, you can use latest version of FlutterFire CLI
dart pub global activate flutterfire_cli 1.0.1-dev.4 --overwrite
flutterfire install git:feat/update-web100
Related Issues
closes #13190
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.
- [ ] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
- [ ] All existing and new tests are passing.
- [ ] I updated/added relevant documentation (doc comments with
///). - [ ] The analyzer (
melos run analyze) does not report any problems on my PR. - [ ] I read and followed the Flutter Style Guide.
- [ ] I signed the CLA.
- [ ] I am willing to follow-up on review comments in a timely manner.
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
- [ ] Yes, this is a breaking change.
- [ ] No, this is not a breaking change.
Hello @Lyokone, thank you for creating this PR! I tested it out and encountered an issue with phone number authentication:
Type '_TypeError' is not a subtype of type 'JSValue' in type cast.
After some investigation, I found that changing line 103 of packages/firebase_auth/firebase_auth_web/lib/src/firebase_auth_web_recaptcha_verifier_factory.dart to this resolved the issue for me:
_delegate = auth_interop.RecaptchaVerifier(
- element,
+ element.toJS,
parameters,
auth.delegate,
);
Would you be open to including this fix in your PR? This would help me depend on it directly.
@mj-shifu thanks so much for noticing 👍 We have some dynamic left here and there from the first implementation 😓 I've pushed the fix
latest version should be used
How long does it take for this update to be released and available on pub.dev?
I would love this to be merged as well. This dependency is blocking quite some of my other dependencies
@russellwheatley @Salakar this PR unblocks a train of dependency updates that grows longer by the day....
@russellwheatley @Salakar please review this PR asap. A lot of depedencies are being blocked by this. Thank you.
@Lyokone This
dart pub global activate flutterfire_cli 1.0.1-dev.4 --overwrite
flutterfire install git:feat/update-web100
Did not work for me... The latter command failed.
Also, side question: I am actually not using flutter on web, so I was wondering if there was a way to prevent this dependency to be used altogether from my project pubspec.yaml. It infuriating that a dependency I do not use prevents me to update other things.
Or maybe I should just override the web dependency!? 🤔🎉
@millerf Unfortunately, the web package was in beta, but it is now stable 1.0.0, it will have less frequent updates or breaking changes
Hello, this PR has attracted a lot of attention. We are not ready to force users to upgrade to Dart 3.4 (which is required for us to add support for web: ^1.0.0.
We are expecting to make Dart 3.4 required in the coming weeks. You still can depend on this PR or override the web version if needed.
@Lyokone getting some typeerrors in web_utils convertPlatformActionCodeSettings method: https://github.com/firebase/flutterfire/blob/9c3181dde8e2e999e39eba0bc8cc49d535654966/packages/firebase_auth/firebase_auth_web/lib/src/utils/web_utils.dart#L240
The AndroidSettings and IOSSettings fields are not being converted to JS. This works:
if (actionCodeSettingsMap['android'] != null) {
webActionCodeSettings.android = auth_interop.AndroidSettings(
packageName: (actionCodeSettingsMap['android']['packageName'] as String?)?.toJS,
minimumVersion: (actionCodeSettingsMap['android']['minimumVersion'] as String?)?.toJS,
installApp: (actionCodeSettingsMap['android']['installApp'] as bool?)?.toJS,
);
}
if (actionCodeSettingsMap['iOS'] != null) {
webActionCodeSettings.iOS = auth_interop.IosSettings(
bundleId: (actionCodeSettingsMap['iOS']['bundleId'] as String?)?.toJS,
);
}
PR here: https://github.com/firebase/flutterfire/pull/13260
@Lyokone pls release an update with this PR asap. A lot of packages are stuck only because of this
Hello, this PR has attracted a lot of attention. We are not ready to force users to upgrade to Dart 3.4 (which is required for us to add support for
web: ^1.0.0. We are expecting to make Dart 3.4 required in the coming weeks. You still can depend on this PR or override thewebversion if needed.
The existing package is not compatible with web^1.0.0 so it won't overwrite as well
Nice! Thanks for working on it everyone! Will it be deployed on pub.dev soon?
It is now deployed.