npm / firebase-functions
firebase-functions
What changed in firebase-functions 4 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
17 breaking2 deprecations20 new APIs and options4 behavior and defaults14 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initfirebase-functions 738 changes
Breaking changes 7
Literal values are validated against v2 trigger-specific ranges at function-definition or manifest-extraction time, so misconfigurations fail before deploy.
Removes attemptDeadlineSeconds from v2 scheduled functions.
The package now targets ES2022, which may affect runtime compatibility requirements.
The deprecated API is removed; use the params module for environment variables instead.
The v1 Event type is renamed to avoid an api-extractor conflict.
Node.js 16 is no longer supported; projects must use Node.js 18 or later.
The package upgrades to TypeScript v5, which may affect projects compiling against its types.
New APIs and options 17
The AI provider is exported from firebase-functions/v2.
Adds the lifecycle import path for lifecycle hooks.
Adds support for declaring lifecycle hooks in functions.
Adds a function for declaring Google Cloud API dependencies in code.
Adds a developer API for declarative security support and automatic Manifest extraction.
Adds the v2/lifecycle import path for lifecycle hooks.
CallableOptions now accepts BooleanParams, allowing it to be used in callable options.
Realtime database events in the v2 SDK now provide auth context.
The expr tag lets string expressions be used in string interpolation.
All V1 configuration, including pubsub topics, can now be set with params.
Secret params now support a label and/or description.
Support is added for VPC direct connect using network interfaces.
Adds the onGraphRequest method for handling graph requests.
Exports parameter types such as SecretParam and StringParam for use in type annotations.
Function secrets option arrays now allow JsonSecretParam.
ESM is supported alongside CommonJS.
A trigger for Firebase Data Connect is added.
Behavior and default changes 2
The 2nd gen Firebase Authentication trigger is now generally available.
v2 auth blocking functions can use run.app or cloudfunctions.net URLs.
Fixes and other changes 12
Firestore snapshot creation falls back to a valid resource path.
Backwards compatibility is restored for declared parameters when SDK versions are mixed in nested dependencies.
String console.error calls and Node.js runtime warnings no longer receive synthetic Error stack traces.
The Express Response type is re-exported from firebase-functions/v2/https.
Fixes event data unpacking for auth event triggers.
Removes a false warning when an Expression is used in the cors option.
The onInit hook is now called for schedule.onRun functions.
Fixes using Params to set CORS allowed hosts.
Fixes handling of literals with leading or trailing slashes in v1 Firestore paths.
Fixed a missing dependency on graphql.
Fixes the dual-package hazard for parameterized configuration in ESM projects.
Unhandled errors in async handlers now return a 500 error immediately in the Emulator.
firebase-functions 64 changes
Breaking changes 1
The package's default entrypoint changes from v1 to v2, which may affect which API developers use by default.
Deprecations 1
The functions.config() API is annotated as deprecated.
New APIs and options 1
Adds an API for storing structured JSON objects in Cloud Secret Manager.
Fixes and other changes 1
Validation against incomplete or invalid app_remove events is enhanced to avoid runtime crashes.
firebase-functions 52 changes
New APIs and options 1
Adds an option to select a named Firestore instance for v2 Firestore functions.
Behavior and default changes 1
Firestore triggers support multiple databases after removing the firebase-admin v10 dependency.
firebase-functions 413 changes
Breaking changes 9
Support for Admin SDK versions 8 and 9 was dropped.
The logging severity for Auth/App Check token validation changed from info to debug.
App Check enforcement on callable functions is disabled by default in v4.
The Realtime Database trigger now receives a DataSnapshot matching the Admin SDK's version, with null values removed.
Deploys now clear configurations not specified in source code; use preserveExternalChanges to keep existing behavior.
The functions.handler namespace was removed.
It now always outputs an error object and is included in Google Cloud Error Reporting.
Support for Node.js versions 8, 10, and 12 was dropped.
The __trigger object was removed from function handlers.
Deprecations 1
The option is deprecated; use enforceAppCheck instead.
New APIs and options 1
Use this option to keep existing deployment behavior and preserve configurations not specified in source code.
Behavior and default changes 1
Logs created with this package in v2 functions are annotated with each request's trace ID, helping correlate log entries with incoming requests.
Fixes and other changes 1
Event parameters for 2nd generation functions are now strongly typed, permitting stronger TypeScript types for matched parameters.