Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 86f8c4c

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feat/pin-remote
2 parents caf935f + cea7317 commit 86f8c4c

File tree

985 files changed

+14224
-11173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

985 files changed

+14224
-11173
lines changed

.github/workflows/bundlesize.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Checks bundlesize, does not run on master
2+
on:
3+
pull_request:
4+
branches:
5+
- '*'
6+
7+
name: Bundlesize
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [12.x]
14+
project:
15+
- packages/ipfs-core-utils
16+
- packages/ipfs-core
17+
- packages/ipfs-http-client
18+
- packages/ipfs
19+
- packages/ipfs-message-port-protocol
20+
- packages/ipfs-message-port-client
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- name: Restore dependencies
28+
id: cache-modules
29+
uses: actions/checkout@v2
30+
with:
31+
path: node_modules
32+
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
33+
- name: Install dependencies
34+
run: npm install
35+
- name: Bundlesize ${{ matrix.project }}
36+
uses: ipfs/aegir/actions/[email protected]
37+
with:
38+
project: ${{ matrix.project }}
39+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/main.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/typecheck.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- '*'
5+
6+
name: Typecheck
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [12.x]
13+
project:
14+
- packages/ipfs-core-utils
15+
- packages/ipfs-core
16+
- packages/ipfs-http-client
17+
- packages/ipfs
18+
- packages/ipfs-cli
19+
- packages/ipfs-http-server
20+
- packages/ipfs-http-gateway
21+
- packages/ipfs-message-port-protocol
22+
- packages/ipfs-message-port-server
23+
- packages/ipfs-message-port-client
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v1
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
- name: Restore dependencies
31+
id: cache-modules
32+
uses: actions/checkout@v2
33+
with:
34+
path: node_modules
35+
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
36+
- name: Install dependencies
37+
run: npm install
38+
- name: Typecheck ${{ matrix.project }}
39+
uses: gozala/[email protected]
40+
with:
41+
project: ${{ matrix.project }}
42+

.travis.yml

Lines changed: 145 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ branches:
99
- /^release\/.*$/
1010

1111
stages:
12-
- check
1312
- test
1413
- release-rc
14+
- release-docker
1515
- test-external
1616

1717
node_js:
@@ -38,14 +38,18 @@ addons:
3838
# https://stackoverflow.com/questions/57903415/travis-ci-chrome-62-instead-of-77
3939
- dpkg
4040
chrome: stable
41+
firefox: latest
4142

4243
before_install:
4344
# prevents windows error: npm ERR! ... git-sh-setup: file not found
4445
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export PATH=/c/PROGRA~1/Git/usr/bin:/c/PROGRA~1/Git/mingw64/libexec/git-core:$PATH ; fi
4546
# only run jobs in packages that have changed since master in PR builds
4647
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export RUN_SINCE='--since master' ; fi
48+
# modules with pre-built binaries may not have deployed versions for bleeding-edge node so this lets us fall back to building from source
49+
- npm install -g node-pre-gyp
4750

48-
script: npm run test:node -- $RUN_SINCE -- -- --timeout 10000 --bail
51+
script:
52+
- npm run test:node -- $RUN_SINCE -- -- --timeout 10000 --bail
4953

5054
jobs:
5155
allow_failures:
@@ -57,84 +61,181 @@ jobs:
5761
- name: external - orbit-db
5862
- name: external - ipfs-log
5963
- name: external - sidetree
64+
6065
include:
61-
- stage: check
66+
# manual install step, we do this to cache the installed files for subsequent steps
67+
- stage: test
68+
name: lint
6269
script:
63-
- npm run build -- $RUN_SINCE --scope={ipfs,ipfs-http-client,ipfs-message-port-*}
64-
- npm run dep-check -- $RUN_SINCE -- -- -- -i electron-webrtc
6570
- npm run lint -- $RUN_SINCE --concurrency 1
6671

72+
- stage: test
73+
name: dep-check
74+
script:
75+
- npm run dep-check -- $RUN_SINCE -- -- -- -i electron-webrtc
76+
6777
- stage: test
6878
name: chrome
69-
addons:
70-
chrome: stable
7179
script:
7280
- npm run test:browser -- $RUN_SINCE -- -- --bail
7381

7482
- stage: test
7583
name: chrome webworker
76-
addons:
77-
chrome: stable
7884
script:
79-
- npm run test:webworker -- $RUN_SINCE -- -- --bail
85+
- npm run test:webworker -- $RUN_SINCE -- -- --bail --timeout 60000
8086

8187
- stage: test
8288
name: firefox
83-
addons:
84-
firefox: latest
8589
script:
8690
- npm run test:browser -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless
8791

8892
- stage: test
8993
name: firefox webworker
90-
addons:
91-
firefox: latest
9294
script:
93-
- npm run test:webworker -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless
95+
- npm run test:webworker -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless --timeout 60000
9496

9597
- stage: test
9698
name: electron-main
97-
os: osx
9899
script:
99-
- npm run test:electron-main -- $RUN_SINCE -- -- --bail
100+
- npm run test:electron-main -- $RUN_SINCE -- -- --bail --timeout 60000
100101

101102
- stage: test
102103
name: electron-renderer
103-
os: osx
104104
script:
105-
- npm run test:electron-renderer -- $RUN_SINCE -- -- --bail
105+
- npm run test:electron-renderer -- $RUN_SINCE -- -- --bail --timeout 60000
106106

107107
- stage: test
108108
name: interop - node
109109
script:
110-
- npm run test:interop:node -- $RUN_SINCE -- -- --bail
110+
- npm run test:interop -- $RUN_SINCE -- -- -- -t node --bail
111111

112112
- stage: test
113113
name: interop - browser
114114
script:
115-
- npm run test:interop:browser -- $RUN_SINCE -- -- --bail
115+
- npm run test:interop -- $RUN_SINCE -- -- -- -t browser --bail
116116

117117
- stage: test
118118
name: interop - electron-main
119-
os: osx
120119
script:
121-
- npm run test:interop:electron-main -- $RUN_SINCE -- -- --bail --timeout 10000
120+
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-main -f ./test/node.js --bail --timeout 60000
122121

123122
- stage: test
124123
name: interop - electron-renderer
125-
os: osx
126124
script:
127-
- npm run test:interop:electron-renderer -- $RUN_SINCE -- -- --bail --timeout 10000
125+
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-renderer -f ./test/browser.js -bail --timeout 60000
126+
127+
- stage: test
128+
name: js-ipfs interface tests - node
129+
script:
130+
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t node
131+
132+
- stage: test
133+
name: js-ipfs interface tests - chrome
134+
script:
135+
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser
136+
137+
- stage: test
138+
name: js-ipfs interface tests - chrome webworker
139+
script:
140+
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
141+
142+
- stage: test
143+
name: js-ipfs interface tests - firefox
144+
script:
145+
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
146+
147+
- stage: test
148+
name: js-ipfs interface tests - firefox webworker
149+
script:
150+
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
151+
152+
- stage: test
153+
name: js-ipfs interface tests - electron main
154+
script:
155+
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000
156+
157+
- stage: test
158+
name: js-ipfs interface tests - electron renderer
159+
script:
160+
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000
161+
162+
- stage: test
163+
name: http-api-client interface tests vs go-ipfs - node
164+
script:
165+
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t node
166+
167+
- stage: test
168+
name: http-api-client interface tests vs go-ipfs - chrome
169+
script:
170+
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser
171+
172+
- stage: test
173+
name: http-api-client interface tests vs go-ipfs - chrome webworker
174+
script:
175+
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
176+
177+
- stage: test
178+
name: http-api-client interface tests vs go-ipfs - firefox
179+
script:
180+
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
181+
182+
- stage: test
183+
name: http-api-client interface tests vs go-ipfs - firefox webworker
184+
script:
185+
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
186+
187+
- stage: test
188+
name: http-api-client interface tests vs js-ipfs - node
189+
script:
190+
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t node
191+
192+
- stage: test
193+
name: http-api-client interface tests vs js-ipfs - chrome
194+
script:
195+
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser
196+
197+
- stage: test
198+
name: http-api-client interface tests vs js-ipfs - chrome webworker
199+
script:
200+
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000
201+
202+
- stage: test
203+
name: http-api-client interface tests vs js-ipfs - firefox
204+
script:
205+
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
206+
207+
- stage: test
208+
name: http-api-client interface tests vs js-ipfs - firefox webworker
209+
script:
210+
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000
211+
212+
- stage: test
213+
name: http-api-client interface tests vs js-ipfs - electron main
214+
script:
215+
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000
216+
217+
- stage: test
218+
name: http-api-client interface tests vs js-ipfs - electron renderer
219+
script:
220+
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000
221+
222+
- stage: test
223+
name: ipfs-message-port-client interface tests - chrome
224+
script:
225+
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser
226+
227+
- stage: test
228+
name: ipfs-message-port-client interface tests - firefox
229+
script:
230+
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
128231

129232
- stage: test
130233
name: examples
131234
script:
132-
- npx json -I -f ./lerna.json -e "this.packages.push('examples/*')"
133-
- npx json -I -f ./lerna.json -e "this.command.bootstrap.nohoist = ['ipfs-css', 'tachyons']"
134-
- npm run reset
135-
- npm install
136-
- npm run build -- --scope={ipfs,ipfs-http-client,ipfs-message-port-*}
137-
- npm run test -- --scope=example* --concurrency=1
235+
# Travis lets scripts continue even if previous steps fail: https://github.com/travis-ci/travis-ci/issues/1066
236+
- npm run build -- --scope={ipfs-core,ipfs,ipfs-http-client,ipfs-message-port-*} &&
237+
npm run configure-examples &&
238+
npm run test -- --scope=example* --concurrency=1
138239

139240
- stage: release-rc
140241
# only run on changes to master
@@ -149,6 +250,19 @@ jobs:
149250
# only run if the last commit was not part of a release
150251
- if [[ ! `git log -n 1 -q` =~ publish ]]; then npm run release:rc ; fi
151252

253+
- stage: release-docker
254+
# only run on changes to master
255+
if: branch = master AND type = push AND fork = false
256+
name: release docker
257+
script:
258+
# travis does not fetch the whole repo history, but we need that to work out the
259+
# ref count to publish canary releases properly
260+
- git fetch --unshallow
261+
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
262+
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
263+
# only run if the last commit was not part of a release
264+
- if [[ ! `git log -n 1 -q` =~ publish ]]; then npm run docker:rc ; fi
265+
152266
- stage: test-external
153267
# only run on changes to master
154268
if: branch = master AND type = push AND fork = false

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Contributing guidelines
2+
3+
IPFS as a project, including js-ipfs and all of its modules, follows the [standard IPFS Community contributing guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md).
4+
5+
We also adhere to the [IPFS JavaScript Community contributing guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) which provide additional information of how to collaborate and contribute in the JavaScript implementation of IPFS.
6+
7+
We appreciate your time and attention for going over these. Please open an issue on [ipfs/community](https://github.com/ipfs/community) if you have any question.
8+
9+
Thank you.

COPYRIGHT

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This project is transitioning from an MIT-only license to a dual MIT/Apache-2.0 license.
2+
Unless otherwise noted, all code contributed prior to 2019-11-21 and not contributed by
3+
a user listed in [this signoff issue](https://github.com/ipfs/js-ipfs/issues/2624) is
4+
licensed under MIT-only. All new contributions (and past contributions since 2019-11-21)
5+
are licensed under a dual MIT/Apache-2.0 license.

0 commit comments

Comments
 (0)