-
Notifications
You must be signed in to change notification settings - Fork 217
Firebase Functions 7.0.0 #1758
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
+6,923
−1,095
Merged
Firebase Functions 7.0.0 #1758
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
335d241
BREAKING: Upgrade TypeScript to v5.9.3 (#1746)
taeold feeee1b
BREAKING: Drop Node.js 14/16 support, require Node.js >=18 (#1747)
taeold dece9a9
BREAKING: remove functions.config() implementation (#1748)
taeold e598c3b
chore: migrate to ESLint v9 and Flat Config (#1753)
taeold afe2f71
chore: enable esModuleInterop (#1751)
taeold 206c838
feat: add async error handling to onRequest (#1755)
taeold 337b47d
BREAKING: Break TS build that uses functions.config() (#1757)
taeold ec05deb
Add Firebase Data Connect v2 support (#1727)
lisajian 8bf94c2
Fix linter
taeold d82f3e5
feat: enable ESM support via dual-publishing (#1750)
taeold 9ee469e
lock down permission per GitHub alert.
taeold 755e3bc
update lint rule to enforce prettier rules.
taeold 5338516
chore: update CHANGELOG for v7.0.0
taeold 78702c0
format.
taeold File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| - BREAKING: Drop support for Node.js 16. Minimum supported version is now Node.js 18. (#1747) | ||
| - BREAKING: Remove deprecated `functions.config()` API. Use `params` module for environment variables instead. (#1748) | ||
| - BREAKING: Upgrade to TypeScript v5 and target ES2022. (#1746) | ||
| - BREAKING: Unhandled errors in async `onRequest` handlers in the Emulator now return a 500 error immediately. (#1755) | ||
| - Add support for ESM (ECMAScript Modules) alongside CommonJS. (#1750) | ||
| - Add `onMutationExecuted()` trigger for Firebase Data Connect. (#1727) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| const { FlatCompat } = require("@eslint/eslintrc"); | ||
| const js = require("@eslint/js"); | ||
| const path = require("path"); | ||
|
|
||
| const compat = new FlatCompat({ | ||
| baseDirectory: __dirname, | ||
| recommendedConfig: js.configs.recommended, | ||
| allConfig: js.configs.all | ||
| }); | ||
|
|
||
| module.exports = [ | ||
| { | ||
| ignores: [ | ||
| "lib/", | ||
| "dev/", | ||
| "node_modules/", | ||
| "coverage/", | ||
| "docgen/", | ||
| "v1/", | ||
| "v2/", | ||
| "logger/", | ||
| "dist/", | ||
| "spec/fixtures/", | ||
| "scripts/**/*.js", | ||
| "scripts/**/*.mjs", | ||
| "protos/", | ||
| ".prettierrc.js", | ||
| "eslint.config.*", | ||
| "tsdown.config.*", | ||
| "scripts/bin-test/sources/esm-ext/index.mjs", | ||
| ], | ||
| }, | ||
| ...compat.extends( | ||
| "eslint:recommended", | ||
| "plugin:@typescript-eslint/recommended", | ||
| "plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
| "plugin:jsdoc/recommended", | ||
| "google", | ||
| "prettier" | ||
| ), | ||
| { | ||
| languageOptions: { | ||
| parser: require("@typescript-eslint/parser"), | ||
| parserOptions: { | ||
| project: "tsconfig.json", | ||
| tsconfigRootDir: __dirname, | ||
| }, | ||
| ecmaVersion: 2022 | ||
| }, | ||
| plugins: { | ||
| "prettier": require("eslint-plugin-prettier"), | ||
| }, | ||
| rules: { | ||
| "jsdoc/newline-after-description": "off", | ||
| "jsdoc/require-jsdoc": ["warn", { publicOnly: true }], | ||
| "jsdoc/check-tag-names": ["warn", { definedTags: ["alpha", "remarks", "typeParam", "packageDocumentation", "hidden"] }], | ||
| "no-restricted-globals": ["error", "name", "length"], | ||
| "prefer-arrow-callback": "error", | ||
| "prettier/prettier": "error", | ||
| "require-atomic-updates": "off", // This rule is so noisy and isn't useful: https://github.com/eslint/eslint/issues/11899 | ||
| "require-jsdoc": "off", // This rule is deprecated and superseded by jsdoc/require-jsdoc. | ||
| "valid-jsdoc": "off", // This is deprecated but included in recommended configs. | ||
| "no-prototype-builtins": "warn", | ||
| "no-useless-escape": "warn", | ||
| "prefer-promise-reject-errors": "warn", | ||
| }, | ||
| }, | ||
| { | ||
| files: ["**/*.ts"], | ||
| rules: { | ||
| "jsdoc/require-param-type": "off", | ||
| "jsdoc/require-returns-type": "off", | ||
| // Google style guide allows us to omit trivial parameters and returns | ||
| "jsdoc/require-param": "off", | ||
| "jsdoc/require-returns": "off", | ||
|
|
||
| "@typescript-eslint/no-invalid-this": "error", | ||
| "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_" }], // Unused vars should not exist. | ||
| "@typescript-eslint/no-misused-promises": "warn", // rule does not work with async handlers for express. | ||
| "no-invalid-this": "off", // Turned off in favor of @typescript-eslint/no-invalid-this. | ||
| "no-unused-vars": "off", // Off in favor of @typescript-eslint/no-unused-vars. | ||
| eqeqeq: ["error", "always", { null: "ignore" }], | ||
| camelcase: ["error", { properties: "never" }], // snake_case allowed in properties iif to satisfy an external contract / style | ||
|
|
||
| // Ideally, all these warning should be error - let's fix them in the future. | ||
| "@typescript-eslint/no-unsafe-argument": "warn", | ||
| "@typescript-eslint/no-unsafe-assignment": "warn", | ||
| "@typescript-eslint/no-unsafe-call": "warn", | ||
| "@typescript-eslint/no-unsafe-member-access": "warn", | ||
| "@typescript-eslint/no-unsafe-return": "warn", | ||
| "@typescript-eslint/restrict-template-expressions": "warn", | ||
| "@typescript-eslint/no-explicit-any": "warn", | ||
| "@typescript-eslint/no-redundant-type-constituents": "warn", | ||
| "@typescript-eslint/no-base-to-string": "warn", | ||
| "@typescript-eslint/no-duplicate-type-constituents": "warn", | ||
| "@typescript-eslint/no-require-imports": "warn", | ||
| "@typescript-eslint/no-empty-object-type": "warn", | ||
| "@typescript-eslint/prefer-promise-reject-errors": "warn", | ||
| }, | ||
| }, | ||
| { | ||
| files: ["**/*.spec.ts", "**/*.spec.js", "spec/helper.ts", "scripts/bin-test/**/*.ts", "integration_test/**/*.ts"], | ||
| languageOptions: { | ||
| globals: { | ||
| mocha: true, | ||
| }, | ||
| }, | ||
| rules: { | ||
| "@typescript-eslint/no-unused-expressions": "off", | ||
| } | ||
| }, | ||
| ]; |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,6 @@ | ||
| import * as chai from "chai"; | ||
| import * as chaiAsPromisedModule from "chai-as-promised"; | ||
| import * as nockModule from "nock"; | ||
|
|
||
| // Normalize CommonJS exports so ts-node (Node.js 20) and Node.js 22's strip-only loader | ||
| // both receive callable modules without relying on esModuleInterop. | ||
| type ChaiPlugin = Parameters<typeof chai.use>[0]; | ||
| type NockModule = typeof nockModule; | ||
|
|
||
| const chaiAsPromisedExport = chaiAsPromisedModule as ChaiPlugin & { default?: ChaiPlugin }; | ||
| const chaiAsPromised = chaiAsPromisedExport.default ?? chaiAsPromisedExport; | ||
| const nockExport = nockModule as NockModule & { default?: NockModule }; | ||
| const nock = nockExport.default ?? nockExport; | ||
| import chai from "chai"; | ||
| import chaiAsPromised from "chai-as-promised"; | ||
| import nock from "nock"; | ||
|
|
||
| chai.use(chaiAsPromised); | ||
|
|
||
| nock.disableNetConnect(); |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.