@dotinc/ogre 0.8.1 → 0.9.0

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.
Files changed (27) hide show
  1. package/.tap/processinfo/{4bb3fbc0-322c-47fe-99ca-5a2029006dab.json → 2426d9f3-699c-4fb9-94b2-9ec9c3eac102.json} +23 -23
  2. package/.tap/processinfo/{999e3026-ccc7-47b1-bfbd-82a08fbfebb2.json → 45f9dbea-d45b-4370-ad84-bacbe0f7923b.json} +7 -7
  3. package/.tap/processinfo/{46e1fc09-045e-4621-a147-8e17ab127537.json → 6a2329ae-15e9-4041-98f8-205645f535f5.json} +7 -7
  4. package/.tap/processinfo/{9e618086-85e0-4b56-855b-6e7251bd1b83.json → 7073c462-24dd-4066-8ee7-610cc0a4cdc6.json} +23 -23
  5. package/.tap/processinfo/{0edfcd98-724a-4657-9a64-db2d38f2bc26.json → 8ce3d798-c3e7-49ba-a002-477d6aed67d1.json} +11 -11
  6. package/.tap/processinfo/a33fc811-9cba-46ee-8577-3d68cb1ae96f.json +246 -0
  7. package/.tap/processinfo/{afde0f56-0117-4d71-a370-ed7621252dcc.json → cc694d82-e679-4b5d-8cf9-decd8029a65a.json} +7 -7
  8. package/.tap/test-results/src/branch.test.ts.tap +6 -6
  9. package/.tap/test-results/src/checkout.test.ts.tap +9 -9
  10. package/.tap/test-results/src/commit.test.ts.tap +18 -18
  11. package/.tap/test-results/src/merge.test.ts.tap +2 -2
  12. package/.tap/test-results/src/repository.test.ts.tap +111 -26
  13. package/.tap/test-results/src/tag.test.ts.tap +3 -3
  14. package/.tap/test-results/src/utils.test.ts.tap +41 -8
  15. package/CHANGELOG.md +17 -0
  16. package/lib/commit.d.ts +2 -2
  17. package/lib/repository.d.ts +19 -7
  18. package/lib/repository.js +84 -5
  19. package/lib/utils.d.ts +12 -1
  20. package/lib/utils.js +40 -8
  21. package/package.json +4 -2
  22. package/src/commit.ts +9 -9
  23. package/src/repository.test.ts +359 -5
  24. package/src/repository.ts +118 -13
  25. package/src/utils.test.ts +88 -1
  26. package/src/utils.ts +48 -10
  27. package/.tap/processinfo/ae7dad2b-5163-4c3f-8d16-e25e7696c657.json +0 -242
@@ -2,39 +2,39 @@ TAP version 14
2
2
  # Subtest: current branch on empty repo is HEAD
3
3
  ok 1 - invalid current branch
4
4
  1..1
5
- ok 1 - current branch on empty repo is HEAD # time=48.912ms
5
+ ok 1 - current branch on empty repo is HEAD # time=54.047ms
6
6
 
7
7
  # Subtest: first commit goes onto default 'main' branch
8
8
  ok 1 - invalid current branch
9
9
  ok 2 - invalid HEAD
10
10
  1..2
11
- ok 2 - first commit goes onto default 'main' branch # time=9.17ms
11
+ ok 2 - first commit goes onto default 'main' branch # time=9.099ms
12
12
 
13
13
  # Subtest: fails to create a branch with empty repo
14
14
  ok 1 - incorrect \# of commits
15
15
  ok 2 - new branch w/ incorrect \# of changelog entries
16
16
  ok 3 - expected to throw
17
17
  1..3
18
- ok 3 - fails to create a branch with empty repo # time=5.644ms
18
+ ok 3 - fails to create a branch with empty repo # time=5.829ms
19
19
 
20
20
  # Subtest: checkout new branch with empty repo
21
21
  ok 1 - HEAD did not move to new branch
22
22
  ok 2 - main should not be pointing to anything
23
23
  ok 3 - new_feature should not be pointing to anything
24
24
  1..3
25
- ok 4 - checkout new branch with empty repo # time=2.702ms
25
+ ok 4 - checkout new branch with empty repo # time=2.654ms
26
26
 
27
27
  # Subtest: creating a valid branch on a baseline
28
28
  ok 1 - invalid branch ref created
29
29
  ok 2 - new branch is pointing to wrong commit
30
30
  1..2
31
- ok 5 - creating a valid branch on a baseline # time=3.537ms
31
+ ok 5 - creating a valid branch on a baseline # time=3.456ms
32
32
 
33
33
  # Subtest: cannot create new branch with invalid name
34
34
  ok 1 - expected to throw
35
35
  ok 2 - expected to throw
36
36
  ok 3 - expected to throw
37
37
  1..3
38
- ok 6 - cannot create new branch with invalid name # time=2.354ms
38
+ ok 6 - cannot create new branch with invalid name # time=2.363ms
39
39
 
40
40
  1..6
@@ -4,19 +4,19 @@ TAP version 14
4
4
  ok 2 - incorrect \# of commits
5
5
  ok 3 - points to wrong commit
6
6
  ok 4 - repo is not in detached state
7
- ok 5 - has a nested object when it shouldn't: {"uuid":"dfe32535-0664-4b55-9b70-8127bad657c8","name":"my first process template","description":"now we have a description","nested":[]}
7
+ ok 5 - has a nested object when it shouldn't: {"uuid":"8d4d94d0-c405-4935-8865-2bc02d629bf9","name":"my first process template","description":"now we have a description","nested":[]}
8
8
  1..5
9
- ok 1 - checkout prev commit # time=83.43ms
9
+ ok 1 - checkout prev commit # time=212.153ms
10
10
 
11
11
  # Subtest: checkout new branch with simple name
12
12
  ok 1 - HEAD is not moved to target branch
13
13
  1..1
14
- ok 2 - checkout new branch with simple name # time=3.535ms
14
+ ok 2 - checkout new branch with simple name # time=5.235ms
15
15
 
16
16
  # Subtest: checkout new branch with full ref name
17
17
  ok 1 - HEAD is not moved to target branch
18
18
  1..1
19
- ok 3 - checkout new branch with full ref name # time=6.662ms
19
+ ok 3 - checkout new branch with full ref name # time=2.448ms
20
20
 
21
21
  # Subtest: checkout commit which has two refs pointing leaves HEAD detached
22
22
  ok 1 - main does not point to commit
@@ -24,29 +24,29 @@ ok 3 - checkout new branch with full ref name # time=6.662ms
24
24
  ok 3 - HEAD is not detached at commit
25
25
  ok 4 - HEAD is not pointing to commit
26
26
  1..4
27
- ok 4 - checkout commit which has two refs pointing leaves HEAD detached # time=6.351ms
27
+ ok 4 - checkout commit which has two refs pointing leaves HEAD detached # time=2.678ms
28
28
 
29
29
  # Subtest: checkout new branch moves head to new branch
30
30
  ok 1 - HEAD is not moved to target branch
31
31
  1..1
32
- ok 5 - checkout new branch moves head to new branch # time=2.438ms
32
+ ok 5 - checkout new branch moves head to new branch # time=2.312ms
33
33
 
34
34
  # Subtest: checkout and create new branch on empty main
35
35
  ok 1 - HEAD should point to empty branch
36
36
  ok 2 - branch still should be empty
37
37
  1..2
38
- ok 6 - checkout and create new branch on empty main # time=0.775ms
38
+ ok 6 - checkout and create new branch on empty main # time=4.428ms
39
39
 
40
40
  # Subtest: checkout and create new branch with at least 1 commit
41
41
  ok 1 - HEAD should point to new branch
42
42
  ok 2 - branch is not pointing to last HEAD commit
43
43
  1..2
44
- ok 7 - checkout and create new branch with at least 1 commit # time=2.495ms
44
+ ok 7 - checkout and create new branch with at least 1 commit # time=2.203ms
45
45
 
46
46
  # Subtest: replacing default branch on empty master removes main
47
47
  ok 1 - new branch w/ incorrect \# of changelog entries
48
48
  ok 2 - expected to throw
49
49
  1..2
50
- ok 8 - replacing default branch on empty master removes main # time=6.177ms
50
+ ok 8 - replacing default branch on empty master removes main # time=5.049ms
51
51
 
52
52
  1..8
@@ -3,58 +3,58 @@ TAP version 14
3
3
  ok 1 - has changelog entries
4
4
  ok 2 - incorrect \# of commits
5
5
  1..2
6
- ok 1 - baseline with 1 commit and zero changelog entries # time=215.908ms
6
+ ok 1 - baseline with 1 commit and zero changelog entries # time=423.514ms
7
7
 
8
8
  # Subtest: head points to main
9
9
  ok 1 - head not pointing where it should
10
10
  1..1
11
- ok 2 - head points to main # time=1.466ms
11
+ ok 2 - head points to main # time=0.959ms
12
12
 
13
13
  # Subtest: changes are available for commit if starting from empty
14
14
  ok 1 - Status does not contain the right amount of changes
15
15
  ok 2 - (unnamed test)
16
16
  1..2
17
- ok 3 - changes are available for commit if starting from empty # time=7.24ms
17
+ ok 3 - changes are available for commit if starting from empty # time=6.542ms
18
18
 
19
19
  # Subtest: no commit without changes
20
20
  ok 1 - expected to reject
21
21
  1..1
22
- ok 4 - no commit without changes # time=6.161ms
22
+ ok 4 - no commit without changes # time=14.342ms
23
23
 
24
24
  # Subtest: no commit without changes after recent commit
25
25
  ok 1 - expected to reject
26
26
  1..1
27
- ok 5 - no commit without changes after recent commit # time=4.5ms
27
+ ok 5 - no commit without changes after recent commit # time=6.753ms
28
28
 
29
29
  # Subtest: overwrite nested array changes are recognized
30
30
  1..0
31
- ok 6 - overwrite nested array changes are recognized # time=4.377ms
31
+ ok 6 - overwrite nested array changes are recognized # time=10.249ms
32
32
 
33
33
  # Subtest: change of nested array element is recognized
34
34
  1..0
35
- ok 7 - change of nested array element is recognized # time=13.835ms
35
+ ok 7 - change of nested array element is recognized # time=9.908ms
36
36
 
37
37
  # Subtest: treeHash of commit is matching content
38
38
  ok 1 - should be equal
39
39
  ok 2 - tree hash mismatch
40
40
  1..2
41
- ok 8 - treeHash of commit is matching content # time=2.617ms
41
+ ok 8 - treeHash of commit is matching content # time=2.513ms
42
42
 
43
43
  # Subtest: no commit --amend without commit
44
44
  ok 1 - expected to reject
45
45
  1..1
46
- ok 9 - no commit --amend without commit # time=2.781ms
46
+ ok 9 - no commit --amend without commit # time=2.606ms
47
47
 
48
48
  # Subtest: main moves to recent commit
49
49
  ok 1 - head does not point to recent commit
50
50
  1..1
51
- ok 10 - main moves to recent commit # time=1.978ms
51
+ ok 10 - main moves to recent commit # time=5.997ms
52
52
 
53
53
  # Subtest: two commits with 3 changes
54
54
  ok 1 - incorrect \# of changelog entries
55
55
  ok 2 - incorrect \# of commits
56
56
  1..2
57
- ok 11 - two commits with 3 changes # time=2.623ms
57
+ ok 11 - two commits with 3 changes # time=2.865ms
58
58
 
59
59
  # Subtest: array push double-change, 6 changes, 3 commits
60
60
  ok 1 - incorrect \# of changelog entries
@@ -62,7 +62,7 @@ ok 11 - two commits with 3 changes # time=2.623ms
62
62
  ok 3 - \#incorrect \# of changes in commit\#1
63
63
  ok 4 - \#incorrect \# of changes in commit\#2
64
64
  1..4
65
- ok 12 - array push double-change, 6 changes, 3 commits # time=4.552ms
65
+ ok 12 - array push double-change, 6 changes, 3 commits # time=23.914ms
66
66
 
67
67
  # Subtest: all refs OK, when committing on new branch while main is empty main
68
68
  ok 1 - main should not point to a commit
@@ -70,7 +70,7 @@ ok 12 - array push double-change, 6 changes, 3 commits # time=4.552ms
70
70
  ok 3 - branch should now be visible
71
71
  ok 4 - HEAD is pointing to wrong branch
72
72
  1..4
73
- ok 13 - all refs OK, when committing on new branch while main is empty main # time=4.113ms
73
+ ok 13 - all refs OK, when committing on new branch while main is empty main # time=3.201ms
74
74
 
75
75
  # Subtest: commit --amend changes hash on content change
76
76
  ok 1 - hash should have changed
@@ -80,7 +80,7 @@ ok 13 - all refs OK, when committing on new branch while main is empty main # ti
80
80
  ok 5 - we are on the wrong branch
81
81
  ok 6 - main should point to changed commit hash
82
82
  1..6
83
- ok 14 - commit --amend changes hash on content change # time=5.954ms
83
+ ok 14 - commit --amend changes hash on content change # time=72.189ms
84
84
 
85
85
  # Subtest: commit --amend changes hash on message change
86
86
  ok 1 - hash should have changed
@@ -90,7 +90,7 @@ ok 14 - commit --amend changes hash on content change # time=5.954ms
90
90
  ok 5 - we are on the wrong branch
91
91
  ok 6 - main should point to changed commit hash
92
92
  1..6
93
- ok 15 - commit --amend changes hash on message change # time=5.565ms
93
+ ok 15 - commit --amend changes hash on message change # time=46.266ms
94
94
 
95
95
  # Subtest: commit at detached HEAD does not affect main, but moves head
96
96
  ok 1 - HEAD did not move to commit
@@ -99,12 +99,12 @@ ok 15 - commit --amend changes hash on message change # time=5.565ms
99
99
  ok 4 - HEAD did not move to commit
100
100
  ok 5 - main branch did not stay at last commit
101
101
  1..5
102
- ok 16 - commit at detached HEAD does not affect main, but moves head # time=17.176ms
102
+ ok 16 - commit at detached HEAD does not affect main, but moves head # time=14.451ms
103
103
 
104
104
  # Subtest: commit at detached HEAD saved to a branch
105
105
  ok 1 - savepoint branch should point to last detached commit
106
106
  1..1
107
- ok 17 - commit at detached HEAD saved to a branch # time=6.346ms
107
+ ok 17 - commit at detached HEAD saved to a branch # time=2.418ms
108
108
 
109
109
  # Subtest: commit --amend changes hash on message change even in detached HEAD
110
110
  ok 1 - hash should have changed
@@ -114,6 +114,6 @@ ok 17 - commit at detached HEAD saved to a branch # time=6.346ms
114
114
  ok 5 - HEAD is not pointing to detached commit
115
115
  ok 6 - main should point to changed commit hash
116
116
  1..6
117
- ok 18 - commit --amend changes hash on message change even in detached HEAD # time=19.982ms
117
+ ok 18 - commit --amend changes hash on message change even in detached HEAD # time=2.835ms
118
118
 
119
119
  1..18
@@ -2,7 +2,7 @@ TAP version 14
2
2
  # Subtest: merge with no commit fails
3
3
  ok 1 - expected to throw
4
4
  1..1
5
- ok 1 - merge with no commit fails # time=25.666ms
5
+ ok 1 - merge with no commit fails # time=25.574ms
6
6
 
7
7
  # Subtest: merge fast-forward
8
8
  ok 1 - HEAD not pointing to new_branch
@@ -11,6 +11,6 @@ ok 1 - merge with no commit fails # time=25.666ms
11
11
  ok 4 - master is not at expected commit
12
12
  ok 5 - fast-forward failed, superfluous commit detected
13
13
  1..5
14
- ok 2 - merge fast-forward # time=9.009ms
14
+ ok 2 - merge fast-forward # time=9.006ms
15
15
 
16
16
  1..2
@@ -1,9 +1,9 @@
1
1
  TAP version 14
2
2
  # Subtest: diff is ok
3
3
  ok 1 - main is pointing at wrong commit
4
- ok 2 - invalid \# of change entries: [{"op":"add","path":"/nested/0","value":{"uuid":"002b691f-f58b-4b34-82a8-405dcc789b6d","name":"new name"}},{"op":"add","path":"/nested/1","value":{"uuid":"3703fb2e-234b-4919-b50e-9db2a6119240","name":"first name"}}]
4
+ ok 2 - invalid \# of change entries: [{"op":"add","path":"/nested/0","value":{"uuid":"668ca535-c2a1-4254-8195-c9865fcd7033","name":"new name"}},{"op":"add","path":"/nested/1","value":{"uuid":"2ed8e591-db77-48ab-b0f4-f3519fc5375a","name":"first name"}}]
5
5
  1..2
6
- ok 1 - diff is ok # time=78.819ms
6
+ ok 1 - diff is ok # time=98.593ms
7
7
 
8
8
  # Subtest: restore
9
9
  # Subtest: history check
@@ -13,7 +13,7 @@ ok 1 - diff is ok # time=78.819ms
13
13
  ok 4 - incorrect \# of commits
14
14
  ok 5 - incorrect \# of changelog entries
15
15
  1..5
16
- ok 1 - history check # time=50.546ms
16
+ ok 1 - history check # time=68.993ms
17
17
 
18
18
  # Subtest: reconstruct with 2 commits
19
19
  ok 1 - main is pointing at wrong commit
@@ -22,16 +22,17 @@ ok 1 - diff is ok # time=78.819ms
22
22
  ok 4 - incorrect \# of commits
23
23
  ok 5 - incorrect \# of changelog entries
24
24
  1..5
25
- ok 2 - reconstruct with 2 commits # time=9.721ms
25
+ ok 2 - reconstruct with 2 commits # time=10.45ms
26
26
 
27
27
  1..2
28
- ok 2 - restore # time=105.334ms
28
+ ok 2 - restore # time=119.522ms
29
29
 
30
30
  # Subtest: history
31
31
  # Subtest: successful restore
32
32
  ok 1 - restored object does not equal last version.
33
- 1..1
34
- ok 1 - successful restore # time=170.426ms
33
+ ok 2 - should not be the js ref
34
+ 1..2
35
+ ok 1 - successful restore # time=211.353ms
35
36
 
36
37
  # Subtest: remoteRefs doesn't change on commit
37
38
  ok 1 - input history refs and remote before change should not be the same object
@@ -40,7 +41,7 @@ ok 2 - restore # time=105.334ms
40
41
  ok 4 - history refs must not be the same as static remotes
41
42
  ok 5 - histories must not match anymore
42
43
  1..5
43
- ok 2 - remoteRefs doesn't change on commit # time=7.071ms
44
+ ok 2 - remoteRefs doesn't change on commit # time=5.59ms
44
45
 
45
46
  # Subtest: history contains HEAD ref
46
47
  ok 1 - should be equal
@@ -48,15 +49,15 @@ ok 2 - restore # time=105.334ms
48
49
  ok 3 - should be equal
49
50
  ok 4 - should be equal
50
51
  1..4
51
- ok 3 - history contains HEAD ref # time=0.914ms
52
+ ok 3 - history contains HEAD ref # time=0.862ms
52
53
 
53
54
  # Subtest: empty history unreachable HEAD
54
55
  ok 1 - expected to throw
55
56
  1..1
56
- ok 4 - empty history unreachable HEAD # time=1.353ms
57
+ ok 4 - empty history unreachable HEAD # time=1.299ms
57
58
 
58
59
  1..4
59
- ok 3 - history # time=277.262ms
60
+ ok 3 - history # time=276.028ms
60
61
 
61
62
  # Subtest: reset
62
63
  # Subtest: reset hard
@@ -64,54 +65,54 @@ ok 3 - history # time=277.262ms
64
65
  ok 2 - wrong \# of changes in diff
65
66
  ok 3 - failed to reset
66
67
  1..3
67
- ok 1 - reset hard # time=2.094ms
68
+ ok 1 - reset hard # time=2.99ms
68
69
 
69
70
  1..1
70
- ok 4 - reset # time=54.664ms
71
+ ok 4 - reset # time=99.336ms
71
72
 
72
73
  # Subtest: status
73
74
  # Subtest: clean repo no change
74
75
  ok 1 - Shouldn't have pending changes
75
76
  1..1
76
- ok 1 - clean repo no change # time=409.58ms
77
+ ok 1 - clean repo no change # time=358.547ms
77
78
 
78
79
  # Subtest: clean repo pending change
79
80
  ok 1 - Status doesn't contain the expected \# of changes: [{"op":"replace","path":"/name","value":"changed name"}]
80
81
  1..1
81
- ok 2 - clean repo pending change # time=0.692ms
82
+ ok 2 - clean repo pending change # time=0.615ms
82
83
 
83
84
  # Subtest: reading status shouldn't clean observer
84
85
  ok 1 - Status doesn't contain the expected \# of changes: [{"op":"replace","path":"/name","value":"changed name"}]
85
86
  ok 2 - Status doesn't contain the expected \# of changes: [{"op":"replace","path":"/name","value":"changed name"}]
86
87
  ok 3 - why different pending changes??
87
88
  1..3
88
- ok 3 - reading status shouldn't clean observer # time=1.028ms
89
+ ok 3 - reading status shouldn't clean observer # time=1.062ms
89
90
 
90
91
  # Subtest: after commit no change
91
92
  ok 1 - Shouldn't have pending changes
92
93
  1..1
93
- ok 4 - after commit no change # time=1.109ms
94
+ ok 4 - after commit no change # time=1.211ms
94
95
 
95
96
  # Subtest: after commit pending change
96
97
  ok 1 - Shouldn't have pending changes
97
98
  ok 2 - Status doesn't contain changes
98
99
  1..2
99
- ok 5 - after commit pending change # time=1.199ms
100
+ ok 5 - after commit pending change # time=1.325ms
100
101
 
101
102
  # Subtest: after commit pending change for rewrite array
102
103
  ok 1 - Shouldn't have pending changes
103
104
  ok 2 - Status doesn't contain changes
104
105
  1..2
105
- ok 6 - after commit pending change for rewrite array # time=1.536ms
106
+ ok 6 - after commit pending change for rewrite array # time=1.478ms
106
107
 
107
108
  # Subtest: change of nested array element prop
108
109
  ok 1 - Shouldn't have pending changes
109
110
  ok 2 - Status doesn't contain changes
110
111
  1..2
111
- ok 7 - change of nested array element prop # time=1.795ms
112
+ ok 7 - change of nested array element prop # time=1.692ms
112
113
 
113
114
  1..7
114
- ok 5 - status # time=484.67ms
115
+ ok 5 - status # time=457.537ms
115
116
 
116
117
  # Subtest: apply
117
118
  # Subtest: single patch
@@ -121,7 +122,7 @@ ok 5 - status # time=484.67ms
121
122
  ok 4 - Status doesn't contain changes
122
123
  ok 5 - It should have the right changes
123
124
  1..5
124
- ok 1 - single patch # time=127.187ms
125
+ ok 1 - single patch # time=134.156ms
125
126
 
126
127
  # Subtest: patch for undefined props with workaround
127
128
  ok 1 - Shouldn't have pending changes
@@ -129,7 +130,7 @@ ok 5 - status # time=484.67ms
129
130
  ok 3 - The final state should match up
130
131
  ok 4 - Status should contain 1 change
131
132
  1..4
132
- ok 2 - patch for undefined props with workaround # time=1.445ms
133
+ ok 2 - patch for undefined props with workaround # time=1.495ms
133
134
 
134
135
  # Subtest: multiple patches
135
136
  ok 1 - Shouldn't have pending changes
@@ -138,9 +139,93 @@ ok 5 - status # time=484.67ms
138
139
  ok 4 - It should have the right changes
139
140
  ok 5 - The final state does not match up
140
141
  1..5
141
- ok 3 - multiple patches # time=1.336ms
142
+ ok 3 - multiple patches # time=1.343ms
142
143
 
143
144
  1..3
144
- ok 6 - apply # time=185.109ms
145
+ ok 6 - apply # time=191.115ms
146
+
147
+ # Subtest: pending changes - push helpers
148
+ # Subtest: 1 commit & 1 ref update
149
+ ok 1 - incorrect number of pending commits
150
+ ok 2 - incorrect number of pending ref updates
151
+ ok 3 - wrong pending commit
152
+ ok 4 - wrong pending ref update
153
+ 1..4
154
+ ok 1 - 1 commit & 1 ref update # time=764.1ms
155
+
156
+ # Subtest: 2 commit & 1 ref update
157
+ ok 1 - incorrect number of pending commits
158
+ ok 2 - incorrect number of pending ref updates
159
+ ok 3 - wrong pending commits
160
+ ok 4 - wrong pending ref update
161
+ 1..4
162
+ ok 2 - 2 commit & 1 ref update # time=7.31ms
163
+
164
+ # Subtest: 1 commit & 2 ref updates
165
+ ok 1 - incorrect number of pending commits
166
+ ok 2 - incorrect number of pending ref updates
167
+ ok 3 - wrong pending commits
168
+ ok 4 - wrong pending ref update
169
+ 1..4
170
+ ok 3 - 1 commit & 2 ref updates # time=7.412ms
171
+
172
+ # Subtest: 2 commit & 2 ref updates
173
+ ok 1 - incorrect number of pending commits
174
+ ok 2 - incorrect number of pending ref updates
175
+ ok 3 - wrong pending commits
176
+ ok 4 - wrong pending ref update
177
+ 1..4
178
+ ok 4 - 2 commit & 2 ref updates # time=8.667ms
179
+
180
+ # Subtest: 3 commit & 2 ref updates
181
+ ok 1 - incorrect number of pending commits
182
+ ok 2 - incorrect number of pending ref updates
183
+ ok 3 - wrong pending commits
184
+ ok 4 - wrong pending ref update
185
+ 1..4
186
+ ok 5 - 3 commit & 2 ref updates # time=10.865ms
187
+
188
+ # Subtest: 3 commit & 3 ref updates
189
+ ok 1 - incorrect number of pending commits
190
+ ok 2 - incorrect number of pending ref updates
191
+ ok 3 - wrong pending commits
192
+ ok 4 - wrong pending ref update
193
+ 1..4
194
+ ok 6 - 3 commit & 3 ref updates # time=5.957ms
195
+
196
+ # Subtest: after merge 1 commit & 3 ref updates
197
+ ok 1 - incorrect number of pending commits
198
+ ok 2 - incorrect number of pending ref updates
199
+ ok 3 - wrong pending commits
200
+ ok 4 - wrong pending ref update
201
+ 1..4
202
+ ok 7 - after merge 1 commit & 3 ref updates # time=4.207ms
203
+
204
+ # Subtest: after merge 1 commit & 2 ref updates
205
+ ok 1 - incorrect number of pending commits
206
+ ok 2 - incorrect number of pending ref updates
207
+ ok 3 - wrong pending commits
208
+ ok 4 - wrong pending ref update
209
+ 1..4
210
+ ok 8 - after merge 1 commit & 2 ref updates # time=5.355ms
211
+
212
+ # Subtest: no merge 1 commit & 1 ref updates
213
+ ok 1 - incorrect number of pending commits
214
+ ok 2 - incorrect number of pending ref updates
215
+ ok 3 - wrong pending commits
216
+ ok 4 - wrong pending ref update
217
+ 1..4
218
+ ok 9 - no merge 1 commit & 1 ref updates # time=3.122ms
219
+
220
+ # Subtest: no merge no commit & 1 ref updates
221
+ ok 1 - incorrect number of pending commits
222
+ ok 2 - incorrect number of pending ref updates
223
+ ok 3 - wrong pending commits
224
+ ok 4 - wrong pending ref update
225
+ 1..4
226
+ ok 10 - no merge no commit & 1 ref updates # time=2.262ms
227
+
228
+ 1..10
229
+ ok 7 - pending changes - push helpers # time=875.074ms
145
230
 
146
- 1..6
231
+ 1..7
@@ -2,18 +2,18 @@ TAP version 14
2
2
  # Subtest: cannot tag on an empty repo
3
3
  ok 1 - expected to throw
4
4
  1..1
5
- ok 1 - cannot tag on an empty repo # time=25.803ms
5
+ ok 1 - cannot tag on an empty repo # time=46.899ms
6
6
 
7
7
  # Subtest: can create simple tag pointing to HEAD
8
8
  ok 1 - should be equal
9
9
  ok 2 - tag is not pointing to expected commit
10
10
  ok 3 - reference was not present in history
11
11
  1..3
12
- ok 2 - can create simple tag pointing to HEAD # time=8.438ms
12
+ ok 2 - can create simple tag pointing to HEAD # time=8.063ms
13
13
 
14
14
  # Subtest: cannot create tag with whitespace
15
15
  ok 1 - expected to throw
16
16
  1..1
17
- ok 3 - cannot create tag with whitespace # time=1.809ms
17
+ ok 3 - cannot create tag with whitespace # time=2.527ms
18
18
 
19
19
  1..3
@@ -3,41 +3,74 @@ TAP version 14
3
3
  ok 1 - should be equal
4
4
  ok 2 - should be equal
5
5
  1..2
6
- ok 1 - author <email@domain.info> # time=4.167ms
6
+ ok 1 - author <email@domain.info> # time=5.206ms
7
7
 
8
8
  # Subtest: author with space <email@domain.info>
9
9
  ok 1 - should be equal
10
10
  ok 2 - should be equal
11
11
  1..2
12
- ok 2 - author with space <email@domain.info> # time=0.808ms
12
+ ok 2 - author with space <email@domain.info> # time=0.755ms
13
13
 
14
14
  # Subtest: author @handle
15
15
  ok 1 - should be equal
16
16
  ok 2 - should be equal
17
17
  1..2
18
- ok 3 - author @handle # time=0.568ms
18
+ ok 3 - author @handle # time=0.528ms
19
19
 
20
20
  # Subtest: author with space @handle
21
21
  ok 1 - should be equal
22
22
  ok 2 - should be equal
23
23
  1..2
24
- ok 4 - author with space @handle # time=0.553ms
24
+ ok 4 - author with space @handle # time=0.501ms
25
25
 
26
26
  # Subtest: email@domain.info
27
27
  ok 1 - should be equal
28
28
  ok 2 - should be equal
29
29
  1..2
30
- ok 5 - email@domain.info # time=0.745ms
30
+ ok 5 - email@domain.info # time=0.739ms
31
31
 
32
32
  # Subtest: @handle
33
33
  ok 1 - should be equal
34
34
  ok 2 - should be equal
35
35
  1..2
36
- ok 6 - @handle # time=0.696ms
36
+ ok 6 - @handle # time=0.689ms
37
37
 
38
38
  # Subtest: empty author
39
39
  ok 1 - expected to throw
40
40
  1..1
41
- ok 7 - empty author # time=2.405ms
41
+ ok 7 - empty author # time=3.038ms
42
42
 
43
- 1..7
43
+ # Subtest: mapPath
44
+ # Subtest: find root
45
+ ok 1 - path does not contain 1 commit
46
+ ok 2 - root is not ancestor of commit
47
+ ok 3 - path does not contain the right commit
48
+ 1..3
49
+ ok 1 - find root # time=128.458ms
50
+
51
+ # Subtest: finds full path to root
52
+ ok 1 - path does not contain 1 commit
53
+ ok 2 - root is not ancestor of commit
54
+ ok 3 - path does not contain the right commit at 0
55
+ ok 4 - path does not contain the right commit at 1
56
+ 1..4
57
+ ok 2 - finds full path to root # time=5.049ms
58
+
59
+ # Subtest: parent-to-child no ancestor
60
+ ok 1 - path contains a commit
61
+ ok 2 - child must not be an ancestor of parent
62
+ 1..2
63
+ ok 3 - parent-to-child no ancestor # time=4.309ms
64
+
65
+ # Subtest: finds path across 2 branches
66
+ ok 1 - path does not contain 1 commit
67
+ ok 2 - root is not ancestor of commit
68
+ ok 3 - path does not contain the right commit at 0
69
+ ok 4 - path does not contain the right commit at 1
70
+ 1..4
71
+ ok 4 - finds path across 2 branches # time=4.852ms
72
+
73
+ 1..4
74
+ ok 8 - mapPath # time=181.64ms
75
+
76
+ 1..8
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # v0.9.0 (Sat Apr 06 2024)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - feat: git cherry [#172](https://github.com/dotindustries/ogre/pull/172) ([@nadilas](https://github.com/nadilas))
6
+ - feat: cherry for pending changes ([@nadilas](https://github.com/nadilas))
7
+
8
+ #### 🐛 Bug Fix
9
+
10
+ - refactor: array type syntax ([@nadilas](https://github.com/nadilas))
11
+
12
+ #### Authors: 1
13
+
14
+ - [@nadilas](https://github.com/nadilas)
15
+
16
+ ---
17
+
1
18
  # v0.8.1 (Thu Apr 04 2024)
2
19
 
3
20
  #### 🐛 Bug Fix
package/lib/commit.d.ts CHANGED
@@ -5,14 +5,14 @@ export interface Commit {
5
5
  message: string | undefined;
6
6
  author: string;
7
7
  parent: string | undefined;
8
- changes: Operation[];
8
+ changes: Array<Operation>;
9
9
  timestamp: Date;
10
10
  }
11
11
  export interface CommitHashContent {
12
12
  message: string;
13
13
  author: string;
14
14
  parentRef: string | undefined;
15
- changes: Operation[];
15
+ changes: Array<Operation>;
16
16
  timestamp: Date;
17
17
  }
18
18
  export declare function calculateCommitHash(content: CommitHashContent): Promise<string>;