Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(deps): bump to current RNFB 18.5.0, react-native 0.72.5 #7374

Merged
merged 6 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/create_test_patches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ jobs:
# - make into an action, parameterize directories to pack, and package names to install
# - name patches w/PR as "semver prerelease" and SHA as "semver build info". Needs patch-package enhancement.

# FIXME: when github runner bumped from 18.17.1 to 18.18+ we started seeing template copy errors
# different files, could reproduce locally on linux with v18.18+ and v20.8.0. Pinning to
# prior version (18.17.1) to see if it stabilizes
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 18.17.1

- name: Set workflow variables
id: workflow-variables
Expand Down
34 changes: 17 additions & 17 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.6.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
6 changes: 3 additions & 3 deletions packages/database/e2e/query/onValue.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ describe('onValue()', function () {
await Utils.spyToBeCalledOnceAsync(callback, 5000);
callback.should.be.calledWith(value);

value = Date.now();
set(dbRef, value);
callback.should.not.be.calledWith(value);
let secondValue = Date.now();
set(dbRef, secondValue);
callback.should.not.be.calledWith(secondValue);
});

xit('should callback multiple times when the value changes', async function () {
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 @@
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
10 changes: 7 additions & 3 deletions packages/firestore/e2e/Bundle/namedQuery.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ describe('firestore().namedQuery()', function () {
return await firebase.firestore().loadBundle(getBundle());
});

describe('v8 compatibility', function () {
// FIXME named query functionality appears to have an android-only issue
// with loading and clearing and re-loading bundles. We test modular but not v8
// APIs since they are the future, and idsable the v8 compat APIs for now
// Still bears investigating, there could be a race condition either in our android
// native code or in firebase-android-sdk
xdescribe('v8 compatibility', function () {
it('returns bundled QuerySnapshot', async function () {
const query = firebase.firestore().namedQuery(BUNDLE_QUERY_NAME);
const snapshot = await query.get({ source: 'cache' });
Expand Down Expand Up @@ -99,8 +104,7 @@ describe('firestore().namedQuery()', function () {
});

describe('modular', function () {
// FIXME: works in isolation, but not in suite
xit('returns bundled QuerySnapshot', async function () {
it('returns bundled QuerySnapshot', async function () {
const { getFirestore, namedQuery, getDocsFromCache } = firestoreModular;

const query = namedQuery(getFirestore(), BUNDLE_QUERY_NAME);
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
Loading
Loading