Skip to content

Commit 65b7dad

Browse files
authored
fix: Revert "feat: package.json exports (#1429)" (#1430)
This reverts commit e46a185.
1 parent 32416b3 commit 65b7dad

5 files changed

Lines changed: 2212 additions & 2030 deletions

File tree

babel.config.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
module.exports = {
2-
overrides: [
3-
{
4-
exclude: /\/node_modules\//,
5-
presets: ['module:react-native-builder-bob/babel-preset'],
6-
},
7-
{
8-
include: /\/node_modules\//,
9-
presets: ['module:@react-native/babel-preset'],
10-
},
11-
],
2+
presets: ['@react-native/babel-preset'],
123
};

example/babel.config.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
const path = require('path');
2-
const root = path.resolve(__dirname, '..');
3-
const pkg = require('../package.json');
4-
51
module.exports = {
6-
presets: ['module:@react-native/babel-preset'],
7-
plugins: [
8-
[
9-
require.resolve('babel-plugin-module-resolver'),
10-
{
11-
extensions: ['.tsx', '.ts', '.jsx', '.js', '.json'],
12-
alias: {
13-
'@react-native-google-signin/google-signin': path.join(
14-
root,
15-
pkg.source,
16-
),
17-
},
18-
},
19-
],
20-
],
2+
presets: ['@react-native/babel-preset'],
213
};

package.json

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22
"name": "@react-native-google-signin/google-signin",
33
"version": "13.3.0",
44
"description": "Google sign in for your react native applications",
5-
"main": "./lib/module/index.js",
6-
"types": "./lib/typescript/src/index.d.ts",
7-
"source": "./src/index.ts",
8-
"exports": {
9-
".": {
10-
"types": "./lib/typescript/src/index.d.ts",
11-
"default": "./lib/module/index.js"
12-
},
13-
"./app.plugin.js": "./app.plugin.js",
14-
"./package.json": "./package.json"
15-
},
5+
"main": "lib/commonjs/index",
6+
"module": "lib/module/index",
7+
"types": "lib/typescript/src/index.d.ts",
8+
"react-native": "src/index",
9+
"source": "src/index",
1610
"files": [
1711
"src",
1812
"lib",
@@ -82,28 +76,27 @@
8276
"@semantic-release/git": "^10.0.1",
8377
"@types/jest": "^29.5.12",
8478
"@types/react": "^18.2.79",
85-
"babel-plugin-module-resolver": "^5.0.2",
8679
"eslint": "^8.57.0",
8780
"eslint-config-prettier": "^9.1.0",
8881
"eslint-plugin-ft-flow": "^3.0.7",
8982
"eslint-plugin-jest": "^28.5.0",
9083
"eslint-plugin-prettier": "^5.1.3",
91-
"expo": "^51.0.39",
92-
"expo-module-scripts": "^3.5.4",
84+
"expo": "^49.0.21",
85+
"expo-module-scripts": "^3.4.1",
9386
"husky": "^8.0.3",
9487
"jest": "^29.7.0",
9588
"patch-package": "^7.0.2",
9689
"pod-install": "^0.2.2",
9790
"prettier": "^3.2.5",
9891
"react": "18.2.0",
9992
"react-native": "^0.74.1",
100-
"react-native-builder-bob": "^0.40.10",
93+
"react-native-builder-bob": "^0.23.2",
10194
"react-native-test-app": "3.7.2",
10295
"semantic-release": "^22.0.12",
10396
"typescript": "^5.4.5"
10497
},
10598
"peerDependencies": {
106-
"expo": ">=52.0.40",
99+
"expo": ">=50.0.0",
107100
"react": "*",
108101
"react-dom": "*",
109102
"react-native": "*"
@@ -125,12 +118,8 @@
125118
"source": "src",
126119
"output": "lib",
127120
"targets": [
128-
[
129-
"module",
130-
{
131-
"esm": true
132-
}
133-
],
121+
"commonjs",
122+
"module",
134123
[
135124
"typescript",
136125
{

src/signIn/GoogleSignin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function configure(options: ConfigureParams = {}): void {
2424
if (options.offlineAccess && !options.webClientId) {
2525
throw new Error('RNGoogleSignin: offline use requires server web ClientID');
2626
}
27-
if (__DEV__ && 'androidClientId' in options) {
27+
if ('androidClientId' in options) {
2828
console.error(
2929
'RNGoogleSignIn: `androidClientId` is not a valid configuration parameter, please remove it.',
3030
);

0 commit comments

Comments
 (0)