Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Suppressed the 'punycode' deprecation warning during `firebase deploy` on Node 22. (#10385)
- Fixed an issue where hosting deploy allowed publishing to a site in a different project. (#10376)
- Added 'firebase_deploy' and 'firebase_deploy_status' MCP tools.
- Added SSE mode support to `firebase mcp`. To use it, run `firebase mcp --mode=sse --port=3000`, and connect your client on `http://localhost:3000`.
18 changes: 18 additions & 0 deletions src/bin/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
// Check for older versions of Node no longer supported by the CLI.
import * as semver from "semver";
const pkg = require("../../package.json");

interface NodeWarning extends Error {
code?: string;
}

// List of warning codes to silence
const IGNORED_WARNINGS = [
"DEP0040", // Punycode module is deprecated. Ignored because transitive dependencies (e.g. tr46) still use it via require('punycode/') or directly.
];

process.on("warning", (warning) => {
const nodeWarning = warning as NodeWarning;
if (nodeWarning.code && IGNORED_WARNINGS.includes(nodeWarning.code)) {
return;
}
console.warn(nodeWarning.stack || nodeWarning.message);
});

const nodeVersion = process.version;
if (!semver.satisfies(nodeVersion, pkg.engines.node)) {
console.error(
Expand Down
Loading