Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 6552f0f

Browse files
author
Alan Shaw
authored
chore: switch to travis-ci.com (#943)
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent bfd71c2 commit 6552f0f

File tree

7 files changed

+55
-90
lines changed

7 files changed

+55
-90
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
test/fixtures/** text eol=lf

.travis.yml

+43-29
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,46 @@
1-
# Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
2-
sudo: false
31
language: node_js
2+
cache: npm
3+
stages:
4+
- check
5+
- test
6+
- cov
47

5-
matrix:
8+
node_js:
9+
- '10'
10+
11+
os:
12+
- linux
13+
- osx
14+
- windows
15+
16+
script: npx nyc -s npm run test:node -- --bail
17+
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov
18+
19+
jobs:
620
include:
7-
- node_js: 6
8-
env: CXX=g++-4.8
9-
- node_js: 8
10-
env: CXX=g++-4.8
11-
# - node_js: stable
12-
# env: CXX=g++-4.8
13-
14-
script:
15-
- npm run lint
16-
- npm run test
17-
- npm run coverage
18-
19-
before_script:
20-
- export DISPLAY=:99.0
21-
- sh -e /etc/init.d/xvfb start
22-
23-
after_success:
24-
- npm run coverage-publish
25-
26-
addons:
27-
firefox: 'latest'
28-
apt:
29-
sources:
30-
- ubuntu-toolchain-r-test
31-
packages:
32-
- g++-4.8
21+
- stage: check
22+
script:
23+
- npx aegir commitlint --travis
24+
- npx aegir dep-check
25+
- npm run lint
26+
27+
- stage: test
28+
name: chrome
29+
addons:
30+
chrome: stable
31+
script: npx aegir test -t browser
32+
33+
- stage: test
34+
name: firefox
35+
addons:
36+
firefox: latest
37+
script: npx aegir test -t browser -- --browsers FirefoxHeadless
38+
39+
- stage: test
40+
name: webworker
41+
addons:
42+
chrome: stable
43+
script: npx aegir test -t webworker
44+
45+
notifications:
46+
email: false

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<p align="center">
1616
<a href="https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small" alt="FOSSA Status"><img src="https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small"/></a>
17-
<a href="https://ci.ipfs.team/job/ipfs/job/js-ipfs-http-client/job/master/"><img src="https://ci.ipfs.team/buildStatus/icon?job=ipfs/js-ipfs-http-client/master" /></a>
17+
<a href="https://travis-ci.com/ipfs/js-ipfs-http-client"><img src="https://flat.badgen.net/travis/ipfs/js-ipfs-http-client" /></a>
1818
<a href="https://codecov.io/gh/ipfs/js-ipfs-http-client"><img src="https://codecov.io/gh/ipfs/js-ipfs-http-client/branch/master/graph/badge.svg"></a>
1919
<br>
2020
<a href="https://david-dm.org/ipfs/js-ipfs-http-client"><img src="https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square" /></a>

appveyor.yml

-29
This file was deleted.

ci/Jenkinsfile

-2
This file was deleted.

circle.yml

-19
This file was deleted.

src/files-regular/get-pull-stream.js

+9-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
const cleanCID = require('../utils/clean-cid')
44
const TarStreamToObjects = require('../utils/tar-stream-to-objects')
55
const v = require('is-ipfs')
6-
const through = require('through2')
76
const pull = require('pull-stream')
87
const toPull = require('stream-to-pull-stream')
98
const deferred = require('pull-defer')
@@ -28,15 +27,15 @@ module.exports = (send) => {
2827
send.andTransform(request, TarStreamToObjects, (err, stream) => {
2928
if (err) { return p.end(err) }
3029

31-
const files = []
32-
stream.pipe(through.obj((file, enc, next) => {
33-
if (file.content) {
34-
files.push({ path: file.path, content: toPull(file.content) })
35-
} else {
36-
files.push(file)
37-
}
38-
next()
39-
}, () => p.resolve(pull.values(files))))
30+
p.resolve(
31+
pull(
32+
toPull.source(stream),
33+
pull.map(file => {
34+
const { path, content } = file
35+
return content ? { path, content: toPull.source(content) } : file
36+
})
37+
)
38+
)
4039
})
4140

4241
return p

0 commit comments

Comments
 (0)