Skip to content

Commit

Permalink
build(deps): update javascript dependencies
Browse files Browse the repository at this point in the history
Required a few changes to source to match breaking changes:

- prettier has some slightly different preferences: some code reformatted
- firebase-tools firestore emulator disallows some queries now,
  this specifically required not combining "or" with "not-in" queries
  • Loading branch information
mikehardy committed Sep 28, 2023
1 parent a9e7c74 commit 6a29816
Show file tree
Hide file tree
Showing 9 changed files with 1,872 additions and 683 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,41 +51,41 @@
"format:markdown": "prettier --write \"docs/**/*.md\""
},
"devDependencies": {
"@babel/core": "^7.22.11",
"@babel/core": "^7.23.0",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/plugin-transform-class-properties": "^7.22.5",
"@babel/preset-env": "^7.22.10",
"@octokit/core": "^4.2.4",
"@babel/preset-env": "^7.22.20",
"@octokit/core": "^5.0.1",
"@tsconfig/node12": "^1.0.11",
"@types/react": "^18.2.21",
"@types/react-native": "^0.72.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"babel-jest": "^29.6.4",
"@types/react": "^18.2.23",
"@types/react-native": "^0.72.3",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"babel-jest": "^29.7.0",
"clang-format": "^1.8.0",
"conventional-changelog-cli": "^3.0.0",
"conventional-changelog-cli": "^4.1.0",
"cross-env": "^7.0.3",
"eslint": "^8.48.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.2",
"genversion": "^3.1.1",
"google-java-format": "^1.1.0",
"inquirer": "^8.2.4",
"jest": "^29.7.0",
"lerna": "^6.6.2",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"regenerator-transform": "^0.15.2",
"rimraf": "^5.0.1",
"rimraf": "^5.0.5",
"shelljs": "^0.8.5",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
},
"resolutions": {
"@types/react": "^18.2.21"
"@types/react": "^18.2.23"
},
"workspaces": {
"packages": [
Expand Down
25 changes: 10 additions & 15 deletions packages/app-check/e2e/appcheck.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ describe('appCheck() modular', function () {
// but in CI it's fresh every time and would be true if not overridden in Info.plist
it('should configure token auto refresh in Info.plist on ios', async function () {
if (device.getPlatform() === 'ios') {
const tokenRefresh = await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled(
'[DEFAULT]',
);
const tokenRefresh =
await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled('[DEFAULT]');
tokenRefresh.should.equal(false);
} else {
this.skip();
Expand All @@ -65,17 +64,15 @@ describe('appCheck() modular', function () {

// Only iOS lets us assert on this unfortunately, other platforms have no accessor
if (device.getPlatform() === 'ios') {
let tokenRefresh = await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled(
'[DEFAULT]',
);
let tokenRefresh =
await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled('[DEFAULT]');
tokenRefresh.should.equal(false);
}
firebase.appCheck().setTokenAutoRefreshEnabled(true);
// Only iOS lets us assert on this unfortunately, other platforms have no accessor
if (device.getPlatform() === 'ios') {
tokenRefresh = await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled(
'[DEFAULT]',
);
tokenRefresh =
await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled('[DEFAULT]');
tokenRefresh.should.equal(true);
}
});
Expand Down Expand Up @@ -223,17 +220,15 @@ describe('appCheck() modular', function () {
setTokenAutoRefreshEnabled(appCheckInstance, false);
// Only iOS lets us assert on this unfortunately, other platforms have no accessor
if (device.getPlatform() === 'ios') {
let tokenRefresh = await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled(
'[DEFAULT]',
);
let tokenRefresh =
await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled('[DEFAULT]');
tokenRefresh.should.equal(false);
}
setTokenAutoRefreshEnabled(appCheckInstance, true);
// Only iOS lets us assert on this unfortunately, other platforms have no accessor
if (device.getPlatform() === 'ios') {
tokenRefresh = await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled(
'[DEFAULT]',
);
tokenRefresh =
await NativeModules.RNFBAppCheckModule.isTokenAutoRefreshEnabled('[DEFAULT]');
tokenRefresh.should.equal(true);
}
});
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"expo": ">=47.0.0"
},
"devDependencies": {
"@types/plist": "^3.0.2",
"@types/plist": "^3.0.3",
"expo": "^47.0.0"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion packages/database/lib/DatabaseStatics.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
TIMESTAMP: {
'.sv': 'timestamp',
},
increment(delta: number) {
increment(delta) {

Check warning on line 23 in packages/database/lib/DatabaseStatics.js

View check run for this annotation

Codecov / codecov/patch

packages/database/lib/DatabaseStatics.js#L23

Added line #L23 was not covered by tests
return {
'.sv': {
increment: delta,
Expand Down
25 changes: 20 additions & 5 deletions packages/firestore/e2e/Query/where.filter.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ describe('firestore().collection().where(Filters)', function () {

it('throws if fieldPath string is invalid', function () {
try {
firebase.firestore().collection(COLLECTION).where(Filter('.foo.bar', '==', 1));
firebase
.firestore()
.collection(COLLECTION)
.where(Filter('.foo.bar', '==', 1));

return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
Expand All @@ -37,7 +40,10 @@ describe('firestore().collection().where(Filters)', function () {

it('throws if operator string is invalid', function () {
try {
firebase.firestore().collection(COLLECTION).where(Filter('foo.bar', '!', 1));
firebase
.firestore()
.collection(COLLECTION)
.where(Filter('foo.bar', '!', 1));

return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
Expand Down Expand Up @@ -87,11 +93,17 @@ describe('firestore().collection().where(Filters)', function () {
});

it('allows null to be used with equal operator', function () {
firebase.firestore().collection(COLLECTION).where(Filter('foo.bar', '==', null));
firebase
.firestore()
.collection(COLLECTION)
.where(Filter('foo.bar', '==', null));
});

it('allows null to be used with not equal operator', function () {
firebase.firestore().collection(COLLECTION).where(Filter('foo.bar', '!=', null));
firebase
.firestore()
.collection(COLLECTION)
.where(Filter('foo.bar', '!=', null));
});

it('throws if multiple inequalities on different paths is provided', function () {
Expand Down Expand Up @@ -119,7 +131,10 @@ describe('firestore().collection().where(Filters)', function () {

it('throws if in query with no array value', function () {
try {
firebase.firestore().collection(COLLECTION).where(Filter('foo.bar', 'in', '123'));
firebase
.firestore()
.collection(COLLECTION)
.where(Filter('foo.bar', 'in', '123'));

return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
Expand Down
27 changes: 6 additions & 21 deletions packages/firestore/e2e/Query/where.or.filter.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,7 @@ describe('firestore().collection().where(OR Filters)', function () {
colRef.add(data),
]);

const snapshot = await colRef
.where(Filter.or(Filter('foo', 'not-in', ['not', 'this']), Filter('foo', '==', 'not-this')))
.get();
const snapshot = await colRef.where(Filter('foo', 'not-in', ['not', 'this'])).get();

snapshot.size.should.eql(2);
snapshot.forEach(s => {
Expand Down Expand Up @@ -926,12 +924,7 @@ describe('firestore().collection().where(OR Filters)', function () {
]);

const snapshot = await colRef
.where(
Filter.or(
Filter.and(Filter('foo', 'not-in', ['yolo', 'thing']), Filter('bar', '==', 'baz')),
Filter.and(Filter('foo', '==', 'not-this'), Filter('bar', '==', 'baz')),
),
)
.where(Filter.and(Filter('foo', 'not-in', ['yolo', 'thing']), Filter('bar', '==', 'baz')))
.get();

snapshot.size.should.eql(2);
Expand Down Expand Up @@ -1777,7 +1770,7 @@ describe('firestore().collection().where(OR Filters)', function () {
});

it('returns with where "not-in" filter', async function () {
const { getFirestore, collection, where, or, query, addDoc, getDocs } = firestoreModular;
const { getFirestore, collection, where, query, addDoc, getDocs } = firestoreModular;
const colRef = collection(getFirestore(), `${COLLECTION}/filter/not-in-modular`);
const expected = 'bar';
const data = { foo: expected };
Expand All @@ -1789,9 +1782,7 @@ describe('firestore().collection().where(OR Filters)', function () {
addDoc(colRef, data),
]);

const snapshot = await getDocs(
query(colRef, or(where('foo', 'not-in', ['not', 'this']), where('foo', '==', 'not-this'))),
);
const snapshot = await getDocs(query(colRef, where('foo', 'not-in', ['not', 'this'])));

snapshot.size.should.eql(2);
snapshot.forEach(s => {
Expand Down Expand Up @@ -2045,7 +2036,7 @@ describe('firestore().collection().where(OR Filters)', function () {
});

it('returns with where "==" & "not-in" filter', async function () {
const { getFirestore, collection, where, or, and, query, addDoc, getDocs } = firestoreModular;
const { getFirestore, collection, where, and, query, addDoc, getDocs } = firestoreModular;
const colRef = collection(getFirestore(), `${COLLECTION}/filter/not-in-modular`);

await Promise.all([
Expand All @@ -2056,13 +2047,7 @@ describe('firestore().collection().where(OR Filters)', function () {
]);

const snapshot = await getDocs(
query(
colRef,
or(
and(where('foo', 'not-in', ['yolo', 'thing']), where('bar', '==', 'baz')),
and(where('foo', '==', 'not-this'), where('bar', '==', 'baz')),
),
),
query(colRef, and(where('foo', 'not-in', ['yolo', 'thing']), where('bar', '==', 'baz'))),
);

snapshot.size.should.eql(2);
Expand Down
4 changes: 2 additions & 2 deletions tests/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ PODS:
- React-logger (= 0.72.5)
- React-perflogger (= 0.72.5)
- RecaptchaInterop (100.0.0)
- RNDeviceInfo (10.9.0):
- RNDeviceInfo (10.11.0):
- React-Core
- RNFBAnalytics (18.5.0):
- Firebase/Analytics (= 10.15.0)
Expand Down Expand Up @@ -1743,7 +1743,7 @@ SPEC CHECKSUMS:
React-utils: 40cdd9acee23230df5b78bf78a64ce8a2084c2d0
ReactCommon: 4ec7cc40d091eed0a510755619940b6a03cb507b
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
RNDeviceInfo: 02ea8b23e2280fa18e00a06d7e62804d74028579
RNDeviceInfo: bf8a32acbcb875f568217285d1793b0e8588c974
RNFBAnalytics: acdfdb0ef2d0f391b797e4d4dd3526ca9e31732f
RNFBApp: 082df9f8ffba99f23f7aee3ecb64df703e7e1adb
RNFBAppCheck: c93ea3cce9bd195a43a52914d9bbbcb5826ee884
Expand Down
22 changes: 11 additions & 11 deletions tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@
"postinstall-postinstall": "2.1.0",
"react": "18.2.0",
"react-native": "0.72.5",
"react-native-device-info": "^10.8.0"
"react-native-device-info": "^10.11.0"
},
"devDependencies": {
"@firebase/rules-unit-testing": "^2.0.7",
"@firebase/rules-unit-testing": "^3.0.1",
"@react-native-firebase/private-tests-helpers": "0.0.13",
"@react-native/metro-config": "^0.72.11",
"@react-native/metro-config": "^0.73.1",
"a2a": "^0.2.1",
"babel-plugin-istanbul": "^6.0.0",
"detox": "^19.12.6",
"firebase": "^9.23.0",
"firebase-tools": "^12.5.2",
"jest-circus": "^29.6.4",
"jest-environment-node": "^29.6.4",
"firebase": "^10.4.0",
"firebase-tools": "^12.6.0",
"jest-circus": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jet": "^0.8.2",
"jsonwebtoken": "^9.0.1",
"metro-react-native-babel-preset": "0.76.8",
"jsonwebtoken": "^9.0.2",
"metro-react-native-babel-preset": "0.77.0",
"mocha": "^10.2.0",
"node-fetch": "^2.6.11",
"node-fetch": "^2.7.0",
"nyc": "^15.0.1",
"patch-package": "^8.0.0",
"pod-install": "^0.1.39",
"should": "^13.2.3",
"should-sinon": "0.0.6",
"sinon": "^15.2.0"
"sinon": "^16.0.0"
},
"detox": {
"test-runner": "mocha",
Expand Down
Loading

0 comments on commit 6a29816

Please sign in to comment.