Skip to content

Commit 03a8555

Browse files
committed
chore: format
1 parent e3c5d2b commit 03a8555

File tree

5 files changed

+38
-18
lines changed

5 files changed

+38
-18
lines changed

packages/database/__tests__/database.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -624,14 +624,14 @@ describe('Database', function () {
624624
});
625625
});
626626

627-
describe('DatabaseTransaction', function() {
627+
describe('DatabaseTransaction', function () {
628628
it('runTransaction', function () {
629629
const db = getDatabase();
630630
const testRef = ref(db, 'test');
631631
referenceV9Deprecation(
632-
() => runTransaction(testRef, (currentData) => currentData, { applyLocally: true }),
633-
() => testRef.transaction((currentData) => currentData, undefined, true),
634-
'transaction'
632+
() => runTransaction(testRef, currentData => currentData, { applyLocally: true }),
633+
() => testRef.transaction(currentData => currentData, undefined, true),
634+
'transaction',
635635
);
636636
});
637637
});

packages/database/lib/DatabaseQuery.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ import {
3030
import DatabaseDataSnapshot from './DatabaseDataSnapshot';
3131
import DatabaseSyncTree from './DatabaseSyncTree';
3232

33-
import { createDeprecationProxy, MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/lib/common';
33+
import {
34+
createDeprecationProxy,
35+
MODULAR_DEPRECATION_ARG,
36+
} from '@react-native-firebase/app/lib/common';
3437

3538
const eventTypes = ['value', 'child_added', 'child_changed', 'child_moved', 'child_removed'];
3639

@@ -120,7 +123,9 @@ export default class DatabaseQuery extends ReferenceBase {
120123
}
121124

122125
// Internal method calls should always use MODULAR_DEPRECATION_ARG to avoid false deprecation warnings
123-
return this.startAt.call(this, value, key, MODULAR_DEPRECATION_ARG).endAt.call(this, value, MODULAR_DEPRECATION_ARG);
126+
return this.startAt
127+
.call(this, value, key, MODULAR_DEPRECATION_ARG)
128+
.endAt.call(this, value, MODULAR_DEPRECATION_ARG);
124129
}
125130

126131
/**
@@ -158,11 +163,9 @@ export default class DatabaseQuery extends ReferenceBase {
158163
);
159164
}
160165

161-
return createDeprecationProxy(new DatabaseQuery(
162-
this._database,
163-
this.path,
164-
this._modifiers._copy().limitToFirst(limit),
165-
));
166+
return createDeprecationProxy(
167+
new DatabaseQuery(this._database, this.path, this._modifiers._copy().limitToFirst(limit)),
168+
);
166169
}
167170

168171
/**
@@ -183,7 +186,9 @@ export default class DatabaseQuery extends ReferenceBase {
183186
);
184187
}
185188

186-
return createDeprecationProxy(new DatabaseQuery(this._database, this.path, this._modifiers._copy().limitToLast(limit)));
189+
return createDeprecationProxy(
190+
new DatabaseQuery(this._database, this.path, this._modifiers._copy().limitToLast(limit)),
191+
);
187192
}
188193

189194
/**

packages/database/lib/index.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515
*
1616
*/
1717

18-
import { isAndroid, isBoolean, isNumber, isString, MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/lib/common';
18+
import {
19+
isAndroid,
20+
isBoolean,
21+
isNumber,
22+
isString,
23+
MODULAR_DEPRECATION_ARG,
24+
} from '@react-native-firebase/app/lib/common';
1925
import {
2026
createModuleNamespace,
2127
FirebaseModule,
@@ -56,9 +62,13 @@ class FirebaseDatabaseModule extends FirebaseModule {
5662
* @private
5763
*/
5864
_syncServerTimeOffset() {
59-
this.ref('.info/serverTimeOffset').on('value', snapshot => {
60-
this._serverTimeOffset = snapshot.val();
61-
}, MODULAR_DEPRECATION_ARG);
65+
this.ref('.info/serverTimeOffset').on(
66+
'value',
67+
snapshot => {
68+
this._serverTimeOffset = snapshot.val();
69+
},
70+
MODULAR_DEPRECATION_ARG,
71+
);
6272
}
6373

6474
/**

packages/database/lib/modular/query.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class QueryConstraint {
2323
}
2424

2525
_apply(query) {
26-
// eslint-disable-next-line prefer-spread
2726
return query[this._type].apply(query, [...this._args, MODULAR_DEPRECATION_ARG]);
2827
}
2928
}

packages/database/lib/modular/transaction.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,11 @@
1414
import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/lib/common';
1515

1616
export function runTransaction(ref, transactionUpdate, options) {
17-
return ref.transaction.call(ref, transactionUpdate, undefined, options && options.applyLocally, MODULAR_DEPRECATION_ARG);
17+
return ref.transaction.call(
18+
ref,
19+
transactionUpdate,
20+
undefined,
21+
options && options.applyLocally,
22+
MODULAR_DEPRECATION_ARG,
23+
);
1824
}

0 commit comments

Comments
 (0)