Skip to content
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

refactor!: migrate to typescript #155

Merged
merged 35 commits into from Dec 29, 2021

Conversation

rnike
Copy link
Collaborator

@rnike rnike commented Dec 16, 2021

continue #95

Resolve todos and fix some issues, also changed the compiler to tsc because this is how I usually do, @react-native-community/bob was removed.

This is a huge change, before public release, I think we should have a beta version first

package.json Outdated Show resolved Hide resolved
@rnike
Copy link
Collaborator Author

rnike commented Dec 22, 2021

It will be wonderful if there's a beta version on npm to test it properly, currently I am just pushing it to my repo and yarn add from there.

None is it necessary, just consider it as a nice to have

src/FBAccessToken.ts Outdated Show resolved Hide resolved
src/FBAppEventsLogger.ts Outdated Show resolved Hide resolved
src/FBGraphRequest.ts Outdated Show resolved Hide resolved
src/FBProfile.ts Show resolved Hide resolved
Copy link
Collaborator Author

@rnike rnike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self reviewed all files, issues found are all solved

@mikehardy
Copy link
Collaborator

It will be wonderful if there's a beta version on npm to test it properly, currently I am just pushing it to my repo and yarn add from there.

None is it necessary, just consider it as a nice to have

A strict requirement of the migration for me is that it is buildable from source, from the installed version or from a version that is in git (so people may use a repo or branch or commit ref) then they should be able to change into the node_modules/react-native-fbsdk-next directory and run yarn (or yarn && yarn build or whatever) and it works. If that's okay then it's okay to alpha test at least, you can put out a call for testers on the roadmap issue perhaps? I can test it as well. I'm still behind deadline on one project and now it's the holidays so I haven't had time personally but this is critical for the repository's future I think, so it will get reviewed and merged soon I hope :-), thanks for your patience

@rnike
Copy link
Collaborator Author

rnike commented Dec 23, 2021

I've created a pre-release named v7.0.0-alpha.1 including the recent feature I've made in my repo rnike/react-native-fbsdk#v7.0.0-alpha.1, but what I really want to do is to publish v7.0.0-alpha.1 to npm for a proper testing, @mikehardy any idea how can I achieve that?

@mikehardy
Copy link
Collaborator

I can try after I review it. The holidays mean I'm quite short on time though, apologies

@rnike
Copy link
Collaborator Author

rnike commented Dec 23, 2021

@mikehardy That's ok, this is no hurry. Thank you for still replying during your holidays.

@mikehardy
Copy link
Collaborator

status for me:

  1. I've pulled the branch and run the example app successfully, as a basic criteria for merge - everything is 💯
  2. I want to review the actual changes but may just not have time - so the strategy I will actually use is exactly as @rnike suggests - I'll see about getting a beta version out, then people may test integrate it. We can put a time box around how long we wait prior to full release perhaps? Maybe at the end of the first week of January? In the end people do not have to upgrade and we'll mark it as a major version just in case so it should be okay either way

@mikehardy mikehardy changed the title refactor: Migrate to typescript refactor!: migrate to typescript Dec 29, 2021
@mikehardy mikehardy changed the base branch from master to beta December 29, 2021 12:33
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this into a new beta branch, and semantic-release should auto-magically publish that in to a beta tag on npmjs.com

@mikehardy mikehardy merged commit fcd1a61 into thebergamo:beta Dec 29, 2021
@github-actions
Copy link

🎉 This PR is included in version 6.2.1-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mikehardy
Copy link
Collaborator

I'm having a really frustrating time getting the version and tag lined up the way I like.
I have so far been unable to trigger a forced breaking change, and I think I know why but I am out of time for now on holidays to fix it.

The release is officially out there on the beta tag on npmjs.com so anyone may install it. It is still in the v6 series though, which is unwanted. It is released from the beta branch here until merged back to master. beta branch is strictly ahead of master at the moment so that part is easy to manage.

Future steps:

  • add configuration to semantic release on beta branch so it understands the ! syntax in commit messages for breaking changes (I did this in some other repo, I think react-native-google-ads so can copy from there)
  • make another ! commit on beta branch and trigger release action on beta branch so beta tag on npmjs.com lines up with a v7 beta release
  • test integrate beta package with various work projects and my react-native-authentication-example-template to make sure it's good
  • let it sit until january then merge to master and release there ?

@mikehardy
Copy link
Collaborator

This is now successfully out as v7.0.0-beta.1 on npmjs.com and on the beta branch, got it all working.
Now it can incubate - and this is a call for testers, any interested parties should test this in their projects and report problems before end of first week of January!

@rnike
Copy link
Collaborator Author

rnike commented Dec 29, 2021

Thanks

@rnike rnike deleted the migrate-to-typescript branch December 29, 2021 16:29
mikehardy pushed a commit that referenced this pull request Jan 21, 2022
* Remove old type definitions
* Migrate source to typescript
* Remove use strict
* Replace 'import type' with 'import'
* Export all types
* Unify array type syntax
* Change react-native value in package.json
* Add index todo
* fix prettier config
* prettier all files
* add .vscode to .gitignore
* batchCallback default value
* refactor: simplify index.ts
* remove types from package.json
* remove "react-native": "src/index.ts" in package.json
* remove unnecessary type declaration
Co-authored-by: tet.bot <tet.bot@theelephant.tech>
Co-authored-by: Georges DIMITRY <georges.dimitry@atlasone.io>
github-actions bot pushed a commit that referenced this pull request Jan 21, 2022
## [7.0.0](v6.2.0...v7.0.0) (2022-01-21)

### ⚠ BREAKING CHANGES

* **release:** use conventional commits style for commit parsing
* update dependencies
* migrate to typescript (#155)

### Features

* add clearUserID to AppEventsLogger (`setUserId(null)` throws exception from SDK) ([#185](#185)) ([03306a6](03306a6))
* export all module types ([#173](#173)) ([bd7f968](bd7f968))
* **ios:** AEM logger ([#165](#165)) ([be1e861](be1e861))

### Bug Fixes

* **android, build:** delete jcenter from rootProject - should not affect consuming apps ([#184](#184)) ([a76c285](a76c285))
* **android, deprecation:** Replace deprecated GameRequestDialog ([#172](#172)) ([a0c20d2](a0c20d2))
* **android:** remove dead code ([#176](#176)) ([a24bdb4](a24bdb4))
* **iOS:** update deprecated methods ([81fc259](81fc259))
* **release:** use conventional commits style for commit parsing ([c311031](c311031)), closes [#164](#164)
* update dependencies ([ddc968f](ddc968f))

### Code Refactoring

* migrate to typescript ([#155](#155)) ([d55e203](d55e203))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested released on @beta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants