isomorphic-git 1.44.10 → 1.44.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,12 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
6
 
7
7
  var ignore = _interopDefault(require('ignore'));
8
- var Hash = _interopDefault(require('sha.js/sha1.js'));
8
+ var crypto$1 = require('crypto');
9
9
  var AsyncLock = _interopDefault(require('async-lock'));
10
10
  var cleanGitRef = _interopDefault(require('clean-git-ref'));
11
11
  var crc32 = _interopDefault(require('crc-32'));
12
12
  var pako = _interopDefault(require('pako'));
13
- var crypto$1 = require('crypto');
14
13
 
15
14
  /**
16
15
  * @typedef {Object} GitProgressEvent
@@ -1231,6 +1230,10 @@ function normalizeStats(e) {
1231
1230
  }
1232
1231
  }
1233
1232
 
1233
+ function createSha1() {
1234
+ return crypto$1.createHash('sha1')
1235
+ }
1236
+
1234
1237
  function toHex(buffer) {
1235
1238
  let hex = '';
1236
1239
  for (const byte of new Uint8Array(buffer)) {
@@ -1255,7 +1258,7 @@ async function shasum(buffer) {
1255
1258
  // but without the 'json-stable-stringify' dependency and
1256
1259
  // extra type-casting features.
1257
1260
  function shasumSync(buffer) {
1258
- return new Hash().update(buffer).digest('hex')
1261
+ return createSha1().update(buffer).digest('hex')
1259
1262
  }
1260
1263
 
1261
1264
  async function subtleSHA1(buffer) {
package/managers/index.js CHANGED
@@ -1224,6 +1224,10 @@ function normalizeStats(e) {
1224
1224
  }
1225
1225
  }
1226
1226
 
1227
+ function createSha1() {
1228
+ return new Hash()
1229
+ }
1230
+
1227
1231
  function toHex(buffer) {
1228
1232
  let hex = '';
1229
1233
  for (const byte of new Uint8Array(buffer)) {
@@ -1248,7 +1252,7 @@ async function shasum(buffer) {
1248
1252
  // but without the 'json-stable-stringify' dependency and
1249
1253
  // extra type-casting features.
1250
1254
  function shasumSync(buffer) {
1251
- return new Hash().update(buffer).digest('hex')
1255
+ return createSha1().update(buffer).digest('hex')
1252
1256
  }
1253
1257
 
1254
1258
  async function subtleSHA1(buffer) {