Skip to content

Commit 5891bd3

Browse files
committed
chore: update ci configuration
- Update ESLint rules - Add steps to update yarn lock files after release - Fix Linter issues - Fix Mixpanel mock issues - Enable publish on Master branch
1 parent 71e7eae commit 5891bd3

File tree

14 files changed

+4031
-4651
lines changed

14 files changed

+4031
-4651
lines changed

.eslintrc.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
module.exports = {
22
extends: [
3-
'@react-native-community',
4-
'prettier',
3+
"@react-native",
54
'plugin:@typescript-eslint/recommended',
6-
'plugin:@typescript-eslint/recommended-requiring-type-checking'
5+
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
76
],
8-
plugins: ['@typescript-eslint'],
97
rules: {
108
'prettier/prettier': [
11-
'error',
9+
'warn',
1210
{
1311
quoteProps: 'consistent',
1412
singleQuote: true,
@@ -48,8 +46,8 @@ module.exports = {
4846
rules: {
4947
"no-unused-vars": "off",
5048
"@typescript-eslint/no-unsafe-call": "warn",
51-
"@typescript-eslint/no-unused-vars": ["error"],
52-
"@typescript-eslint/unbound-method": "warn",
49+
"@typescript-eslint/no-unused-vars": "error",
50+
"@typescript-eslint/unbound-method": "off",
5351
"@typescript-eslint/no-unsafe-assignment": "warn",
5452
"@typescript-eslint/no-unsafe-member-access": "warn",
5553
"@typescript-eslint/ban-ts-comment": "warn"

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# End workaround
3131

3232
- name: Install
33-
run: yarn install --frozen-lockfile
33+
run: yarn install --immutable
3434
- name: Build
3535
run: yarn build
3636
# Linter has to run after the build because it relies on TS types

.github/workflows/publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Config and Build
3535
run: |
3636
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
37-
yarn install --frozen-lockfile
37+
yarn install --immutable
3838
yarn build
3939
env:
4040
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -45,3 +45,17 @@ jobs:
4545
env:
4646
GH_TOKEN: ${{ secrets.GH_TOKEN }}
4747
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
49+
- name: Update Apps
50+
run: |
51+
yarn install --no-immutable
52+
yarn e2e install --no-immutable
53+
yarn example install --no-immutable
54+
55+
- name: Commit Updated App Locks
56+
run: |
57+
git add yarn.lock
58+
git add examples/E2E/yarn.lock
59+
git add examples/AnalyticsReactNativeExample/yarn.lock
60+
git commit -m "chore(release): update lockfiles [skip ci]" --no-verify
61+
git push

.yarnrc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
nodeLinker: node-modules
1+
nodeLinker: node-modules
2+
npmPublishAccess: public

examples/AnalyticsReactNativeExample/yarn.lock

Lines changed: 812 additions & 812 deletions
Large diffs are not rendered by default.

examples/E2E/yarn.lock

Lines changed: 1024 additions & 1024 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@changesets/cli": "^2.26.2",
3030
"@commitlint/config-conventional": "^18.4.2",
3131
"@react-native-async-storage/async-storage": "^1.19",
32-
"@react-native-community/eslint-config": "^3.2.0",
32+
"@react-native/eslint-config": "^0.73.2",
3333
"@segment/analytics-rn-shared": "workspace:^",
3434
"@semantic-release/changelog": "^6.0.3",
3535
"@semantic-release/commit-analyzer": "^11.1.0",
@@ -42,19 +42,14 @@
4242
"@types/react": "^18.2.37",
4343
"@types/react-native": "0.72.6",
4444
"@types/uuid": "^9.0.7",
45-
"@typescript-eslint/eslint-plugin": "^6.11.0",
46-
"@typescript-eslint/parser": "^6.11.0",
4745
"babel-jest": "^29.7.0",
4846
"commitlint": "^18.4.2",
4947
"conventional-changelog-conventionalcommits": "^7.0.2",
50-
"eslint": "^8.54.0",
51-
"eslint-config-prettier": "^9.0.0",
52-
"eslint-plugin-jest": "^27.6.0",
53-
"eslint-plugin-prettier": "^5.0.1",
48+
"eslint": "^8.56.0",
5449
"husky": "^8.0.3",
5550
"jest": "^29.7.0",
5651
"metro-react-native-babel-preset": "^0.77.0",
57-
"prettier": "^3.1.0",
52+
"prettier": "^2.8.8",
5853
"react": "18.2.0",
5954
"react-native": "^0.72.7",
6055
"react-native-builder-bob": "^0.23.1",
@@ -64,5 +59,5 @@
6459
"ts-jest": "^29.1.1",
6560
"typescript": "^5.2.2"
6661
},
67-
"packageManager": "yarn@4.0.2"
62+
"packageManager": "yarn@4.1.0"
6863
}

packages/core/.eslintrc.js

Lines changed: 0 additions & 63 deletions
This file was deleted.

packages/plugins/plugin-appsflyer/src/AppsflyerPlugin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class AppsflyerPlugin extends DestinationPlugin {
9797
},
9898
};
9999

100-
if (is_first_launch && JSON.parse(is_first_launch) === true) {
100+
if (Boolean(is_first_launch) && JSON.parse(is_first_launch) === true) {
101101
if (af_status === 'Non-organic') {
102102
void this.analytics?.track('Install Attributed', properties);
103103
} else {

packages/plugins/plugin-mixpanel/src/methods/__mocks__/mixpanel-react-native.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export class Mixpanel {
4242
flush = jest.fn();
4343
getDeviceId = jest.fn();
4444
setFlushOnBackground = jest.fn();
45+
setFlushBatchSize = jest.fn();
4546
}
4647

4748
export class People {

0 commit comments

Comments
 (0)