Skip to content

Commit 24d0eb5

Browse files
authored
Merge pull request #747 from SteveGT96/feature/SD-30-upgrade-to-react-19
OH2-470 (SD-30 | SD-31 | SD-32) | Migrate to react 19, vite, msw
1 parent 87129ce commit 24d0eb5

1,334 files changed

Lines changed: 109226 additions & 130307 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
REACT_APP_USE_MOCK_API=false
2-
REACT_APP_ENABLE_PERMISSIONS=true
1+
VITE_USE_MOCK_API=false
2+
VITE_ENABLE_PERMISSIONS=true

.env.development

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
REACT_APP_USE_MOCK_API=true
2-
REACT_APP_ENABLE_PERMISSIONS=false
1+
VITE_USE_MOCK_API=true
2+
VITE_ENABLE_PERMISSIONS=false
3+
VITE_API_BASE_URL=http://localhost:8080/

.env.gh-pages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
PUBLIC_URL=/openhospital-ui
2-
REACT_APP_USE_MOCK_API=
2+
VITE_USE_MOCK_API=

.env.prod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
REACT_APP_USE_MOCK_API=false
2-
REACT_APP_ENABLE_PERMISSIONS=true
1+
VITE_USE_MOCK_API=false
2+
VITE_ENABLE_PERMISSIONS=true
33
PUBLIC_URL=/oh-ui
4-
REACT_APP_BASE_PATH=http://localhost:8080/oh-api
4+
VITE_BASE_PATH=http://localhost:8080/oh-api

.env.staging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
PUBLIC_URL=/oh20
2-
REACT_APP_USE_MOCK_API=
2+
VITE_USE_MOCK_API=

.env.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
REACT_APP_USE_MOCK_API=true
1+
VITE_USE_MOCK_API=true
2+
VITE_ENABLE_PERMISSIONS=false
3+
VITE_API_BASE_URL=http://localhost:8080/

.github/workflows/ci.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,26 @@ jobs:
2929
- name: Testing...
3030
run: npm test
3131

32+
type-check:
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v1
37+
- name: Installing...
38+
run: npm i
39+
- name: Type Checking...
40+
run: npm run tsc
41+
42+
lint:
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- uses: actions/checkout@v1
47+
- name: Installing...
48+
run: npm i
49+
- name: Linting...
50+
run: npm run lint
51+
3252
e2e:
3353
runs-on: ubuntu-latest
3454

@@ -39,5 +59,5 @@ jobs:
3959
uses: cypress-io/github-action@v6
4060
with:
4161
record: false
42-
start: npm start
43-
wait-on: "http://localhost:3000"
62+
start: npm run start:ci
63+
wait-on: "http://localhost:5173"

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
uses: cypress-io/github-action@v6
3939
with:
4040
record: false
41-
start: npm start
42-
wait-on: "http://localhost:3000"
41+
start: npm run start:ci
42+
wait-on: "http://localhost:5173"
4343
deploy:
4444
needs: e2e
4545
runs-on: ubuntu-latest
@@ -55,7 +55,7 @@ jobs:
5555
run: npm run clear && npm run build:gh-pages
5656
- run: git add --force build
5757
- run: git commit -m 'new build'
58-
# we could use the same repo but we keep it in case we later change the remote repo for github pages
59-
- run: git remote add oh-ui-pages https://github.com/informatici/openhospital-ui.git
58+
# we could use the same repo but we keep it in case we later change the remote repo for github pages
59+
- run: git remote add oh-ui-pages https://github.com/informatici/openhospital-ui.git
6060
- run: echo "HASH_COMMIT=$(git subtree split --prefix build develop)" >> $GITHUB_ENV
6161
- run: git push oh-ui-pages $HASH_COMMIT:gh-pages --force

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,13 @@ yarn-error.log*
2727
# IntelliJ
2828
.idea
2929
*.iml
30+
31+
32+
# Generated files
33+
src/generated
34+
src/__generated__
35+
36+
# Cypress videos and screenshots
37+
cypress/videos
38+
cypress/screenshots
3039
/.project

.storybook/main.js

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
module.exports = {
2-
"stories": [
3-
"../src/**/*.stories.mdx",
4-
"../src/**/*.stories.@(js|jsx|ts|tsx)"
5-
],
6-
7-
"addons": [
8-
"@storybook/addon-links",
9-
"@storybook/addon-essentials",
10-
"@storybook/addon-interactions",
11-
"@storybook/preset-create-react-app",
12-
"storybook-addon-material-ui"
13-
],
14-
15-
"framework": {
16-
name: "@storybook/react-webpack5",
17-
options: {}
18-
},
19-
20-
docs: {
21-
autodocs: true
22-
}
23-
}
1+
module.exports = {
2+
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
3+
4+
addons: [
5+
'@storybook/addon-links',
6+
'@storybook/addon-essentials',
7+
'@storybook/addon-interactions',
8+
'@storybook/preset-create-react-app',
9+
'storybook-addon-material-ui',
10+
],
11+
12+
framework: {
13+
name: '@storybook/react-webpack5',
14+
options: {},
15+
},
16+
17+
docs: {
18+
autodocs: true,
19+
},
20+
};

0 commit comments

Comments
 (0)