Skip to content

Commit 1f4f6f4

Browse files
Make FIREBASE_FRAMEWORKS_VERSION injectable for testing (#6571)
* 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 <[email protected]>
1 parent 99af335 commit 1f4f6f4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/frameworks/constants.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { SupportLevel } from "./interfaces";
22
import * as clc from "colorette";
3+
import * as experiments from "../experiments";
34

45
export const NPM_COMMAND_TIMEOUT_MILLIES = 10_000;
56

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

28-
export const FIREBASE_FRAMEWORKS_VERSION = "^0.10.4";
29+
const DEFAULT_FIREBASE_FRAMEWORKS_VERSION = "^0.10.4";
30+
export const FIREBASE_FRAMEWORKS_VERSION =
31+
(experiments.isEnabled("internaltesting") && process.env.FIREBASE_FRAMEWORKS_VERSION) ||
32+
DEFAULT_FIREBASE_FRAMEWORKS_VERSION;
2933
export const FIREBASE_FUNCTIONS_VERSION = "^4.3.0";
3034
export const FIREBASE_ADMIN_VERSION = "^11.0.1";
3135
export const SHARP_VERSION = "^0.32.1";

0 commit comments

Comments
 (0)