Skip to content

fix: register Watt close handler#1009

Merged
ferhatelmas merged 7 commits into
supabase:masterfrom
mcollina:chore/npm-lock-config
Apr 15, 2026
Merged

fix: register Watt close handler#1009
ferhatelmas merged 7 commits into
supabase:masterfrom
mcollina:chore/npm-lock-config

Conversation

@mcollina
Copy link
Copy Markdown
Contributor

Summary

  • upgrade Platformatic/Watt to 3.52.0
  • use @platformatic/globals to register a Watt close handler when available
  • keep Watt optional while removing the shutdown warning

Verification

  • npm run build
  • wattpm start binds to 0.0.0.0 without PLT_SERVER_HOSTNAME
  • Watt shutdown no longer warns about a missing close handler

@mcollina mcollina requested a review from a team as a code owner April 11, 2026 07:10
Copilot AI review requested due to automatic review settings April 11, 2026 07:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the project to Platformatic/Watt 3.52.0 and integrates a Watt/Platformatic-driven shutdown path by registering a close handler via @platformatic/globals, aiming to eliminate the “missing close handler” shutdown warning while keeping Watt optional.

Changes:

  • Bump Platformatic/Watt-related dependencies and the watt.json schema to 3.52.0.
  • Add a Platformatic/Watt close event listener that triggers the existing shutdown flow (via a new exported close()).
  • Add .npmrc to ensure package-lock.json is generated/kept.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
watt.json Updates the Platformatic schema reference to 3.52.0.
src/start/server.ts Registers a Platformatic/Watt close handler and adds an exported close() that triggers shutdown.
package.json Upgrades Platformatic/Watt dependencies and adds @platformatic/globals.
package-lock.json Locks dependency upgrades and newly added package metadata.
.npmrc Forces package-lock generation/usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/start/server.ts Outdated
Comment thread src/start/server.ts
Comment thread src/start/server.ts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 24456512436

Coverage remained the same at 82.476%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 33948
Covered Lines: 30463
Line Coverage: 89.73%
Relevant Branches: 7447
Covered Branches: 3678
Branch Coverage: 49.39%
Branches in Coverage %: Yes
Coverage Strength: 347.54 hits per line

💛 - Coveralls

@ferhatelmas ferhatelmas merged commit 1c2b1dd into supabase:master Apr 15, 2026
9 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.

4 participants