feat(middleware)!: migrate to Fiber v3, cut /v3 major#121
Conversation
Bump gofiber/fiber v2->v3.4.0 and cut the /v3 module major. Consume the published betas lib-commons/v6 v6.0.0-beta.2 and lib-observability/v2 v2.0.0-beta.1 (no local replace). Authorize's handler is now func(c fiber.Ctx) (interface by value) and uses c.Context(); merged with develop's product-param rename. Bump golang.org/x/text to v0.39.0 (CVE-2026-56852). BREAKING CHANGE: module path is now github.com/LerianStudio/lib-auth/v3 and the Authorize middleware requires Fiber v3. X-Lerian-Ref: 0x1
Fiber v3 pulls golang.org/x/crypto via acme/autocert; the openpgp advisory has no fixed version and the package is not imported. X-Lerian-Ref: 0x1
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe project was migrated to the Changeslib-auth v3 migration
✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.trivyignore:
- Around line 1-5: The .trivyignore exception is not constrained against future
direct imports of golang.org/x/crypto/openpgp. Add a CI guard using govulncheck
./... or an equivalent import-path check that fails when this module directly
imports golang.org/x/crypto/openpgp, while preserving the existing
transitive-dependency exception.
In `@README.md`:
- Line 10: Update the README installation command to remove the -u flag and
explicitly request the latest or a pinned lib-auth/v3 release, preventing
unrelated dependency upgrades.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: deeb0125-5863-4a38-85a5-6db3002ee406
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (6)
.trivyignoreREADME.mdauth/middleware/middleware.goauth/middleware/middlewareGRPC.goauth/middleware/middleware_test.gogo.mod
|
🎉 This PR is included in version 3.0.0-beta.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 3.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
What
Migrates
lib-authto Fiber v3.4.0 and cuts the/v3module major. Part of the coordinated Fiber v2→v3 wave, after lib-observability (v2.0.0-beta.1) and lib-commons (v6.0.0-beta.2).Changes
github.com/LerianStudio/lib-auth/v3gofiber/fiberv2 → v3.4.0; consumes the published betaslib-commons/v6 v6.0.0-beta.2+lib-observability/v2 v2.0.0-beta.1(no local replace)Authorize(...)handler nowfunc(c fiber.Ctx) error(v3 interface, by value) usingc.Context()— merged cleanly with develop'sproduct-param renamegolang.org/x/text→ v0.39.0 (CVE-2026-56852).trivyignore: accept GO-2026-5932 (x/crypto/openpgp unmaintained, no fix, not imported — pulled transitively by fiber v3's acme/autocert). No fiber/v2 in the graph (lib-auth doesn't use the huma wrapper).Validation
go build ./...,go test ./...,golangci-lint— all green against the published betas.Post-merge note
lib-auth's last tag is a prerelease (
v2.9.0-beta.3), so semantic-release will mis-tag the /v3 cut as a v2 beta (same as lib-commons did). It will need a manualv3.0.0-beta.1bootstrap tag after merge before consumers can pin it.BREAKING CHANGE: consumers must move to
/v3and Fiber v3.