From 93e406e8f35525b35d8ac55784f3253d71af674d Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 9 Apr 2021 18:55:41 +0100 Subject: [PATCH 1/9] chore: update deps Pulls in the new buffer version --- .travis.yml | 17 +++++++++++------ package.json | 6 +++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50369c9..f743fa5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,11 @@ language: node_js cache: npm +dist: bionic + +branches: + only: + - master + - /^release\/.*$/ stages: - check @@ -13,21 +19,20 @@ node_js: os: - linux - osx + - windows -before_install: - # modules with pre-built binaries may not have deployed versions for bleeding-edge node so this lets us fall back to building from source - - npm install -g node-pre-gyp - -script: npx nyc -s npm run test:node -- --bail +script: npm run test:node -- --cov after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov jobs: include: + - os: windows + cache: false + - stage: check script: - npx aegir dep-check - npm run lint - - npm run build notifications: email: false diff --git a/package.json b/package.json index 0a74317..e63e66a 100644 --- a/package.json +++ b/package.json @@ -36,14 +36,14 @@ "filesize": "^6.1.0", "it-buffer": "^0.1.1", "it-concat": "^1.0.0", - "it-reader": "^2.1.0", - "it-to-stream": "^0.1.1", + "it-reader": "^3.0.0", + "it-to-stream": "^1.0.0", "mime-types": "^2.1.27", "multihashes": "^4.0.2", "p-try-each": "^1.0.1" }, "devDependencies": { - "aegir": "^32.0.2", + "aegir": "^33.0.0", "cids": "^1.0.0", "get-stream": "^6.0.0", "ipfs": "^0.54.2", From b47cda1cada787e8d3f23f00511a12dedaae5de2 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 12 Apr 2021 09:23:01 +0100 Subject: [PATCH 2/9] chore: install node-pre-gyp --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f743fa5..6cbdf7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ os: - osx - windows +before_install: npm install -g @mapbox/node-pre-gyp script: npm run test:node -- --cov after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov From 1d4bdb4a2c5b79494c3554570179650117be00d7 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 12 Apr 2021 09:41:19 +0100 Subject: [PATCH 3/9] chore: remove windows double-build --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6cbdf7c..e9b3442 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js -cache: npm +cache: false dist: bionic branches: @@ -27,9 +27,6 @@ after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codeco jobs: include: - - os: windows - cache: false - - stage: check script: - npx aegir dep-check From 62679da1f5b0a09cbf5b60f37e63010635d56cc8 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 12 Apr 2021 09:52:51 +0100 Subject: [PATCH 4/9] chore: add gh ci --- .github/workflows/main.yml | 71 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 36 ------------------- 2 files changed, 71 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c763a5d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,71 @@ +name: ci +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npx aegir lint + - run: npx aegir dep-check + - run: npx aegir build --no-types + test-node: + needs: check + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + node: [14, 15] + fail-fast: true + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - run: npm install -g @mapbox/node-pre-gyp + - run: npm install + - run: npx nyc --reporter=lcov aegir test -t node -- --bail + - uses: codecov/codecov-action@v1 + test-chrome: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npx aegir test -t browser -t webworker --bail + test-firefox: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npx aegir test -t browser -t webworker --bail -- --browser firefox + test-webkit: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: microsoft/playwright-github-action@v1 + - run: npm install + - run: npx aegir test -t browser -t webworker --bail -- --browser webkit + test-electron-main: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npx xvfb-maybe aegir test -t electron-main --bail + test-electron-renderer: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npx xvfb-maybe aegir test -t electron-renderer --bail diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e9b3442..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: node_js -cache: false -dist: bionic - -branches: - only: - - master - - /^release\/.*$/ - -stages: - - check - - test - - cov - -node_js: - - 'lts/*' - - 'node' - -os: - - linux - - osx - - windows - -before_install: npm install -g @mapbox/node-pre-gyp -script: npm run test:node -- --cov -after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov - -jobs: - include: - - stage: check - script: - - npx aegir dep-check - - npm run lint - -notifications: - email: false From a7e9dd29fca24edf015d9815119307e81fdf268e Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 12 Apr 2021 10:33:30 +0100 Subject: [PATCH 5/9] chore: do not ci in browsers --- .aegir.js | 13 ----------- .github/workflows/main.yml | 45 ++++++-------------------------------- 2 files changed, 7 insertions(+), 51 deletions(-) delete mode 100644 .aegir.js diff --git a/.aegir.js b/.aegir.js deleted file mode 100644 index 5eb001b..0000000 --- a/.aegir.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -module.exports = { - bundlesize: { maxSize: '140kB' }, - webpack: { - node: { - // needed by the mime-types module - path: true, - // needed by readable-web-to-node-stream module used by file-type - stream: true - } - } -} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c763a5d..c32b23b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,8 +14,13 @@ jobs: - uses: actions/checkout@v2 - run: npm install - run: npx aegir lint + - uses: gozala/typescript-error-reporter-action@v1.0.8 + - run: npx aegir build - run: npx aegir dep-check - - run: npx aegir build --no-types + - uses: ipfs/aegir/actions/bundle-size@master + name: size + with: + github_token: ${{ secrets.GITHUB_TOKEN }} test-node: needs: check runs-on: ${{ matrix.os }} @@ -31,41 +36,5 @@ jobs: node-version: ${{ matrix.node }} - run: npm install -g @mapbox/node-pre-gyp - run: npm install - - run: npx nyc --reporter=lcov aegir test -t node -- --bail + - run: npx aegir test -t node --cov --bail - uses: codecov/codecov-action@v1 - test-chrome: - needs: check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: npm install - - run: npx aegir test -t browser -t webworker --bail - test-firefox: - needs: check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: npm install - - run: npx aegir test -t browser -t webworker --bail -- --browser firefox - test-webkit: - needs: check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: microsoft/playwright-github-action@v1 - - run: npm install - - run: npx aegir test -t browser -t webworker --bail -- --browser webkit - test-electron-main: - needs: check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: npm install - - run: npx xvfb-maybe aegir test -t electron-main --bail - test-electron-renderer: - needs: check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: npm install - - run: npx xvfb-maybe aegir test -t electron-renderer --bail From 2f9f9eb7e8b24569ae4663ef6e9b4de1055f39e9 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 12 Apr 2021 10:34:14 +0100 Subject: [PATCH 6/9] chore: remove extraneous build steps --- .github/workflows/main.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c32b23b..7991294 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,13 +14,8 @@ jobs: - uses: actions/checkout@v2 - run: npm install - run: npx aegir lint - - uses: gozala/typescript-error-reporter-action@v1.0.8 - run: npx aegir build - run: npx aegir dep-check - - uses: ipfs/aegir/actions/bundle-size@master - name: size - with: - github_token: ${{ secrets.GITHUB_TOKEN }} test-node: needs: check runs-on: ${{ matrix.os }} From b096aaa9c2c8d3923e2c742d7590190bb84d71ac Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 12 Apr 2021 11:53:07 +0100 Subject: [PATCH 7/9] chore: ensure fixtures have correct line endings on windows --- test/fixtures/.gitattributes | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/fixtures/.gitattributes diff --git a/test/fixtures/.gitattributes b/test/fixtures/.gitattributes new file mode 100644 index 0000000..7fc1a26 --- /dev/null +++ b/test/fixtures/.gitattributes @@ -0,0 +1,4 @@ +# Make sure fixtures have correct line endings on windows + +*.txt lf +*.svg lf From 7b4433c151c7105e4354f6be0f45abd35b987f41 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 12 Apr 2021 12:02:04 +0100 Subject: [PATCH 8/9] chore: update attributes --- test/fixtures/.gitattributes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fixtures/.gitattributes b/test/fixtures/.gitattributes index 7fc1a26..94c8e49 100644 --- a/test/fixtures/.gitattributes +++ b/test/fixtures/.gitattributes @@ -1,4 +1,4 @@ # Make sure fixtures have correct line endings on windows -*.txt lf -*.svg lf +*.txt text eol=lf +*.svg text eol=lf From d131683c3d376f6368147822ab3ab1e56f3e15a4 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 12 Apr 2021 12:05:29 +0100 Subject: [PATCH 9/9] chore: update attributes --- test/fixtures/.gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/test/fixtures/.gitattributes b/test/fixtures/.gitattributes index 94c8e49..50b7936 100644 --- a/test/fixtures/.gitattributes +++ b/test/fixtures/.gitattributes @@ -2,3 +2,4 @@ *.txt text eol=lf *.svg text eol=lf +*.html text eol=lf