Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BA: standardize versions #98

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/authentication/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @baseapp-frontend/authentication

## 3.0.1

### Patch Changes

- `preAuthenticateJWT` uses normal fetch to avoid Node.js module not supported in the Edge Runtime error when used in the `middleware`.
- Standardize some of dependencies versions.
- Updated dependencies
- @baseapp-frontend/provider@2.0.1

## 3.0.0

### Major Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ describe('preAuthenticateJWT', () => {
expect(fetch).toHaveBeenCalledWith(expectedUrl, {
method: 'POST',
body: JSON.stringify({ token }),
cache: 'no-store',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { baseAppFetch } from '@baseapp-frontend/utils/functions/fetch/baseAppFetch'
import type { JWTResponse } from '@baseapp-frontend/utils/types/jwt'

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

const response = await baseAppFetch<JWTResponse>('/auth/pre-auth/jwt', {
const response = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/auth/pre-auth/jwt`, {
method: 'POST',
body: { token },
body: JSON.stringify({ token }),
cache: 'no-store',
headers: {
'Content-Type': 'application/json',
},
})

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

return response
const data = (await response.json()) as JWTResponse
return data
} catch (error) {
return Promise.reject(error)
}
Expand Down
8 changes: 4 additions & 4 deletions packages/authentication/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@baseapp-frontend/authentication",
"description": "Authentication modules.",
"version": "3.0.0",
"version": "3.0.1",
"main": "./dist/index.ts",
"module": "./dist/index.mjs",
"scripts": {
Expand All @@ -15,7 +15,7 @@
"@baseapp-frontend/provider": "*",
"@baseapp-frontend/utils": "*",
"@hookform/resolvers": "^3.6.0",
"@tanstack/react-query": "^5.40.1",
"@tanstack/react-query": "^5.45.1",
"js-cookie": "^3.0.5",
"react-hook-form": "^7.51.5",
"zod": "^3.23.8"
Expand All @@ -32,9 +32,9 @@
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/humps": "^2.0.2",
"@types/humps": "^2.0.6",
"@types/jest": "^29.5.12",
"@types/js-cookie": "^3.0.3",
"@types/js-cookie": "^3.0.6",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"babel-jest": "^29.7.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @baseapp-frontend/config

## 2.1.5

### Patch Changes

- Standardize some of dependencies versions.

## 2.1.4

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@baseapp-frontend/config",
"description": "Reusable configurations for eslint, prettier, jest and relay",
"version": "2.1.4",
"version": "2.1.5",
"main": "index.js",
"files": [
".eslintrc.js",
Expand All @@ -10,15 +10,15 @@
"relay.config.ts"
],
"devDependencies": {
"@emotion/eslint-plugin": "^11.7.0",
"@emotion/eslint-plugin": "^11.11.0",
"@next/eslint-plugin-next": "^13.1.6",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.29.0",
"eslint": "^8.42.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-next": "^13.4.5",
"eslint-config-next": "^13.4.6",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
Expand Down
6 changes: 6 additions & 0 deletions packages/provider/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @baseapp-frontend/provider

## 2.0.1

### Patch Changes

- Standardize some of dependencies versions.

## 2.0.0

### Major Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/provider/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@baseapp-frontend/provider",
"description": "Providers for React Query and Emotion.",
"version": "2.0.0",
"version": "2.0.1",
"main": "./dist/index.ts",
"module": "./dist/index.mjs",
"scripts": {
Expand All @@ -11,7 +11,7 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"dependencies": {
"@tanstack/react-query": "^5.40.1",
"@tanstack/react-query": "^5.45.1",
"lodash": "^4.17.21"
},
"peerDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions packages/test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @baseapp-frontend/test

## 2.0.1

### Patch Changes

- Standardize some of dependencies versions.

## 2.0.0

### Major Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/test/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@baseapp-frontend/test",
"description": "Test utils that extends React Testing Library.",
"version": "2.0.0",
"version": "2.0.1",
"main": "./dist/index.ts",
"module": "./dist/index.mjs",
"scripts": {
Expand All @@ -15,7 +15,7 @@
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.4",
"@mui/material": "^5.15.19",
"@tanstack/react-query": "^5.44.0",
"@tanstack/react-query": "^5.45.1",
"axios-mock-adapter": "^1.22.0",
"js-cookie": "^3.0.5"
},
Expand Down
Loading
Loading