Skip to content

Commit ac5c940

Browse files
committed
fix: update deps
BREAKING CHANGE: `gapi.auth2.GoogleUser.signIn()` is removed. Use `gapi.auth2.GoogleAuth.signIn()` instead.
1 parent 7f3e67a commit ac5c940

File tree

4 files changed

+1587
-2467
lines changed

4 files changed

+1587
-2467
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
'src/**/*.{js,jsx,ts,tsx}',
66
],
77
coveragePathIgnorePatterns: [],
8+
testEnvironment: 'jsdom',
89
testEnvironmentOptions: {
910
resources: 'usable',
1011
runScripts: 'dangerously',
@@ -17,7 +18,6 @@ module.exports = {
1718
],
1819
transform: {
1920
'\\.([tj]sx?)$': 'ts-jest',
20-
// '\\.(jsx?)$': 'babel-jest',
2121
},
2222
transformIgnorePatterns: [
2323
'/node_modules/',

package.json

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "react-gapi",
3+
"version": "0.0.1",
34
"description": "Google API per React hook",
45
"keywords": [
56
"Google",
@@ -9,9 +10,26 @@
910
"repository": "https://github.com/ph-fritsche/react-gapi.git",
1011
"author": "Philipp Fritsche",
1112
"license": "MIT",
12-
"main": "dist/index.js",
13+
"main": "dist/cjs/index.js",
14+
"module": "dist/esm/index.js",
15+
"types": "dist/types/index.d.ts",
1316
"exports": {
14-
"./testing": "./dist/testing.js"
17+
".": {
18+
"node": "./dist/cjs/index.js",
19+
"import": "./dist/esm/index.js",
20+
"default": "./dist/cjs/index.js"
21+
},
22+
"./testing": {
23+
"node": "./dist/cjs/testing.js",
24+
"import": "./dist/esm/testing.js",
25+
"default": "./dist/cjs/testing.js"
26+
}
27+
},
28+
"typesVersions": {
29+
"*": {
30+
"dist/types/index.d.ts": ["./dist/types/index.d.ts"],
31+
"*": ["dist/types/*.d.ts"]
32+
}
1533
},
1634
"files": [
1735
"dist/"
@@ -24,29 +42,23 @@
2442
},
2543
"devDependencies": {
2644
"@ph.fritsche/eslint-config": "^0.1.1",
27-
"@ph.fritsche/scripts-config": "^1.0.0",
28-
"@testing-library/jest-dom": "^5.11.8",
29-
"@testing-library/react": "^11.2.3",
30-
"@types/gapi": "^0.0.39",
31-
"@types/gapi.auth2": "^0.0.52",
32-
"@types/gapi.client": "^1.0.3",
33-
"@types/react": "^17.0.0",
34-
"@typescript-eslint/eslint-plugin": "^4.12.0",
35-
"@typescript-eslint/parser": "^4.12.0",
36-
"eslint": "^7.17.0",
37-
"eslint-plugin-jest": "^24.1.3",
38-
"eslint-plugin-jest-dom": "^3.6.5",
39-
"eslint-plugin-jsx-a11y": "^6.4.1",
40-
"eslint-plugin-react": "^7.22.0",
41-
"eslint-plugin-react-hooks": "^4.2.0",
42-
"eslint-plugin-testing-library": "^3.10.1",
43-
"jest": "^26.6.3",
45+
"@ph.fritsche/scripts-config": "^2.0.0",
46+
"@testing-library/jest-dom": "^5.14.1",
47+
"@testing-library/react": "^12.0.0",
48+
"@types/gapi": "^0.0.41",
49+
"@types/gapi.auth2": "^0.0.55",
50+
"@types/gapi.client": "^1.0.5",
51+
"@types/react": "^17.0.18",
52+
"@typescript-eslint/eslint-plugin": "^4.29.1",
53+
"@typescript-eslint/parser": "^4.29.1",
54+
"eslint": "^7.32.0",
55+
"jest": "^27.0.6",
4456
"jest-tobetype": "^1.2.3",
45-
"react": "^17.0.1",
46-
"react-dom": "^17.0.1",
47-
"shared-scripts": "^1.0.0",
48-
"ts-jest": "^26.4.4",
49-
"typescript": "^4.1.3"
57+
"react": "^17.0.2",
58+
"react-dom": "^17.0.2",
59+
"shared-scripts": "^1.4.1",
60+
"ts-jest": "^27.0.4",
61+
"typescript": "^4.3.5"
5062
},
5163
"scripts": {
5264
"build": "scripts ts-build",

src/gapiMock.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ function createAuthModuleMock({user, _user}: {user: user, _user: userInternal})
298298

299299
return {
300300
getId: () => _user.props.id ?? '',
301-
signIn: (options: gapi.auth2.SigninOptions) => authInstance?.signIn(options),
302301
isSignedIn: () => _user.isSignedIn,
303302
getHostedDomain: () => { throw notImplemented('GoogleUser.getHostedDomain') },
304303
getGrantedScopes: () => _user.isSignedIn

0 commit comments

Comments
 (0)