Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd619c7694 | ||
|
|
bc6ca02caa | ||
|
|
b098249bea | ||
|
|
ecdabc9879 | ||
|
|
71600df374 | ||
|
|
f9be7e7d7b | ||
|
|
fcf91af996 |
@@ -0,0 +1,6 @@
|
||||
coverage:
|
||||
round: up
|
||||
precision: 2
|
||||
parsers:
|
||||
javascript:
|
||||
enable_partials: yes
|
||||
@@ -0,0 +1,56 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.js"
|
||||
- "package.json"
|
||||
- ".github/workflows/ci.yml"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
node: ["14", "12", engines]
|
||||
exclude:
|
||||
# On Windows, run tests with only the LTS environments.
|
||||
- os: windows-latest
|
||||
node: engines
|
||||
- os: windows-latest
|
||||
node: "14"
|
||||
# On macOS, run tests with only the LTS environments.
|
||||
- os: macOS-latest
|
||||
node: engines
|
||||
- os: macOS-latest
|
||||
node: "14"
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get Node.JS version from package.json
|
||||
if: matrix.node == 'engines'
|
||||
id: get-version
|
||||
run: echo ::set-output name=node::$(npx --q minimum-node-version)
|
||||
|
||||
- uses: actions/setup-node@v2-beta
|
||||
if: matrix.node != 'engines'
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
- uses: actions/setup-node@v2-beta
|
||||
if: matrix.node == 'engines'
|
||||
with:
|
||||
node-version: ${{steps.get-version.outputs.node}}
|
||||
|
||||
- run: npm install
|
||||
|
||||
- run: npm run report -- --colors
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
file: ./coverage/coverage-final.json
|
||||
@@ -0,0 +1,20 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.js"
|
||||
- "**eslint**"
|
||||
- "package.json"
|
||||
- ".github/workflows/lint.yml"
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2-beta
|
||||
with:
|
||||
node-version: 14
|
||||
- run: npm install
|
||||
- run: npm run lint
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- "lts/*"
|
||||
- "node"
|
||||
|
||||
script:
|
||||
- npm run lint
|
||||
- npm run coverage
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
@@ -1,7 +1,7 @@
|
||||
# fetch-blob
|
||||
|
||||
[![npm version][npm-image]][npm-url]
|
||||
[![build status][travis-image]][travis-url]
|
||||
[![build status][ci-image]][ci-url]
|
||||
[![coverage status][codecov-image]][codecov-url]
|
||||
[![install size][install-size-image]][install-size-url]
|
||||
|
||||
@@ -31,8 +31,8 @@ See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blo
|
||||
|
||||
[npm-image]: https://flat.badgen.net/npm/v/fetch-blob
|
||||
[npm-url]: https://www.npmjs.com/package/fetch-blob
|
||||
[travis-image]: https://flat.badgen.net/travis/node-fetch/fetch-blob
|
||||
[travis-url]: https://travis-ci.org/node-fetch/fetch-blob
|
||||
[ci-image]: https://github.com/node-fetch/fetch-blob/workflows/CI/badge.svg
|
||||
[ci-url]: https://github.com/node-fetch/fetch-blob/actions
|
||||
[codecov-image]: https://flat.badgen.net/codecov/c/github/node-fetch/fetch-blob/master
|
||||
[codecov-url]: https://codecov.io/gh/node-fetch/fetch-blob
|
||||
[install-size-image]: https://flat.badgen.net/packagephobia/install/fetch-blob
|
||||
|
||||
+3
-3
@@ -10,8 +10,8 @@
|
||||
"scripts": {
|
||||
"lint": "xo",
|
||||
"test": "xo && ava",
|
||||
"report": "nyc ava",
|
||||
"coverage": "nyc --reporter json --reporter text ava && codecov -f coverage/coverage-final.json",
|
||||
"report": "c8 --reporter json --reporter text ava",
|
||||
"coverage": "c8 --reporter json --reporter text ava && codecov -f coverage/coverage-final.json",
|
||||
"prepublishOnly": "tsc --declaration --emitDeclarationOnly --allowJs index.js"
|
||||
},
|
||||
"repository": "https://github.com/node-fetch/fetch-blob.git",
|
||||
@@ -30,10 +30,10 @@
|
||||
"homepage": "https://github.com/node-fetch/fetch-blob#readme",
|
||||
"devDependencies": {
|
||||
"ava": "^3.8.2",
|
||||
"c8": "^7.2.0",
|
||||
"codecov": "^3.7.0",
|
||||
"get-stream": "^5.1.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"nyc": "^15.1.0",
|
||||
"typescript": "^3.9.5",
|
||||
"xo": "^0.32.0"
|
||||
},
|
||||
|
||||
@@ -2,6 +2,7 @@ const test = require('ava');
|
||||
const Blob = require('.');
|
||||
const getStream = require('get-stream');
|
||||
const {Response} = require('node-fetch');
|
||||
const {TextDecoder} = require('util');
|
||||
|
||||
test('new Blob()', t => {
|
||||
const blob = new Blob(); // eslint-disable-line no-unused-vars
|
||||
|
||||
Reference in New Issue
Block a user