Commit 63dbb09
committed
(PUP-11077) Pass SemVer prerelease and build as an array
Passing SemVer prerelease or build components as a list of arguments or a hash
added dots between each character due to confusion between Strings vs Arrays.
For example, SemVer(1, 0, 0, "rc0") resulted in prerelease "r.c.0". This isn't
an issue when passing the entire version as a string, eg "1.0.0-rc0".
Automatically wrapping the prerelease or build components in an array isn't a
breaking change, because it wasn't possible to do it previously. That's because
the function signature is defined to accept a `SemVerQualifier` which `Array` is
not:
$ bx puppet apply -e 'notice(SemVer(1, 2, 3, ["rc4"], ["5"]))'
Error: Evaluation Error: Error while evaluating a Function Call...
rejected: parameter 'prerelease' expects a match for SemVerQualifier1 parent 2fde3e6 commit 63dbb09
File tree
2 files changed
+26
-2
lines changed- lib/puppet/pops/types
- spec/unit/pops/types
2 files changed
+26
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
128 | 146 | | |
129 | 147 | | |
130 | 148 | | |
| |||
0 commit comments