Skip to content

Commit

Permalink
Require Node.js 12.20
Browse files Browse the repository at this point in the history
Signed-off-by: Richie Bendall <[email protected]>
  • Loading branch information
Richienb committed Jun 25, 2021
1 parent a375e4e commit 918e71d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 30 deletions.
4 changes: 2 additions & 2 deletions browser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict"
import { Blob } from "blob-polyfill"

module.exports = require("blob-polyfill").Blob
export default Blob
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
/// <reference lib="dom"/>

export = Blob
export default Blob
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict"
import { Blob } from "fetch-blob"

module.exports = require("fetch-blob")
export default Blob
28 changes: 9 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"repository": "https://github.com/Richienb/cross-blob.git",
"author": "Richie Bendall <[email protected]>",
"license": "MIT",
"main": "index.js",
"browser": "browser.js",
"type": "module",
"exports": {
"browser": "./browser.js",
"default": "./index.js"
Expand All @@ -17,11 +16,11 @@
"browser.js"
],
"engines": {
"node": "^10.17.0 || >=12.3.0"
"node": "^12.20 || >=14.13"
},
"scripts": {
"lint": "xo",
"test": "yarn lint && ava"
"test": "xo && ava"
},
"keywords": [
"blob",
Expand All @@ -38,25 +37,16 @@
],
"dependencies": {
"blob-polyfill": "^5.0.20210201",
"fetch-blob": "^2.1.2"
"fetch-blob": "^3.0.1"
},
"devDependencies": {
"ava": "^3.10.1",
"eslint-config-richienb": "^0.4.2",
"get-stream": "^5.1.0",
"ava": "^3.15.0",
"eslint-config-richienb": "^0.6.2",
"get-stream": "^6.0.1",
"is-blob": "^2.1.0",
"xo": "^0.32.1"
"xo": "^0.40.3"
},
"xo": {
"extends": "richienb",
"overrides": [
{
"files": "test.js",
"rules": {
"node/no-unsupported-features/node-builtins": 0,
"node/no-unsupported-features/es-syntax": 0
}
}
]
"extends": "richienb"
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ npm install cross-blob
## Usage

```js
const Blob = require("cross-blob");
import Blob from "cross-blob"

new Blob([]);
//=> Blob {size: 0, type: ""}
Expand All @@ -24,4 +24,4 @@ globalThis.Blob = Blob;

## API

### Blob extends [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
### [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
8 changes: 4 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const test = require("ava")
const isBlob = require("is-blob")
const getStream = require("get-stream")
const Blob = require(".")
import test from "ava"
import isBlob from "is-blob"
import getStream from "get-stream"
import Blob from "./index.js"
global.Blob = Blob

test("main", t => {
Expand Down

0 comments on commit 918e71d

Please sign in to comment.