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

[isomorphic-unfetch] Add isomorphic-unfetch_v3 #2908

Merged
merged 3 commits into from Oct 29, 2018

Conversation

NameFILIP
Copy link
Contributor

Source code: https://github.com/developit/unfetch/tree/master/packages/isomorphic-unfetch

Basically copied the definition from isomorphic-fetch. Looks like it is not maintained.

@NameFILIP NameFILIP changed the title Add isomorphic-unfetch_v3 [isomorphic-unfetch] Add isomorphic-unfetch_v3 Oct 26, 2018
@villesau
Copy link
Member

Hi @NameFILIP and thanks for the contribution! Looks like the tests are failing, would you mind fixing them? Here is how you can run the tests: https://github.com/flow-typed/flow-typed/blob/master/CONTRIBUTING.md#running-libdef-tests

https://travis-ci.org/flow-typed/flow-typed/jobs/446462824

      test_isomorphic-unfetch_v3.js:35:4
       35|   (res.headers.get("test"): string);
              ^^^^^^^^^^^^^^^^^^^^^^^
   
   References:
      <BUILTINS>/bom.js:921:24
      921|     get(name: string): null | string;
                                  ^^^^ [1]
      test_isomorphic-unfetch_v3.js:35:29
       35|   (res.headers.get("test"): string);
                                       ^^^^^^ [2]
   
   
   
   Found 1 error

@NameFILIP
Copy link
Contributor Author

@villesau not sure why the Travis CI is failing now

@NameFILIP
Copy link
Contributor Author

It passes locally:

➜  flow-typed git:(add-isomorphic-unfetch) ./build_and_test_cli.sh

yarn install v1.10.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
✨  Done in 8.71s.
yarn run v1.10.1
$ eslint **/**/test_* --quiet
✨  Done in 4.42s.
yarn install v1.10.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
$ mkdirp dist && yarn test
yarn run v1.10.1
$ yarn clean && yarn build && yarn test-quick
$ rimraf dist
$ mkdirp dist && babel ./src --out-dir=./dist
Successfully compiled 80 files with Babel.
$ jest && yarn lint
 PASS  src/lib/__tests__/codeSign-test.js
 PASS  src/lib/__tests__/semver-test.js
 PASS  src/lib/__tests__/flowVersion-test.js
 PASS  src/lib/__tests__/cacheRepoUtils-test.js
 PASS  src/commands/__tests__/search-test.js
 PASS  src/lib/__tests__/libDefs-test.js
 PASS  src/lib/npm/__tests__/npmLibDefs-test.js (6.648s)
  ● Console

    console.log src/lib/cacheRepoUtils.js:108
      • rebasing flow-typed cache...

 PASS  src/commands/__tests__/runTests-test.js (7.348s)
 PASS  src/commands/__tests__/install-test.js (12.799s)

Test Suites: 9 passed, 9 total
Tests:       99 passed, 99 total
Snapshots:   0 total
Time:        14.687s
Ran all test suites.
$ eslint .; exit 0
✨  Done in 25.85s.
✨  Done in 34.32s.
All libdefs are named and structured correctly. (Found 720)
➜  flow-typed git:(add-isomorphic-unfetch) ./quick_run_def_tests.sh
Running changed definition tests against latest 15 flow versions in /Users/fspiridonov/Dev/flow-typed/definitions/npm...

Fetching all Flow binaries...
  Fetching flow-v0.71.0...
  Fetching flow-v0.72.0...
  Fetching flow-v0.73.0...
  Fetching flow-v0.74.0...
  Fetching flow-v0.75.0...
  Fetching flow-v0.76.0...
  Fetching flow-v0.77.0...
  Fetching flow-v0.78.0...
  Fetching flow-v0.79.0...
  Fetching flow-v0.79.1...
  Fetching flow-v0.80.0...
  Fetching flow-v0.81.0...
  Fetching flow-v0.82.0...
  Fetching flow-v0.83.0...
    flow-v0.74.0 finished downloading.
  Extracting flow-v0.74.0...
    flow-v0.76.0 finished downloading.
  Extracting flow-v0.76.0...
    flow-v0.73.0 finished downloading.
  Extracting flow-v0.73.0...
    flow-v0.75.0 finished downloading.
  Extracting flow-v0.75.0...
    flow-v0.79.1 finished downloading.
  Extracting flow-v0.79.1...
    flow-v0.71.0 finished downloading.
  Extracting flow-v0.71.0...
    flow-v0.81.0 finished downloading.
  Extracting flow-v0.81.0...
    flow-v0.72.0 finished downloading.
  Extracting flow-v0.72.0...
    flow-v0.80.0 finished downloading.
  Extracting flow-v0.80.0...
    flow-v0.78.0 finished downloading.
  Extracting flow-v0.78.0...
    flow-v0.79.0 finished downloading.
  Extracting flow-v0.79.0...
    flow-v0.83.0 finished downloading.
  Extracting flow-v0.83.0...
    flow-v0.77.0 finished downloading.
  Extracting flow-v0.77.0...
    flow-v0.82.0 finished downloading.
  Extracting flow-v0.82.0...
  Removing flow-v0.74.0 artifacts...
    flow-v0.74.0 complete!
  Removing flow-v0.73.0 artifacts...
  Removing flow-v0.71.0 artifacts...
    flow-v0.73.0 complete!
    flow-v0.71.0 complete!
  Removing flow-v0.72.0 artifacts...
    flow-v0.72.0 complete!
  Removing flow-v0.75.0 artifacts...
    flow-v0.75.0 complete!
  Removing flow-v0.76.0 artifacts...
    flow-v0.76.0 complete!
  Removing flow-v0.79.1 artifacts...
    flow-v0.79.1 complete!
  Removing flow-v0.78.0 artifacts...
    flow-v0.78.0 complete!
  Removing flow-v0.80.0 artifacts...
    flow-v0.80.0 complete!
  Removing flow-v0.79.0 artifacts...
    flow-v0.79.0 complete!
  Removing flow-v0.81.0 artifacts...
    flow-v0.81.0 complete!
  Removing flow-v0.77.0 artifacts...
    flow-v0.77.0 complete!
  Removing flow-v0.83.0 artifacts...
    flow-v0.83.0 complete!
  Removing flow-v0.82.0 artifacts...
    flow-v0.82.0 complete!
Finished fetching Flow binaries.

Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.71.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.72.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.73.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.74.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.75.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.76.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.77.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.78.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.79.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.79.1)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.80.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.81.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.82.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.83.0)...
Testing isomorphic-unfetch_v3.x.x/flow_v0.25.x- (flow-v0.84.0)...
 
All tests passed!
➜  flow-typed git:(add-isomorphic-unfetch) 

@NameFILIP
Copy link
Contributor Author

NameFILIP commented Oct 29, 2018

oh, looks like the last on passed. Maybe there was some Travis CI issue..

@villesau
Copy link
Member

Yeah looks like 0.84.0 and Travis are not the best friends for some reason so we had to disable 0.84.0 checks: #2916

Thanks for the contribution @NameFILIP !

@villesau villesau merged commit c610e4a into flow-typed:master Oct 29, 2018
@NameFILIP NameFILIP deleted the add-isomorphic-unfetch branch October 29, 2018 21:15
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.

None yet

2 participants