File tree 6 files changed +19
-5
lines changed
modules/access/preAuthenticateJWT
functions/fetch/baseAppFetch
6 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1
1
# @baseapp-frontend/authentication
2
2
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
+
3
11
## 2.1.2
4
12
5
13
### Patch Changes
Original file line number Diff line number Diff line change 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'
2
3
3
4
const preAuthenticateJWT = async ( token ?: string ) => {
4
5
try {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @baseapp-frontend/authentication" ,
3
3
"description" : " Authentication modules." ,
4
- "version" : " 2.1.2 " ,
4
+ "version" : " 2.1.3 " ,
5
5
"main" : " ./dist/index.ts" ,
6
6
"module" : " ./dist/index.mjs" ,
7
7
"scripts" : {
Original file line number Diff line number Diff line change 1
1
# @baseapp-frontend/utils
2
2
3
+ ## 2.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Use native include instead of ` lodash ` .
8
+
3
9
## 2.2.2
4
10
5
11
### Patch Changes
Original file line number Diff line number Diff line change 1
1
import humps from 'humps'
2
- import includes from 'lodash/includes'
3
2
4
3
import { ACCESS_COOKIE_NAME , REFRESH_COOKIE_NAME } from '../../../constants/cookie'
5
4
import { LOGOUT_EVENT } from '../../../constants/events'
@@ -126,7 +125,7 @@ export const baseAppFetch: BaseAppFetch = async (
126
125
127
126
// set content-type header
128
127
const methodsToSetContentType = [ 'POST' , 'PUT' , 'PATCH' ]
129
- if ( setContentType && includes ( methodsToSetContentType , fetchOptions . method ) ) {
128
+ if ( setContentType && methodsToSetContentType . includes ( fetchOptions . method || '' ) ) {
130
129
fetchOptions . headers ! [ 'Content-Type' ] = 'application/json'
131
130
}
132
131
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @baseapp-frontend/utils" ,
3
3
"description" : " Util functions, constants and types." ,
4
- "version" : " 2.2.2 " ,
4
+ "version" : " 2.2.3 " ,
5
5
"main" : " ./dist/index.ts" ,
6
6
"module" : " ./dist/index.mjs" ,
7
7
"scripts" : {
You can’t perform that action at this time.
0 commit comments