Repository navigation
Commit b1ce801
committed
fix: a range that matches none of a package's pre-release keys names the pin that works
A package whose only orderable keys are pre-releases (compat.glad publishes
0.0.0-651a425 alone, compat.tray 0.0.0-8dd1358) can never be reached by a
range: a range sees a pre-release only when it names one at the same numbers.
`"*"` or `"^0.0"` against such a package failed with
constraint '*' matches none of: [0.0.0-651a425]
and nothing more. The exact-pin hint was given only for unorderable keys,
while these keys are orderable and took the plain branch.
When every orderable key is a pre-release, the error now says why the range
misses and offers the exact pin, with the highest pre-release as its value:
These keys are pre-releases, which a range matches only when it names a
pre-release of the same version — pin one exactly:
acme.pre = "0.0.0-651a425"
A package that also publishes a release is unchanged: a range can reach
the release, so a miss there is an ordinary one.
e2e 196 covers `*` and `^0.0` over one pre-release key, the highest of
several being offered, the offered pin resolving, and no hint when a
release is published. docs/05 (both languages) states the rule.
Closes #370.1 parent 304487b commit b1ce801
4 files changed
Lines changed: 58 additions & 0 deletions
File tree
- docs
- zh
- src/pm
- tests/e2e
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
231 | 243 | | |
232 | 244 | | |
233 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
57 | 62 | | |
58 | 63 | | |
59 | 64 | | |
| |||
139 | 144 | | |
140 | 145 | | |
141 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
142 | 180 | | |
143 | 181 | | |
144 | 182 | | |
| |||
0 commit comments