From d4114a4f7da3f469c0c900416ac8beee58885ec3 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Wed, 21 Dec 2022 10:32:58 -0800 Subject: [PATCH] Format comment containing process.env (#6874) --- .changeset/wild-geckos-fetch.md | 5 +++++ packages/util/src/defaults.ts | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/wild-geckos-fetch.md diff --git a/.changeset/wild-geckos-fetch.md b/.changeset/wild-geckos-fetch.md new file mode 100644 index 00000000000..80787c38b5b --- /dev/null +++ b/.changeset/wild-geckos-fetch.md @@ -0,0 +1,5 @@ +--- +'@firebase/util': patch +--- + +Reformat a comment that causes compile errors in some build toolchains. diff --git a/packages/util/src/defaults.ts b/packages/util/src/defaults.ts index 0bf32b1968a..ceb73c683a8 100644 --- a/packages/util/src/defaults.ts +++ b/packages/util/src/defaults.ts @@ -53,8 +53,11 @@ const getDefaultsFromGlobal = (): FirebaseDefaults | undefined => /** * Attempt to read defaults from a JSON string provided to - * process.env.__FIREBASE_DEFAULTS__ or a JSON file whose path is in - * process.env.__FIREBASE_DEFAULTS_PATH__ + * process(.)env(.)__FIREBASE_DEFAULTS__ or a JSON file whose path is in + * process(.)env(.)__FIREBASE_DEFAULTS_PATH__ + * The dots are in parens because certain compilers (Vite?) cannot + * handle seeing that variable in comments. + * See https://github.com/firebase/firebase-js-sdk/issues/6838 */ const getDefaultsFromEnvVariable = (): FirebaseDefaults | undefined => { if (typeof process === 'undefined' || typeof process.env === 'undefined') {