Repository: GoogleContainerTools/kpt
Pull request #3660 (2022-11-16 01:42:07)

Move printer package out of internal
The printer is required to be set on the context to run the commands,
so we should expose the (required) printer package.



Patch:
diff --git a/commands/alpha/rpkg/pull/command.go b/commands/alpha/rpkg/pull/command.go
index d4ba82d3..af47ca61 100644
--- a/commands/alpha/rpkg/pull/command.go
+++ b/commands/alpha/rpkg/pull/command.go
@@ -24,10 +24,10 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/docs/generated/rpkgdocs"
 	"github.com/GoogleContainerTools/kpt/internal/errors"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/cmdutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/porch"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	porchapi "github.com/GoogleContainerTools/kpt/porch/api/porch/v1alpha1"
 	"github.com/spf13/cobra"
 	"k8s.io/apimachinery/pkg/runtime"
diff --git a/commands/alpha/rpkg/push/command.go b/commands/alpha/rpkg/push/command.go
index 6d514a70..974b3e86 100644
--- a/commands/alpha/rpkg/push/command.go
+++ b/commands/alpha/rpkg/push/command.go
@@ -28,8 +28,8 @@ import (
 	"github.com/GoogleContainerTools/kpt/internal/docs/generated/rpkgdocs"
 	"github.com/GoogleContainerTools/kpt/internal/errors"
 	"github.com/GoogleContainerTools/kpt/internal/fnruntime"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/porch"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	porchapi "github.com/GoogleContainerTools/kpt/porch/api/porch/v1alpha1"
 	"github.com/spf13/cobra"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
diff --git a/commands/fn/doc/cmdfndoc.go b/commands/fn/doc/cmdfndoc.go
index 581c79bf..055cf174 100644
--- a/commands/fn/doc/cmdfndoc.go
+++ b/commands/fn/doc/cmdfndoc.go
@@ -24,8 +24,8 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/docs/generated/fndocs"
 	"github.com/GoogleContainerTools/kpt/internal/fnruntime"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/cmdutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/spf13/cobra"
 )
 
diff --git a/commands/fn/render/cmdrender.go b/commands/fn/render/cmdrender.go
index 17ecd422..89e55ded 100644
--- a/commands/fn/render/cmdrender.go
+++ b/commands/fn/render/cmdrender.go
@@ -24,11 +24,11 @@ import (
 
 	docs "github.com/GoogleContainerTools/kpt/internal/docs/generated/fndocs"
 	"github.com/GoogleContainerTools/kpt/internal/fnruntime"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/argutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/cmdutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/pathutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/render"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/spf13/cobra"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 )
diff --git a/commands/live/init/cmdliveinit.go b/commands/live/init/cmdliveinit.go
index ed89d9f8..35c0d316 100644
--- a/commands/live/init/cmdliveinit.go
+++ b/commands/live/init/cmdliveinit.go
@@ -28,13 +28,13 @@ import (
 	"github.com/GoogleContainerTools/kpt/internal/docs/generated/livedocs"
 	"github.com/GoogleContainerTools/kpt/internal/errors"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/types"
 	"github.com/GoogleContainerTools/kpt/internal/util/attribution"
 	"github.com/GoogleContainerTools/kpt/internal/util/pathutil"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/spf13/cobra"
 	"k8s.io/cli-runtime/pkg/genericclioptions"
 	k8scmdutil "k8s.io/kubectl/pkg/cmd/util"
diff --git a/commands/pkg/diff/cmddiff.go b/commands/pkg/diff/cmddiff.go
index 2af9877c..b483cb80 100644
--- a/commands/pkg/diff/cmddiff.go
+++ b/commands/pkg/diff/cmddiff.go
@@ -20,11 +20,11 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/docs/generated/pkgdocs"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/argutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/cmdutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/diff"
 	"github.com/GoogleContainerTools/kpt/internal/util/pathutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/spf13/cobra"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 )
diff --git a/internal/cmdutil/util.go b/internal/cmdutil/util.go
index 086876bc..2a2baa44 100644
--- a/internal/cmdutil/util.go
+++ b/internal/cmdutil/util.go
@@ -18,8 +18,8 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/pkg/live"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"k8s.io/kubectl/pkg/cmd/util"
 )
 
diff --git a/internal/fnruntime/container.go b/internal/fnruntime/container.go
index b0772040..36ecc1ba 100644
--- a/internal/fnruntime/container.go
+++ b/internal/fnruntime/container.go
@@ -28,8 +28,8 @@ import (
 	"sync"
 	"time"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	fnresult "github.com/GoogleContainerTools/kpt/pkg/api/fnresult/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"golang.org/x/mod/semver"
 	"sigs.k8s.io/kustomize/kyaml/fn/runtime/runtimeutil"
 )
diff --git a/internal/fnruntime/exec.go b/internal/fnruntime/exec.go
index 0fd7e7d2..e06a6a4d 100644
--- a/internal/fnruntime/exec.go
+++ b/internal/fnruntime/exec.go
@@ -23,8 +23,8 @@ import (
 	"os/exec"
 	"time"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	fnresult "github.com/GoogleContainerTools/kpt/pkg/api/fnresult/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 )
 
 type ExecFn struct {
diff --git a/internal/fnruntime/runner.go b/internal/fnruntime/runner.go
index a83db137..cfde4d92 100644
--- a/internal/fnruntime/runner.go
+++ b/internal/fnruntime/runner.go
@@ -28,11 +28,11 @@ import (
 	"github.com/GoogleContainerTools/kpt/internal/builtins"
 	"github.com/GoogleContainerTools/kpt/internal/errors"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/types"
 	fnresult "github.com/GoogleContainerTools/kpt/pkg/api/fnresult/v1"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/fn"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/google/shlex"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 	"sigs.k8s.io/kustomize/kyaml/fn/framework"
diff --git a/internal/gitutil/gitutil.go b/internal/gitutil/gitutil.go
index b3c7e34c..73678fe8 100644
--- a/internal/gitutil/gitutil.go
+++ b/internal/gitutil/gitutil.go
@@ -30,7 +30,7 @@ import (
 	"time"
 
 	"github.com/GoogleContainerTools/kpt/internal/errors"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 )
 
 // RepoCacheDirEnv is the name of the environment variable that controls the cache directory
diff --git a/internal/util/argutil/argutil.go b/internal/util/argutil/argutil.go
index 32a61162..084716d0 100644
--- a/internal/util/argutil/argutil.go
+++ b/internal/util/argutil/argutil.go
@@ -22,7 +22,7 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"sigs.k8s.io/kustomize/kyaml/errors"
 )
 
diff --git a/internal/util/fetch/fetch.go b/internal/util/fetch/fetch.go
index 5c6c53e7..d32381d5 100644
--- a/internal/util/fetch/fetch.go
+++ b/internal/util/fetch/fetch.go
@@ -28,12 +28,12 @@ import (
 	"github.com/GoogleContainerTools/kpt/internal/errors"
 	"github.com/GoogleContainerTools/kpt/internal/gitutil"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/types"
 	"github.com/GoogleContainerTools/kpt/internal/util/git"
 	"github.com/GoogleContainerTools/kpt/internal/util/pkgutil"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 )
 
 // Command takes the upstream information in the Kptfile at the path for the
diff --git a/internal/util/get/get.go b/internal/util/get/get.go
index 605acf2a..fd96bb38 100644
--- a/internal/util/get/get.go
+++ b/internal/util/get/get.go
@@ -27,7 +27,6 @@ import (
 	"github.com/GoogleContainerTools/kpt/internal/fnruntime"
 	"github.com/GoogleContainerTools/kpt/internal/hook"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/types"
 	"github.com/GoogleContainerTools/kpt/internal/util/addmergecomment"
 	"github.com/GoogleContainerTools/kpt/internal/util/attribution"
@@ -36,6 +35,7 @@ import (
 	"github.com/GoogleContainerTools/kpt/internal/util/stack"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 	"sigs.k8s.io/kustomize/kyaml/kio"
 )
diff --git a/internal/util/printerutil/printerutil.go b/internal/util/printerutil/printerutil.go
index 1d90d42d..049144ac 100644
--- a/internal/util/printerutil/printerutil.go
+++ b/internal/util/printerutil/printerutil.go
@@ -17,7 +17,7 @@ package printerutil
 import (
 	"context"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 )
 
 // PrintFnResultInfo displays information about the function results file.
diff --git a/internal/util/render/executor.go b/internal/util/render/executor.go
index b9cf9862..af7dc4d5 100644
--- a/internal/util/render/executor.go
+++ b/internal/util/render/executor.go
@@ -25,13 +25,13 @@ import (
 	"github.com/GoogleContainerTools/kpt/internal/errors"
 	"github.com/GoogleContainerTools/kpt/internal/fnruntime"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/types"
 	"github.com/GoogleContainerTools/kpt/internal/util/attribution"
 	"github.com/GoogleContainerTools/kpt/internal/util/printerutil"
 	fnresult "github.com/GoogleContainerTools/kpt/pkg/api/fnresult/v1"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/fn"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 	"sigs.k8s.io/kustomize/kyaml/kio"
 	"sigs.k8s.io/kustomize/kyaml/kio/kioutil"
diff --git a/internal/util/update/update.go b/internal/util/update/update.go
index cd90c7a5..3db2f4f0 100644
--- a/internal/util/update/update.go
+++ b/internal/util/update/update.go
@@ -26,7 +26,6 @@ import (
 	"github.com/GoogleContainerTools/kpt/internal/errors"
 	"github.com/GoogleContainerTools/kpt/internal/gitutil"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/types"
 	"github.com/GoogleContainerTools/kpt/internal/util/addmergecomment"
 	"github.com/GoogleContainerTools/kpt/internal/util/fetch"
@@ -35,6 +34,7 @@ import (
 	"github.com/GoogleContainerTools/kpt/internal/util/stack"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"sigs.k8s.io/kustomize/kyaml/copyutil"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 )
diff --git a/pkg/kptpkg/init.go b/pkg/kptpkg/init.go
index 419f8850..37214019 100644
--- a/pkg/kptpkg/init.go
+++ b/pkg/kptpkg/init.go
@@ -23,9 +23,9 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/builtins"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/man"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"sigs.k8s.io/kustomize/kyaml/errors"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 	"sigs.k8s.io/kustomize/kyaml/kio/filters"
diff --git a/internal/printer/fake/fake.go b/pkg/printer/fake/fake.go
similarity index 96%
rename from internal/printer/fake/fake.go
rename to pkg/printer/fake/fake.go
index e790ae21..499c5f35 100644
--- a/internal/printer/fake/fake.go
+++ b/pkg/printer/fake/fake.go
@@ -19,7 +19,7 @@ import (
 	"io"
 
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 )
 
 // Printer implements the printer.Printer interface and just ignores
diff --git a/internal/printer/printer.go b/pkg/printer/printer.go
similarity index 100%
rename from internal/printer/printer.go
rename to pkg/printer/printer.go
diff --git a/porch/pkg/engine/init.go b/porch/pkg/engine/init.go
index 49d1b2fe..b4101be3 100644
--- a/porch/pkg/engine/init.go
+++ b/porch/pkg/engine/init.go
@@ -18,9 +18,9 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/pkg/kptpkg"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	api "github.com/GoogleContainerTools/kpt/porch/api/porch/v1alpha1"
 	"github.com/GoogleContainerTools/kpt/porch/pkg/repository"
 	"go.opentelemetry.io/otel/trace"
diff --git a/porch/pkg/engine/update.go b/porch/pkg/engine/update.go
index ec71c3fc..4d7c3bc2 100644
--- a/porch/pkg/engine/update.go
+++ b/porch/pkg/engine/update.go
@@ -19,8 +19,8 @@ import (
 	"os"
 	"path/filepath"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/update"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/GoogleContainerTools/kpt/porch/pkg/repository"
 )
 
diff --git a/porch/pkg/kpt/pkgupdate.go b/porch/pkg/kpt/pkgupdate.go
index 62db8f37..dbc28fe1 100644
--- a/porch/pkg/kpt/pkgupdate.go
+++ b/porch/pkg/kpt/pkgupdate.go
@@ -21,12 +21,12 @@ import (
 	"path/filepath"
 
 	internalpkg "github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/fetch"
 	"github.com/GoogleContainerTools/kpt/internal/util/git"
 	"github.com/GoogleContainerTools/kpt/internal/util/update"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"k8s.io/klog/v2"
 )
 
diff --git a/porch/pkg/kpt/render.go b/porch/pkg/kpt/render.go
index e65c24f4..c454f191 100644
--- a/porch/pkg/kpt/render.go
+++ b/porch/pkg/kpt/render.go
@@ -22,10 +22,10 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/fnruntime"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/render"
 	fnresult "github.com/GoogleContainerTools/kpt/pkg/api/fnresult/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/fn"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"k8s.io/klog/v2"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 )
diff --git a/run/run.go b/run/run.go
index 611101fe..7f5a7c56 100644
--- a/run/run.go
+++ b/run/run.go
@@ -26,8 +26,8 @@ import (
 
 	kptcommands "github.com/GoogleContainerTools/kpt/commands"
 	"github.com/GoogleContainerTools/kpt/internal/docs/generated/overview"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/cmdutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/spf13/cobra"
 	"sigs.k8s.io/kustomize/kyaml/commandutil"
 )
diff --git a/site/reference/annotations/local-config/README.md b/site/reference/annotations/local-config/README.md
index 5592c683..be2e733b 100644
--- a/site/reference/annotations/local-config/README.md
+++ b/site/reference/annotations/local-config/README.md
@@ -24,8 +24,8 @@ YAML boolean (invalid annotation), not a string.
 
 ### Behavior
 
-Resources with the `local-config` annotation set to `true` will not be applied
-to the cluster when using `kpt live apply`.
+Resources with the `local-config` annotation set to any value except `false`
+will not be applied to the cluster when using `kpt live apply`.
 
 ### Example
 
diff --git a/thirdparty/cmdconfig/commands/cmdeval/cmdeval.go b/thirdparty/cmdconfig/commands/cmdeval/cmdeval.go
index ba6ecd5a..3113cf89 100644
--- a/thirdparty/cmdconfig/commands/cmdeval/cmdeval.go
+++ b/thirdparty/cmdconfig/commands/cmdeval/cmdeval.go
@@ -15,12 +15,12 @@ import (
 	docs "github.com/GoogleContainerTools/kpt/internal/docs/generated/fndocs"
 	"github.com/GoogleContainerTools/kpt/internal/fnruntime"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/argutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/cmdutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/pathutil"
 	kptfile "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/GoogleContainerTools/kpt/thirdparty/cmdconfig/commands/runner"
 	"github.com/GoogleContainerTools/kpt/thirdparty/kyaml/runfn"
 	"github.com/google/shlex"
diff --git a/thirdparty/cmdconfig/commands/cmdsource/cmdsource.go b/thirdparty/cmdconfig/commands/cmdsource/cmdsource.go
index fc06836b..242434b0 100644
--- a/thirdparty/cmdconfig/commands/cmdsource/cmdsource.go
+++ b/thirdparty/cmdconfig/commands/cmdsource/cmdsource.go
@@ -10,10 +10,10 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/docs/generated/fndocs"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/argutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/cmdutil"
 	kptfile "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/GoogleContainerTools/kpt/thirdparty/cmdconfig/commands/runner"
 	"github.com/spf13/cobra"
 	"sigs.k8s.io/kustomize/kyaml/kio"
diff --git a/thirdparty/cmdconfig/commands/cmdtree/cmdtree.go b/thirdparty/cmdconfig/commands/cmdtree/cmdtree.go
index 61058310..4fa5bfa5 100644
--- a/thirdparty/cmdconfig/commands/cmdtree/cmdtree.go
+++ b/thirdparty/cmdconfig/commands/cmdtree/cmdtree.go
@@ -8,9 +8,9 @@ import (
 	"path/filepath"
 
 	"github.com/GoogleContainerTools/kpt/internal/docs/generated/pkgdocs"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/util/argutil"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/GoogleContainerTools/kpt/thirdparty/cmdconfig/commands/runner"
 	"github.com/spf13/cobra"
 	"sigs.k8s.io/kustomize/kyaml/kio"
diff --git a/thirdparty/cmdconfig/commands/runner/runner.go b/thirdparty/cmdconfig/commands/runner/runner.go
index 7a813a32..21bbfad5 100644
--- a/thirdparty/cmdconfig/commands/runner/runner.go
+++ b/thirdparty/cmdconfig/commands/runner/runner.go
@@ -10,8 +10,8 @@ import (
 	"os"
 	"strings"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/go-errors/errors"
 	"github.com/spf13/cobra"
 	"sigs.k8s.io/kustomize/kyaml/pathutil"
diff --git a/thirdparty/kyaml/runfn/runfn.go b/thirdparty/kyaml/runfn/runfn.go
index 87e4dd4b..d632540c 100644
--- a/thirdparty/kyaml/runfn/runfn.go
+++ b/thirdparty/kyaml/runfn/runfn.go
@@ -13,7 +13,7 @@ import (
 	"strings"
 
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"sigs.k8s.io/kustomize/kyaml/errors"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 	"sigs.k8s.io/kustomize/kyaml/fn/runtime/runtimeutil"


Test patch:
diff --git a/commands/alpha/repo/reg/command_test.go b/commands/alpha/repo/reg/command_test.go
index a8038128..3eb844b8 100644
--- a/commands/alpha/repo/reg/command_test.go
+++ b/commands/alpha/repo/reg/command_test.go
@@ -25,7 +25,7 @@ import (
 	"strings"
 	"testing"
 
-	fakeprinter "github.com/GoogleContainerTools/kpt/internal/printer/fake"
+	fakeprinter "github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/google/go-cmp/cmp"
 	"gopkg.in/yaml.v3"
 	"k8s.io/cli-runtime/pkg/genericclioptions"
diff --git a/commands/alpha/rpkg/pull/command_test.go b/commands/alpha/rpkg/pull/command_test.go
index a6fb5b2e..fb20dc29 100644
--- a/commands/alpha/rpkg/pull/command_test.go
+++ b/commands/alpha/rpkg/pull/command_test.go
@@ -19,8 +19,8 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
-	fakeprint "github.com/GoogleContainerTools/kpt/internal/printer/fake"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
+	fakeprint "github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	porchapi "github.com/GoogleContainerTools/kpt/porch/api/porch/v1alpha1"
 	"github.com/google/go-cmp/cmp"
 	"github.com/spf13/cobra"
diff --git a/commands/fn/doc/cmdfndoc_test.go b/commands/fn/doc/cmdfndoc_test.go
index 59677535..4fef74ce 100644
--- a/commands/fn/doc/cmdfndoc_test.go
+++ b/commands/fn/doc/cmdfndoc_test.go
@@ -19,7 +19,7 @@ import (
 	"testing"
 
 	"github.com/GoogleContainerTools/kpt/commands/fn/doc"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"sigs.k8s.io/kustomize/kyaml/testutil"
 )
 
diff --git a/commands/fn/render/cmdrender_test.go b/commands/fn/render/cmdrender_test.go
index 7a2c7684..68978f58 100644
--- a/commands/fn/render/cmdrender_test.go
+++ b/commands/fn/render/cmdrender_test.go
@@ -19,8 +19,8 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/spf13/cobra"
 	"github.com/stretchr/testify/assert"
 )
diff --git a/commands/live/apply/cmdapply_test.go b/commands/live/apply/cmdapply_test.go
index 003a4072..bb4353d4 100644
--- a/commands/live/apply/cmdapply_test.go
+++ b/commands/live/apply/cmdapply_test.go
@@ -18,10 +18,10 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	"k8s.io/cli-runtime/pkg/genericclioptions"
diff --git a/commands/live/destroy/cmddestroy_test.go b/commands/live/destroy/cmddestroy_test.go
index f1ae9622..60ab11ce 100644
--- a/commands/live/destroy/cmddestroy_test.go
+++ b/commands/live/destroy/cmddestroy_test.go
@@ -18,10 +18,10 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 	"k8s.io/cli-runtime/pkg/genericclioptions"
 	cmdtesting "k8s.io/kubectl/pkg/cmd/testing"
diff --git a/commands/live/init/cmdliveinit_test.go b/commands/live/init/cmdliveinit_test.go
index 43de6a8d..59a1959d 100644
--- a/commands/live/init/cmdliveinit_test.go
+++ b/commands/live/init/cmdliveinit_test.go
@@ -22,10 +22,10 @@ import (
 	"time"
 
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 	"k8s.io/cli-runtime/pkg/genericclioptions"
 	cmdtesting "k8s.io/kubectl/pkg/cmd/testing"
diff --git a/commands/live/migrate/migratecmd_test.go b/commands/live/migrate/migratecmd_test.go
index e136025c..6f167b46 100644
--- a/commands/live/migrate/migratecmd_test.go
+++ b/commands/live/migrate/migratecmd_test.go
@@ -21,8 +21,8 @@ import (
 	"testing"
 
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	"k8s.io/cli-runtime/pkg/genericclioptions"
diff --git a/commands/live/status/cmdstatus_test.go b/commands/live/status/cmdstatus_test.go
index ec8904f7..bc56e70e 100644
--- a/commands/live/status/cmdstatus_test.go
+++ b/commands/live/status/cmdstatus_test.go
@@ -22,10 +22,10 @@ import (
 	"testing"
 	"time"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	cmdtesting "k8s.io/kubectl/pkg/cmd/testing"
diff --git a/commands/pkg/diff/cmddiff_test.go b/commands/pkg/diff/cmddiff_test.go
index 645579e4..440d0f20 100644
--- a/commands/pkg/diff/cmddiff_test.go
+++ b/commands/pkg/diff/cmddiff_test.go
@@ -21,8 +21,8 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/commands/pkg/diff"
 	"github.com/GoogleContainerTools/kpt/commands/pkg/get"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/spf13/cobra"
 	"github.com/stretchr/testify/assert"
 )
diff --git a/commands/pkg/get/cmdget_test.go b/commands/pkg/get/cmdget_test.go
index a930caa5..3222187b 100644
--- a/commands/pkg/get/cmdget_test.go
+++ b/commands/pkg/get/cmdget_test.go
@@ -22,9 +22,9 @@ import (
 	"testing"
 
 	"github.com/GoogleContainerTools/kpt/commands/pkg/get"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/spf13/cobra"
 	"github.com/stretchr/testify/assert"
 	"sigs.k8s.io/kustomize/kyaml/yaml"
diff --git a/commands/pkg/init/cmdinit_test.go b/commands/pkg/init/cmdinit_test.go
index b013fc1a..d0f81dca 100644
--- a/commands/pkg/init/cmdinit_test.go
+++ b/commands/pkg/init/cmdinit_test.go
@@ -22,9 +22,9 @@ import (
 
 	initialization "github.com/GoogleContainerTools/kpt/commands/pkg/init"
 	"github.com/GoogleContainerTools/kpt/internal/builtins"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	"github.com/GoogleContainerTools/kpt/internal/util/man"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/commands/pkg/update/cmdupdate_test.go b/commands/pkg/update/cmdupdate_test.go
index 3c264453..a759f70f 100644
--- a/commands/pkg/update/cmdupdate_test.go
+++ b/commands/pkg/update/cmdupdate_test.go
@@ -27,10 +27,10 @@ import (
 	"github.com/GoogleContainerTools/kpt/commands/pkg/get"
 	"github.com/GoogleContainerTools/kpt/commands/pkg/update"
 	"github.com/GoogleContainerTools/kpt/internal/gitutil"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	"github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/spf13/cobra"
 	"github.com/stretchr/testify/assert"
 	"sigs.k8s.io/kustomize/kyaml/yaml"
diff --git a/internal/fnruntime/container_test.go b/internal/fnruntime/container_test.go
index cc11d970..b059f79f 100644
--- a/internal/fnruntime/container_test.go
+++ b/internal/fnruntime/container_test.go
@@ -21,8 +21,8 @@ import (
 	"context"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	fnresult "github.com/GoogleContainerTools/kpt/pkg/api/fnresult/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/internal/fnruntime/runner_test.go b/internal/fnruntime/runner_test.go
index 8f8099cc..7d63c049 100644
--- a/internal/fnruntime/runner_test.go
+++ b/internal/fnruntime/runner_test.go
@@ -24,9 +24,9 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	"github.com/GoogleContainerTools/kpt/internal/types"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/stretchr/testify/assert"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 	"sigs.k8s.io/kustomize/kyaml/fn/framework"
diff --git a/internal/gitutil/gitutil_test.go b/internal/gitutil/gitutil_test.go
index ffe60b4f..4d2257d7 100644
--- a/internal/gitutil/gitutil_test.go
+++ b/internal/gitutil/gitutil_test.go
@@ -23,9 +23,9 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/errors"
 	. "github.com/GoogleContainerTools/kpt/internal/gitutil"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	"github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/internal/testutil/setup_manager.go b/internal/testutil/setup_manager.go
index dd8ede1a..73f1e454 100644
--- a/internal/testutil/setup_manager.go
+++ b/internal/testutil/setup_manager.go
@@ -21,10 +21,10 @@ import (
 	"testing"
 
 	"github.com/GoogleContainerTools/kpt/internal/gitutil"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder"
 	"github.com/GoogleContainerTools/kpt/internal/util/get"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 	"sigs.k8s.io/kustomize/kyaml/yaml"
 )
diff --git a/internal/testutil/testutil.go b/internal/testutil/testutil.go
index cfa7906a..7275f985 100644
--- a/internal/testutil/testutil.go
+++ b/internal/testutil/testutil.go
@@ -27,11 +27,11 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/gitutil"
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/util/addmergecomment"
 	"github.com/GoogleContainerTools/kpt/internal/util/git"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	toposort "github.com/philopon/go-toposort"
 	"github.com/stretchr/testify/assert"
 	assertnow "gotest.tools/assert"
diff --git a/internal/util/argutil/argutil_test.go b/internal/util/argutil/argutil_test.go
index b8c83a19..c1d393dd 100644
--- a/internal/util/argutil/argutil_test.go
+++ b/internal/util/argutil/argutil_test.go
@@ -19,9 +19,9 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	. "github.com/GoogleContainerTools/kpt/internal/util/argutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/internal/util/diff/diff_test.go b/internal/util/diff/diff_test.go
index 9ff13c51..983ba37b 100644
--- a/internal/util/diff/diff_test.go
+++ b/internal/util/diff/diff_test.go
@@ -26,10 +26,10 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	"github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder"
 	. "github.com/GoogleContainerTools/kpt/internal/util/diff"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/internal/util/fetch/fetch_test.go b/internal/util/fetch/fetch_test.go
index c0c28174..c97cc5d3 100644
--- a/internal/util/fetch/fetch_test.go
+++ b/internal/util/fetch/fetch_test.go
@@ -21,12 +21,12 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
 	pkgtesting "github.com/GoogleContainerTools/kpt/internal/pkg/testing"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	"github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder"
 	. "github.com/GoogleContainerTools/kpt/internal/util/fetch"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 	"sigs.k8s.io/kustomize/kyaml/yaml"
diff --git a/internal/util/get/example_test.go b/internal/util/get/example_test.go
index 6d0669e3..136f3add 100644
--- a/internal/util/get/example_test.go
+++ b/internal/util/get/example_test.go
@@ -17,9 +17,9 @@ package get_test
 import (
 	"path/filepath"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/util/get"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 )
 
 func ExampleCommand() {
diff --git a/internal/util/get/get_test.go b/internal/util/get/get_test.go
index 96c0ca01..5667bcc2 100644
--- a/internal/util/get/get_test.go
+++ b/internal/util/get/get_test.go
@@ -20,11 +20,11 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	"github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder"
 	. "github.com/GoogleContainerTools/kpt/internal/util/get"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 	"sigs.k8s.io/kustomize/kyaml/kio"
 	"sigs.k8s.io/kustomize/kyaml/kio/filters"
diff --git a/internal/util/parse/parse_test.go b/internal/util/parse/parse_test.go
index c0bbef4a..c985cdac 100644
--- a/internal/util/parse/parse_test.go
+++ b/internal/util/parse/parse_test.go
@@ -19,8 +19,8 @@ import (
 	"fmt"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
 	v1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/internal/util/update/update_test.go b/internal/util/update/update_test.go
index 3a67f128..0e0ec314 100644
--- a/internal/util/update/update_test.go
+++ b/internal/util/update/update_test.go
@@ -24,12 +24,12 @@ import (
 
 	"github.com/GoogleContainerTools/kpt/internal/pkg"
 	pkgtest "github.com/GoogleContainerTools/kpt/internal/pkg/testing"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
 	"github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder"
 	. "github.com/GoogleContainerTools/kpt/internal/util/update"
 	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	"github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 	"sigs.k8s.io/kustomize/kyaml/copyutil"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
diff --git a/porch/pkg/kpt/fs_test.go b/porch/pkg/kpt/fs_test.go
index 13b01bcc..d724f8e8 100644
--- a/porch/pkg/kpt/fs_test.go
+++ b/porch/pkg/kpt/fs_test.go
@@ -18,8 +18,8 @@ import (
 	"testing"
 
 	"github.com/GoogleContainerTools/kpt/internal/fnruntime"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/util/render"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 )
 
diff --git a/porch/pkg/kpt/render_test.go b/porch/pkg/kpt/render_test.go
index e99fe95e..ef99a31b 100644
--- a/porch/pkg/kpt/render_test.go
+++ b/porch/pkg/kpt/render_test.go
@@ -20,8 +20,8 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/util/render"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/google/go-cmp/cmp"
 	"sigs.k8s.io/kustomize/kyaml/filesys"
 )
diff --git a/thirdparty/cmdconfig/commands/cmdeval/cmdeval_test.go b/thirdparty/cmdconfig/commands/cmdeval/cmdeval_test.go
index 7b87b402..f21b805e 100644
--- a/thirdparty/cmdconfig/commands/cmdeval/cmdeval_test.go
+++ b/thirdparty/cmdconfig/commands/cmdeval/cmdeval_test.go
@@ -13,8 +13,8 @@ import (
 	"testing"
 
 	"github.com/GoogleContainerTools/kpt/internal/fnruntime"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/GoogleContainerTools/kpt/thirdparty/kyaml/runfn"
 	"github.com/spf13/cobra"
 	"github.com/stretchr/testify/assert"
diff --git a/thirdparty/cmdconfig/commands/cmdsink/cmdsink_test.go b/thirdparty/cmdconfig/commands/cmdsink/cmdsink_test.go
index 94028b71..0f20e46b 100644
--- a/thirdparty/cmdconfig/commands/cmdsink/cmdsink_test.go
+++ b/thirdparty/cmdconfig/commands/cmdsink/cmdsink_test.go
@@ -10,8 +10,8 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer"
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
+	"github.com/GoogleContainerTools/kpt/pkg/printer"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/thirdparty/cmdconfig/commands/cmdsource/cmdsource_test.go b/thirdparty/cmdconfig/commands/cmdsource/cmdsource_test.go
index af5dc314..9cfaf4f6 100644
--- a/thirdparty/cmdconfig/commands/cmdsource/cmdsource_test.go
+++ b/thirdparty/cmdconfig/commands/cmdsource/cmdsource_test.go
@@ -9,8 +9,8 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/thirdparty/cmdconfig/commands/cmdtree/cmdtree_test.go b/thirdparty/cmdconfig/commands/cmdtree/cmdtree_test.go
index 9434c92f..908abcf2 100644
--- a/thirdparty/cmdconfig/commands/cmdtree/cmdtree_test.go
+++ b/thirdparty/cmdconfig/commands/cmdtree/cmdtree_test.go
@@ -10,8 +10,8 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	"github.com/GoogleContainerTools/kpt/internal/testutil"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/thirdparty/kyaml/runfn/runfn_test.go b/thirdparty/kyaml/runfn/runfn_test.go
index 5cbddc00..21485ac4 100644
--- a/thirdparty/kyaml/runfn/runfn_test.go
+++ b/thirdparty/kyaml/runfn/runfn_test.go
@@ -10,9 +10,9 @@ import (
 	"runtime"
 	"testing"
 
-	"github.com/GoogleContainerTools/kpt/internal/printer/fake"
 	fnresult "github.com/GoogleContainerTools/kpt/pkg/api/fnresult/v1"
 	v1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
+	"github.com/GoogleContainerTools/kpt/pkg/printer/fake"
 	"github.com/stretchr/testify/assert"
 
 	"sigs.k8s.io/kustomize/kyaml/copyutil"