Skip to content

Commit

Permalink
Merge branch 'master' into update_readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Stratus3D authored Dec 18, 2024
2 parents 465a6b2 + 98b8c6f commit 7d843bd
Show file tree
Hide file tree
Showing 47 changed files with 4,843 additions and 673 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
node-version: "20"

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
id: npm-cache
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
semantic-pr:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.4.0
- uses: amannn/action-semantic-pull-request@v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
with:
node-version: "18"

- uses: actions/cache@v3
- uses: actions/cache@v4
id: npm-cache
with:
path: |
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.14.1](https://github.com/asdf-vm/asdf/compare/v0.14.0...v0.14.1) (2024-08-15)


### Patches

* Only display the "can't keep downloads" warning when asked to keep downloads ([#1756](https://github.com/asdf-vm/asdf/issues/1756)) ([44f3efb](https://github.com/asdf-vm/asdf/commit/44f3efb63b7517520f4610d504d30783a85c9d79))

## [0.14.0](https://github.com/asdf-vm/asdf/compare/v0.13.1...v0.14.0) (2024-01-19)


Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ not covered under this security policy.**
<!-- x-release-please-start-version -->

```
0.14.0
0.14.1
```

<!-- x-release-please-end -->
Expand Down
54 changes: 39 additions & 15 deletions asdf.nu
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def --env configure-asdf [] {
if ( $env | get --ignore-errors ASDF_DATA_DIR | is-empty ) {
$env.HOME | path join '.asdf'
} else {
$env.ASDF_DIR
$env.ASDF_DATA_DIR
} | path join 'shims'
)
let asdf_bin_dir = ( $env.ASDF_DIR | path join 'bin' )
Expand Down Expand Up @@ -74,6 +74,30 @@ module asdf {
}
}

def "complete asdf plugin versions all" [context: string] {
let plugin = $context | str trim | split words | last
^asdf list all $plugin
| lines
| each { |line| $line | str trim }
| prepend "latest"
}

def "complete asdf plugin versions installed" [context: string] {
let plugin = $context | str trim | split words | last
let versions = ^asdf list $plugin
| lines
| each { |line| $line | str trim }
| each { |version| if ($version | str starts-with "*") {{value: ($version | str substring 1..), description: "current version"}} else {{value: $version, description: ""}} }

let latest = ^asdf latest $plugin | str trim

if ($versions | get value | any {|el| $el == $latest}) {
$versions | prepend {value: "latest", description: $"alias to ($latest)"}
} else {
$versions
}
}

# ASDF version manager
export extern main [
subcommand?: string@"complete asdf sub-commands"
Expand Down Expand Up @@ -107,7 +131,7 @@ module asdf {

let flags = ($params | where enabled | get --ignore-errors flag | default '' )

^asdf plugin list $flags | lines | parse -r $template | str trim
^asdf plugin list ...$flags | lines | parse -r $template | str trim
}

# list all available plugins
Expand Down Expand Up @@ -145,15 +169,15 @@ module asdf {

# install a package version
export extern "asdf install" [
name?: string # Name of the package
version?: string # Version of the package or latest
name?: string@"complete asdf installed plugins" # Name of the package
version?: string@"complete asdf plugin versions all" # Version of the package or latest
]


# Remove an installed package version
export extern "asdf uninstall" [
name: string@"complete asdf installed" # Name of the package
version: string # Version of the package
version: string@"complete asdf plugin versions installed" # Version of the package
]

# Display current version
Expand All @@ -169,31 +193,31 @@ module asdf {
# Display install path for an installled package version
export extern "asdf where" [
name: string@"complete asdf installed" # Name of installed package
version?: string # Version of installed package
version?: string@"complete asdf plugin versions installed" # Version of installed package
]

# Set the package local version
export extern "asdf local" [
name: string@"complete asdf installed" # Name of the package
version?: string # Version of the package or latest
version?: string@"complete asdf plugin versions installed" # Version of the package or latest
]

# Set the package global version
export extern "asdf global" [
name: string@"complete asdf installed" # Name of the package
version?: string # Version of the package or latest
version?: string@"complete asdf plugin versions installed" # Version of the package or latest
]

# Set the package to version in the current shell
export extern "asdf shell" [
name: string@"complete asdf installed" # Name of the package
version?: string # Version of the package or latest
version?: string@"complete asdf plugin versions installed" # Version of the package or latest
]

# Show latest stable version of a package
export extern "asdf latest" [
name: string # Name of the package
version?: string # Filter latest stable version from this version
name: string@"complete asdf installed" # Name of the package
version?: string@"complete asdf plugin versions installed" # Filter latest stable version from this version
]

# Show latest stable version for all installed packages
Expand All @@ -202,21 +226,21 @@ module asdf {
# List installed package versions
export extern "asdf list" [
name?: string@"complete asdf installed" # Name of the package
version?: string # Filter the version
version?: string@"complete asdf plugin versions installed" # Filter the version
]

# List all available package versions
export def "asdf list all" [
name: string@"complete asdf installed" # Name of the package
version?: string="" # Filter the version
version?: string@"complete asdf plugin versions installed"="" # Filter the version
] {
^asdf list all $name $version | lines | parse "{version}" | str trim
}

# Show documentation for plugin
export extern "asdf help" [
name: string@"complete asdf installed" # Name of the plugin
version?: string # Version of the plugin
version?: string@"complete asdf plugin versions installed" # Version of the plugin
]

# Execute a command shim for the current version
Expand All @@ -237,7 +261,7 @@ module asdf {
# Recreate shims for version package
export extern "asdf reshim" [
name?: string@"complete asdf installed" # Name of the package
version?: string # Version of the package
version?: string@"complete asdf plugin versions installed" # Version of the package
]

# List the plugins and versions that provide a command
Expand Down
12 changes: 7 additions & 5 deletions completions/asdf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _asdf() {
COMPREPLY=($(compgen -W "$available_plugins" -- "$cur"))
;;
install | list | list-all | help)
if [[ "$plugins" == *"$prev"* ]]; then
if [[ " $plugins " == *" $prev "* ]]; then
local versions
versions=$(asdf list-all "$prev" 2>/dev/null)
# shellcheck disable=SC2207
Expand All @@ -54,9 +54,10 @@ _asdf() {
COMPREPLY=($(compgen -W "--head" -- "$cur"))
;;
uninstall | where | reshim)
if [[ "$plugins" == *"$prev"* ]]; then
if [[ " $plugins " == *" $prev "* ]]; then
local versions
versions=$(asdf list "$prev" 2>/dev/null)
# The first two columns are either blank or contain the "current" marker.
versions=$(asdf list "$prev" 2>/dev/null | colrm 1 2)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$versions" -- "$cur"))
else
Expand All @@ -65,9 +66,10 @@ _asdf() {
fi
;;
local | global | shell)
if [[ "$plugins" == *"$prev"* ]]; then
if [[ " $plugins " == *" $prev "* ]]; then
local versions
versions=$(asdf list "$prev" 2>/dev/null)
# The first two columns are either blank or contain the "current" marker.
versions=$(asdf list "$prev" 2>/dev/null | colrm 1 2)
versions+=" system"
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$versions" -- "$cur"))
Expand Down
2 changes: 1 addition & 1 deletion docs/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 20.2.0
nodejs 22.10.0
8 changes: 8 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ export default defineConfig({
sidebar: sidebars.en,
},
},
"ko-kr": {
label: "한국어",
lang: "ko-kr",
themeConfig: {
nav: navbars.ko_kr,
sidebar: sidebars.ko_kr,
},
},
"ja-jp": {
label: "日本語",
lang: "ja-jp",
Expand Down
20 changes: 19 additions & 1 deletion docs/.vitepress/navbars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ const ja_jp = [
},
];

const ko_kr = [
{ text: "가이드", link: "/ko-kr/guide/getting-started" },
{
text: "참고자료",
link: "/ko-kr/manage/configuration",
},
{
text: getVersion(),
items: [
{
text: "변동사항",
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
},
{ text: "기여하기", link: "/ko-kr/contribute/core" },
],
},
];

const pt_br = [
{ text: "Guia", link: "/pt-br/guide/getting-started" },
{
Expand Down Expand Up @@ -86,4 +104,4 @@ const zh_hans = [
},
];

export { en, ja_jp, pt_br, zh_hans };
export { en, ko_kr, ja_jp, pt_br, zh_hans };
Loading

0 comments on commit 7d843bd

Please sign in to comment.