• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dunglas / mercure / 29599463785
86%
master: 93%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 17 Jul 2026 05:20PM UTC
Jobs 1
Files 37
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jul 2026 05:17PM UTC coverage: 85.042% (+0.9%) from 84.18%
29599463785

push

github

web-flow
feat!: OAuth 2.0 authorization, Exact/URLPattern matchers, and docs (#1278)

* feat(matcher): add MatcherType enum and go-urlpattern

Scaffolding for the Exact + URLPattern matcher types defined by the
spec revision (https://github.com/dunglas/mercure/pull/1262). The enum
replaces the matcher registry explored in
https://github.com/dunglas/mercure/pull/1207.

Refs https://github.com/dunglas/mercure/pull/1262

* feat(matcher): switch-based Exact and URLPattern matching

TopicSelectorStore dispatches on MatcherType instead of a registry:
Exact is a plain slices.Contains, URLPattern compiles via go-urlpattern
with the hub URL as base (ignoreCase off, per spec). v8 exact-or-URI-
Template matching moves behind the new deprecated_topic build tag.

The legacy match() path is kept temporarily until subscribers and
claims migrate to topicMatcher.

Refs https://github.com/dunglas/mercure/pull/1262

* feat(update)!: single canonical Topic per update

Update.Topics becomes Update.Topic: the spec revision removes alternate
topics (an update has exactly one). The v8 Topics field survives behind
the deprecated_topic build tag as alternate topics, and a custom JSON
codec keeps the historic "Topics" array wire shape so bolt databases
written by 0.x hubs stay readable.

BREAKING CHANGE: Go API users must set Update.Topic. Update.Topics
exists only in deprecated_topic builds.

Refs https://github.com/dunglas/mercure/pull/1262

* feat(matcher)!: topic and topicURLPattern subscribe parameters

Implements the matcher surface of the spec revision: the topic query
parameter selects Exact matching, topicURLPattern selects WHATWG URL
Pattern matching, and unknown matcher parameter names are rejected with
a 400. JWT mercure.publish / mercure.subscribe entries use the object
form {match, matchType, payload} with matchType defaulting to Exact;
the per-subscription payload is the first matching subscribe claim's
payload. The subscription API moves to
/subscriptions/{matchType}/{ma... (continued)

1116 of 1255 new or added lines in 28 files covered. (88.92%)

17 existing lines in 6 files now uncovered.

2712 of 3189 relevant lines covered (85.04%)

101.0 hits per line

Uncovered Changes

Lines Coverage ∆ File
16
78.66
0.88% subscription.go
14
92.67
authorizationdetails.go
14
46.15
handlertopic_deprecated.go
13
93.1
-3.12% hub.go
12
84.81
matcherclaim.go
12
83.33
-1.75% subscribe.go
10
88.8
-7.2% authorization.go
10
90.99
topicmatcher.go
7
94.57
-4.13% subscriber.go
6
91.18
authorization_deprecated.go
4
41.03
0.0% config_deprecated.go
4
86.83
-1.75% publish.go
4
90.91
-9.09% update.go
3
93.62
reservedtopic.go
2
95.24
bearererror.go
2
88.89
resourcemetadata.go
2
97.14
subscribematchers.go
2
93.75
topicmatcher_deprecated.go
2
88.89
update_deprecated.go

Coverage Regressions

Lines Coverage ∆ File
5
83.33
-1.75% subscribe.go
4
88.8
-7.2% authorization.go
4
86.83
-1.75% publish.go
2
81.82
-6.06% jwtkeyfunc.go
1
93.1
-3.12% hub.go
1
78.66
0.88% subscription.go
Jobs
ID Job ID Ran Files Coverage
1 0 - 29599463785.1 17 Jul 2026 05:20PM UTC 37
85.04
GitHub Action Run
Source Files on build 29599463785
  • Tree
  • List 37
  • Changed 12
  • Source Changed 0
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 71f29291 on github
  • Prev Build on main (#29599457929)
  • Next Build on main (#29640604202)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc