isomorphic-git 1.30.2 → 1.30.3
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 +3 -1
- package/browser-tests.json +2 -2
- package/index.cjs +21 -6
- package/index.js +21 -6
- package/index.umd.min.js +1 -1
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/size_report.html +1 -1
package/README.md
CHANGED
|
@@ -111,7 +111,8 @@ Then check out the [Useful Snippets](https://isomorphic-git.org/docs/en/snippets
|
|
|
111
111
|
|
|
112
112
|
Unfortunately, due to the same-origin policy by default `isomorphic-git` can only clone from the same origin as the webpage it is running on. This is terribly inconvenient, as it means for all practical purposes cloning and pushing repos must be done through a proxy.
|
|
113
113
|
|
|
114
|
-
For this purpose [@isomorphic-git/cors-proxy](https://github.com/isomorphic-git/cors-proxy) exists which you can clone or [`npm install`](https://www.npmjs.com/package/@isomorphic-git/cors-proxy).
|
|
114
|
+
For this purpose, [@isomorphic-git/cors-proxy](https://github.com/isomorphic-git/cors-proxy) exists; which you can clone it or [`npm install`](https://www.npmjs.com/package/@isomorphic-git/cors-proxy) it. Alternatively, use CloudFlare workers, which can be setup without leaving the browser ([instructions](https://gist.github.com/tomlarkworthy/cf1d4ceabeabdb6d1628575ab3a83acf)).
|
|
115
|
+
|
|
115
116
|
For testing or small projects, you can also use [https://cors.isomorphic-git.org](https://cors.isomorphic-git.org) - a free proxy sponsored by [Clever Cloud](https://www.clever-cloud.com/?utm_source=ref&utm_medium=link&utm_campaign=isomorphic-git).
|
|
116
117
|
|
|
117
118
|
We hope to get CORS headers added to all the major Git hosting platforms eventually, and will list the progress made here:
|
|
@@ -385,6 +386,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
|
|
|
385
386
|
</tr>
|
|
386
387
|
<tr>
|
|
387
388
|
<td align="center"><a href="https://github.com/lukecotter"><img src="https://avatars.githubusercontent.com/u/4013877?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Luke Cotter</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=lukecotter" title="Code">💻</a></td>
|
|
389
|
+
<td align="center"><a href="https://tomlarkworthy.endpointservices.net/"><img src="https://avatars.githubusercontent.com/u/1848162?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Tom Larkworthy</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=tomlarkworthy" title="Documentation">📖</a></td>
|
|
388
390
|
<td align="center"><a href="https://github.com/kofta999"><img src="https://avatars.githubusercontent.com/u/99273340?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Mostafa Mahmoud</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=kofta999" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=kofta999" title="Tests">⚠️</a> <a href="#question-kofta999" title="Answering Questions">💬</a></td>
|
|
389
391
|
</tr>
|
|
390
392
|
</table>
|
package/browser-tests.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[
|
|
2
2
|
"Chrome Headless 79.0.3945.0 (Linux x86_64)",
|
|
3
|
-
"Firefox
|
|
4
|
-
"Chrome 135.0.0.0 (Android 10)",
|
|
3
|
+
"Firefox 139.0 (Linux x86_64)",
|
|
5
4
|
"Edge 79.0.309.65 (Windows 10)",
|
|
5
|
+
"Chrome 135.0.0.0 (Android 10)",
|
|
6
6
|
"Mobile Safari 14.0 (iOS 14.0.1)",
|
|
7
7
|
"Safari 14.1 (Mac OS 10.15.7)"
|
|
8
8
|
]
|
package/index.cjs
CHANGED
|
@@ -7644,8 +7644,8 @@ function filterCapabilities(server, client) {
|
|
|
7644
7644
|
|
|
7645
7645
|
const pkg = {
|
|
7646
7646
|
name: 'isomorphic-git',
|
|
7647
|
-
version: '1.30.
|
|
7648
|
-
agent: 'git/isomorphic-git@1.30.
|
|
7647
|
+
version: '1.30.3',
|
|
7648
|
+
agent: 'git/isomorphic-git@1.30.3',
|
|
7649
7649
|
};
|
|
7650
7650
|
|
|
7651
7651
|
class FIFO {
|
|
@@ -9392,7 +9392,12 @@ async function mergeTree({
|
|
|
9392
9392
|
}
|
|
9393
9393
|
|
|
9394
9394
|
// deleted by both
|
|
9395
|
-
if (
|
|
9395
|
+
if (
|
|
9396
|
+
base &&
|
|
9397
|
+
!ours &&
|
|
9398
|
+
!theirs &&
|
|
9399
|
+
((await base.type()) === 'blob' || (await base.type()) === 'tree')
|
|
9400
|
+
) {
|
|
9396
9401
|
return undefined
|
|
9397
9402
|
}
|
|
9398
9403
|
|
|
@@ -9416,9 +9421,19 @@ async function mergeTree({
|
|
|
9416
9421
|
if (!parent) return
|
|
9417
9422
|
|
|
9418
9423
|
// automatically delete directories if they have been emptied
|
|
9419
|
-
|
|
9424
|
+
// except for the root directory
|
|
9425
|
+
if (
|
|
9426
|
+
parent &&
|
|
9427
|
+
parent.type === 'tree' &&
|
|
9428
|
+
entries.length === 0 &&
|
|
9429
|
+
parent.path !== '.'
|
|
9430
|
+
)
|
|
9431
|
+
return
|
|
9420
9432
|
|
|
9421
|
-
if (
|
|
9433
|
+
if (
|
|
9434
|
+
entries.length > 0 ||
|
|
9435
|
+
(parent.path === '.' && entries.length === 0)
|
|
9436
|
+
) {
|
|
9422
9437
|
const tree = new GitTree(entries);
|
|
9423
9438
|
const object = tree.toObject();
|
|
9424
9439
|
const oid = await _writeObject({
|
|
@@ -9682,7 +9697,7 @@ async function _merge({
|
|
|
9682
9697
|
);
|
|
9683
9698
|
|
|
9684
9699
|
// Defer throwing error until the index lock is relinquished and index is
|
|
9685
|
-
// written to
|
|
9700
|
+
// written to filesystem
|
|
9686
9701
|
if (tree instanceof MergeConflictError) throw tree
|
|
9687
9702
|
|
|
9688
9703
|
if (!message) {
|
package/index.js
CHANGED
|
@@ -7638,8 +7638,8 @@ function filterCapabilities(server, client) {
|
|
|
7638
7638
|
|
|
7639
7639
|
const pkg = {
|
|
7640
7640
|
name: 'isomorphic-git',
|
|
7641
|
-
version: '1.30.
|
|
7642
|
-
agent: 'git/isomorphic-git@1.30.
|
|
7641
|
+
version: '1.30.3',
|
|
7642
|
+
agent: 'git/isomorphic-git@1.30.3',
|
|
7643
7643
|
};
|
|
7644
7644
|
|
|
7645
7645
|
class FIFO {
|
|
@@ -9386,7 +9386,12 @@ async function mergeTree({
|
|
|
9386
9386
|
}
|
|
9387
9387
|
|
|
9388
9388
|
// deleted by both
|
|
9389
|
-
if (
|
|
9389
|
+
if (
|
|
9390
|
+
base &&
|
|
9391
|
+
!ours &&
|
|
9392
|
+
!theirs &&
|
|
9393
|
+
((await base.type()) === 'blob' || (await base.type()) === 'tree')
|
|
9394
|
+
) {
|
|
9390
9395
|
return undefined
|
|
9391
9396
|
}
|
|
9392
9397
|
|
|
@@ -9410,9 +9415,19 @@ async function mergeTree({
|
|
|
9410
9415
|
if (!parent) return
|
|
9411
9416
|
|
|
9412
9417
|
// automatically delete directories if they have been emptied
|
|
9413
|
-
|
|
9418
|
+
// except for the root directory
|
|
9419
|
+
if (
|
|
9420
|
+
parent &&
|
|
9421
|
+
parent.type === 'tree' &&
|
|
9422
|
+
entries.length === 0 &&
|
|
9423
|
+
parent.path !== '.'
|
|
9424
|
+
)
|
|
9425
|
+
return
|
|
9414
9426
|
|
|
9415
|
-
if (
|
|
9427
|
+
if (
|
|
9428
|
+
entries.length > 0 ||
|
|
9429
|
+
(parent.path === '.' && entries.length === 0)
|
|
9430
|
+
) {
|
|
9416
9431
|
const tree = new GitTree(entries);
|
|
9417
9432
|
const object = tree.toObject();
|
|
9418
9433
|
const oid = await _writeObject({
|
|
@@ -9676,7 +9691,7 @@ async function _merge({
|
|
|
9676
9691
|
);
|
|
9677
9692
|
|
|
9678
9693
|
// Defer throwing error until the index lock is relinquished and index is
|
|
9679
|
-
// written to
|
|
9694
|
+
// written to filesystem
|
|
9680
9695
|
if (tree instanceof MergeConflictError) throw tree
|
|
9681
9696
|
|
|
9682
9697
|
if (!message) {
|