Skip to content

Commit ae61429

Browse files
committed
v9.0.20240710
1 parent eba3fdc commit ae61429

9 files changed

+114
-99
lines changed

.eslintrc.js

-30
This file was deleted.

Blob.js

+7-8
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ function array2base64 (input) {
8585
// Check if Blob constructor supports ArrayBufferViews
8686
// Fails in Safari 6, so we need to map to ArrayBuffers there.
8787
blobSupportsArrayBufferView = new Blob([new Uint8Array([1, 2])]).size === 2;
88-
} catch (e) {/**/}
89-
88+
} catch (e) {/* eslint-disable-line no-unused-vars */}
9089

9190
// Helper function that maps ArrayBufferViews to ArrayBuffers
9291
// Used by BlobBuilder constructor and old browsers that didn't
@@ -426,7 +425,7 @@ function array2base64 (input) {
426425
} else {
427426
try {
428427
File.__proto__ = Blob;
429-
} catch (e) {/**/}
428+
} catch (e) {/* eslint-disable-line no-unused-vars */}
430429
}
431430

432431
File.prototype.toString = function () {
@@ -492,7 +491,7 @@ function array2base64 (input) {
492491
try {
493492
new File([], "");
494493
exports.File = global.File;
495-
} catch (e) {
494+
} catch (e) { // eslint-disable-line no-unused-vars
496495
try {
497496
exports.File = new Function("class File extends Blob {" +
498497
"constructor(chunks, name, opts) {" +
@@ -504,7 +503,7 @@ function array2base64 (input) {
504503
"}};" +
505504
"return new File([], \"\"), File"
506505
)();
507-
} catch (e) {
506+
} catch (e) { // eslint-disable-line no-unused-vars
508507
exports.File = function File(b, d, c) {
509508
var blob = new Blob(b, c);
510509
var t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date();
@@ -638,7 +637,7 @@ function array2base64 (input) {
638637
}
639638
});
640639
};
641-
} catch (e) {
640+
} catch (e) { // eslint-disable-line no-unused-vars
642641
try {
643642
new ReadableStream({});
644643
stream = function stream(blob){
@@ -659,13 +658,13 @@ function array2base64 (input) {
659658
}
660659
});
661660
};
662-
} catch (e) {
661+
} catch (e) { // eslint-disable-line no-unused-vars
663662
try {
664663
new Response("").body.getReader().read();
665664
stream = function stream() {
666665
return (new Response(this)).body;
667666
};
668-
} catch (e) {
667+
} catch (e) { // eslint-disable-line no-unused-vars
669668
stream = function stream() {
670669
throw new Error("Include https://github.com/MattiasBuelens/web-streams-polyfill");
671670
};

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# `blob-polyfill` CHANGELOG
22

3+
## v9.0.20240710
4+
* [Blob.js] Use exported FileReader (@luke-stead-sonocent)
5+
* [test] Test is now a module (@bjornstar)
6+
* [README.md] Add badge for `master` branch build status (@bjornstar)
7+
* [package.json] Update devDependencies: `@sindresorhus/is`, `eslint`, & `mocha` (@bjornstar)
8+
* [bower.json] Match current version (@bjornstar)
9+
* [.eslintrc.js] Change to `eslint.config.mjs` for eslint@9 (@bjornstar)
10+
311
## v8.0.20240630
412
* [Blob.js] Change Blob.prototype to global.Blob.prototype (@tmisirpash)
513
* [Blob.js] Make it work in environments where global.Blob exists, but global.FileReader does not (@bjornstar)

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
[![npm](https://img.shields.io/npm/v/blob-polyfill.svg)](https://www.npmjs.com/package/blob-polyfill)
44
[![npm](https://img.shields.io/npm/dm/blob-polyfill.svg)](https://www.npmjs.com/package/blob-polyfill)
5+
[![build status](https://github.com/bjornstar/blob-polyfill/actions/workflows/node.js.yml/badge.svg?branch=master)](https://github.com/bjornstar/blob-polyfill/actions/workflows/node.js.yml?query=branch%3Amaster)
56

67
## Purpose
78

89
Blob Polyfill serves [Blob.js][0] over npm.
9-
10-
Blob.js implements the W3C [`Blob`][1] interface in browsers that do not natively support it.
10+
11+
Blob.js implements the W3C [`Blob`][1] interface in browsers that do not natively support it.
1112

1213
## Changelog
1314

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blob-polyfill",
3-
"version": "6.0.20211015",
3+
"version": "9.0.20240710",
44
"homepage": "https://github.com/bjornstar/blob-polyfill",
55
"authors": [
66
"Eli Grey <[email protected]>"

eslint.config.mjs

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
4+
export default [
5+
js.configs.recommended,
6+
{
7+
languageOptions: {
8+
globals: {
9+
...globals.amd,
10+
...globals.browser,
11+
...globals.node,
12+
}
13+
},
14+
rules: {
15+
indent: [
16+
"error",
17+
"tab"
18+
],
19+
"linebreak-style": [
20+
"error",
21+
"unix"
22+
],
23+
quotes: [
24+
"error",
25+
"double"
26+
],
27+
semi: [
28+
"error",
29+
"always"
30+
],
31+
}
32+
},
33+
{
34+
files: ["test/*.mjs"],
35+
languageOptions: {
36+
globals: {
37+
...globals.mocha,
38+
...globals.node,
39+
}
40+
}
41+
}
42+
];

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blob-polyfill",
3-
"version": "8.0.20240630",
3+
"version": "9.0.20240710",
44
"description": "Blob.js implements the W3C Blob interface in browsers that do not natively support it.",
55
"main": "Blob.js",
66
"scripts": {
@@ -23,7 +23,7 @@
2323
"homepage": "https://github.com/bjornstar/blob-polyfill",
2424
"devDependencies": {
2525
"@sindresorhus/is": "^4.6.0",
26-
"eslint": "^8.12.0",
27-
"mocha": "^9.2.2"
26+
"eslint": "^9.6.0",
27+
"mocha": "^10.6.0"
2828
}
2929
}

test/.eslintrc.js

-5
This file was deleted.

0 commit comments

Comments
 (0)