Skip to content

Conversation

@adamchel
Copy link
Contributor

This is ready to review, and almost ready to publish, I just need to update the READMEs.

Main things to note:

  • The most relevant files to review in mongodb-stitch-react-native-core are RNAsyncStorage.ts and Stitch.ts (since we now have async client initialization),
  • React Native doesn't play nicely with hoisted lerna dependencies since its packager doesn't follow symlinks, and its Jest configuration assumes that react-native and several other packages are in a particular project's node_modules so I've added some packages to nohoist in lerna.json. This only affects the react native projects.
  • None of our user-facing package will list react-native as a dependency, it is only a peer dependency of mongodb-stitch-react-native-core. React Native's packager doesn't work when the RN package exists in multiple places in a node_modules directory. For the purposes of tests, some packages list react-native as a devDependency.
  • Jest now requires us to explicitly specify "testURL": "http://localhost/" if we want to use localStorage in tests.
  • Some of the other funky stuff we're doing in the RN tests are specified here: https://github.com/kulshekhar/ts-jest#react-native
  • We couldn't include an example project inside the lerna monorepo because of Follow symlinks? facebook/metro#1. The example that will eventually be in the README for the react native SDK will serve as the example until docs comes up with something.

@adamchel adamchel requested a review from edaniels July 27, 2018 15:44
@coveralls
Copy link

coveralls commented Jul 27, 2018

Coverage Status

Coverage increased (+0.9%) to 83.546% when pulling 46a89b4 on adamchel:STITCH-1732 into 9f3df7c on mongodb:master.

Copy link
Contributor

@edaniels edaniels left a comment

Choose a reason for hiding this comment

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

LGTM. Just some random comments.

expect(stitchUserProfileImpl.pictureUrl).toEqual(PICTURE_URL);
expect(stitchUserProfileImpl.minAge).toEqual(Number.parseInt(MIN_AGE));
expect(stitchUserProfileImpl.maxAge).toEqual(Number.parseInt(MAX_AGE));
expect(stitchUserProfileImpl.minAge).toEqual(Number.parseInt(MIN_AGE, 10));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

new linter warning

* Initializes the default StitchAppClient associated with the application.
*
* @param clientAppId The desired clientAppId for the client.
* @param config Additional configuration options (optional).
Copy link
Contributor

Choose a reason for hiding this comment

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

doc return type

* @param clientAppId The desired clientAppId for the client.
* @param config Additional configuration options (optional).
*/
public static initializeAppClient(
Copy link
Contributor

Choose a reason for hiding this comment

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

doc return type

StitchUserIdentity,
Storage,
MemoryStorage,
RNAsyncStorage,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you actually want to expose this to users?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, good catch. I was using it when debugging earlier but I can get rid of it here.

{
"name": "mongodb-stitch-react-native-coretest",
"version": "4.0.9",
"description": "web core test",
Copy link
Contributor

Choose a reason for hiding this comment

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

update descs in these new files


This package contains the React Native Core.

**For more information on using this on a server, see the [mongodb-stitch-react-native-sdk](https://www.npmjs.com/package/mongodb-stitch-react-native-sdk) package.** No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

on react native

@adamchel adamchel merged commit 75c2169 into mongodb:master Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants