@@ -3012,7 +3012,7 @@ exports.Octokit = Octokit;
3012
3012
3013
3013
Object.defineProperty(exports, "__esModule", ({ value: true }));
3014
3014
3015
- var isPlainObject = __nccwpck_require__(558 );
3015
+ var isPlainObject = __nccwpck_require__(3287 );
3016
3016
var universalUserAgent = __nccwpck_require__(5030);
3017
3017
3018
3018
function lowercaseKeys(object) {
@@ -3400,52 +3400,6 @@ exports.endpoint = endpoint;
3400
3400
//# sourceMappingURL=index.js.map
3401
3401
3402
3402
3403
- /***/ }),
3404
-
3405
- /***/ 558:
3406
- /***/ ((__unused_webpack_module, exports) => {
3407
-
3408
- "use strict";
3409
-
3410
-
3411
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3412
-
3413
- /*!
3414
- * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
3415
- *
3416
- * Copyright (c) 2014-2017, Jon Schlinkert.
3417
- * Released under the MIT License.
3418
- */
3419
-
3420
- function isObject(o) {
3421
- return Object.prototype.toString.call(o) === '[object Object]';
3422
- }
3423
-
3424
- function isPlainObject(o) {
3425
- var ctor,prot;
3426
-
3427
- if (isObject(o) === false) return false;
3428
-
3429
- // If has modified constructor
3430
- ctor = o.constructor;
3431
- if (ctor === undefined) return true;
3432
-
3433
- // If has modified prototype
3434
- prot = ctor.prototype;
3435
- if (isObject(prot) === false) return false;
3436
-
3437
- // If constructor does not have an Object-specific method
3438
- if (prot.hasOwnProperty('isPrototypeOf') === false) {
3439
- return false;
3440
- }
3441
-
3442
- // Most likely a plain Object
3443
- return true;
3444
- }
3445
-
3446
- exports.isPlainObject = isPlainObject;
3447
-
3448
-
3449
3403
/***/ }),
3450
3404
3451
3405
/***/ 8467:
@@ -4926,7 +4880,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
4926
4880
4927
4881
var endpoint = __nccwpck_require__(9440);
4928
4882
var universalUserAgent = __nccwpck_require__(5030);
4929
- var isPlainObject = __nccwpck_require__(9062 );
4883
+ var isPlainObject = __nccwpck_require__(3287 );
4930
4884
var nodeFetch = _interopDefault(__nccwpck_require__(1768));
4931
4885
var requestError = __nccwpck_require__(537);
4932
4886
@@ -5097,52 +5051,6 @@ exports.request = request;
5097
5051
//# sourceMappingURL=index.js.map
5098
5052
5099
5053
5100
- /***/ }),
5101
-
5102
- /***/ 9062:
5103
- /***/ ((__unused_webpack_module, exports) => {
5104
-
5105
- "use strict";
5106
-
5107
-
5108
- Object.defineProperty(exports, "__esModule", ({ value: true }));
5109
-
5110
- /*!
5111
- * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
5112
- *
5113
- * Copyright (c) 2014-2017, Jon Schlinkert.
5114
- * Released under the MIT License.
5115
- */
5116
-
5117
- function isObject(o) {
5118
- return Object.prototype.toString.call(o) === '[object Object]';
5119
- }
5120
-
5121
- function isPlainObject(o) {
5122
- var ctor,prot;
5123
-
5124
- if (isObject(o) === false) return false;
5125
-
5126
- // If has modified constructor
5127
- ctor = o.constructor;
5128
- if (ctor === undefined) return true;
5129
-
5130
- // If has modified prototype
5131
- prot = ctor.prototype;
5132
- if (isObject(prot) === false) return false;
5133
-
5134
- // If constructor does not have an Object-specific method
5135
- if (prot.hasOwnProperty('isPrototypeOf') === false) {
5136
- return false;
5137
- }
5138
-
5139
- // Most likely a plain Object
5140
- return true;
5141
- }
5142
-
5143
- exports.isPlainObject = isPlainObject;
5144
-
5145
-
5146
5054
/***/ }),
5147
5055
5148
5056
/***/ 1768:
@@ -14616,6 +14524,52 @@ if (typeof Object.create === 'function') {
14616
14524
}
14617
14525
14618
14526
14527
+ /***/ }),
14528
+
14529
+ /***/ 3287:
14530
+ /***/ ((__unused_webpack_module, exports) => {
14531
+
14532
+ "use strict";
14533
+
14534
+
14535
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
14536
+
14537
+ /*!
14538
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
14539
+ *
14540
+ * Copyright (c) 2014-2017, Jon Schlinkert.
14541
+ * Released under the MIT License.
14542
+ */
14543
+
14544
+ function isObject(o) {
14545
+ return Object.prototype.toString.call(o) === '[object Object]';
14546
+ }
14547
+
14548
+ function isPlainObject(o) {
14549
+ var ctor,prot;
14550
+
14551
+ if (isObject(o) === false) return false;
14552
+
14553
+ // If has modified constructor
14554
+ ctor = o.constructor;
14555
+ if (ctor === undefined) return true;
14556
+
14557
+ // If has modified prototype
14558
+ prot = ctor.prototype;
14559
+ if (isObject(prot) === false) return false;
14560
+
14561
+ // If constructor does not have an Object-specific method
14562
+ if (prot.hasOwnProperty('isPrototypeOf') === false) {
14563
+ return false;
14564
+ }
14565
+
14566
+ // Most likely a plain Object
14567
+ return true;
14568
+ }
14569
+
14570
+ exports.isPlainObject = isPlainObject;
14571
+
14572
+
14619
14573
/***/ }),
14620
14574
14621
14575
/***/ 910:
@@ -22249,6 +22203,9 @@ class BlobDataItem {
22249
22203
this.#start = options.start
22250
22204
this.size = options.size
22251
22205
this.lastModified = options.lastModified
22206
+ this.originalSize = options.originalSize === undefined
22207
+ ? options.size
22208
+ : options.originalSize
22252
22209
}
22253
22210
22254
22211
/**
@@ -22259,16 +22216,19 @@ class BlobDataItem {
22259
22216
return new BlobDataItem({
22260
22217
path: this.#path,
22261
22218
lastModified: this.lastModified,
22219
+ originalSize: this.originalSize,
22262
22220
size: end - start,
22263
22221
start: this.#start + start
22264
22222
})
22265
22223
}
22266
22224
22267
22225
async * stream () {
22268
- const { mtimeMs } = await stat(this.#path)
22269
- if (mtimeMs > this.lastModified) {
22226
+ const { mtimeMs, size } = await stat(this.#path)
22227
+
22228
+ if (mtimeMs > this.lastModified || this.originalSize !== size) {
22270
22229
throw new DOMException('The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.', 'NotReadableError')
22271
22230
}
22231
+
22272
22232
yield * createReadStream(this.#path, {
22273
22233
start: this.#start,
22274
22234
end: this.#start + this.size - 1
@@ -22380,8 +22340,12 @@ const _Blob = class Blob {
22380
22340
part = encoder.encode(`${element}`)
22381
22341
}
22382
22342
22383
- this.#size += ArrayBuffer.isView(part) ? part.byteLength : part.size
22384
- this.#parts.push(part)
22343
+ const size = ArrayBuffer.isView(part) ? part.byteLength : part.size
22344
+ // Avoid pushing empty parts into the array to better GC them
22345
+ if (size) {
22346
+ this.#size += size
22347
+ this.#parts.push(part)
22348
+ }
22385
22349
}
22386
22350
22387
22351
this.#endings = `${options.endings === undefined ? 'transparent' : options.endings}`
0 commit comments