Commit 372229e
authored
Don't blow away package manifest when updating (#20)
When we read a package manifest, we need a representation of the
manifest that we can make reliable assumptions about. To do this, we
disregard fields that we don't care about and we fill in default values
for fields that we _do_ care about but haven't been explicitly provided.
The problem is that when updating the version of a package, we are using
a modified version of this representation of the manifest. That isn't
good, because it means that the package's manifest ends up getting
fundamentally changed.
This commit fixes this by storing the original representation of the
manifest when it is read. This representation is then used when the
version is updated instead of the "parsed" representation. This does
make the parsed representation immediately out of date, but that doesn't
really matter.1 parent 8caa76a commit 372229e
16 files changed
Lines changed: 357 additions & 232 deletions
File tree
- src
- tests
- functional/helpers
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
47 | 78 | | |
48 | 79 | | |
49 | 80 | | |
| |||
55 | 86 | | |
56 | 87 | | |
57 | 88 | | |
58 | | - | |
| 89 | + | |
| 90 | + | |
59 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
60 | 95 | | |
61 | 96 | | |
62 | 97 | | |
63 | | - | |
| 98 | + | |
| 99 | + | |
64 | 100 | | |
| 101 | + | |
65 | 102 | | |
66 | 103 | | |
67 | 104 | | |
68 | | - | |
| 105 | + | |
| 106 | + | |
69 | 107 | | |
| 108 | + | |
70 | 109 | | |
71 | 110 | | |
72 | 111 | | |
73 | | - | |
| 112 | + | |
| 113 | + | |
74 | 114 | | |
| 115 | + | |
75 | 116 | | |
76 | 117 | | |
77 | 118 | | |
78 | | - | |
| 119 | + | |
| 120 | + | |
79 | 121 | | |
| 122 | + | |
80 | 123 | | |
81 | 124 | | |
82 | 125 | | |
83 | | - | |
| 126 | + | |
| 127 | + | |
84 | 128 | | |
| 129 | + | |
85 | 130 | | |
86 | 131 | | |
87 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments