functions-framework-nodejs icon indicating copy to clipboard operation
functions-framework-nodejs copied to clipboard

v4.0.1 introduced breaking change (express v4 -> v5 bump)

Open caugner opened this issue 1 month ago • 0 comments

In https://github.com/GoogleCloudPlatform/functions-framework-nodejs/pull/715, express was upgraded from v4 to v5.

Since express types are used in the public interface of @google/functions-framework, this appears to be a breaking change for users of this library:

  • The signature of the public http() function has changed: https://github.com/GoogleCloudPlatform/functions-framework-nodejs/blob/34e75c8ea4d6fa455de072ac8b9f14135d42e9d6/src/function_registry.ts#L86-L88
  • The second parameter uses the HttpFunction type: https://github.com/GoogleCloudPlatform/functions-framework-nodejs/blob/34e75c8ea4d6fa455de072ac8b9f14135d42e9d6/src/functions.ts#L58-L60
  • This type uses Request and Response from express: https://github.com/GoogleCloudPlatform/functions-framework-nodejs/blob/34e75c8ea4d6fa455de072ac8b9f14135d42e9d6/src/functions.ts#L19

caugner avatar Dec 09 '25 09:12 caugner