Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Fix test --coverage errors related to TS #8

Merged
merged 16 commits into from
Oct 25, 2018

Conversation

horacioh
Copy link
Member

also I took out all the pre-commit/format config from this branch. I think the best way is to fix this in another PR.

@horacioh
Copy link
Member Author

I hate when things in my machine works and in others doesn't... :(
screen shot 2018-10-18 at 1 13 02 am

@horacioh
Copy link
Member Author

ok I need a little help here. not getting too much progress :(

it is strange that in the circleci log we are getting the typescript help text and not locally?

if someone with more experience with circleci can help that would be great!. I'm sure is a really silly (and funny) error...

@horacioh
Copy link
Member Author

i noticed this: https://github.com/react-navigation/react-navigation-core/blob/master/.circleci/config.yml#L5

maybe using node 7 is causing any problem? I'm using 9.4.0 locally..

package.json Outdated
},
"peerDependencies": {
"react": "*"
},
"jest": {
"preset": "react-native",
"testRegex": "/__tests__/[^/]+-test\\.js$",
"testRegex": "/__tests__/[^/]+-test\\.[jt]sx?$",

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

"tsConfig": "./tsconfig.test.json",
"diagnostics": {
"ignoreCodes": [
151001

This comment was marked as abuse.

This comment was marked as abuse.

.gitignore Outdated

# TypeScript-generated files
*.d.ts
!src/react-navigation.d.ts

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@horacioh
Copy link
Member Author

ok everything solved :)
the problem was that the tsconfig.json was listed in the .gitignore. I knew it was a silly error...

package.json Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
.gitignore Outdated

# TypeScript-generated files
*.d.ts
!src/react-navigation.d.ts

This comment was marked as abuse.

@horacioh
Copy link
Member Author

Finally, because of some updates to getChildEventSubscriber I needed to roll back to the JS version for now. there are some other files in TS and everything now it seams to work.

sorry for the mess with this PR, I need to properly setup my machine to be more reliable with the CI, a lot of trials and errors. or maybe I can learn a better way to maintain this contributions cleaner?

hope this now can be approved :)

@brentvatne
Copy link
Member

ok let's try this again :) thanks @horacioh and @satya164!

@brentvatne brentvatne merged commit 27ed333 into react-navigation:master Oct 25, 2018
@satya164
Copy link
Member

@horacioh you forgot to fix this buggy regex: #8 (comment)

@brentvatne
Copy link
Member

@horacioh - can you open a followup pr for that? thx 🙏

@horacioh horacioh deleted the feature/typescript branch October 25, 2018 23:56
@brentvatne
Copy link
Member

I can't get the example project running with typescript :( here's my attempt: https://github.com/react-navigation/react-navigation-core/tree/%40brent/attempted-example-fix-ts

@horacioh
Copy link
Member Author

checking it now @brentvatne

@horacioh
Copy link
Member Author

horacioh commented Oct 26, 2018

@brentvatne I got the example project working in your branch:
it appears that the dependencies we have listed in the react-navigation-core package.json file are not being installed in the example project. the two packages that are required and not installed in the example are path-to-regexp and query-string.

let me dig dipper into why this two packages are not installed as a dependency in the example project.

maybe because the @react-navigation/core package is marked as devDependency inside the @react-navigation/native package?

ericvicenti added a commit that referenced this pull request Oct 30, 2018
This reverts commit 27ed333, reversing
changes made to a4da6ff.

# Conflicts:
#	package.json
@ericvicenti
Copy link
Contributor

ericvicenti commented Oct 30, 2018

Sorry I had to revert this change because I needed to get examples running again: 1897b32

maybe because the @react-navigation/core package is marked as devDependency inside the @react-navigation/native package?

Let me know if this is the problem and I can make a release of /native without it. Its funny how our real devDependencies seem to be the dependencies of the example project

@horacioh
Copy link
Member Author

horacioh commented Oct 31, 2018

I think this is the problem. I manually add it as a dependency and it was working correctly.

so if you add @react-navigation/core as a dependency, this installs the package properly in the example project and works.

hope this helps :)

@horacioh
Copy link
Member Author

@ericvicenti do you want me to do a PR of this?

@brentvatne
Copy link
Member

@horacioh - yeah that would be great! thanks

@horacioh
Copy link
Member Author

horacioh commented Nov 2, 2018

is the example working in master? its not for me. I tried to link the local packages to test my changes before pushing any change and now i got other errors :(

trying to resolve this issues before submitting another PR. sorry!

@brentvatne
Copy link
Member

hey @horacioh - it's running for me on master.

@horacioh
Copy link
Member Author

horacioh commented Nov 10, 2018

hey @brentvatne !
could you please check this? I think I got some progress on the TS migration.

cc @satya164 @ericvicenti

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants