Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 12, 2025

Bumps github.com/lburgazzoli/gomega-matchers from 0.1.1 to 0.4.0.

Release notes

Sourced from github.com/lburgazzoli/gomega-matchers's releases.

v0.4.0

What's New in v0.4.0

🔄 Breaking Changes

Typed Matcher API Returns Functions

The typed Kubernetes matcher API has been refactored to return functions instead of direct values, enabling seamless integration with Gomega's Eventually() for async assertions.

Before (v0.3.0):

obj, err := k.Get(ctx, &corev1.ConfigMap{
    ObjectMeta: metav1.ObjectMeta{
        Name:      "my-config",
        Namespace: "default",
    },
})
Expect(err).ToNot(HaveOccurred())
Expect(obj).Should(jq.Match(`.data.key == "value"`))

After (v0.4.0):

Eventually(k.Get(&corev1.ConfigMap{
    ObjectMeta: metav1.ObjectMeta{
        Name:      "my-config",
        Namespace: "default",
    },
})).WithContext(ctx).Should(jq.Match(`.data.key == "value"`))

Migration Guide:

  1. Remove ctx parameter from all typed matcher method calls
  2. Wrap calls with Eventually() and add .WithContext(ctx)
  3. Direct invocation is still supported when needed: k.Get(...)(ctx)

All four methods are affected:

  • Get(obj, opts...) → returns func(context.Context) (*unstructured.Unstructured, error)
  • List(list, opts...) → returns func(context.Context) (*unstructured.UnstructuredList, error)
  • Update(obj, updateFunc, opts...) → returns func(context.Context) (*unstructured.Unstructured, error)
  • Delete(obj, opts...) → returns func(context.Context) error

🏗️ Architecture Improvements

  • Consistent API: Typed and unstructured matcher APIs now follow the same pattern
  • Better async testing: Native support for Gomega's Eventually() enables polling until conditions are met
  • Cleaner test code: No need for explicit error handling when using Eventually()
  • Idiomatic Gomega: Follows standard Gomega async assertion patterns

... (truncated)

Commits
  • 4b14295 refactor: make typed K8s matcher API return functions for Gomega integration
  • e7297bd feat: add typed Kubernetes matcher API and reorganize k8s package
  • dae72cd fix: add UnstructuredList converter for JQ matcher
  • a639370 fix tests
  • 2995117 Bump actions/upload-artifact from 4.6.2 to 5.0.0
  • 8fd8cd9 chore: enable forcetypeassert linter and fix all issues
  • 522d6f2 chore: enable nlreturn linter and fix all issues
  • df2870c chore: enable lll linter and fix all issues
  • 9f824ec chore: enable nestif linter
  • 1567c29 chore: enable revive linter and fix all issues
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/lburgazzoli/gomega-matchers](https://github.com/lburgazzoli/gomega-matchers) from 0.1.1 to 0.4.0.
- [Release notes](https://github.com/lburgazzoli/gomega-matchers/releases)
- [Commits](lburgazzoli/gomega-matchers@v0.1.1...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/lburgazzoli/gomega-matchers
  dependency-version: 0.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant