From 8813b1771304208ac5743cb158c60f31bedd98fb Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 6 Apr 2025 23:45:36 -0700 Subject: [PATCH 1/2] plugin: ignore name casing --- d2plugin/plugin.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/d2plugin/plugin.go b/d2plugin/plugin.go index 6708e5e03..fdf2ec25f 100644 --- a/d2plugin/plugin.go +++ b/d2plugin/plugin.go @@ -9,6 +9,7 @@ import ( "context" "encoding/json" "os/exec" + "strings" "oss.terrastruct.com/util-go/xexec" "oss.terrastruct.com/util-go/xmain" @@ -170,7 +171,7 @@ func FindPlugin(ctx context.Context, ps []Plugin, name string) (Plugin, error) { if err != nil { return nil, err } - if info.Name == name { + if strings.EqualFold(info.Name, name) { return p, nil } } From 25f90e9bd7314ef2546f8846a873b71bf5c11045 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 6 Apr 2025 23:47:31 -0700 Subject: [PATCH 2/2] next --- ci/release/changelogs/next.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 7f7f63458..2d814312d 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -17,6 +17,7 @@ - Support `validate` command. [#2415](https://github.com/terrastruct/d2/pull/2415) - Watch mode ignores backup files (e.g. files created by certain editors like Helix). [#2131](https://github.com/terrastruct/d2/issues/2131) - Support for `--omit-version` flag. [#2377](https://github.com/terrastruct/d2/issues/2377) + - Casing is ignored for plugin names [#2486](https://github.com/terrastruct/d2/pull/2486) - Compiler: - `link`s can be set to root path, e.g. `/xyz`. [#2357](https://github.com/terrastruct/d2/issues/2357) - When importing a file, attempt resolving substitutions at the imported file scope first [#2482](https://github.com/terrastruct/d2/pull/2482)