Skip to content

Commit e96410a

Browse files
Merge main into release
2 parents 2fe7547 + 35ad526 commit e96410a

File tree

9 files changed

+24
-47
lines changed

9 files changed

+24
-47
lines changed

.changeset/dirty-crews-cross.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@firebase/auth": patch
3+
"@firebase/database": patch
4+
"@firebase/firestore": patch
5+
"@firebase/functions": patch
6+
"@firebase/storage": patch
7+
---
8+
9+
Revert "Fixed scroll behavior (#9043)"

packages/auth/src/core/auth/emulator.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ import { Auth } from '../../model/public_types';
1818
import { AuthErrorCode } from '../errors';
1919
import { _assert } from '../util/assert';
2020
import { _castAuth } from './auth_impl';
21-
import {
22-
deepEqual,
23-
isCloudWorkstation,
24-
pingServer,
25-
updateEmulatorBanner
26-
} from '@firebase/util';
21+
import { deepEqual, isCloudWorkstation, pingServer } from '@firebase/util';
2722

2823
/**
2924
* Changes the {@link Auth} instance to communicate with the Firebase Auth Emulator, instead of production
@@ -102,12 +97,13 @@ export function connectAuthEmulator(
10297
authInternal.emulatorConfig = emulatorConfig;
10398
authInternal.settings.appVerificationDisabledForTesting = true;
10499

100+
if (!disableWarnings) {
101+
emitEmulatorWarning();
102+
}
103+
104+
// Workaround to get cookies in Firebase Studio
105105
if (isCloudWorkstation(host)) {
106-
updateEmulatorBanner('Auth', true);
107-
// Workaround to get cookies in Firebase Studio
108106
void pingServer(`${protocol}//${host}${portStr}`);
109-
} else if (!disableWarnings) {
110-
emitEmulatorWarning();
111107
}
112108
}
113109

packages/auth/src/platform_browser/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ import { browserSessionPersistence } from './persistence/session_storage';
3030
import { indexedDBLocalPersistence } from './persistence/indexed_db';
3131
import { browserPopupRedirectResolver } from './popup_redirect';
3232
import { Auth, User } from '../model/public_types';
33-
import {
34-
getDefaultEmulatorHost,
35-
getExperimentalSetting,
36-
updateEmulatorBanner
37-
} from '@firebase/util';
33+
import { getDefaultEmulatorHost, getExperimentalSetting } from '@firebase/util';
3834
import { _setExternalJSProvider } from './load_js';
3935
import { _createError } from '../core/util/assert';
4036
import { AuthErrorCode } from '../core/errors';
@@ -114,8 +110,6 @@ export function getAuth(app: FirebaseApp = getApp()): Auth {
114110
const authEmulatorHost = getDefaultEmulatorHost('auth');
115111
if (authEmulatorHost) {
116112
connectAuthEmulator(auth, `http://${authEmulatorHost}`);
117-
} else {
118-
updateEmulatorBanner('Auth', false);
119113
}
120114

121115
return auth;

packages/database/src/api/Database.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ import {
3131
EmulatorMockTokenOptions,
3232
getDefaultEmulatorHostnameAndPort,
3333
isCloudWorkstation,
34-
pingServer,
35-
updateEmulatorBanner
34+
pingServer
3635
} from '@firebase/util';
3736

3837
import { AppCheckTokenProvider } from '../core/AppCheckTokenProvider';
@@ -258,10 +257,6 @@ export class Database implements _FirebaseService {
258257
this.app.options['databaseAuthVariableOverride']
259258
);
260259
this._instanceStarted = true;
261-
updateEmulatorBanner(
262-
'Database',
263-
this._repo.repoInfo_.emulatorOptions !== null
264-
);
265260
}
266261
return this._repoInternal;
267262
}
@@ -398,7 +393,6 @@ export function connectDatabaseEmulator(
398393
// Workaround to get cookies in Firebase Studio
399394
if (isCloudWorkstation(host)) {
400395
void pingServer(host);
401-
updateEmulatorBanner('Database', true);
402396
}
403397

404398
// Modify the repo to apply emulator settings

packages/firestore/src/lite-api/database.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
EmulatorMockTokenOptions,
2929
getDefaultEmulatorHostnameAndPort,
3030
isCloudWorkstation,
31-
updateEmulatorBanner,
3231
pingServer
3332
} from '@firebase/util';
3433

@@ -143,7 +142,6 @@ export class Firestore implements FirestoreService {
143142

144143
_freezeSettings(): FirestoreSettingsImpl {
145144
this._settingsFrozen = true;
146-
updateEmulatorBanner('Firestore', this._settings.isUsingEmulator);
147145
return this._settings;
148146
}
149147

@@ -336,7 +334,9 @@ export function connectFirestoreEmulator(
336334
emulatorOptions: firestore._getEmulatorOptions()
337335
};
338336
const newHostSetting = `${host}:${port}`;
339-
337+
if (useSsl) {
338+
void pingServer(`https://${newHostSetting}`);
339+
}
340340
if (settings.host !== DEFAULT_HOST && settings.host !== newHostSetting) {
341341
logWarn(
342342
'Host has been set in both settings() and connectFirestoreEmulator(), emulator host ' +
@@ -357,11 +357,6 @@ export function connectFirestoreEmulator(
357357

358358
firestore._setSettings(newConfig);
359359

360-
if (useSsl) {
361-
void pingServer(`https://${newHostSetting}`);
362-
updateEmulatorBanner('Firestore', true);
363-
}
364-
365360
if (options.mockUserToken) {
366361
let token: string;
367362
let user: User;

packages/functions/src/api.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ import {
2929
} from './service';
3030
import {
3131
getModularInstance,
32-
getDefaultEmulatorHostnameAndPort,
33-
updateEmulatorBanner
32+
getDefaultEmulatorHostnameAndPort
3433
} from '@firebase/util';
3534

3635
export { FunctionsError } from './error';
@@ -48,7 +47,6 @@ export function getFunctions(
4847
app: FirebaseApp = getApp(),
4948
regionOrCustomDomain: string = DEFAULT_REGION
5049
): Functions {
51-
updateEmulatorBanner('Functions', false);
5250
// Dependencies
5351
const functionsProvider: Provider<'functions'> = _getProvider(
5452
getModularInstance(app),

packages/functions/src/service.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ import { Provider } from '@firebase/component';
3030
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
3131
import { MessagingInternalComponentName } from '@firebase/messaging-interop-types';
3232
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
33-
import {
34-
isCloudWorkstation,
35-
pingServer,
36-
updateEmulatorBanner
37-
} from '@firebase/util';
33+
import { isCloudWorkstation, pingServer } from '@firebase/util';
3834

3935
export const DEFAULT_REGION = 'us-central1';
4036

@@ -186,7 +182,6 @@ export function connectFunctionsEmulator(
186182
// Workaround to get cookies in Firebase Studio
187183
if (useSsl) {
188184
void pingServer(functionsInstance.emulatorOrigin);
189-
updateEmulatorBanner('Functions', true);
190185
}
191186
}
192187

packages/storage/src/api.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ import { STORAGE_TYPE } from './constants';
5353
import {
5454
EmulatorMockTokenOptions,
5555
getModularInstance,
56-
getDefaultEmulatorHostnameAndPort,
57-
updateEmulatorBanner
56+
getDefaultEmulatorHostnameAndPort
5857
} from '@firebase/util';
5958
import { StringFormat } from './implementation/string';
6059

@@ -333,7 +332,6 @@ export function getStorage(
333332
bucketUrl?: string
334333
): FirebaseStorage {
335334
app = getModularInstance(app);
336-
updateEmulatorBanner('Storage', false);
337335
const storageProvider: Provider<'storage'> = _getProvider(app, STORAGE_TYPE);
338336
const storageInstance = storageProvider.getImmediate({
339337
identifier: bucketUrl

packages/storage/src/service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ import {
4646
createMockUserToken,
4747
EmulatorMockTokenOptions,
4848
isCloudWorkstation,
49-
pingServer,
50-
updateEmulatorBanner
49+
pingServer
5150
} from '@firebase/util';
5251
import { Connection, ConnectionType } from './implementation/connection';
5352

@@ -151,7 +150,6 @@ export function connectStorageEmulator(
151150
// Workaround to get cookies in Firebase Studio
152151
if (useSsl) {
153152
void pingServer(`https://${storage.host}`);
154-
updateEmulatorBanner('Storage', true);
155153
}
156154
storage._isUsingEmulator = true;
157155
storage._protocol = useSsl ? 'https' : 'http';

0 commit comments

Comments
 (0)