Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugins] Use reflikes for plugins #1845

Merged
merged 24 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into landau/shift-plugins-to-config
  • Loading branch information
mikeland73 committed Feb 28, 2024
commit 908f9a8c92544d88c654cf7396e33df6a81eb0aa
1 change: 0 additions & 1 deletion internal/devconfig/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const (
type ConfigFile struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Version string `json:"version"`

// PackagesMutator is the slice of Nix packages that devbox makes available in
// its environment. Deliberately do not omitempty.
Expand Down
10 changes: 3 additions & 7 deletions internal/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"text/template"

"github.com/pkg/errors"
"github.com/samber/lo"
"go.jetpack.io/devbox/internal/devconfig"
"go.jetpack.io/devbox/internal/devpkg"

Expand Down Expand Up @@ -44,7 +43,8 @@ type config struct {
DeprecatedDescription string `json:"readme"`
// If true, we remove the package that triggered this plugin from the environment
// Useful when we want to replace with flake
RemoveTriggerPackage bool `json:"__remove_trigger_package,omitempty"`
RemoveTriggerPackage bool `json:"__remove_trigger_package,omitempty"`
Version string `json:"version"`
}

func (c *config) ProcessComposeYaml() (string, string) {
Expand Down Expand Up @@ -283,9 +283,5 @@ func (c *config) Description() string {
if c == nil {
return ""
}
return lo.Ternary(
c.ConfigFile.Description != "",
c.ConfigFile.Description,
c.DeprecatedDescription,
)
return cmp.Or(c.ConfigFile.Description, c.DeprecatedDescription)
}
You are viewing a condensed version of this merge commit. You can view the full changes here.