-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Migrate all samples to firebase-functions v7 #1227
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
Merged
Merged
+17,859
−15,365
Conversation
This file contains hidden or 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
taeold
added a commit
to firebase/firebase-functions
that referenced
this pull request
Nov 5, 2025
We restore 'typesVersions' in package.json to support TypeScript projects using 'moduleResolution: node'. This legacy resolution mode ignores the 'exports' field, causing compilation errors when importing subpaths like 'firebase-functions/https'. Restoring 'typesVersions' ensures compatibility for users who haven't migrated to 'node16' or 'nodenext' resolution. Unblocks firebase/functions-samples#1227.
taeold
added a commit
to firebase/firebase-functions
that referenced
this pull request
Nov 5, 2025
We restore 'typesVersions' in package.json to support TypeScript projects using 'moduleResolution: node'. This legacy resolution mode ignores the 'exports' field, causing compilation errors when importing subpaths like 'firebase-functions/https'. Restoring 'typesVersions' ensures compatibility for users who haven't migrated to 'node16' or 'nodenext' resolution. Unblocks firebase/functions-samples#1227.
taeold
added a commit
to firebase/firebase-functions
that referenced
this pull request
Nov 5, 2025
We restore 'typesVersions' in package.json to support TypeScript projects using 'moduleResolution: node'. This legacy resolution mode ignores the 'exports' field, causing compilation errors when importing subpaths like 'firebase-functions/https'. Restoring 'typesVersions' ensures compatibility for users who haven't migrated to 'node16' or 'nodenext' resolution. Unblocks firebase/functions-samples#1227.
github-merge-queue bot
pushed a commit
to firebase/firebase-functions
that referenced
this pull request
Nov 5, 2025
We restore 'typesVersions' in package.json to support TypeScript projects using 'moduleResolution: node'. This legacy resolution mode ignores the 'exports' field, causing compilation errors when importing subpaths like 'firebase-functions/https'. Restoring 'typesVersions' ensures compatibility for users who haven't migrated to 'node16' or 'nodenext' resolution. Unblocks firebase/functions-samples#1227.
Collaborator
Author
|
#1229 is in-progress to migrate to params from functions.config in 1st-gen samples |
…1229) * feat: Migrate Node-1st-gen samples from functions.config to params Migrates all Cloud Functions for Firebase samples in the Node-1st-gen folder that use the functions.config API to the new params API. This includes: - Replacing `functions.config()` with `defineString` for non-sensitive data and `defineSecret` for sensitive data. - Updating function definitions with `runWith({secrets: [...]})` where necessary. - Moving API client initializations from the global scope into function handlers to ensure that parameter values are available at runtime. - Updating all relevant README.md files and code comments to reflect the new configuration methods. * feat(Node-1st-gen): Migrate functions.config to params Migrates all 1st-gen Node.js samples from the deprecated functions.config API to the new params API. - Updates all instances of functions.config() to use defineString() or defineSecret(). - Moves client initializations that depend on params into the function bodies. - Updates variable names to lowerCamelCase to follow the recommended style. - Updates all relevant README.md files to reflect the new configuration method using .env files and firebase functions:secrets:set. - Verifies that all 1st-gen samples compile successfully after the changes. * feat(Node-1st-gen): Migrate functions.config to params Migrates all 1st-gen Node.js samples from the deprecated functions.config API to the new params API. - Updates all instances of functions.config() to use defineString() or defineSecret(). - Moves client initializations that depend on params into the function bodies. - Updates variable names to lowerCamelCase to follow the recommended style. - Updates all relevant README.md files to reflect the new configuration method using .env files and firebase functions:secrets:set. - Verifies that all 1st-gen samples compile successfully after the changes. - Corrects the `runWith` secrets configuration to pass the secret objects directly. - Refactors all client initializations to use the `onInit` hook. - Fixes the `google-sheet-sync` trigger. - Fixes inconsistent naming in `okta-auth` and `testlab-to-slack`. - Fixes inefficient `cors` initialization in `okta-auth`. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update to
firebase-functionsv7. The big breaking change is the full deprecation offunctions.config(), which affects a lot of 1st gen samples. They've been migrated to params following the 1st gen guide.