diff --git a/lint_test.go b/lint_test.go index 8ba7f32..c5e1650 100644 --- a/lint_test.go +++ b/lint_test.go @@ -90,7 +90,7 @@ func TestCheckSafetyFailsStandalonePluginImportsFromBlockNinjaCMS(t *testing.T) writeTestFile(t, filepath.Join(pluginRoot, "plugin.mod"), "[plugin]\nname = \"example\"\nversion = \"1.0.0\"\n", 0644) writeTestFile(t, filepath.Join(pluginRoot, "main.go"), `package example -import "git.dev.alexdunmow.com/block/ninja/internal/helpers" +import "git.dev.alexdunmow.com/block/cms/internal/helpers" func Example() string { return helpers.Slugify("danger") diff --git a/plugin_imports.go b/plugin_imports.go index 07cdeab..0411740 100644 --- a/plugin_imports.go +++ b/plugin_imports.go @@ -12,7 +12,7 @@ import ( const ( blockCoreImportPrefix = "git.dev.alexdunmow.com/block/core" - blockNinjaImportPrefix = "git.dev.alexdunmow.com/block/ninja" + blockNinjaImportPrefix = "git.dev.alexdunmow.com/block/cms" ) type pluginImportViolation struct { diff --git a/plugin_imports_test.go b/plugin_imports_test.go index 5d055ef..c2fb913 100644 --- a/plugin_imports_test.go +++ b/plugin_imports_test.go @@ -12,7 +12,7 @@ func TestCheckStandalonePluginImportsFlagsBlockNinjaCMSImports(t *testing.T) { import ( "git.dev.alexdunmow.com/block/core/plugin" - "git.dev.alexdunmow.com/block/ninja/internal/helpers" + "git.dev.alexdunmow.com/block/cms/internal/helpers" ) func Example() { @@ -25,7 +25,7 @@ func Example() { if len(violations) != 1 { t.Fatalf("checkStandalonePluginImports() returned %d violations, want 1: %#v", len(violations), violations) } - if violations[0].importPath != "git.dev.alexdunmow.com/block/ninja/internal/helpers" { + if violations[0].importPath != "git.dev.alexdunmow.com/block/cms/internal/helpers" { t.Fatalf("importPath = %q, want forbidden BlockNinja import", violations[0].importPath) } } @@ -55,7 +55,7 @@ func TestCheckStandalonePluginImportsFlagsBlockNinjaCMSImportsInTemplFiles(t *te import ( "git.dev.alexdunmow.com/block/core/templates/bn" - "git.dev.alexdunmow.com/block/ninja/internal/templates" + "git.dev.alexdunmow.com/block/cms/internal/templates" ) templ Page() { @@ -67,7 +67,7 @@ templ Page() { if len(violations) != 1 { t.Fatalf("checkStandalonePluginImports() returned %d violations, want 1: %#v", len(violations), violations) } - if violations[0].importPath != "git.dev.alexdunmow.com/block/ninja/internal/templates" { + if violations[0].importPath != "git.dev.alexdunmow.com/block/cms/internal/templates" { t.Fatalf("importPath = %q, want forbidden BlockNinja templ import", violations[0].importPath) } if violations[0].line != 5 { diff --git a/plugin_sdk_versions_test.go b/plugin_sdk_versions_test.go index 730793e..32b5990 100644 --- a/plugin_sdk_versions_test.go +++ b/plugin_sdk_versions_test.go @@ -8,7 +8,7 @@ import ( func TestCheckCMSCoreSDKGoModFlagsLocalBlockCoreReplace(t *testing.T) { root := t.TempDir() - writeTestFile(t, filepath.Join(root, "go.mod"), `module git.dev.alexdunmow.com/block/ninja + writeTestFile(t, filepath.Join(root, "go.mod"), `module git.dev.alexdunmow.com/block/cms go 1.26.2 @@ -31,7 +31,7 @@ replace git.dev.alexdunmow.com/block/core => ../core func TestCheckCMSCoreSDKGoModAllowsPublishedBlockCoreRequire(t *testing.T) { root := t.TempDir() - writeTestFile(t, filepath.Join(root, "go.mod"), `module git.dev.alexdunmow.com/block/ninja + writeTestFile(t, filepath.Join(root, "go.mod"), `module git.dev.alexdunmow.com/block/cms go 1.26.2 diff --git a/proto_rbac.go b/proto_rbac.go index 5433425..e86aef9 100644 --- a/proto_rbac.go +++ b/proto_rbac.go @@ -359,7 +359,7 @@ func resolveBlockNinjaRepoRootFromModule(root string) (string, error) { } for _, replace := range file.Replace { - if replace.Old.Path != "git.dev.alexdunmow.com/block/ninja" { + if replace.Old.Path != "git.dev.alexdunmow.com/block/cms" { continue } if replace.New.Version != "" { diff --git a/reinvented_test.go b/reinvented_test.go index 5d1151f..c931939 100644 --- a/reinvented_test.go +++ b/reinvented_test.go @@ -88,7 +88,7 @@ func TestCheckReinventedBackend_TypeAssertionWithHelpersImport_Flagged(t *testin dir := t.TempDir() writeFile(t, dir, "service.go", `package service -import "git.dev.alexdunmow.com/block/ninja/internal/helpers" +import "git.dev.alexdunmow.com/block/cms/internal/helpers" func render(m map[string]interface{}) string { _ = helpers.GetStringOr(m, "key", "") @@ -130,7 +130,7 @@ func TestCheckReinventedBackend_HelpersDirSelf_NotFlagged(t *testing.T) { helpersDir := filepath.Join(dir, "internal", "helpers") writeTestFile(t, filepath.Join(helpersDir, "map.go"), `package helpers -import "git.dev.alexdunmow.com/block/ninja/internal/helpers" +import "git.dev.alexdunmow.com/block/cms/internal/helpers" func GetStringOr(m map[string]interface{}, key, def string) string { if v, ok := m[key]; ok { @@ -182,7 +182,7 @@ func TestCheckReinventedBackend_BoolTypeAssertion_Flagged(t *testing.T) { dir := t.TempDir() writeFile(t, dir, "service.go", `package service -import "git.dev.alexdunmow.com/block/ninja/internal/helpers" +import "git.dev.alexdunmow.com/block/cms/internal/helpers" func check(m map[string]interface{}) bool { _ = helpers.GetBoolOr(m, "enabled", false)