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
feat(typescript): migrate project to typescript #1001
feat(typescript): migrate project to typescript #1001
Conversation
@@ -104,12 +104,12 @@ - (NSDictionary *)constantsToExport | |||
{ | |||
return @{ | |||
@"FACEBOOK": @"facebook", | |||
@"FACEBOOK_STORIES": @"facebookstories", | |||
@"FACEBOOKSTORIES": @"facebookstories", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To standardize naming between iOS and Android.
In android we've got facebookstories
(which is later uppercased to FACEBOOKSTORIES
).
Original implementation -> NativeModules.RNShare.FACEBOOK_STORIES
was returning undefined on Android (because the key name there is FACEBOOKSTORIES
).
@@ -1,5 +0,0 @@ | |||
module.exports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if deleting prettier.config.js is a good idea. Because in future changes the code will be indented with the configuration of each code editor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configuration was moved to .eslintrc.js
file.
I've got a prettier plugin in my editor and it was recognizing the config correctly. After this change yarn lint
will let you know if something is wrong even if you don't have a plugin. Also CI (yarn validate
) will be double-checking that everything is ok.
What about keeping the flow types @DanielMarkiel? How do you think we would be able to achieve this or do you think it's worth it to keep these types? |
@MateusAndrade I agree with the @mikehardy 's opinion presented here -> #805 (comment). |
@EstebanFuentealba Great suggestion! :) Done |
Nice!!! Do you guys think we should bump this as a major version? |
Yep, in my opinion it should be a major version bump |
Do you think we can go on with this @EstebanFuentealba? |
} | ||
|
||
export interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions { | ||
social: Social.FacebookStories; | ||
method: FacebookStories; | ||
method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@DanielMarkiel did you test this with the example app? |
@MateusAndrade Yes, I did. Android looked fine but I couldn't test the iOS version properly since I don't have an iPhone. |
Tested here with iOS and it's working! 🚀 I'm going to merge this and publish a major version. Thanks a lot, @EstebanFuentealba, @DanielMarkiel!! |
# [6.0.0](v5.3.0...v6.0.0) (2021-04-19) ### Features * migrate project to typescript ([#1001](#1001)) ([c2085d3](c2085d3)) ### BREAKING CHANGES * migrate the project to typescript * feat(typescript): migrate project to typescript * feat(typescript): extend react native NativeModules interface with RNShare types * feat(typescript): remove unnecessary 'exclude' clause in tsconfig * feat(typescript): fix ts error when using RNShare.Facebook/InstagramStories Co-authored-by: Mateus Andrade <15278828+MateusAndrade@users.noreply.github.com>
🎉 This PR is included in version 6.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [6.0.0](react-native-share/react-native-share@v5.3.0...v6.0.0) (2021-04-19) ### Features * migrate project to typescript ([#1001](react-native-share/react-native-share#1001)) ([c2085d3](react-native-share/react-native-share@c2085d3)) ### BREAKING CHANGES * migrate the project to typescript * feat(typescript): migrate project to typescript * feat(typescript): extend react native NativeModules interface with RNShare types * feat(typescript): remove unnecessary 'exclude' clause in tsconfig * feat(typescript): fix ts error when using RNShare.Facebook/InstagramStories Co-authored-by: Mateus Andrade <15278828+MateusAndrade@users.noreply.github.com>
Overview
Introduces typescript to project
See #805 and #818
@tcodes0 Thanks for your input!
Test Plan
Run
yarn validate
TODO