Skip to content

Commit

Permalink
update message of TaggedReleaseIncompatible failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Techatrix committed Aug 14, 2024
1 parent 3161c32 commit bbf873b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The API Endpoint is `releases.zigtools.org`.
Build artifacts that target windows are compressed as `.zip` files. All other targets are available as `.tar.xz` and `.tar.gz`.

All artifacts are signed with [minisign](https://jedisct1.github.io/minisign/) using the following public key:

```
RWR+9B91GBZ0zOjh6Lr17+zKf5BoSuFvrx2xSeDE57uIYvnKBGmMjOex
```
Expand Down Expand Up @@ -99,7 +100,7 @@ curl "https://releases.zigtools.org/v1/zls/select-version?zig_version=0.30.0&com
```json
{
"code": 1,
"message": "ZLS 0.30.* does not exist (yet)"
"message": "ZLS 0.30 has not been released yet"
}
```

Expand Down Expand Up @@ -150,7 +151,7 @@ This error only occurs on development/nightly builds of Zig.
```json
{
"code": 3,
"message": "ZLS ${ZIG_MAJOR_VERSION}.${ZIG_MINOR_VERSION}.* does not exist (yet)"
"message": "ZLS ${ZIG_MAJOR_VERSION}.${ZIG_MINOR_VERSION} has not been released yet"
}
```
Expand Down
2 changes: 1 addition & 1 deletion src/select-zls-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function selectZLSVersionFailureCodeToString(
case SelectVersionFailureCode.DevelopmentBuildIncompatible:
return `Zig ${zigVersion.toString()} has no compatible ZLS build (yet)`;
case SelectVersionFailureCode.TaggedReleaseIncompatible:
return `ZLS ${zigVersion.major.toString()}.${zigVersion.minor.toString()}.* does not exist (yet)`;
return `ZLS ${zigVersion.major.toString()}.${zigVersion.minor.toString()} has not been released yet`;
}
}

Expand Down
4 changes: 2 additions & 2 deletions test/select-zls-version.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ describe("/v1/zls/select-version", () => {
);
expect(await response.json()).toStrictEqual<SelectVersionFailureResponse>({
code: SelectVersionFailureCode.TaggedReleaseIncompatible,
message: "ZLS 0.11.* does not exist (yet)",
message: "ZLS 0.11 has not been released yet",
});
expect(response.status).toBe(200);
});
Expand Down Expand Up @@ -510,7 +510,7 @@ describe("/v1/zls/select-version", () => {
[
"0.15.0",
SelectVersionFailureCode.TaggedReleaseIncompatible,
"ZLS 0.15.* does not exist (yet)",
"ZLS 0.15 has not been released yet",
],
[
"0.10.0-dev.5+aaaaaaaaa",
Expand Down

0 comments on commit bbf873b

Please sign in to comment.