Skip to content

Commit f08e6a6

Browse files
Add generated typings for from.js file. (#80)
* Generate typings for from.js * Add generated typings to files section and fix linter issue. * Remove domexception installation from ci workflow * Fix for .d.ts output Co-authored-by: Jimmy Wärting <jimmy@warting.se>
1 parent eed6a1d commit f08e6a6

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
node-version: ${{steps.get-version.outputs.node}}
4848

4949
- run: npm install
50-
- run: npm install domexception
5150

5251
- run: npm run report -- --colors
5352

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ typings/
6363
.env
6464

6565
index.d.ts
66+
from.d.ts

from.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const {statSync, createReadStream} = require('fs');
2+
const Blob = require('./index.js');
23
const DOMException = require('domexception');
34

45
// eslint-disable-next-line unicorn/import-index

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
"files": [
77
"from.js",
88
"index.js",
9-
"index.d.ts"
9+
"index.d.ts",
10+
"from.d.ts"
1011
],
1112
"scripts": {
1213
"lint": "xo",
1314
"test": "xo && ava",
1415
"report": "c8 --reporter json --reporter text ava",
1516
"coverage": "c8 --reporter json --reporter text ava && codecov -f coverage/coverage-final.json",
16-
"prepublishOnly": "tsc --declaration --emitDeclarationOnly --allowJs index.js"
17+
"prepublishOnly": "tsc --declaration --emitDeclarationOnly --allowJs index.js from.js"
1718
},
1819
"repository": "https://github.com/node-fetch/fetch-blob.git",
1920
"keywords": [
@@ -33,6 +34,7 @@
3334
"ava": "^3.8.2",
3435
"c8": "^7.2.0",
3536
"codecov": "^3.7.0",
37+
"domexception": "^2.0.1",
3638
"get-stream": "^5.1.0",
3739
"node-fetch": "^2.6.0",
3840
"typescript": "^3.9.5",

0 commit comments

Comments
 (0)