Skip to content

deps: migrate shellescape to al.essio.dev/pkg/shellescape - #1443

Merged
mrexox merged 1 commit into
evilmartians:masterfrom
maguowei:shellescape-new-module-path
Jun 16, 2026
Merged

deps: migrate shellescape to al.essio.dev/pkg/shellescape#1443
mrexox merged 1 commit into
evilmartians:masterfrom
maguowei:shellescape-new-module-path

Conversation

@maguowei

Copy link
Copy Markdown
Contributor

Title: deps: migrate shellescape to al.essio.dev/pkg/shellescape


Why

The shellescape module was renamed from github.com/alessio/shellescape to al.essio.dev/pkg/shellescape starting with v1.5.0 (see https://github.com/alessio/shellescape/releases).

Lefthook itself builds fine because its graph pins the old path at v1.4.1. However, downstream projects that pull lefthook in as a Go tool dependency and resolve a fresh module graph can end up selecting a post-rename version of the old path, which fails with:

github.com/alessio/[email protected]: parsing go.mod:
        module declares its path as: al.essio.dev/pkg/shellescape
                but was required as: github.com/alessio/shellescape

Other projects hit the same issue with this dependency, e.g. kubernetes-sigs/kind#3840.

What

  • Switch the three import sites (build_command.go, build_script.go, replacer/replacer.go) to the new canonical path
  • Bump the dependency to v1.6.0 in go.mod / go.sum

Package name is unchanged (shellescape), so no code changes are needed. go mod tidy, go build ./... and go test ./... pass locally.

The shellescape module was renamed to al.essio.dev/pkg/shellescape in
v1.5.0. Keeping the old github.com/alessio/shellescape import works for
lefthook itself (the graph is pinned to v1.4.1), but it breaks downstream
projects that resolve lefthook as a tool dependency and end up selecting
a post-rename version of the old path, which fails with:

  module declares its path as: al.essio.dev/pkg/shellescape
          but was required as: github.com/alessio/shellescape

Switch the three import sites to the new canonical path and bump the
dependency to v1.6.0. Same package name, no code changes needed.

See also kubernetes-sigs/kind#3840 for the same migration.
@maguowei
maguowei requested a review from mrexox as a code owner June 12, 2026 10:42

@mrexox mrexox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care!

@mrexox
mrexox merged commit afce724 into evilmartians:master Jun 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants