@dotinc/ogre 0.10.2 → 0.10.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.
@@ -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":"a4ed9262-9b6d-4d30-b7e3-02656b4668bf","name":"my first process template","description":"now we have a description","nested":[]}
7
+ ok 5 - has a nested object when it shouldn't: {"uuid":"768632cc-ecb5-4d3a-bc5f-d0010597c42c","name":"my first process template","description":"now we have a description","nested":[]}
8
8
  1..5
9
- ok 1 - checkout prev commit # time=105.932ms
9
+ ok 1 - checkout prev commit # time=67.618ms
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=10.857ms
14
+ ok 2 - checkout new branch with simple name # time=9.661ms
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=3.757ms
19
+ ok 3 - checkout new branch with full ref name # time=6.255ms
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=3.757ms
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=22.977ms
27
+ ok 4 - checkout commit which has two refs pointing leaves HEAD detached # time=6.06ms
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=7.195ms
32
+ ok 5 - checkout new branch moves head to new branch # time=5.822ms
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=1.583ms
38
+ ok 6 - checkout and create new branch on empty main # time=0.676ms
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=9.102ms
44
+ ok 7 - checkout and create new branch with at least 1 commit # time=6.655ms
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=25.629ms
50
+ ok 8 - replacing default branch on empty master removes main # time=8.563ms
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=76.508ms
6
+ ok 1 - baseline with 1 commit and zero changelog entries # time=63.548ms
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=0.728ms
11
+ ok 2 - head points to main # time=0.889ms
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=13.344ms
17
+ ok 3 - changes are available for commit if starting from empty # time=14.463ms
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=11.432ms
22
+ ok 4 - no commit without changes # time=5.382ms
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=10.255ms
27
+ ok 5 - no commit without changes after recent commit # time=4.126ms
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=9.773ms
31
+ ok 6 - overwrite nested array changes are recognized # time=5.128ms
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.066ms
35
+ ok 7 - change of nested array element is recognized # time=6.271ms
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=6.378ms
41
+ ok 8 - treeHash of commit is matching content # time=14.351ms
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.341ms
46
+ ok 9 - no commit --amend without commit # time=7.499ms
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=8.238ms
51
+ ok 10 - main moves to recent commit # time=14.945ms
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=5.51ms
57
+ ok 11 - two commits with 3 changes # time=6.252ms
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=5.51ms
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=10.13ms
65
+ ok 12 - array push double-change, 6 changes, 3 commits # time=30.44ms
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=10.13ms
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=5.791ms
73
+ ok 13 - all refs OK, when committing on new branch while main is empty main # time=6.922ms
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=10.797ms
83
+ ok 14 - commit --amend changes hash on content change # time=10.498ms
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=10.797ms
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=16.276ms
93
+ ok 15 - commit --amend changes hash on message change # time=18.706ms
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=16.276ms
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=21.173ms
102
+ ok 16 - commit at detached HEAD does not affect main, but moves head # time=16.604ms
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=28.825ms
107
+ ok 17 - commit at detached HEAD saved to a branch # time=6.032ms
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=28.825ms
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=15.913ms
117
+ ok 18 - commit --amend changes hash on message change even in detached HEAD # time=9.509ms
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=37.955ms
5
+ ok 1 - merge with no commit fails # time=43.034ms
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=37.955ms
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=8.271ms
14
+ ok 2 - merge fast-forward # time=33.688ms
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":"94c88171-956a-4a4c-aeb7-b769d358fed1","name":"new name"}},{"op":"add","path":"/nested/1","value":{"uuid":"3b0511e1-bfe6-4410-91a4-6f0731e47d7d","name":"first name"}}]
4
+ ok 2 - invalid \# of change entries: [{"op":"add","path":"/nested/0","value":{"uuid":"fea5b57a-b39b-4808-bf16-ad25153e7901","name":"new name"}},{"op":"add","path":"/nested/1","value":{"uuid":"bd47586c-e9b8-4a35-9a5e-4921fe98c90f","name":"first name"}}]
5
5
  1..2
6
- ok 1 - diff is ok # time=81.375ms
6
+ ok 1 - diff is ok # time=61.966ms
7
7
 
8
8
  # Subtest: restore
9
9
  # Subtest: history check
@@ -13,7 +13,7 @@ ok 1 - diff is ok # time=81.375ms
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=59.305ms
16
+ ok 1 - history check # time=61.836ms
17
17
 
18
18
  # Subtest: reconstruct with 2 commits
19
19
  ok 1 - main is pointing at wrong commit
@@ -22,17 +22,17 @@ ok 1 - diff is ok # time=81.375ms
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=14.945ms
25
+ ok 2 - reconstruct with 2 commits # time=14.616ms
26
26
 
27
27
  1..2
28
- ok 2 - restore # time=121.145ms
28
+ ok 2 - restore # time=121.742ms
29
29
 
30
30
  # Subtest: history
31
31
  # Subtest: successful restore
32
32
  ok 1 - restored object does not equal last version.
33
33
  ok 2 - should not be the js ref
34
34
  1..2
35
- ok 1 - successful restore # time=257.124ms
35
+ ok 1 - successful restore # time=338.281ms
36
36
 
37
37
  # Subtest: remoteRefs doesn't change on commit
38
38
  ok 1 - input history refs and remote before change should not be the same object
@@ -41,7 +41,7 @@ ok 2 - restore # time=121.145ms
41
41
  ok 4 - history refs must not be the same as static remotes
42
42
  ok 5 - histories must not match anymore
43
43
  1..5
44
- ok 2 - remoteRefs doesn't change on commit # time=7.397ms
44
+ ok 2 - remoteRefs doesn't change on commit # time=9.293ms
45
45
 
46
46
  # Subtest: history contains HEAD ref
47
47
  ok 1 - should be equal
@@ -49,15 +49,15 @@ ok 2 - restore # time=121.145ms
49
49
  ok 3 - should be equal
50
50
  ok 4 - should be equal
51
51
  1..4
52
- ok 3 - history contains HEAD ref # time=0.786ms
52
+ ok 3 - history contains HEAD ref # time=1.261ms
53
53
 
54
54
  # Subtest: empty history unreachable HEAD
55
55
  ok 1 - expected to throw
56
56
  1..1
57
- ok 4 - empty history unreachable HEAD # time=1.291ms
57
+ ok 4 - empty history unreachable HEAD # time=1.963ms
58
58
 
59
59
  1..4
60
- ok 3 - history # time=324.479ms
60
+ ok 3 - history # time=466.698ms
61
61
 
62
62
  # Subtest: reset
63
63
  # Subtest: reset hard
@@ -65,54 +65,54 @@ ok 3 - history # time=324.479ms
65
65
  ok 2 - wrong \# of changes in diff
66
66
  ok 3 - failed to reset
67
67
  1..3
68
- ok 1 - reset hard # time=2.604ms
68
+ ok 1 - reset hard # time=3.088ms
69
69
 
70
70
  1..1
71
- ok 4 - reset # time=44.607ms
71
+ ok 4 - reset # time=82.806ms
72
72
 
73
73
  # Subtest: status
74
74
  # Subtest: clean repo no change
75
75
  ok 1 - Shouldn't have pending changes
76
76
  1..1
77
- ok 1 - clean repo no change # time=454.524ms
77
+ ok 1 - clean repo no change # time=445.374ms
78
78
 
79
79
  # Subtest: clean repo pending change
80
80
  ok 1 - Status doesn't contain the expected \# of changes: [{"op":"replace","path":"/name","value":"changed name"}]
81
81
  1..1
82
- ok 2 - clean repo pending change # time=1.175ms
82
+ ok 2 - clean repo pending change # time=1.153ms
83
83
 
84
84
  # Subtest: reading status shouldn't clean observer
85
85
  ok 1 - Status doesn't contain the expected \# of changes: [{"op":"replace","path":"/name","value":"changed name"}]
86
86
  ok 2 - Status doesn't contain the expected \# of changes: [{"op":"replace","path":"/name","value":"changed name"}]
87
87
  ok 3 - why different pending changes??
88
88
  1..3
89
- ok 3 - reading status shouldn't clean observer # time=1.635ms
89
+ ok 3 - reading status shouldn't clean observer # time=1.756ms
90
90
 
91
91
  # Subtest: after commit no change
92
92
  ok 1 - Shouldn't have pending changes
93
93
  1..1
94
- ok 4 - after commit no change # time=2.227ms
94
+ ok 4 - after commit no change # time=5.188ms
95
95
 
96
96
  # Subtest: after commit pending change
97
97
  ok 1 - Shouldn't have pending changes
98
98
  ok 2 - Status doesn't contain changes
99
99
  1..2
100
- ok 5 - after commit pending change # time=1.734ms
100
+ ok 5 - after commit pending change # time=2.061ms
101
101
 
102
102
  # Subtest: after commit pending change for rewrite array
103
103
  ok 1 - Shouldn't have pending changes
104
104
  ok 2 - Status doesn't contain changes
105
105
  1..2
106
- ok 6 - after commit pending change for rewrite array # time=1.811ms
106
+ ok 6 - after commit pending change for rewrite array # time=1.764ms
107
107
 
108
108
  # Subtest: change of nested array element prop
109
109
  ok 1 - Shouldn't have pending changes
110
110
  ok 2 - Status doesn't contain changes
111
111
  1..2
112
- ok 7 - change of nested array element prop # time=5.549ms
112
+ ok 7 - change of nested array element prop # time=5.018ms
113
113
 
114
114
  1..7
115
- ok 5 - status # time=519.999ms
115
+ ok 5 - status # time=530.878ms
116
116
 
117
117
  # Subtest: apply
118
118
  # Subtest: single patch
@@ -122,7 +122,7 @@ ok 5 - status # time=519.999ms
122
122
  ok 4 - Status doesn't contain changes
123
123
  ok 5 - It should have the right changes
124
124
  1..5
125
- ok 1 - single patch # time=112.017ms
125
+ ok 1 - single patch # time=200.288ms
126
126
 
127
127
  # Subtest: patch for undefined props with workaround
128
128
  ok 1 - Shouldn't have pending changes
@@ -130,7 +130,7 @@ ok 5 - status # time=519.999ms
130
130
  ok 3 - The final state should match up
131
131
  ok 4 - Status should contain 1 change
132
132
  1..4
133
- ok 2 - patch for undefined props with workaround # time=1.76ms
133
+ ok 2 - patch for undefined props with workaround # time=1.512ms
134
134
 
135
135
  # Subtest: multiple patches
136
136
  ok 1 - Shouldn't have pending changes
@@ -139,10 +139,10 @@ ok 5 - status # time=519.999ms
139
139
  ok 4 - It should have the right changes
140
140
  ok 5 - The final state does not match up
141
141
  1..5
142
- ok 3 - multiple patches # time=2.019ms
142
+ ok 3 - multiple patches # time=1.934ms
143
143
 
144
144
  1..3
145
- ok 6 - apply # time=161.758ms
145
+ ok 6 - apply # time=277.685ms
146
146
 
147
147
  # Subtest: pending changes - push helpers
148
148
  # Subtest: 1 commit & 1 ref update
@@ -151,7 +151,7 @@ ok 6 - apply # time=161.758ms
151
151
  ok 3 - wrong pending commit
152
152
  ok 4 - wrong pending ref update
153
153
  1..4
154
- ok 1 - 1 commit & 1 ref update # time=584.028ms
154
+ ok 1 - 1 commit & 1 ref update # time=581.505ms
155
155
 
156
156
  # Subtest: 2 commit & 1 ref update
157
157
  ok 1 - incorrect number of pending commits
@@ -159,7 +159,7 @@ ok 6 - apply # time=161.758ms
159
159
  ok 3 - wrong pending commits
160
160
  ok 4 - wrong pending ref update
161
161
  1..4
162
- ok 2 - 2 commit & 1 ref update # time=19.117ms
162
+ ok 2 - 2 commit & 1 ref update # time=11.802ms
163
163
 
164
164
  # Subtest: 1 commit & 2 ref updates
165
165
  ok 1 - incorrect number of pending commits
@@ -167,7 +167,7 @@ ok 6 - apply # time=161.758ms
167
167
  ok 3 - wrong pending commits
168
168
  ok 4 - wrong pending ref update
169
169
  1..4
170
- ok 3 - 1 commit & 2 ref updates # time=65.619ms
170
+ ok 3 - 1 commit & 2 ref updates # time=7.276ms
171
171
 
172
172
  # Subtest: 2 commit & 2 ref updates
173
173
  ok 1 - incorrect number of pending commits
@@ -175,7 +175,7 @@ ok 6 - apply # time=161.758ms
175
175
  ok 3 - wrong pending commits
176
176
  ok 4 - wrong pending ref update
177
177
  1..4
178
- ok 4 - 2 commit & 2 ref updates # time=4.897ms
178
+ ok 4 - 2 commit & 2 ref updates # time=5.659ms
179
179
 
180
180
  # Subtest: 3 commit & 2 ref updates
181
181
  ok 1 - incorrect number of pending commits
@@ -183,7 +183,7 @@ ok 6 - apply # time=161.758ms
183
183
  ok 3 - wrong pending commits
184
184
  ok 4 - wrong pending ref update
185
185
  1..4
186
- ok 5 - 3 commit & 2 ref updates # time=27.844ms
186
+ ok 5 - 3 commit & 2 ref updates # time=27.891ms
187
187
 
188
188
  # Subtest: 3 commit & 3 ref updates
189
189
  ok 1 - incorrect number of pending commits
@@ -191,7 +191,7 @@ ok 6 - apply # time=161.758ms
191
191
  ok 3 - wrong pending commits
192
192
  ok 4 - wrong pending ref update
193
193
  1..4
194
- ok 6 - 3 commit & 3 ref updates # time=9.487ms
194
+ ok 6 - 3 commit & 3 ref updates # time=8.929ms
195
195
 
196
196
  # Subtest: after merge 1 commit & 3 ref updates
197
197
  ok 1 - incorrect number of pending commits
@@ -199,7 +199,7 @@ ok 6 - apply # time=161.758ms
199
199
  ok 3 - wrong pending commits
200
200
  ok 4 - wrong pending ref update
201
201
  1..4
202
- ok 7 - after merge 1 commit & 3 ref updates # time=3.837ms
202
+ ok 7 - after merge 1 commit & 3 ref updates # time=6.342ms
203
203
 
204
204
  # Subtest: after merge 1 commit & 2 ref updates
205
205
  ok 1 - incorrect number of pending commits
@@ -207,7 +207,7 @@ ok 6 - apply # time=161.758ms
207
207
  ok 3 - wrong pending commits
208
208
  ok 4 - wrong pending ref update
209
209
  1..4
210
- ok 8 - after merge 1 commit & 2 ref updates # time=3.88ms
210
+ ok 8 - after merge 1 commit & 2 ref updates # time=3.736ms
211
211
 
212
212
  # Subtest: no merge 1 commit & 1 ref updates
213
213
  ok 1 - incorrect number of pending commits
@@ -215,7 +215,7 @@ ok 6 - apply # time=161.758ms
215
215
  ok 3 - wrong pending commits
216
216
  ok 4 - wrong pending ref update
217
217
  1..4
218
- ok 9 - no merge 1 commit & 1 ref updates # time=3.55ms
218
+ ok 9 - no merge 1 commit & 1 ref updates # time=3.413ms
219
219
 
220
220
  # Subtest: no merge no commit & 1 ref updates
221
221
  ok 1 - incorrect number of pending commits
@@ -223,9 +223,9 @@ ok 6 - apply # time=161.758ms
223
223
  ok 3 - wrong pending commits
224
224
  ok 4 - wrong pending ref update
225
225
  1..4
226
- ok 10 - no merge no commit & 1 ref updates # time=2.667ms
226
+ ok 10 - no merge no commit & 1 ref updates # time=2.543ms
227
227
 
228
228
  1..10
229
- ok 7 - pending changes - push helpers # time=797.671ms
229
+ ok 7 - pending changes - push helpers # time=741.45ms
230
230
 
231
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=14.848ms
5
+ ok 1 - cannot tag on an empty repo # time=21.173ms
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=19.451ms
12
+ ok 2 - can create simple tag pointing to HEAD # time=7.632ms
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=12.533ms
17
+ ok 3 - cannot create tag with whitespace # time=4.171ms
18
18
 
19
19
  1..3
@@ -3,42 +3,42 @@ 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=3.833ms
6
+ ok 1 - author <email@domain.info> # time=3.82ms
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.759ms
12
+ ok 2 - author with space <email@domain.info> # time=0.787ms
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.544ms
18
+ ok 3 - author @handle # time=0.543ms
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.517ms
24
+ ok 4 - author with space @handle # time=0.558ms
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.751ms
30
+ ok 5 - email@domain.info # time=0.722ms
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.689ms
36
+ ok 6 - @handle # time=0.699ms
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.273ms
41
+ ok 7 - empty author # time=3.033ms
42
42
 
43
43
  # Subtest: mapPath
44
44
  # Subtest: find root
@@ -46,7 +46,7 @@ ok 7 - empty author # time=2.273ms
46
46
  ok 2 - root is not ancestor of commit
47
47
  ok 3 - path does not contain the right commit
48
48
  1..3
49
- ok 1 - find root # time=52.954ms
49
+ ok 1 - find root # time=56.745ms
50
50
 
51
51
  # Subtest: finds full path to root
52
52
  ok 1 - path does not contain 1 commit
@@ -54,13 +54,13 @@ ok 7 - empty author # time=2.273ms
54
54
  ok 3 - path does not contain the right commit at 0
55
55
  ok 4 - path does not contain the right commit at 1
56
56
  1..4
57
- ok 2 - finds full path to root # time=6.435ms
57
+ ok 2 - finds full path to root # time=5.903ms
58
58
 
59
59
  # Subtest: parent-to-child no ancestor
60
60
  ok 1 - path contains a commit
61
61
  ok 2 - child must not be an ancestor of parent
62
62
  1..2
63
- ok 3 - parent-to-child no ancestor # time=3.774ms
63
+ ok 3 - parent-to-child no ancestor # time=3.901ms
64
64
 
65
65
  # Subtest: finds path across 2 branches
66
66
  ok 1 - path does not contain 1 commit
@@ -68,9 +68,9 @@ ok 7 - empty author # time=2.273ms
68
68
  ok 3 - path does not contain the right commit at 0
69
69
  ok 4 - path does not contain the right commit at 1
70
70
  1..4
71
- ok 4 - finds path across 2 branches # time=4.327ms
71
+ ok 4 - finds path across 2 branches # time=4.368ms
72
72
 
73
73
  1..4
74
- ok 8 - mapPath # time=85.31ms
74
+ ok 8 - mapPath # time=89.688ms
75
75
 
76
76
  1..8
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # v0.10.3 (Tue Jun 11 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - fix: extract util function to compress object [#185](https://github.com/dotindustries/ogre/pull/185) ([@nadilas](https://github.com/nadilas))
6
+ - fix: extract util function to compress object ([@nadilas](https://github.com/nadilas))
7
+
8
+ #### Authors: 1
9
+
10
+ - [@nadilas](https://github.com/nadilas)
11
+
12
+ ---
13
+
1
14
  # v0.10.2 (Fri May 31 2024)
2
15
 
3
16
  #### 🐛 Bug Fix
package/lib/repository.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { applyPatch, applyReducer, compare, deepClone, generate, observe, unobserve, validate, } from "fast-json-patch";
2
2
  import { calculateCommitHash } from "./commit.js";
3
- import { compressSync, strToU8 } from "fflate";
4
- import { brancheNameToRef, cleanRefValue, commitAtRefIn, createHeadRefValue, getLastRefPathElement, headValueRefPrefix, immutableArrayCopy, immutableMapCopy, localHeadPathPrefix, mapPath, mutableMapCopy, REFS_HEAD_KEY, REFS_MAIN_KEY, refsAtCommit, shaishToCommit, tagToRef, treeToObject, validateBranchName, validateRef, } from "./utils.js";
3
+ import { brancheNameToRef, cleanRefValue, commitAtRefIn, createHeadRefValue, getLastRefPathElement, headValueRefPrefix, immutableArrayCopy, immutableMapCopy, localHeadPathPrefix, mapPath, mutableMapCopy, objectToTree, REFS_HEAD_KEY, REFS_MAIN_KEY, refsAtCommit, shaishToCommit, tagToRef, treeToObject, validateBranchName, validateRef, } from "./utils.js";
5
4
  /**
6
5
  * A repository recording and managing the state transitions of an object
7
6
  */
@@ -253,7 +252,7 @@ export class Repository {
253
252
  parentRef: parent === null || parent === void 0 ? void 0 : parent.hash,
254
253
  timestamp,
255
254
  });
256
- const treeHash = Buffer.from(compressSync(strToU8(JSON.stringify(this.data)), { level: 6, mem: 8 })).toString("base64");
255
+ const treeHash = objectToTree(this.data);
257
256
  const commit = {
258
257
  hash: sha,
259
258
  message,
package/lib/utils.d.ts CHANGED
@@ -18,6 +18,7 @@ export declare const REFS_HEAD_KEY = "HEAD";
18
18
  * Should only be used in local context
19
19
  */
20
20
  export declare const REFS_MAIN_KEY: string;
21
+ export declare function objectToTree(obj: any): string;
21
22
  export declare const treeToObject: <T = any>(tree: string) => T;
22
23
  /**
23
24
  * Maps the path from a commit to another commit.
package/lib/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { decompressSync, strFromU8 } from "fflate";
1
+ import { compressSync, decompressSync, strFromU8, strToU8 } from "fflate";
2
2
  import { validBranch, validRef } from "./ref.js";
3
3
  import { deepClone } from "fast-json-patch";
4
4
  const emailRegex = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;
@@ -38,6 +38,9 @@ export const REFS_HEAD_KEY = "HEAD";
38
38
  * Should only be used in local context
39
39
  */
40
40
  export const REFS_MAIN_KEY = `${localHeadPathPrefix()}main`;
41
+ export function objectToTree(obj) {
42
+ return Buffer.from(compressSync(strToU8(JSON.stringify(obj)), { level: 6, mem: 8 })).toString("base64");
43
+ }
41
44
  export const treeToObject = (tree) => {
42
45
  return JSON.parse(strFromU8(decompressSync(Buffer.from(tree, "base64"))));
43
46
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/dotindustries/ogre.git"
6
6
  },
7
- "version": "0.10.2",
7
+ "version": "0.10.3",
8
8
  "description": "Git-like repository for in-memory object versioning",
9
9
  "private": false,
10
10
  "main": "lib/index.js",
@@ -39,5 +39,5 @@
39
39
  "registry": "https://registry.npmjs.org/",
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "b9fd80205c495e4702d18e299054a2e3ee342397"
42
+ "gitHead": "7f97384355a9adf8599fce36ee67252b2d94dd91"
43
43
  }