Skip to content

Commit 437afce

Browse files
BA: middleware fix (#94)
1 parent 3365722 commit 437afce

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

packages/authentication/CHANGELOG.md

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

3+
## 2.1.3
4+
5+
### Patch Changes
6+
7+
- Remove barrel file imports since such functions are meant to be used in a `middleware`.
8+
- Updated dependencies
9+
- @baseapp-frontend/utils@2.2.3
10+
311
## 2.1.2
412

513
### Patch Changes

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { IJWTResponse, baseAppFetch } from '@baseapp-frontend/utils'
1+
import { baseAppFetch } from '@baseapp-frontend/utils/functions/fetch/baseAppFetch'
2+
import type { IJWTResponse } from '@baseapp-frontend/utils/types/jwt'
23

34
const preAuthenticateJWT = async (token?: string) => {
45
try {

packages/authentication/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@baseapp-frontend/authentication",
33
"description": "Authentication modules.",
4-
"version": "2.1.2",
4+
"version": "2.1.3",
55
"main": "./dist/index.ts",
66
"module": "./dist/index.mjs",
77
"scripts": {

packages/utils/CHANGELOG.md

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

3+
## 2.2.3
4+
5+
### Patch Changes
6+
7+
- Use native include instead of `lodash`.
8+
39
## 2.2.2
410

511
### Patch Changes

packages/utils/functions/fetch/baseAppFetch/index.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import humps from 'humps'
2-
import includes from 'lodash/includes'
32

43
import { ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME } from '../../../constants/cookie'
54
import { LOGOUT_EVENT } from '../../../constants/events'
@@ -126,7 +125,7 @@ export const baseAppFetch: BaseAppFetch = async (
126125

127126
// set content-type header
128127
const methodsToSetContentType = ['POST', 'PUT', 'PATCH']
129-
if (setContentType && includes(methodsToSetContentType, fetchOptions.method)) {
128+
if (setContentType && methodsToSetContentType.includes(fetchOptions.method || '')) {
130129
fetchOptions.headers!['Content-Type'] = 'application/json'
131130
}
132131

packages/utils/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@baseapp-frontend/utils",
33
"description": "Util functions, constants and types.",
4-
"version": "2.2.2",
4+
"version": "2.2.3",
55
"main": "./dist/index.ts",
66
"module": "./dist/index.mjs",
77
"scripts": {

0 commit comments

Comments
 (0)