Commit Graph

21 Commits

Author SHA1 Message Date
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
d2afb85eb8 feat(golang-rewrite): create asdf which command
* create asdf which command
* enable which_command.bats tests
* add more info to NoExecutableForPluginError
* Write tests for shims.GetExecutablePath function
* Use plugin `exec-path` callback when present to compute executable
path
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
b966ca6627 feat(golang-rewrite): create asdf exec command
* Add `rogpeppe/go-internal` as a dependency
* Create `exec.Exec` function
* Create asdf exec command
* Address linter warnings
2024-12-18 11:32:02 -05:00
Trevor Brown
9f09f78ec0 feat(golang-rewrite): create shims.FindExecutable function for shim execution
* Create primitive `toolversions.Intersect` function
* Create `paths.RemoveFromPath` function
* Create `shims.FindExecutable` function
* Write tests
2024-12-18 11:32:02 -05:00
Trevor Brown
5266ba581d feat(golang-rewrite): use version type when generating shims
* Generate shims after version install
* Enable `reshim_command.bats` tests
* Remove `update_command.bats` tests from main_test.go
* Update `installs` package functions to accept version type in addition to version value
* Update `versions.ParseString` function to handle path version
* Move invocation of hooks for reshim
* Update `asdf reshim` command so shims can be generated for path versions
2024-12-18 11:32:02 -05:00
Trevor Brown
be52d8f39c feat(golang-rewrite): create installs and installtest packages to avoid circular dependency
* Correct `go test` command in GitHub test workflow
* Update execute tests to work on Github Actions
* Check in `shims/testdata` directory
* Create `installtest` helper package
* Create `installs` package
2024-12-18 11:32:02 -05:00
Trevor Brown
620c0d87e8 feat(golang-rewrite): re-organize Go code
* move most Go packages to internal directory
* update import paths
2024-12-18 11:32:02 -05:00
Trevor Brown
985c181118 feat(golang-rewrite): shim generation 2
* Rename `versions.Installed` function to `IsInstalled`
* Create `versions.Installed` function
* Create `shims.GenerateForPluginVersions` and `shims.GenerateAll` functions
* Address linter warnings
* Create asdf reshim command
* Run asdf hook from new `shims` functions
2024-12-18 11:32:02 -05:00
Trevor Brown
18e21c9028 feat(golang-rewrite): shim generation part 1
* Add `x/sys` as a dependency
* Create `toolversions.Unique` function
* Create `shims` package with `ExecutablePaths`, `PluginExecutables`, `Write`, `GenerateForVersion` function
* Address linter warnings
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
8313ebca2d feat(golang-rewrite): create install command
* Create `versions.Install` function
* Create `versions.InstallVersion` function
* Create `versions.InstallAll` function
* Improve tests
* Create install command
2024-12-18 11:32:01 -05:00
Trevor Brown
9f6a65f5dd feat(golang-rewrite): create versions.Latest function
* Create `versions.ListAll` function
* Create `versions.Latest` function
* Update `versions.InstallOneVersion` to install latest version
2024-12-18 11:32:01 -05:00
Trevor Brown
65688915a5 feat(golang-rewrite): create versions.InstallOneVersion function
* Create Plugin.Exists method
* Create internal/versions package
* Add missing asdfrc for internal/resolve package tests
* Create versions.ParseString function
* Create versions.InstallOneVersion function
* Update hook package to allow hook output to be received
* Write tests
2024-12-18 11:32:01 -05:00
Trevor Brown
bd7ab9ae08 feat(golang-rewrite): full version resolution
* Refactor config package so default settings are always used with config file not loaded
* Update `findVersionsInDir` to check legacy files
* Refactor functions in internal/resolve package to return `ToolVersion` structs instead of version slices
* Refactor `findVersionsInEnv` function to return env variable name
* Create `resolve.Version` function
2024-12-18 11:32:01 -05:00
Trevor Brown
c2e5ee6525 feat(golang-rewrite): create internal/resolve package
* Create `resolve` package
* Create `FindVersionsInDir`, `findVersionsInEnv`, and `findVersionsInLegacyFile` functions in resolve package
* Create `LegacyFilenames` and `ParseLegacyVersionFile` methods for Plugin
2024-12-18 11:32:01 -05:00
Trevor Brown
3155dc374e feat(golang-rewrite): version file parsing
* Create toolversions package
* Address linter errors for toolversions package
* Write tests
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