Skip to content

Commit

Permalink
fix: update README and tests (#85)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4b0db74)
  • Loading branch information
crowlKats committed Oct 9, 2024
1 parent 4606d5c commit b571f8c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- macos-latest
deno:
- "1.x"
- "2.x"
- "1.33.1"
- "canary"
- "~1.32"
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,65 @@ Set up your GitHub Actions workflow with a specific version of Deno.
### Latest stable for a major

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x
```
### Latest stable for any major
Targets the latest major, minor and patch version of Deno.
```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: vx.x.x
```
### Specific stable
```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: "1.8.2"
```
### Semver range
```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: "~1.7"
```
### Latest canary
```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: canary
```
### Specific canary
```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: e7b7129b7a92b7500ded88f8f5baa25a7f59e56e
```
### Latest release candidate
```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: rc
```
### Specific release candidate
```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: 2.0.0-rc.1
```
Expand All @@ -76,7 +76,7 @@ The extension can also automatically read the version file from
[`.tool-versions`](https://asdf-vm.com/manage/configuration.html#tool-versions)

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version-file: .tool-versions
```
Expand All @@ -85,7 +85,7 @@ The extension can also automatically read the file from
[`dvm`](https://github.com/justjavac/dvm).

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version-file: .dvmrc
```
Expand All @@ -95,7 +95,7 @@ The extension can also automatically read the file from
This is useful when you want to install different versions of Deno side by side.

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: canary
deno-binary-name: deno_canary
Expand All @@ -108,7 +108,7 @@ You can determine the release channel reading back the `release-channel` output.
Valid values are `stable`, `canary` and `rc`.

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
id: deno
with:
deno-version: canary
Expand All @@ -126,7 +126,7 @@ For stable and rc versions, the output will be the regular semver version
number.

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
id: deno
with:
deno-version: canary
Expand Down
2 changes: 1 addition & 1 deletion src/version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const GIT_HASH_RE = /^[0-9a-fA-F]{40}$/;
* @returns {VersionRange | null}
*/
export function parseVersionRange(version) {
version = String(version) || "1.x";
version = String(version) || "2.x";
version = version.trim();

if (version === "canary") {
Expand Down

0 comments on commit b571f8c

Please sign in to comment.