-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use await import instead of require for functions modules that contai…
…n top-level awaits (#1651) * Use await import instead of require for functions modules that contain top-level awaits * tests ensuring that es modules with top level awaits can be loaded * adds node 22 to the CI matrix on github * Add support for an authPolicy that returns Permission Denied when failed (#1650) * Add support for an authPolicy that returns Permission Denied when failed * Formatter * Changelog * remove ignorant comment * Update streaming callable API (#1652) * Update streaming callable API * Fix linter error * Stream type defaults to unknown * Changelog * Format fix * update changelog.md --------- Co-authored-by: Thomas Bouldin <inlined@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
- Add an authPolicy callback to CallableOptions for reusable auth middleware as well as helper auth policies (#1650) | ||
- Handle ESM functions codebases containing top-level awaits, which would break in node 22.12+ (#1651) | ||
- Multiple breaking changes to the not-yet-announced streaming feature for Callable Functions (#1652) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const fn = () => { | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import * as functionsv2 from "firebase-functions/v2"; | ||
|
||
const { fn } = await import('./exports.js'); | ||
|
||
export const v2http = functionsv2.https.onRequest((req, resp) => { | ||
fn() | ||
resp.status(200).send("PASS"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "esm", | ||
"type": "module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters