Skip to content

Commit

Permalink
Make FIREBASE_FRAMEWORKS_VERSION injectable for testing (#6571)
Browse files Browse the repository at this point in the history
* Make FIREBASE_FRAMEWORKS_VERSION injectable for testing

When `internaltesting` experiment is enabled, the value for
`FIREBASE_FRAMEWORKS_VERSION` shall be derived from the environment
variable with the same name.

This is only intended for testing purposes. Code behavior for
production does not change.

---------

Co-authored-by: James Daniels <jamesdaniels@google.com>
  • Loading branch information
yifanyang and jamesdaniels committed Dec 5, 2023
1 parent 99af335 commit 1f4f6f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/frameworks/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SupportLevel } from "./interfaces";
import * as clc from "colorette";
import * as experiments from "../experiments";

export const NPM_COMMAND_TIMEOUT_MILLIES = 10_000;

Expand All @@ -25,7 +26,10 @@ export const FEATURE_REQUEST_URL =
"https://github.com/firebase/firebase-tools/issues/new?template=feature_request.md";
export const MAILING_LIST_URL = "https://goo.gle/41enW5X";

export const FIREBASE_FRAMEWORKS_VERSION = "^0.10.4";
const DEFAULT_FIREBASE_FRAMEWORKS_VERSION = "^0.10.4";
export const FIREBASE_FRAMEWORKS_VERSION =
(experiments.isEnabled("internaltesting") && process.env.FIREBASE_FRAMEWORKS_VERSION) ||
DEFAULT_FIREBASE_FRAMEWORKS_VERSION;
export const FIREBASE_FUNCTIONS_VERSION = "^4.3.0";
export const FIREBASE_ADMIN_VERSION = "^11.0.1";
export const SHARP_VERSION = "^0.32.1";
Expand Down

0 comments on commit 1f4f6f4

Please sign in to comment.