Skip to content

Commit 1beb5b5

Browse files
committed
chore: update dependencies, de-lint java / ts
also switched 'yarn run' to 'yarn', yarn does not need run now
1 parent 4a57578 commit 1beb5b5

File tree

188 files changed

+2597
-3548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+2597
-3548
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ module.exports = {
3333
'no-underscore-dangle': 'off',
3434
'no-use-before-define': 0,
3535
'import/no-unresolved': 0,
36+
'@typescript-eslint/ban-ts-comment': 'off', // keep it professional when you use them though please
3637
'@typescript-eslint/no-use-before-define': 'off',
3738
'@typescript-eslint/no-explicit-any': 'off',
3839
'@typescript-eslint/no-var-requires': 'off',
3940
'@typescript-eslint/explicit-function-return-type': 'off',
41+
'@typescript-eslint/explicit-module-boundary-types': 'off',
4042
'@typescript-eslint/camelcase': 'off',
4143
'@typescript-eslint/no-empty-function': 'off',
4244
// off for validation tests
@@ -45,7 +47,6 @@ module.exports = {
4547
'mocha/no-top-level-hooks': 'off', // potentially has value if anyone wants to refactor
4648
'mocha/no-hooks-for-single-case': 'off', // potentially has value
4749
'mocha/no-setup-in-describe': 'off', // potentially has value, large refactor here though
48-
4950
},
5051
globals: {
5152
__DEV__: true,

.github/workflows/linting.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
max_attempts: 3
4343
command: yarn --no-audit --prefer-offline
4444
- name: Lint
45-
run: yarn run lint
45+
run: yarn lint
4646
- name: Save Code Linting Report JSON
47-
run: yarn run lint:report
47+
run: yarn lint:report
4848
continue-on-error: true
4949
- name: Annotate Code Linting Results
5050
uses: ataylorme/[email protected]
@@ -91,7 +91,7 @@ jobs:
9191
max_attempts: 3
9292
command: yarn --no-audit --prefer-offline
9393
- name: Lint
94-
run: yarn run tsc:compile
94+
run: yarn tsc:compile
9595

9696
typedoc:
9797
name: TypeDoc Generation

.github/workflows/tests_e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- name: Pre-fetch Javascript bundle
9191
# Prebuild the bundle so that's fast when the app starts.
9292
run: |
93-
nohup yarn run tests:packager:jet &
93+
nohup yarn tests:packager:jet &
9494
printf 'Waiting for packager to come online'
9595
until curl --output /dev/null --silent --head --fail http://localhost:8081/status; do
9696
printf '.'
@@ -296,7 +296,7 @@ jobs:
296296

297297
- name: Pre-fetch Javascript bundle
298298
run: |
299-
nohup yarn run tests:packager:jet &
299+
nohup yarn tests:packager:jet &
300300
printf 'Waiting for packager to come online'
301301
until curl --output /dev/null --silent --head --fail http://localhost:8081/status; do
302302
printf '.'

.github/workflows/tests_jest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
max_attempts: 3
5555
command: yarn --no-audit --prefer-offline
5656
- name: Jest
57-
run: yarn run tests:jest-coverage
57+
run: yarn tests:jest-coverage
5858
- name: Submit Coverage
5959
# This can fail on timeouts etc, wrap with retry
6060
uses: nick-invision/retry@v2

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,30 @@
4141
"format:markdown": "prettier --write \"docs/**/*.md\""
4242
},
4343
"devDependencies": {
44-
"@babel/preset-env": "7.9.5",
45-
"@babel/preset-flow": "7.9.0",
46-
"@types/jest": "^25.2.1",
44+
"@babel/preset-env": "7.12.11",
45+
"@babel/preset-flow": "7.12.1",
46+
"@types/jest": "^26.0.19",
4747
"@types/react": "^16.9.49",
48-
"@types/react-native": "^0.62.0",
49-
"@typescript-eslint/eslint-plugin": "^2.18.0",
50-
"@typescript-eslint/parser": "^2.18.0",
48+
"@types/react-native": "^0.63.42",
49+
"@typescript-eslint/eslint-plugin": "^4.11.0",
50+
"@typescript-eslint/parser": "^4.11.0",
5151
"codecov": "^3.6.5",
5252
"conventional-changelog-cli": "^2.0.34",
53-
"cross-env": "^7.0.2",
54-
"eslint": "^6.8.0",
55-
"eslint-config-prettier": "^6.5.0",
53+
"cross-env": "^7.0.3",
54+
"eslint": "^7.16.0",
55+
"eslint-config-prettier": "^7.1.0",
5656
"eslint-plugin-mocha": "^8.0.0",
57-
"eslint-plugin-prettier": "^3.1.1",
57+
"eslint-plugin-prettier": "^3.3.0",
5858
"eslint-plugin-react": "^7.19.0",
5959
"genversion": "^2.2.0",
6060
"inquirer": "^7.1.0",
61-
"jest": "^25.5.1",
62-
"lerna": "3.20.2",
63-
"prettier": "^1.19.1",
61+
"jest": "^26.6.3",
62+
"lerna": "3.22.1",
63+
"prettier": "^2.2.1",
6464
"rimraf": "^3.0.2",
6565
"shelljs": "^0.8.3",
66-
"ts-jest": "^25.4.0",
67-
"typescript": "^3.8.3"
66+
"ts-jest": "^26.4.4",
67+
"typescript": "^4.1.3"
6868
},
6969
"resolutions": {
7070
"@types/react": "^16.9.49"

packages/admob/__tests__/admob.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import { firebase, FirebaseAdMobTypes } from '../lib';
22

3-
describe('Admob', function() {
4-
describe('namespace', function() {
5-
it('accessible from firebase.app()', function() {
3+
describe('Admob', function () {
4+
describe('namespace', function () {
5+
it('accessible from firebase.app()', function () {
66
const app = firebase.app();
77
expect(app.admob).toBeDefined();
88
expect(app.admob().app).toEqual(app);
99
});
1010
});
1111

12-
describe('setRequestConfiguration()', function() {
13-
it('throws if config is not an object', function() {
12+
describe('setRequestConfiguration()', function () {
13+
it('throws if config is not an object', function () {
1414
// @ts-ignore
1515
expect(() => firebase.admob().setRequestConfiguration('123')).toThrowError(
1616
"firebase.admob().setRequestConfiguration(*) 'requestConfiguration' expected an object value",
1717
);
1818
});
1919

20-
describe('maxAdContentRating', function() {
21-
it('throws if maxAdContentRating is invalid', function() {
20+
describe('maxAdContentRating', function () {
21+
it('throws if maxAdContentRating is invalid', function () {
2222
expect(() =>
2323
firebase.admob().setRequestConfiguration({
2424
maxAdContentRating: 'Y' as FirebaseAdMobTypes.MaxAdContentRating[keyof FirebaseAdMobTypes.MaxAdContentRating],
@@ -29,8 +29,8 @@ describe('Admob', function() {
2929
});
3030
});
3131

32-
describe('tagForChildDirectedTreatment', function() {
33-
it('throws if tagForChildDirectedTreatment not a boolean', function() {
32+
describe('tagForChildDirectedTreatment', function () {
33+
it('throws if tagForChildDirectedTreatment not a boolean', function () {
3434
expect(() =>
3535
firebase.admob().setRequestConfiguration({
3636
// @ts-ignore
@@ -42,8 +42,8 @@ describe('Admob', function() {
4242
});
4343
});
4444

45-
describe('tagForUnderAgeOfConsent', function() {
46-
it('throws if tagForUnderAgeOfConsent not a boolean', function() {
45+
describe('tagForUnderAgeOfConsent', function () {
46+
it('throws if tagForUnderAgeOfConsent not a boolean', function () {
4747
expect(() =>
4848
firebase.admob().setRequestConfiguration({
4949
// @ts-ignore

packages/admob/__tests__/consent.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import { AdsConsent } from '../lib';
22

3-
describe('Admob AdsConsent', function() {
4-
describe('requestInfoUpdate', function() {
5-
it('throws if publisherIds is not an array', function() {
3+
describe('Admob AdsConsent', function () {
4+
describe('requestInfoUpdate', function () {
5+
it('throws if publisherIds is not an array', function () {
66
// @ts-ignore
77
expect(() => AdsConsent.requestInfoUpdate('pub-123')).toThrowError(
88
"firebase.admob.AdsConsent.requestInfoUpdate(*) 'publisherIds' expected an array of string values.",
99
);
1010
});
1111

12-
it('throws if publisherIds is empty array', function() {
12+
it('throws if publisherIds is empty array', function () {
1313
expect(() => AdsConsent.requestInfoUpdate([])).toThrowError(
1414
"firebase.admob.AdsConsent.requestInfoUpdate(*) 'publisherIds' list of publisher IDs cannot be empty.",
1515
);
1616
});
1717

18-
it('throws if publisherIds contains non-string values', function() {
18+
it('throws if publisherIds contains non-string values', function () {
1919
// @ts-ignore
2020
expect(() => AdsConsent.requestInfoUpdate(['foo', 123])).toThrowError(
2121
"firebase.admob.AdsConsent.requestInfoUpdate(*) 'publisherIds[1]' expected a string value.",

packages/admob/__tests__/interstitial.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
import { InterstitialAd } from '../lib';
22

3-
describe('Admob Interstitial', function() {
4-
describe('createForAdRequest', function() {
5-
it('throws if adUnitId is invalid', function() {
3+
describe('Admob Interstitial', function () {
4+
describe('createForAdRequest', function () {
5+
it('throws if adUnitId is invalid', function () {
66
// @ts-ignore
77
expect(() => InterstitialAd.createForAdRequest(123)).toThrowError(
88
"'adUnitId' expected an string value",
99
);
1010
});
1111

12-
it('throws if requestOptions are invalid', function() {
12+
it('throws if requestOptions are invalid', function () {
1313
// @ts-ignore
1414
expect(() => InterstitialAd.createForAdRequest('123', 123)).toThrowError(
1515
"firebase.admob() InterstitialAd.createForAdRequest(_, *) 'options' expected an object value.",
1616
);
1717
});
1818

1919
// has own tests
20-
it('returns a new instance', function() {
20+
it('returns a new instance', function () {
2121
const i = InterstitialAd.createForAdRequest('abc');
2222
expect(i.constructor.name).toEqual('InterstitialAd');
2323
expect(i.adUnitId).toEqual('abc');
2424
expect(i.loaded).toEqual(false);
2525
});
2626

27-
describe('show', function() {
28-
it('throws if showing before loaded', function() {
27+
describe('show', function () {
28+
it('throws if showing before loaded', function () {
2929
const i = InterstitialAd.createForAdRequest('abc');
3030

3131
expect(() => i.show()).toThrowError(
@@ -34,15 +34,15 @@ describe('Admob Interstitial', function() {
3434
});
3535
});
3636

37-
describe('onAdEvent', function() {
38-
it('throws if handler is not a function', function() {
37+
describe('onAdEvent', function () {
38+
it('throws if handler is not a function', function () {
3939
const i = InterstitialAd.createForAdRequest('abc');
4040

4141
// @ts-ignore
4242
expect(() => i.onAdEvent('foo')).toThrowError("'handler' expected a function");
4343
});
4444

45-
it('returns an unsubscriber function', function() {
45+
it('returns an unsubscriber function', function () {
4646
const i = InterstitialAd.createForAdRequest('abc');
4747
const unsub = i.onAdEvent(() => {});
4848
expect(unsub).toBeDefined();

packages/admob/e2e/admob.e2e.js

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

18-
describe('admob()', function() {
19-
describe('namespace', function() {
20-
it('accessible from firebase.app()', function() {
18+
describe('admob()', function () {
19+
describe('namespace', function () {
20+
it('accessible from firebase.app()', function () {
2121
const app = firebase.app();
2222
should.exist(app.admob);
2323
app.admob().app.should.equal(app);
2424
});
2525
});
2626

27-
describe('setRequestConfiguration()', function() {
28-
it('throws if config is not an object', function() {
27+
describe('setRequestConfiguration()', function () {
28+
it('throws if config is not an object', function () {
2929
try {
3030
firebase.admob().setRequestConfiguration('123');
3131
return Promise.reject(new Error('Did not throw Error.'));
@@ -35,8 +35,8 @@ describe('admob()', function() {
3535
}
3636
});
3737

38-
describe('maxAdContentRating', function() {
39-
it('throws if maxAdContentRating is invalid', function() {
38+
describe('maxAdContentRating', function () {
39+
it('throws if maxAdContentRating is invalid', function () {
4040
try {
4141
firebase.admob().setRequestConfiguration({
4242
maxAdContentRating: 'Y',
@@ -48,15 +48,15 @@ describe('admob()', function() {
4848
}
4949
});
5050

51-
it('accepts a age rating', async function() {
51+
it('accepts a age rating', async function () {
5252
await firebase.admob().setRequestConfiguration({
5353
maxAdContentRating: firebase.admob.MaxAdContentRating.G,
5454
});
5555
});
5656
});
5757

58-
describe('tagForChildDirectedTreatment', function() {
59-
it('throws if tagForChildDirectedTreatment not a boolean', function() {
58+
describe('tagForChildDirectedTreatment', function () {
59+
it('throws if tagForChildDirectedTreatment not a boolean', function () {
6060
try {
6161
firebase.admob().setRequestConfiguration({
6262
tagForChildDirectedTreatment: 'true',
@@ -70,15 +70,15 @@ describe('admob()', function() {
7070
}
7171
});
7272

73-
it('sets the value', async function() {
73+
it('sets the value', async function () {
7474
await firebase.admob().setRequestConfiguration({
7575
tagForChildDirectedTreatment: false,
7676
});
7777
});
7878
});
7979

80-
describe('tagForUnderAgeOfConsent', function() {
81-
it('throws if tagForUnderAgeOfConsent not a boolean', function() {
80+
describe('tagForUnderAgeOfConsent', function () {
81+
it('throws if tagForUnderAgeOfConsent not a boolean', function () {
8282
try {
8383
firebase.admob().setRequestConfiguration({
8484
tagForUnderAgeOfConsent: 'false',
@@ -92,7 +92,7 @@ describe('admob()', function() {
9292
}
9393
});
9494

95-
it('sets the value', async function() {
95+
it('sets the value', async function () {
9696
await firebase.admob().setRequestConfiguration({
9797
tagForUnderAgeOfConsent: false,
9898
});

0 commit comments

Comments
 (0)