Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(firebase): upgrade default runtime to node 20 #2654

Merged
merged 4 commits into from
Sep 6, 2024
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
6 changes: 3 additions & 3 deletions docs/2.deploy/20.providers/firebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ You can set custom Node.js version in configuration:
```ts [nitro.config.ts]
export default defineNitroConfig({
firebase: {
nodeVersion: "18" // Can be "16", "18", "20" or "22"
nodeVersion: "20" // Can be "16", "18", "20" or "22"
},
});
```
Expand All @@ -202,7 +202,7 @@ export default defineNitroConfig({
export default defineNuxtConfig({
nitro: {
firebase: {
nodeVersion: "18" // Can be "16", "18", "20" or "22"
nodeVersion: "20" // Can be "16", "18", "20" or "22"
},
},
});
Expand All @@ -218,7 +218,7 @@ You might also need to add a runtime key to your `firebase.json` file:
{
"functions": {
"source": ".output/server",
"runtime": "nodejs18"
"runtime": "nodejs20"
}
}
```
Expand Down
3 changes: 1 addition & 2 deletions src/presets/firebase/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ export async function updatePackageJSON(nitro: Nitro) {
),
engines: {
// https://cloud.google.com/functions/docs/concepts/nodejs-runtime
// const supportedNodeVersions = new Set(["20", "18", "16"]);
pi0 marked this conversation as resolved.
Show resolved Hide resolved
node: nitro.options.firebase?.nodeVersion || "18",
node: nitro.options.firebase?.nodeVersion || "20",
luc122c marked this conversation as resolved.
Show resolved Hide resolved
},
});
}