isomorphic-git 1.10.4 → 1.11.2

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.
package/README.md CHANGED
@@ -27,7 +27,7 @@ The following environments are tested in CI and will continue to be supported un
27
27
  <td align="center"><img src="https://raw.githubusercontent.com/alrra/browser-logos/bc47e4601d2c1fd46a7912f9aed5cdda4afdb301/src/edge/edge.svg?sanitize=true" alt="" width="64" height="64"><br> Edge 79</td>
28
28
  <td align="center"><img src="https://raw.githubusercontent.com/alrra/browser-logos/bc47e4601d2c1fd46a7912f9aed5cdda4afdb301/src/firefox/firefox.svg?sanitize=true" alt="" width="64" height="64"><br> Firefox 72</td>
29
29
  <td align="center"><img src="https://raw.githubusercontent.com/alrra/browser-logos/bc47e4601d2c1fd46a7912f9aed5cdda4afdb301/src/safari/safari_64x64.png" alt="" width="64" height="64"><br> Safari 13</td>
30
- <td align="center"><img src="https://upload.wikimedia.org/wikipedia/commons/8/82/Android_logo_2019.svg" alt="" width="64" height="64"><br> Android 10</td>
30
+ <td align="center"><img src="https://upload.wikimedia.org/wikipedia/commons/6/64/Android_logo_2019_%28stacked%29.svg" alt="" width="64" height="64"><br> Android 10</td>
31
31
  <td align="center"><img src="https://upload.wikimedia.org/wikipedia/commons/d/d6/IOS_13_logo.svg" alt="" width="64" height="64"><br> iOS 13</td>
32
32
  </tr>
33
33
  </table>
@@ -339,6 +339,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
339
339
  <td align="center"><a href="https://github.com/strangedev"><img src="https://avatars.githubusercontent.com/u/3045979?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Noah Hummel</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=strangedev" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=strangedev" title="Tests">⚠️</a></td>
340
340
  <td align="center"><a href="https://github.com/mtlewis"><img src="https://avatars.githubusercontent.com/u/542836?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Mike Lewis</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=mtlewis" title="Documentation">📖</a></td>
341
341
  <td align="center"><a href="https://twitter.com/SamVerschueren"><img src="https://avatars.githubusercontent.com/u/1913805?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Sam Verschueren</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=SamVerschueren" title="Code">💻</a></td>
342
+ <td align="center"><a href="http://vitorluizc.github.io/"><img src="https://avatars.githubusercontent.com/u/9027363?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Vitor Luiz Cavalcanti</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=VitorLuizC" title="Documentation">📖</a></td>
342
343
  </tr>
343
344
  </table>
344
345
 
@@ -1,8 +1,9 @@
1
1
  [
2
2
  "HeadlessChrome 0.0.0 (Linux 0.0.0)",
3
- "Firefox 95.0.0 (Ubuntu 0.0.0)",
4
- "Chrome 79.0.3945 (Windows 10 0.0.0)",
5
- "Chrome Mobile 94.0.4606 (Android 0.0.0)",
3
+ "Firefox 96.0.0 (Ubuntu 0.0.0)",
6
4
  "Safari 13.1.0 (Mac OS X 10.15.4)",
7
- "Mobile Safari 13.0.0 (iOS 13.0.0)"
5
+ "Chrome 79.0.3945 (Windows 10 0.0.0)",
6
+ "Mobile Safari 13.0.0 (iOS 13.0.0)",
7
+ "X Chrome Mobile 96.0.4664 (Android 0.0.0)",
8
+ "Chrome Mobile 96.0.4664 (Android 0.0.0)"
8
9
  ]
package/index.cjs CHANGED
@@ -1559,16 +1559,16 @@ class GitConfig {
1559
1559
  this.parsedConfig[configIndex] = modifiedConfig;
1560
1560
  }
1561
1561
  } else {
1562
- const sectionPath = path
1563
- .split('.')
1564
- .slice(0, -1)
1565
- .join('.')
1566
- .toLowerCase();
1562
+ const pathSegments = path.split('.');
1563
+ const section = pathSegments.shift().toLowerCase();
1564
+ const name = pathSegments.pop();
1565
+ const subsection = pathSegments.length
1566
+ ? pathSegments.join('.').toLowerCase()
1567
+ : undefined;
1568
+ const sectionPath = subsection ? section + '.' + subsection : section;
1567
1569
  const sectionIndex = this.parsedConfig.findIndex(
1568
1570
  config => config.path === sectionPath
1569
1571
  );
1570
- const [section, subsection] = sectionPath.split('.');
1571
- const name = path.split('.').pop();
1572
1572
  const newConfig = {
1573
1573
  section,
1574
1574
  subsection,
@@ -3271,7 +3271,7 @@ class UnknownTransportError extends BaseError {
3271
3271
  /**
3272
3272
  * @param {string} url
3273
3273
  * @param {string} transport
3274
- * @param {string} suggestion
3274
+ * @param {string} [suggestion]
3275
3275
  */
3276
3276
  constructor(url, transport, suggestion) {
3277
3277
  super(
@@ -5551,6 +5551,7 @@ const worthWalking = (filepath, root) => {
5551
5551
  * @param {boolean} [args.noUpdateHead]
5552
5552
  * @param {boolean} [args.dryRun]
5553
5553
  * @param {boolean} [args.force]
5554
+ * @param {boolean} [args.track]
5554
5555
  *
5555
5556
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
5556
5557
  *
@@ -5568,6 +5569,7 @@ async function _checkout({
5568
5569
  noUpdateHead,
5569
5570
  dryRun,
5570
5571
  force,
5572
+ track = true,
5571
5573
  }) {
5572
5574
  // Get tree oid
5573
5575
  let oid;
@@ -5585,11 +5587,13 @@ async function _checkout({
5585
5587
  gitdir,
5586
5588
  ref: remoteRef,
5587
5589
  });
5588
- // Set up remote tracking branch
5589
- const config = await GitConfigManager.get({ fs, gitdir });
5590
- await config.set(`branch.${ref}.remote`, remote);
5591
- await config.set(`branch.${ref}.merge`, `refs/heads/${ref}`);
5592
- await GitConfigManager.save({ fs, gitdir, config });
5590
+ if (track) {
5591
+ // Set up remote tracking branch
5592
+ const config = await GitConfigManager.get({ fs, gitdir });
5593
+ await config.set(`branch.${ref}.remote`, remote);
5594
+ await config.set(`branch.${ref}.merge`, `refs/heads/${ref}`);
5595
+ await GitConfigManager.save({ fs, gitdir, config });
5596
+ }
5593
5597
  // Create a new branch that points at that same commit
5594
5598
  await GitRefManager.writeRef({
5595
5599
  fs,
@@ -6114,6 +6118,7 @@ async function analyze({
6114
6118
  * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided.
6115
6119
  * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed.
6116
6120
  * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes.
6121
+ * @param {boolean} [args.track = true] - If false, will not set the remote branch tracking information. Defaults to true.
6117
6122
  * @param {object} [args.cache] - a [cache](cache.md) object
6118
6123
  *
6119
6124
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
@@ -6161,6 +6166,7 @@ async function checkout({
6161
6166
  noUpdateHead = _ref === undefined,
6162
6167
  dryRun = false,
6163
6168
  force = false,
6169
+ track = true,
6164
6170
  cache = {},
6165
6171
  }) {
6166
6172
  try {
@@ -6182,6 +6188,7 @@ async function checkout({
6182
6188
  noUpdateHead,
6183
6189
  dryRun,
6184
6190
  force,
6191
+ track,
6185
6192
  })
6186
6193
  } catch (err) {
6187
6194
  err.caller = 'git.checkout';
@@ -6865,8 +6872,8 @@ function filterCapabilities(server, client) {
6865
6872
 
6866
6873
  const pkg = {
6867
6874
  name: 'isomorphic-git',
6868
- version: '1.10.4',
6869
- agent: 'git/isomorphic-git@1.10.4',
6875
+ version: '1.11.2',
6876
+ agent: 'git/isomorphic-git@1.11.2',
6870
6877
  };
6871
6878
 
6872
6879
  class FIFO {
package/index.d.ts CHANGED
@@ -944,6 +944,7 @@ export function branch({ fs, dir, gitdir, ref, checkout, }: {
944
944
  * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided.
945
945
  * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed.
946
946
  * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes.
947
+ * @param {boolean} [args.track = true] - If false, will not set the remote branch tracking information. Defaults to true.
947
948
  * @param {object} [args.cache] - a [cache](cache.md) object
948
949
  *
949
950
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
@@ -979,7 +980,7 @@ export function branch({ fs, dir, gitdir, ref, checkout, }: {
979
980
  * })
980
981
  * console.log('done')
981
982
  */
982
- export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, cache, }: {
983
+ export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, track, cache, }: {
983
984
  fs: CallbackFsClient | PromiseFsClient;
984
985
  onProgress?: ProgressCallback;
985
986
  dir: string;
@@ -991,6 +992,7 @@ export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filep
991
992
  noUpdateHead?: boolean;
992
993
  dryRun?: boolean;
993
994
  force?: boolean;
995
+ track?: boolean;
994
996
  cache?: any;
995
997
  }): Promise<void>;
996
998
  /**
@@ -3946,15 +3948,15 @@ declare class UnknownTransportError extends BaseError {
3946
3948
  /**
3947
3949
  * @param {string} url
3948
3950
  * @param {string} transport
3949
- * @param {string} suggestion
3951
+ * @param {string} [suggestion]
3950
3952
  */
3951
- constructor(url: string, transport: string, suggestion: string);
3953
+ constructor(url: string, transport: string, suggestion?: string | undefined);
3952
3954
  code: "UnknownTransportError";
3953
3955
  name: "UnknownTransportError";
3954
3956
  data: {
3955
3957
  url: string;
3956
3958
  transport: string;
3957
- suggestion: string;
3959
+ suggestion: string | undefined;
3958
3960
  };
3959
3961
  }
3960
3962
  declare namespace UnknownTransportError {
package/index.js CHANGED
@@ -1553,16 +1553,16 @@ class GitConfig {
1553
1553
  this.parsedConfig[configIndex] = modifiedConfig;
1554
1554
  }
1555
1555
  } else {
1556
- const sectionPath = path
1557
- .split('.')
1558
- .slice(0, -1)
1559
- .join('.')
1560
- .toLowerCase();
1556
+ const pathSegments = path.split('.');
1557
+ const section = pathSegments.shift().toLowerCase();
1558
+ const name = pathSegments.pop();
1559
+ const subsection = pathSegments.length
1560
+ ? pathSegments.join('.').toLowerCase()
1561
+ : undefined;
1562
+ const sectionPath = subsection ? section + '.' + subsection : section;
1561
1563
  const sectionIndex = this.parsedConfig.findIndex(
1562
1564
  config => config.path === sectionPath
1563
1565
  );
1564
- const [section, subsection] = sectionPath.split('.');
1565
- const name = path.split('.').pop();
1566
1566
  const newConfig = {
1567
1567
  section,
1568
1568
  subsection,
@@ -3265,7 +3265,7 @@ class UnknownTransportError extends BaseError {
3265
3265
  /**
3266
3266
  * @param {string} url
3267
3267
  * @param {string} transport
3268
- * @param {string} suggestion
3268
+ * @param {string} [suggestion]
3269
3269
  */
3270
3270
  constructor(url, transport, suggestion) {
3271
3271
  super(
@@ -5545,6 +5545,7 @@ const worthWalking = (filepath, root) => {
5545
5545
  * @param {boolean} [args.noUpdateHead]
5546
5546
  * @param {boolean} [args.dryRun]
5547
5547
  * @param {boolean} [args.force]
5548
+ * @param {boolean} [args.track]
5548
5549
  *
5549
5550
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
5550
5551
  *
@@ -5562,6 +5563,7 @@ async function _checkout({
5562
5563
  noUpdateHead,
5563
5564
  dryRun,
5564
5565
  force,
5566
+ track = true,
5565
5567
  }) {
5566
5568
  // Get tree oid
5567
5569
  let oid;
@@ -5579,11 +5581,13 @@ async function _checkout({
5579
5581
  gitdir,
5580
5582
  ref: remoteRef,
5581
5583
  });
5582
- // Set up remote tracking branch
5583
- const config = await GitConfigManager.get({ fs, gitdir });
5584
- await config.set(`branch.${ref}.remote`, remote);
5585
- await config.set(`branch.${ref}.merge`, `refs/heads/${ref}`);
5586
- await GitConfigManager.save({ fs, gitdir, config });
5584
+ if (track) {
5585
+ // Set up remote tracking branch
5586
+ const config = await GitConfigManager.get({ fs, gitdir });
5587
+ await config.set(`branch.${ref}.remote`, remote);
5588
+ await config.set(`branch.${ref}.merge`, `refs/heads/${ref}`);
5589
+ await GitConfigManager.save({ fs, gitdir, config });
5590
+ }
5587
5591
  // Create a new branch that points at that same commit
5588
5592
  await GitRefManager.writeRef({
5589
5593
  fs,
@@ -6108,6 +6112,7 @@ async function analyze({
6108
6112
  * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided.
6109
6113
  * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed.
6110
6114
  * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes.
6115
+ * @param {boolean} [args.track = true] - If false, will not set the remote branch tracking information. Defaults to true.
6111
6116
  * @param {object} [args.cache] - a [cache](cache.md) object
6112
6117
  *
6113
6118
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
@@ -6155,6 +6160,7 @@ async function checkout({
6155
6160
  noUpdateHead = _ref === undefined,
6156
6161
  dryRun = false,
6157
6162
  force = false,
6163
+ track = true,
6158
6164
  cache = {},
6159
6165
  }) {
6160
6166
  try {
@@ -6176,6 +6182,7 @@ async function checkout({
6176
6182
  noUpdateHead,
6177
6183
  dryRun,
6178
6184
  force,
6185
+ track,
6179
6186
  })
6180
6187
  } catch (err) {
6181
6188
  err.caller = 'git.checkout';
@@ -6859,8 +6866,8 @@ function filterCapabilities(server, client) {
6859
6866
 
6860
6867
  const pkg = {
6861
6868
  name: 'isomorphic-git',
6862
- version: '1.10.4',
6863
- agent: 'git/isomorphic-git@1.10.4',
6869
+ version: '1.11.2',
6870
+ agent: 'git/isomorphic-git@1.11.2',
6864
6871
  };
6865
6872
 
6866
6873
  class FIFO {
@@ -944,6 +944,7 @@ export function branch({ fs, dir, gitdir, ref, checkout, }: {
944
944
  * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided.
945
945
  * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed.
946
946
  * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes.
947
+ * @param {boolean} [args.track = true] - If false, will not set the remote branch tracking information. Defaults to true.
947
948
  * @param {object} [args.cache] - a [cache](cache.md) object
948
949
  *
949
950
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
@@ -979,7 +980,7 @@ export function branch({ fs, dir, gitdir, ref, checkout, }: {
979
980
  * })
980
981
  * console.log('done')
981
982
  */
982
- export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, cache, }: {
983
+ export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, track, cache, }: {
983
984
  fs: CallbackFsClient | PromiseFsClient;
984
985
  onProgress?: ProgressCallback;
985
986
  dir: string;
@@ -991,6 +992,7 @@ export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filep
991
992
  noUpdateHead?: boolean;
992
993
  dryRun?: boolean;
993
994
  force?: boolean;
995
+ track?: boolean;
994
996
  cache?: any;
995
997
  }): Promise<void>;
996
998
  /**
@@ -3946,15 +3948,15 @@ declare class UnknownTransportError extends BaseError {
3946
3948
  /**
3947
3949
  * @param {string} url
3948
3950
  * @param {string} transport
3949
- * @param {string} suggestion
3951
+ * @param {string} [suggestion]
3950
3952
  */
3951
- constructor(url: string, transport: string, suggestion: string);
3953
+ constructor(url: string, transport: string, suggestion?: string | undefined);
3952
3954
  code: "UnknownTransportError";
3953
3955
  name: "UnknownTransportError";
3954
3956
  data: {
3955
3957
  url: string;
3956
3958
  transport: string;
3957
- suggestion: string;
3959
+ suggestion: string | undefined;
3958
3960
  };
3959
3961
  }
3960
3962
  declare namespace UnknownTransportError {