Skip to content

build(deps): bump golang.design/x/clipboard from 0.8.0 to 0.9.0 - #140

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/golang.design/x/clipboard-0.9.0
Open

build(deps): bump golang.design/x/clipboard from 0.8.0 to 0.9.0#140
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/golang.design/x/clipboard-0.9.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 4, 2026

Copy link
Copy Markdown
Contributor

Bumps golang.design/x/clipboard from 0.8.0 to 0.9.0.

Release notes

Sourced from golang.design/x/clipboard's releases.

v0.9.0

The largest release this package has had: a breaking API change that makes failures visible and operations cancellable, four new capabilities, and a browser backend that the API change made possible.

Every open issue on the tracker is closed by this release.


⚠️ Breaking: context.Context in, error out

Read used to return nil for every kind of failure, so you could not tell an empty clipboard from a missing X server — the package even carried an internal debug flag whose only job was printing that difference to stderr. And a read could not be bounded: on X11 it might sit for five seconds with no way for you to say otherwise.

Every call that moves bytes now takes a context first and returns an error last.

before after
b := clipboard.Read(f) b, err := clipboard.Read(ctx, f)
ch := clipboard.Write(f, b) ch, err := clipboard.Write(ctx, f, b)
fs := clipboard.Formats() fs, err := clipboard.Formats(ctx)
v, err := clipboard.ReadAs(f, dec) v, err := clipboard.ReadAs(ctx, f, dec)

Init, Register and Watch are unchanged at the call site. Watch did change signature — Watch(ctx, t ...Format) became Watch(ctx, opts ...Option) — but Format satisfies Option, so clipboard.Watch(ctx, clipboard.FmtText) still compiles exactly as before.

context.TODO() is a correct first step, and code that ignored failures can keep doing so with _. When you want the cause, three sentinels tell the cases apart:

b, err := clipboard.Read(ctx, clipboard.FmtImage)
switch {
case errors.Is(err, clipboard.ErrNoData):      // nothing to paste
case errors.Is(err, clipboard.ErrUnavailable): // no clipboard to reach
case errors.Is(err, clipboard.ErrUnsupported): // not possible on this platform
}

The context is honored as far as each platform allows: every backend checks it before starting, and X11 applies your deadline to the wire read, capped by the package ceiling. Elsewhere the calls are effectively immediate, so the entry check is the whole of it — promising more would be a lie.

This is a pre-1.0 module, so the change arrives as a minor version rather than a new import path. Full migration guide in the README.

... (truncated)

Commits
  • c768c5d clipboard: add the browser backend (#64) (#172)
  • cc606a2 clipboard: take a context and return an error (v0.9.0) (#171)
  • abdddd7 x11: do not close the connection out from under the last reply (#170)
  • bbca04e clipboard: limit how many times a write is served (#22) (#169)
  • b4a0ae4 x11: do not wait on a selection nobody owns (#168)
  • 5f89cbb clipboard: reach the primary (middle-click) selection (#67) (#167)
  • 07550dd clipboard: copy and paste files (#152) (#166)
  • 9cbb00c clipboard: publish several formats in one write (#151) (#165)
  • 75ec3a0 docs: explain why a Windows service sees a different clipboard (#145) (#164)
  • f6516d5 windows: watch the clipboard by event, not by poll (#153) (#163)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Sep 4, 2026
Bumps [golang.design/x/clipboard](https://github.com/golang-design/clipboard) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/golang-design/clipboard/releases)
- [Commits](golang-design/clipboard@v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.design/x/clipboard
  dependency-version: 0.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/golang.design/x/clipboard-0.9.0 branch from b2690bb to b293160 Compare September 4, 2026 12:35
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.

0 participants