Skip to content

Commit 4cdb42a

Browse files
authored
chore: upgrade packages (#23)
* chore: upgrade packages * refactor: fix lint errors * chore: add react-native to peer deps
1 parent 054d4e9 commit 4cdb42a

File tree

6 files changed

+2112
-1433
lines changed

6 files changed

+2112
-1433
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,11 @@
1111
"@commitlint/config-conventional": "^18.6.1",
1212
"@commitlint/types": "^18.6.1",
1313
"husky": "^9.0.11"
14+
},
15+
"pnpm": {
16+
"overrides": {
17+
"@expo/config>semver@^7": "^7.6.0",
18+
"@expo/image-utils>semver@^7": "^7.6.0"
19+
}
1420
}
1521
}

packages/rn-sample/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@
1515
"@expo/metro-runtime": "~3.1.3",
1616
"@logto/rn": "workspace:^",
1717
"@react-native-async-storage/async-storage": "^1.22.0",
18-
"expo": "~50.0.6",
18+
"expo": "~50.0.17",
1919
"expo-crypto": "^12.8.1",
2020
"expo-secure-store": "^12.8.1",
2121
"expo-status-bar": "~1.11.1",
2222
"expo-web-browser": "^12.8.2",
2323
"react": "18.2.0",
2424
"react-dom": "18.2.0",
25-
"react-native": "0.73.4",
25+
"react-native": "0.73.7",
2626
"react-native-web": "~0.19.6"
2727
},
2828
"devDependencies": {
29-
"@babel/core": "^7.20.0",
30-
"@silverhand/eslint-config": "^5.0.0",
31-
"@silverhand/eslint-config-react": "^5.0.0",
29+
"@babel/core": "^7.24.4",
30+
"@silverhand/eslint-config": "^6.0.1",
31+
"@silverhand/eslint-config-react": "^6.0.2",
3232
"@types/react": "~18.2.45",
33-
"eslint": "^8.56.0",
33+
"eslint": "^8.57.0",
3434
"prettier": "^3.2.5",
35-
"stylelint": "^16.2.1",
36-
"typescript": "^5.1.3"
35+
"stylelint": "^15.0.0",
36+
"typescript": "^5.4.5"
3737
},
3838
"eslintConfig": {
3939
"extends": "@silverhand/react"

packages/rn/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@
3636
"prepack": "pnpm build && pnpm test"
3737
},
3838
"devDependencies": {
39-
"@babel/preset-env": "^7.23.9",
40-
"@silverhand/eslint-config": "^5.0.0",
41-
"@silverhand/eslint-config-react": "^5.0.0",
42-
"@silverhand/ts-config": "^5.0.0",
43-
"@silverhand/ts-config-react": "^5.0.0",
39+
"@babel/preset-env": "^7.24.4",
40+
"@silverhand/eslint-config": "^6.0.1",
41+
"@silverhand/eslint-config-react": "^6.0.2",
42+
"@silverhand/ts-config": "^6.0.0",
43+
"@silverhand/ts-config-react": "^6.0.0",
4444
"@types/react": "~18.2.45",
45-
"eslint": "^8.56.0",
45+
"eslint": "^8.57.0",
4646
"prettier": "^3.2.5",
47-
"stylelint": "^16.2.1",
48-
"typescript": "^5.3.3",
49-
"vitest": "^1.3.0"
47+
"stylelint": "^15.0.0",
48+
"typescript": "^5.4.5",
49+
"vitest": "^1.5.0"
5050
},
5151
"eslintConfig": {
5252
"extends": "@silverhand/react"
@@ -63,6 +63,6 @@
6363
"expo-crypto": "^12.8.0",
6464
"expo-secure-store": "^12.8.1",
6565
"expo-web-browser": "^12.8.2",
66-
"react-native": "0.73.4"
66+
"react-native": ">=0.73.4 <1"
6767
}
6868
}

packages/rn/src/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export class LogtoClient extends StandardLogtoClient {
6666
case 'sign-out': {
6767
break;
6868
}
69+
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check -- just in case
6970
default: {
7071
throw new LogtoNativeClientError('navigation_purpose_not_supported');
7172
}

packages/rn/src/polyfill.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
/* eslint-disable @silverhand/fp/no-mutation, @typescript-eslint/no-unnecessary-condition */
88
import { btoaPolyfill, atobPolyfill } from 'js-base64';
99

10-
if (!global.btoa) {
11-
global.btoa = btoaPolyfill;
12-
}
10+
global.btoa ||= btoaPolyfill;
1311

14-
if (!global.atob) {
15-
global.atob = atobPolyfill;
16-
}
12+
global.atob ||= atobPolyfill;
1713
/* eslint-enable @silverhand/fp/no-mutation, @typescript-eslint/no-unnecessary-condition */

0 commit comments

Comments
 (0)