Skip to content

Commit 4ac6a79

Browse files
committed
use SDK_VERSION from app-exp
1 parent 4e57cac commit 4ac6a79

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

packages/database/exp/register.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@
1616
*/
1717

1818
// eslint-disable-next-line import/no-extraneous-dependencies
19-
import { _registerComponent, registerVersion } from '@firebase/app-exp';
19+
import {
20+
_registerComponent,
21+
registerVersion,
22+
SDK_VERSION
23+
} from '@firebase/app-exp';
2024
import { Component, ComponentType } from '@firebase/component';
2125

2226
import { name, version } from '../package.json';
2327
import {
2428
FirebaseDatabase,
2529
repoManagerDatabaseFromApp
2630
} from '../src/exp/Database';
31+
import { setSDKVersion } from '../src/core/version';
2732

2833
declare module '@firebase/component' {
2934
interface NameServiceMapping {
@@ -32,6 +37,7 @@ declare module '@firebase/component' {
3237
}
3338

3439
export function registerDatabase(variant?: string): void {
40+
setSDKVersion(SDK_VERSION);
3541
_registerComponent(
3642
new Component(
3743
'database-exp',

packages/firestore/compat/index.node.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ import { Firestore, IndexedDbPersistenceProvider } from '../src/api/database';
2424
import { registerBundle } from './bundle';
2525
import { configureForFirebase } from './config';
2626
import { name, version } from './package.json';
27-
import { version as SDK_VERSION } from '../../../packages-exp/firebase-exp/package.json';
2827
import { setSDKVersion } from '../src/core/version';
2928

3029
/**
3130
* Registers the main Firestore Node build with the components framework.
3231
* Persistence can be enabled via `firebase.firestore().enablePersistence()`.
3332
*/
3433
export function registerFirestore(instance: FirebaseNamespace): void {
35-
setSDKVersion(SDK_VERSION);
34+
setSDKVersion(instance.SDK_VERSION);
3635
configureForFirebase(
3736
instance,
3837
(app, firestoreExp) =>

packages/firestore/compat/index.rn.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ import { Firestore, IndexedDbPersistenceProvider } from '../src/api/database';
2424
import { registerBundle } from './bundle';
2525
import { configureForFirebase } from './config';
2626
import { name, version } from './package.json';
27-
import { version as SDK_VERSION } from '../../../packages-exp/firebase-exp/package.json';
2827
import { setSDKVersion } from '../src/core/version';
2928
/**
3029
* Registers the main Firestore ReactNative build with the components framework.
3130
* Persistence can be enabled via `firebase.firestore().enablePersistence()`.
3231
*/
3332
export function registerFirestore(instance: FirebaseNamespace): void {
34-
setSDKVersion(version);
33+
setSDKVersion(instance.SDK_VERSION);
3534
configureForFirebase(
3635
instance,
3736
(app, firestoreExp) =>

packages/firestore/compat/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { Firestore, IndexedDbPersistenceProvider } from '../src/api/database';
2525
import { registerBundle } from './bundle';
2626
import { configureForFirebase } from './config';
2727
import { name, version } from './package.json';
28-
import { version as SDK_VERSION } from '../../../packages-exp/firebase-exp/package.json';
2928
import '../register-module';
3029
import { setSDKVersion } from '../src/core/version';
3130

@@ -34,7 +33,7 @@ import { setSDKVersion } from '../src/core/version';
3433
* Persistence can be enabled via `firebase.firestore().enablePersistence()`.
3534
*/
3635
export function registerFirestore(instance: FirebaseNamespace): void {
37-
setSDKVersion(SDK_VERSION);
36+
setSDKVersion(instance.SDK_VERSION);
3837
configureForFirebase(
3938
instance,
4039
(app, firestoreExp) =>

packages/firestore/exp/register.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { _registerComponent, registerVersion } from '@firebase/app-exp';
18+
import {
19+
_registerComponent,
20+
registerVersion,
21+
SDK_VERSION
22+
} from '@firebase/app-exp';
1923
import { Component, ComponentType } from '@firebase/component';
2024

2125
import { name, version } from '../package.json';
22-
import { version as SDK_VERSION } from '../../../packages-exp/firebase-exp/package.json';
2326
import { FirebaseFirestore } from '../src/exp/database';
2427
import { Settings } from '../src/exp/settings';
2528
import { setSDKVersion } from '../src/core/version';

0 commit comments

Comments
 (0)