Skip to content

Commit

Permalink
update react-jsx-parser (#1791)
Browse files Browse the repository at this point in the history
* update react-jsx-parser

* omit optional is not needed anymore

* update dependencies

* omit=optional is not needed

* support react-jsx-parser

---------

Co-authored-by: Fred Lefévère-Laoide <[email protected]>
  • Loading branch information
FredLL-Avaiga and Fred Lefévère-Laoide authored Sep 16, 2024
1 parent 51694f5 commit 825c843
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 142 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: npm ci
- name: Install dependencies
if: steps.cache-gui-fe-build.outputs.cache-hit != 'true'
run: npm ci --omit=optional
run: npm ci
- if: steps.cache-gui-fe-build.outputs.cache-hit != 'true'
run: npm run build --if-present

Expand Down
2 changes: 1 addition & 1 deletion INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cd frontend/taipy-gui
cd dom
npm i
cd ..
npm i --omit=optional
npm i
npm run build
#
# Build the Taipy front-end bundle
Expand Down
2 changes: 1 addition & 1 deletion frontend/taipy-gui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cd dom
npm i
cd ..
# Install the web app dependencies
npm i --omit=optional
npm i
# Build the web app and all elements
npm run build
```
Expand Down
22 changes: 17 additions & 5 deletions frontend/taipy-gui/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,21 @@

/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
module.exports = {
// testEnvironment: 'jest-environment-jsdom',
preset: 'ts-jest',
testEnvironment: 'jsdom',
setupFiles: ['./test-config/jest.env.js', './test-config/createObjectUrl.js', './test-config/Canvas.js', './test-config/mockFileUpload.js', './test-config/intersectionObserver.js'],
coverageReporters: ["json", "html", "text"],
// testEnvironment: 'jest-environment-jsdom',
// preset: "ts-jest",
preset: "ts-jest/presets/js-with-ts",
testEnvironment: "jsdom",
setupFiles: [
"./test-config/jest.env.js",
"./test-config/createObjectUrl.js",
"./test-config/Canvas.js",
"./test-config/mockFileUpload.js",
"./test-config/intersectionObserver.js",
],
coverageReporters: ["json", "html", "text"],
transformIgnorePatterns: ["<rootDir>/node_modules/(?!react-jsx-parser/)"],
// transform: {"^.+\.[jt]sx?$": "ts-jest"},
// moduleNameMapper: {
// "^react-jsx-parser": require.resolve("react-jsx-parser"),
// },
};
160 changes: 55 additions & 105 deletions frontend/taipy-gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions frontend/taipy-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.3",
"react-helmet-async": "^2.0.1",
"react-jsx-parser": "^1.29.0",
"react-jsx-parser": "^2.1.0",
"react-markdown": "^9.0.1",
"react-plotly.js": "^2.5.1",
"react-router-dom": "^6.0.1",
Expand All @@ -37,7 +37,7 @@
"react-dom": "$react-dom"
},
"scripts": {
"inst": "npm i --omit=optional",
"inst": "npm i",
"start": "echo no start see python",
"build:dev": "webpack --mode development",
"build": "webpack --mode production",
Expand Down
Loading

0 comments on commit 825c843

Please sign in to comment.