Skip to content

Commit c2663a8

Browse files
BA: standardize versions
1 parent a0edfab commit c2663a8

File tree

11 files changed

+218
-174
lines changed

11 files changed

+218
-174
lines changed

packages/authentication/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @baseapp-frontend/authentication
22

3+
## 3.0.1
4+
5+
### Patch Changes
6+
7+
- `preAuthenticateJWT` uses normal fetch to avoid Node.js module not supported in the Edge Runtime error when used in the `middleware`.
8+
- Standardize some of dependencies versions.
9+
- Updated dependencies
10+
- @baseapp-frontend/provider@2.0.1
11+
312
## 3.0.0
413

514
### Major Changes

packages/authentication/modules/access/preAuthenticateJWT/__tests__/preAuthenticateJWT.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ describe('preAuthenticateJWT', () => {
3434
expect(fetch).toHaveBeenCalledWith(expectedUrl, {
3535
method: 'POST',
3636
body: JSON.stringify({ token }),
37+
cache: 'no-store',
3738
headers: {
38-
Accept: 'application/json',
3939
'Content-Type': 'application/json',
4040
},
4141
})

packages/authentication/modules/access/preAuthenticateJWT/index.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { baseAppFetch } from '@baseapp-frontend/utils/functions/fetch/baseAppFetch'
21
import type { JWTResponse } from '@baseapp-frontend/utils/types/jwt'
32

43
const preAuthenticateJWT = async (token?: string) => {
@@ -7,16 +6,21 @@ const preAuthenticateJWT = async (token?: string) => {
76
throw new Error('No token provided.')
87
}
98

10-
const response = await baseAppFetch<JWTResponse>('/auth/pre-auth/jwt', {
9+
const response = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/auth/pre-auth/jwt`, {
1110
method: 'POST',
12-
body: { token },
11+
body: JSON.stringify({ token }),
12+
cache: 'no-store',
13+
headers: {
14+
'Content-Type': 'application/json',
15+
},
1316
})
1417

1518
if (response instanceof Response && !response.ok) {
1619
throw new Error('Failed to pre-authenticate.')
1720
}
1821

19-
return response
22+
const data = (await response.json()) as JWTResponse
23+
return data
2024
} catch (error) {
2125
return Promise.reject(error)
2226
}

packages/authentication/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@baseapp-frontend/authentication",
33
"description": "Authentication modules.",
4-
"version": "3.0.0",
4+
"version": "3.0.1",
55
"main": "./dist/index.ts",
66
"module": "./dist/index.mjs",
77
"scripts": {
@@ -15,7 +15,7 @@
1515
"@baseapp-frontend/provider": "*",
1616
"@baseapp-frontend/utils": "*",
1717
"@hookform/resolvers": "^3.6.0",
18-
"@tanstack/react-query": "^5.40.1",
18+
"@tanstack/react-query": "^5.45.1",
1919
"js-cookie": "^3.0.5",
2020
"react-hook-form": "^7.51.5",
2121
"zod": "^3.23.8"
@@ -32,9 +32,9 @@
3232
"@testing-library/jest-dom": "^6.4.6",
3333
"@testing-library/react": "^16.0.0",
3434
"@testing-library/user-event": "^14.5.2",
35-
"@types/humps": "^2.0.2",
35+
"@types/humps": "^2.0.6",
3636
"@types/jest": "^29.5.12",
37-
"@types/js-cookie": "^3.0.3",
37+
"@types/js-cookie": "^3.0.6",
3838
"@types/react": "^18.3.3",
3939
"@types/react-dom": "^18.3.0",
4040
"babel-jest": "^29.7.0",

packages/config/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @baseapp-frontend/config
22

3+
## 2.1.5
4+
5+
### Patch Changes
6+
7+
- Standardize some of dependencies versions.
8+
39
## 2.1.4
410

511
### Patch Changes

packages/config/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@baseapp-frontend/config",
33
"description": "Reusable configurations for eslint, prettier, jest and relay",
4-
"version": "2.1.4",
4+
"version": "2.1.5",
55
"main": "index.js",
66
"files": [
77
".eslintrc.js",
@@ -10,15 +10,15 @@
1010
"relay.config.ts"
1111
],
1212
"devDependencies": {
13-
"@emotion/eslint-plugin": "^11.7.0",
13+
"@emotion/eslint-plugin": "^11.11.0",
1414
"@next/eslint-plugin-next": "^13.1.6",
15-
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
16-
"@typescript-eslint/eslint-plugin": "^5.13.0",
15+
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
16+
"@typescript-eslint/eslint-plugin": "^5.59.11",
1717
"@typescript-eslint/parser": "^5.29.0",
1818
"eslint": "^8.42.0",
1919
"eslint-config-airbnb": "^19.0.4",
2020
"eslint-config-airbnb-typescript": "^17.0.0",
21-
"eslint-config-next": "^13.4.5",
21+
"eslint-config-next": "^13.4.6",
2222
"eslint-config-prettier": "^8.8.0",
2323
"eslint-plugin-import": "^2.26.0",
2424
"eslint-plugin-jsx-a11y": "^6.6.1",

packages/provider/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @baseapp-frontend/provider
22

3+
## 2.0.1
4+
5+
### Patch Changes
6+
7+
- Standardize some of dependencies versions.
8+
39
## 2.0.0
410

511
### Major Changes

packages/provider/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@baseapp-frontend/provider",
33
"description": "Providers for React Query and Emotion.",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"main": "./dist/index.ts",
66
"module": "./dist/index.mjs",
77
"scripts": {
@@ -11,7 +11,7 @@
1111
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
1212
},
1313
"dependencies": {
14-
"@tanstack/react-query": "^5.40.1",
14+
"@tanstack/react-query": "^5.45.1",
1515
"lodash": "^4.17.21"
1616
},
1717
"peerDependencies": {

packages/test/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @baseapp-frontend/test
22

3+
## 2.0.1
4+
5+
### Patch Changes
6+
7+
- Standardize some of dependencies versions.
8+
39
## 2.0.0
410

511
### Major Changes

packages/test/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@baseapp-frontend/test",
33
"description": "Test utils that extends React Testing Library.",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"main": "./dist/index.ts",
66
"module": "./dist/index.mjs",
77
"scripts": {
@@ -15,7 +15,7 @@
1515
"@emotion/cache": "^11.11.0",
1616
"@emotion/react": "^11.11.4",
1717
"@mui/material": "^5.15.19",
18-
"@tanstack/react-query": "^5.44.0",
18+
"@tanstack/react-query": "^5.45.1",
1919
"axios-mock-adapter": "^1.22.0",
2020
"js-cookie": "^3.0.5"
2121
},

0 commit comments

Comments
 (0)