isomorphic-git 1.44.4 → 1.44.5

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
@@ -464,6 +464,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
464
464
  <td align="center"><a href="https://github.com/macabeus"><img src="https://avatars.githubusercontent.com/u/9501115?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Bruno Macabeus</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=macabeus" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=macabeus" title="Tests">⚠️</a></td>
465
465
  <td align="center"><a href="https://github.com/snowyukitty"><img src="https://avatars.githubusercontent.com/u/270071858?v=4?s=60" width="60px;" alt=""/><br /><sub><b>snowyukitty</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=snowyukitty" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=snowyukitty" title="Tests">⚠️</a></td>
466
466
  <td align="center"><a href="https://github.com/ShahabAhmed01"><img src="https://avatars.githubusercontent.com/u/192491541?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Shahab Ahmed</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ShahabAhmed01" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ShahabAhmed01" title="Tests">⚠️</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ShahabAhmed01" title="Documentation">📖</a></td>
467
+ <td align="center"><a href="https://github.com/wleeaf"><img src="https://avatars.githubusercontent.com/u/179125857?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Wleeaf</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=wleeaf" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=wleeaf" title="Tests">⚠️</a></td>
467
468
  </tr>
468
469
  </table>
469
470
 
package/index.cjs CHANGED
@@ -1823,9 +1823,11 @@ const schema = {
1823
1823
  // section is alphanumeric (ASCII) with - and .
1824
1824
  // section is case insensitive
1825
1825
  // subsection is optional
1826
- // subsection is specified after section and one or more spaces
1827
- // subsection is specified between double quotes
1828
- const SECTION_LINE_REGEX = /^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/;
1826
+ // subsection is specified after section and one or more spaces or tabs
1827
+ // subsection is specified between double quotes, where \ escapes the next character
1828
+ // a comment can follow the section header
1829
+ const SECTION_LINE_REGEX =
1830
+ /^\[([A-Za-z0-9-.]+)(?:[ \t]+"((?:[^"\\]|\\.)*)")?\][ \t]*(?:[#;].*)?$/;
1829
1831
  const SECTION_REGEX = /^[A-Za-z0-9-.]+$/;
1830
1832
 
1831
1833
  // variable lines contain a name, and equal sign and then a value
@@ -1841,7 +1843,8 @@ const extractSectionLine = line => {
1841
1843
  const matches = SECTION_LINE_REGEX.exec(line);
1842
1844
  if (matches != null) {
1843
1845
  const [section, subsection] = matches.slice(1);
1844
- return [section, subsection]
1846
+ // Like canonical git, drop the backslash of an escaped character
1847
+ return [section, subsection && subsection.replace(/\\(.)/g, '$1')]
1845
1848
  }
1846
1849
  return null
1847
1850
  };
@@ -10126,8 +10129,8 @@ function filterCapabilities(server, client) {
10126
10129
 
10127
10130
  const pkg = {
10128
10131
  name: 'isomorphic-git',
10129
- version: '1.44.4',
10130
- agent: 'git/isomorphic-git@1.44.4',
10132
+ version: '1.44.5',
10133
+ agent: 'git/isomorphic-git@1.44.5',
10131
10134
  };
10132
10135
 
10133
10136
  class FIFO {
package/index.js CHANGED
@@ -1816,9 +1816,11 @@ const schema = {
1816
1816
  // section is alphanumeric (ASCII) with - and .
1817
1817
  // section is case insensitive
1818
1818
  // subsection is optional
1819
- // subsection is specified after section and one or more spaces
1820
- // subsection is specified between double quotes
1821
- const SECTION_LINE_REGEX = /^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/;
1819
+ // subsection is specified after section and one or more spaces or tabs
1820
+ // subsection is specified between double quotes, where \ escapes the next character
1821
+ // a comment can follow the section header
1822
+ const SECTION_LINE_REGEX =
1823
+ /^\[([A-Za-z0-9-.]+)(?:[ \t]+"((?:[^"\\]|\\.)*)")?\][ \t]*(?:[#;].*)?$/;
1822
1824
  const SECTION_REGEX = /^[A-Za-z0-9-.]+$/;
1823
1825
 
1824
1826
  // variable lines contain a name, and equal sign and then a value
@@ -1834,7 +1836,8 @@ const extractSectionLine = line => {
1834
1836
  const matches = SECTION_LINE_REGEX.exec(line);
1835
1837
  if (matches != null) {
1836
1838
  const [section, subsection] = matches.slice(1);
1837
- return [section, subsection]
1839
+ // Like canonical git, drop the backslash of an escaped character
1840
+ return [section, subsection && subsection.replace(/\\(.)/g, '$1')]
1838
1841
  }
1839
1842
  return null
1840
1843
  };
@@ -10113,8 +10116,8 @@ function filterCapabilities(server, client) {
10113
10116
 
10114
10117
  const pkg = {
10115
10118
  name: 'isomorphic-git',
10116
- version: '1.44.4',
10117
- agent: 'git/isomorphic-git@1.44.4',
10119
+ version: '1.44.5',
10120
+ agent: 'git/isomorphic-git@1.44.5',
10118
10121
  };
10119
10122
 
10120
10123
  class FIFO {