Commit Graph

330 Commits

Author SHA1 Message Date
Trevor Brown
9ed4216525 feat(golang-rewrite): misc. version improvements
* Update `pluginListCommand` to print tools and versions to STDOUT
* Improve output of `asdf current` command
2024-12-18 11:32:04 -05:00
Your Name
369beebab9 feat(golang-rewrite): implement asdf plugin test command
* Enable `plugin_test_command.bats` tests
* Implement `asdf plugin test` command
2024-12-18 11:32:04 -05:00
Your Name
ccc98ad4e9 feat(golang-rewrite): implement asdf plugin extension commands
* Enable `plugin_extension_command.bats` tests
* Add comment on `version_commands.bats` tests
* Show help output when asdf run with no arguments
* Document breaking change in asdf extension commands feature
* Create `Plugin.ExtensionCommandPath` method
* Create `asdf cmd` subcommand
* Get `plugin_extension_command.bats` tests passing
* Document breaking changes to asdf extension commands
2024-12-18 11:32:04 -05:00
Trevor Brown
e7df5ff325 feat(golang-rewrite): implement asdf plugin list all command
* Enable `plugin_list_all_command.bats` tests
* Create `PluginIndex.Get` method
* Create `asdf plugin list all` subcommand
* Extract plugin index repo URL into config package
* Fix failing tests
2024-12-18 11:32:03 -05:00
Trevor Brown
b6ec89f95f feat(golang-rewrite): get all install_command.bats tests passing
* Enable `install_command.bats` tests
* Update `versions.InstallVersion` function to accept `toolversions.Version` struct
* Remove download directory after install if not configured to keep it
* Add download callback requirement to list of breaking changes
* Add `--keep-download` flag to install command
* Get all `install_command.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
162cb8ecee feat(golang-rewrite): get remaining shim_exec.bats tests passing
* Disable custom shim template tests
* Document another breaking change
* Enable `shim_exec.bats` tests
* Fix bug in `shims.getCustomExecutablePath` function
* Pass default relative executable path as third argument to `exec-path` callback
* Get remaining `shim_exec.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
26a3815948 feat(golang-rewrite): implement asdf env command
* Create `CallbackPath` method on `Plugin` struct
* Correct behavior of `asdf shimversions` command
* Update `shims.FindExecutable` function to return plugin
* Create `repotest.WritePluginCallback` function
* Create `execenv` package for invoking `exec-env` plugin callback
* Make `MapToSlice` a public function
* Return resolved version from `shims.FindExecutable` function
* Create `shims.ExecutablePaths` function
* Enable `shim_env_command.bats` tests
* Implement `asdf env` command
2024-12-18 11:32:03 -05:00
Trevor Brown
924eecfa6a feat(golang-rewrite): introduce Version struct, get some shim_exec.bats tests passing
* Get more shim_exec.bats tests passing by adding shebang lines to test scripts
* Disable shim_exec test case for scenario that is no longer possible
* Add documentation on another breaking change
* Create toolversions.Version struct and update code to use new struct
2024-12-18 11:32:03 -05:00
Trevor Brown
822e14c561 feat(golang-rewrite): create shimversions command
* Enable `shim_versions_command.bats` tests
* Create `asdf shimversions` command
2024-12-18 11:32:03 -05:00
Trevor Brown
626bde0a97 feat(golang-rewrite): more asdf plugin remove tests
* Enable `remove_command.bats` tests
* Update `remove_command.bats` to use new command name
* Create `internal/data` package
* Use data package for install paths
* Get all asdf plugin remove command BATS tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
8db188a702 feat(golang-rewrite): create asdf list and asdf list all commands
* Enable `asdf list` BATS tests
* Update list_command.bats code to use non-hyphenated version of list all command
* Implement `asdf list all` command
* Implement `asdf list` command
2024-12-18 11:32:02 -05:00
Trevor Brown
3fd4a83975 feat(golang-rewrite): create asdf uninstall command
* Enable asdf uninstall BATS tests
* Create `toolversions.ParseFromCliArg` function
* Create `versions.Uninstall` function
* Update `ParseFromCliArg` function to handle latest version without optional filter value
* Create `asdf uninstall` command
* Comment out invalid test
* Address linter warnings
2024-12-18 11:32:02 -05:00
Trevor Brown
09d06ff125 feat(golang-rewrite): create asdf where command
* Move `versions.ParseString` function to the toolversions package
* Create `toolversions.FormatForFS` function
* use new `toolversions.FormatForFS` function
* Create `asdf where` command
* Enable BATS tests for `asdf where` command
2024-12-18 11:32:02 -05:00
Trevor Brown
d94baceb18 feat(golang-rewrite): implement asdf help command
* Create help package
* Add help command
* Enable help command BATS tests
* Implement functions in help package
* Write tests
* Correct function call in `installPlugin` test helper in shims package
2024-12-18 11:32:02 -05:00
Trevor Brown
b33ab6463c feat(golang-rewrite): create asdf current command
* Create asdf current command
* Correct output of asdf exec command when no command is provided
* Enable current_command.bats tests
* Fix current_command.bats test code
2024-12-18 11:32:02 -05:00
Trevor Brown
c0963a38a6 feat(golang-rewrite): more work to get install_command.bats test passing
* Correct `logger.Printf` call
* Get `plugin_remove_command.bats` tests passing
* Enable plugin_remove_command BATS tests
* Create `versions.NoVersionSetError` struct
* Set `ASDF_CONCURRENCY` for install callbacks
2024-12-18 11:32:02 -05:00
Trevor Brown
b23e5a320f feat(golang-rewrite): BATS test fixes & latest command
* Get asdf info BATS tests working
* Create `versions.Installed` function
* Update `versions.Latest` to return single version
* Implement `latest` asdf command
2024-12-18 11:32:01 -05:00
Trevor Brown
447acd13d1 feat(golang-rewrite): info command
* Implement info command
* Remove duplicate and unneeded BATS tests from `main_test.go`
* remove download dir for plugin when removing plugin
* update plugins.Add function so downloads directory is created
2024-12-18 11:32:01 -05:00
Trevor Brown
778ab34a6f feat(golang-rewrite): create RunCallback method for Plugin struct
* Create `plugins.New` function, updating existing code to use it
* Add another test for `hook.Run` function
* Enable `plugin_add_command.bats` tests for Go implementation of asdf
* Add `RunCallback` method to `Plugin` struct
* Update `plugins.Add` function to run `post-plugin-add` plugin callback script
* Handle Bash expression and scripts properly in `execute` package so `$@` is always set
2024-12-18 11:32:01 -05:00
Trevor Brown
8394e858fe feat(golang-rewrite): use plugin index
* Create `pluginindex.Build` function
* Use `pluginindex` when no plugin URL provided for plugin add command
* Get more `plugin_add_command` BATS tests passing against Golang version
* Only use `pluginindex` when it is not disabled
* Update error message so it matches legacy format
* Add staticcheck.conf
2024-12-18 11:32:01 -05:00
Trevor Brown
9097696a4f feat(golang-rewrite): create Makefile
* Address Go linter warnings
* Fix Github workflow
2024-12-18 11:32:00 -05:00
Trevor Brown
2b02f51fa1 feat(golang-rewrite): create plugin remove command
* Simplify BATS test Golang code
* Update plugin add test to new command format
* Correctly set `ASDF_DATA_DIR` for BATS tests
* Rename `PluginAdd` function to `Add`
* Create `plugin.Remove` function
* Make plugin remove command invoke `plugin.Remove` function
2024-12-18 11:32:00 -05:00
Trevor Brown
2951011090 feat(golang-rewrite): set variables for bats integration tests 2024-12-18 11:32:00 -05:00
莊喬
fa3d216540
test: unset ASDF_DATA_DIR and ASDF_CONFIG_FILE during test (#1722)
Co-authored-by: Trevor Brown <Stratus3D@users.noreply.github.com>
2024-12-17 15:58:05 -05:00
Trevor Brown
15571a2d28
feat(golang-rewrite): remove asdf update command to prepare for Go version (#1806) 2024-12-16 15:38:02 -05:00
Ben Blank
44f3efb63b
fix: Only display the "can't keep downloads" warning when asked to keep downloads (#1756) 2024-08-15 10:08:49 -04:00
Edwin Kofler
b8ecf71d77
test(fish): Improve test isolation (#1708) 2024-01-19 19:38:06 +11:00
Edwin Kofler
19515eda3b
fix: warn if plugin does not support keeping downloads if configured (#1644) 2024-01-10 00:06:35 +11:00
Edwin Kofler
dfea89ccc7
fix: avoid mention of ASDF_NU_DIR (#1660) 2024-01-09 23:25:30 +11:00
Lorenz Kitzmann
0ddab5dfaf
fix: nushell language syntax update (#1624)
Co-authored-by: James Hegedus <jthegedus@hey.com>
2023-09-11 21:02:46 +10:00
Edvard
36c7024baa
feat: add plugin location when update the plugin (#1602) 2023-09-11 00:43:39 +10:00
Edwin Kofler
4dd190466a
fix!: 0 exit code for success when adding an existing plugin (#1598) 2023-07-26 21:42:08 +10:00
Edwin Kofler
097f7733d6
fix: warn if .tool-versions or asdfrc contains carriage returns (#1561) 2023-05-28 23:36:53 +10:00
Edwin Kofler
684f4f058f
feat: Support configurable ASDF_CONCURRENCY (#1532)
Co-authored-by: James Hegedus <jthegedus@hey.com>
2023-04-19 13:45:51 +00:00
Trevor Brown
2dd65e0e71
chore: only ban readlink -f (#1539) 2023-04-13 10:06:25 -04:00
Edwin Kofler
491ef2a9f2
test: rm useless echo usage in tests (#1535) 2023-04-11 03:58:58 +00:00
alexezio
d28b13a8c7
test: reshim of plugins installed by path (#1287)
Co-authored-by: Benchi Lian <benchi.lian@thoughtworks.com>
Co-authored-by: James Hegedus <jthegedus@hey.com>
2023-04-05 13:48:13 +00:00
Edwin Kofler
213aa22378
feat: Support PowerShell Core (#1522) 2023-04-01 04:12:20 +00:00
Edwin Kofler
747a55fe4a
test: skip tests for uninstalled shells when run locally (#1517) 2023-03-26 23:18:00 +00:00
Edwin Kofler
a1b5eeec1c
fix: asdf info show BASH_VERSION & all asdf envs (#1513) 2023-03-26 22:28:16 +00:00
Edwin Kofler
bbcbddcdd4
fix: Better handling with paths that include spaces (#1485) 2023-03-24 12:37:23 +00:00
Andrea Jemmett
9363fb2f72
fix: Nushell plugin list --urls (#1507) 2023-03-23 01:23:53 +00:00
Andrea Jemmett
c5b8b3c128
fix: nushell plugin list all (#1501) (#1502) 2023-03-21 08:53:10 +00:00
Edwin Kofler
cd4c3f9698
test: assert info and help output (#1482)
Co-authored-by: James Hegedus <jthegedus@hey.com>
2023-02-19 22:10:05 +11:00
Edwin Kofler
dd8d3999d4
fix: support nushell v0.75.0 (#1481) 2023-02-19 21:46:59 +11:00
Edwin Kofler
e0fd7a7be8
fix: enforce & use consistent function definitions (#1464) 2023-01-29 14:52:22 +11:00
Edwin Kofler
aa0abfa504
test: Skip Fish test if not installed (#1463) 2023-01-29 12:51:54 +11:00
Edwin Kofler
22be95e68d
test: vaidate Bats minimum required version in tests (#1460) 2023-01-28 21:57:39 +11:00
Edwin Kofler
90ead5ea0a
chore: Fix ShellCheck errors in tests (#1459)
Closes https://github.com/asdf-vm/asdf/issues/1396
2023-01-27 23:17:41 +11:00
Edwin Kofler
df154edc25
test: better isolate Git in test suite (#1454) 2023-01-27 23:09:43 +11:00