Skip to content

Commit

Permalink
chore: upgrade versions (#380)
Browse files Browse the repository at this point in the history
* chore: upgrade versions

* fix: vite e2e

* feat: add concurrency to jobs

* fix: revert changes on nextjs and react folders

* fix: add --host

* fix: concurrency

* fix: update presets to use refine-vite

* fix: some interceptors

* fix: remove unused import

* fix: minor typo
  • Loading branch information
BatuhanW authored Dec 4, 2023
1 parent bf67b6d commit 2d233df
Show file tree
Hide file tree
Showing 37 changed files with 177 additions and 168 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/test-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ jobs:
vite:
runs-on: ubuntu-latest
name: vite
concurrency:
group: ${{ github.ref }}-e2e-local-vite-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -36,14 +39,14 @@ jobs:
cd ${{ steps.build_step.outputs.project_path }}
npm install
npm run build
npm run preview -- --port 3000 &
npm run preview -- --port 3000 --host &
- name: Run Cypress on local
uses: cypress-io/github-action@v4
with:
command: npx cypress run --record --parallel --env=AUTH_PROVIDER=${{ steps.build_step.outputs.auth_provider }},UI_FRAMEWORK=${{ matrix.ui_framework }},FRAMEWORK=react,DATA_PROVIDER=${{ matrix.data_provider }}
install: false
start: "npm ls"
wait-on: "http://0.0.0.0:3000"
wait-on: "http://localhost:3000"
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
FRAMEWORK: react
Expand All @@ -53,6 +56,9 @@ jobs:
react:
runs-on: ubuntu-latest
name: react
concurrency:
group: ${{ github.ref }}-e2e-local-react-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -101,6 +107,9 @@ jobs:
nextjs:
runs-on: ubuntu-latest
name: nextjs
concurrency:
group: ${{ github.ref }}-e2e-local-nextjs-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -145,6 +154,9 @@ jobs:
remix:
runs-on: ubuntu-latest
name: remix
concurrency:
group: ${{ github.ref }}-e2e-local-remix-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ jobs:
refine-vite:
runs-on: ubuntu-latest
name: Vite
concurrency:
group: ${{ github.ref }}-e2e-remote-vite-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -51,6 +54,9 @@ jobs:
refine-nextjs:
runs-on: ubuntu-latest
name: NextJS
concurrency:
group: ${{ github.ref }}-e2e-remote-nextjs-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -96,6 +102,9 @@ jobs:
refine-remix:
runs-on: ubuntu-latest
name: Remix
concurrency:
group: ${{ github.ref }}-e2e-remote-remix-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand Down
110 changes: 55 additions & 55 deletions presets.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
presets: [
{
name: "refine-antd",
type: "refine-react",
type: "refine-vite",
answers: {
"ui-framework": "antd",
"router-provider": "react-router-v6",
Expand All @@ -13,12 +13,12 @@ module.exports = {
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
"inferencer": "no",
inferencer: "no",
},
},
{
name: "refine-headless",
type: "refine-react",
type: "refine-vite",
answers: {
"ui-framework": "no",
"router-provider": "react-router-v6",
Expand All @@ -29,12 +29,12 @@ module.exports = {
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
"inferencer": "no",
inferencer: "no",
},
},
{
name: "refine-mui",
type: "refine-react",
type: "refine-vite",
answers: {
"ui-framework": "mui",
"router-provider": "react-router-v6",
Expand All @@ -45,46 +45,46 @@ module.exports = {
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
"inferencer": "no",
inferencer: "no",
},
},
{
name: "refine-mantine",
type: "refine-react",
type: "refine-vite",
answers: {
'ui-framework': 'mantine',
'router-provider': 'react-router-v6',
'data-provider': 'data-provider-custom-json-rest',
'auth-provider': 'none',
'antd-example-pages': 'no',
'mui-example-pages': 'no',
'mantine-example-pages': 'no',
'i18n-no': 'no',
'i18n-antd': 'no',
'i18n-mui': 'no',
'i18n-mantine': 'no',
"inferencer": "no",
}
"ui-framework": "mantine",
"router-provider": "react-router-v6",
"data-provider": "data-provider-custom-json-rest",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"mantine-example-pages": "no",
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
"i18n-mantine": "no",
inferencer: "no",
},
},
{
name: "refine-chakra-ui",
type: "refine-react",
type: "refine-vite",
answers: {
'ui-framework': 'chakra',
'router-provider': 'react-router-v6',
'data-provider': 'data-provider-custom-json-rest',
'auth-provider': 'none',
'antd-example-pages': 'no',
'mui-example-pages': 'no',
'mantine-example-pages': 'no',
'chakra-example-pages': 'no',
'i18n-no': 'no',
'i18n-antd': 'no',
'i18n-mui': 'no',
'i18n-mantine': 'no',
'i18n-chakra': 'no',
"inferencer": "no",
}
"ui-framework": "chakra",
"router-provider": "react-router-v6",
"data-provider": "data-provider-custom-json-rest",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"mantine-example-pages": "no",
"chakra-example-pages": "no",
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
"i18n-mantine": "no",
"i18n-chakra": "no",
inferencer: "no",
},
},
{
name: "refine-headless-remix",
Expand All @@ -95,7 +95,7 @@ module.exports = {
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"inferencer": "no",
inferencer: "no",
},
},
{
Expand All @@ -110,12 +110,12 @@ module.exports = {
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
"inferencer": "no",
inferencer: "no",
},
},
{
name: "refine-antd-supabase",
type: "refine-react",
type: "refine-vite",
answers: {
"ui-framework": "antd",
"router-provider": "react-router-v6",
Expand All @@ -129,27 +129,27 @@ module.exports = {
},
},
{
name: 'refine-supabase',
type: 'refine-vite',
name: "refine-supabase",
type: "refine-vite",
answers: {
'ui-framework': 'no',
'router-provider': 'react-router-v6',
'data-provider': 'data-provider-supabase',
'i18n-no': 'no',
'inferencer': 'no',
}
"ui-framework": "no",
"router-provider": "react-router-v6",
"data-provider": "data-provider-supabase",
"i18n-no": "no",
inferencer: "no",
},
},
{
name: 'refine-appwrite',
type: 'refine-vite',
name: "refine-appwrite",
type: "refine-vite",
answers: {
'ui-framework': 'antd',
'router-provider': 'react-router-v6',
'data-provider': 'data-provider-appwrite',
"ui-framework": "antd",
"router-provider": "react-router-v6",
"data-provider": "data-provider-appwrite",
"antd-example-pages": "no",
"i18n-antd": "no",
'inferencer': 'no',
}
}
inferencer: "no",
},
},
],
};
2 changes: 1 addition & 1 deletion refine-nextjs/plugins/antd/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"@refinedev/antd": "^5.7.0",
"@refinedev/antd": "latest",
"antd": "^5.0.5",
"@ant-design/icons": "^5.0.1"
}
Expand Down
6 changes: 3 additions & 3 deletions refine-nextjs/plugins/chakra/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dependencies": {
"@refinedev/chakra-ui": "^2.5.4",
"@refinedev/react-hook-form": "^4.1.2",
"@refinedev/react-table": "^5.1.4",
"@refinedev/chakra-ui": "latest",
"@refinedev/react-hook-form": "latest",
"@refinedev/react-table": "latest",
"@tabler/icons": "^1.1.0",
"@chakra-ui/react": "^2.5.1"
}
Expand Down
2 changes: 1 addition & 1 deletion refine-nextjs/plugins/data-provider-airtable/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"@refinedev/airtable": "^4.0.0"
"@refinedev/airtable": "latest"
}
}
2 changes: 1 addition & 1 deletion refine-nextjs/plugins/data-provider-altogic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"@refinedev/altogic": "^4.0.0",
"axios": "^0.26.1"
"axios": "^1.6.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"@refinedev/simple-rest": "^4.0.0"
}
}
"dependencies": {
"@refinedev/simple-rest": "^5.0.0"
}
}
8 changes: 4 additions & 4 deletions refine-nextjs/plugins/data-provider-medusa/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"@refinedev/medusa": "^2.0.0"
}
}
"dependencies": {
"@refinedev/medusa": "^3.0.0"
}
}
8 changes: 4 additions & 4 deletions refine-nextjs/plugins/data-provider-nestjsx-crud/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"@refinedev/nestjsx-crud": "^4.0.0"
}
}
"dependencies": {
"@refinedev/nestjsx-crud": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions refine-nextjs/plugins/data-provider-strapi-v4/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"@refinedev/strapi-v4": "^5.2.0",
"axios": "^0.26.1",
"@refinedev/strapi-v4": "^6.0.0",
"axios": "^1.6.2",
"nookies": "^2.5.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
import { AuthBindings } from "@refinedev/core";
import { AuthHelper } from "@refinedev/strapi-v4";

import axios from "axios";
import nookies from "nookies";

import { TOKEN_KEY, API_URL } from "./constants";
import { API_URL, TOKEN_KEY } from "./constants";

export const axiosInstance = axios.create();
const strapiAuthHelper = AuthHelper(API_URL + "/api");

axiosInstance.interceptors.request.use((request) => {
axiosInstance.interceptors.request.use((config) => {
const cookies = nookies.get();
if (cookies[TOKEN_KEY]) {
request.headers = {
Authorization: `Bearer ${cookies[TOKEN_KEY]}`,
};
if (cookies[TOKEN_KEY] && config.headers) {
config.headers["Authorization"] = `Bearer ${cookies[TOKEN_KEY]}`;
}
return request;
return config;
});

export const authProvider: AuthBindings = {
Expand Down
Loading

0 comments on commit 2d233df

Please sign in to comment.