-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade next: `npx @next/codemod@canary upgrade latest` * fix markdown types also by upgrading packages * change TS target to fix some regex issues ("u"/"s" flag supported when targetting ES2018+). next builds to ES5 anyway * upgrade some packages and fix errors * non-major version upgrade of most deps * downgrade eslint back to 8 * fix eslint * migrate to next.config.ts * rework Marquee without SCSS module styles * upgrade also `typed-scss-modules` to 8 * fix usage of firstRender --------- Co-authored-by: matushl <[email protected]>
- Loading branch information
1 parent
c98409f
commit a2cf3c6
Showing
20 changed files
with
3,819 additions
and
2,423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/** @type import('next').NextConfig */ | ||
module.exports = { | ||
import type {NextConfig} from 'next' | ||
|
||
const nextConfig: NextConfig = { | ||
// docs: https://nextjs.org/docs/api-reference/next.config.js/redirects | ||
async redirects() { | ||
return [ | ||
|
@@ -24,7 +25,10 @@ module.exports = { | |
images: { | ||
remotePatterns: [ | ||
{ | ||
// TODO: neviem, preco to krici, treba overit, ci funguju obrazky pri ulohach | ||
// @ts-ignore | ||
Check warning on line 29 in next.config.ts GitHub Actions / branch-test
|
||
protocol: process.env.NEXT_PUBLIC_BE_PROTOCOL, | ||
// @ts-ignore | ||
Check warning on line 31 in next.config.ts GitHub Actions / branch-test
|
||
hostname: process.env.NEXT_PUBLIC_BE_HOSTNAME, | ||
port: process.env.NEXT_PUBLIC_BE_PORT, | ||
pathname: '/media/**', | ||
|
@@ -40,7 +44,7 @@ module.exports = { | |
// https://react-svgr.com/docs/next/ | ||
webpack(config) { | ||
// Grab the existing rule that handles SVG imports | ||
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.('.svg')) | ||
const fileLoaderRule = config.module.rules.find((rule: any) => rule.test?.test?.('.svg')) | ||
|
||
config.module.rules.push( | ||
// Reapply the existing rule, but only for svg imports ending in ?url | ||
|
@@ -63,4 +67,17 @@ module.exports = { | |
|
||
return config | ||
}, | ||
experimental: { | ||
turbo: { | ||
rules: { | ||
'*.svg': { | ||
loaders: ['@svgr/webpack'], | ||
as: '*.js', | ||
}, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
// eslint-disable-next-line import/no-default-export | ||
export default nextConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
"node": ">=16.0.0" | ||
}, | ||
"scripts": { | ||
"dev": "next dev", | ||
"dev": "next dev --turbopack", | ||
"start": "next start", | ||
"build": "next build", | ||
"lint": "eslint .", | ||
|
@@ -16,66 +16,70 @@ | |
"css-types:watch": "yarn css-types --watch" | ||
}, | ||
"dependencies": { | ||
"@emotion/react": "^11.11.0", | ||
"@emotion/styled": "^11.11.0", | ||
"@mui/icons-material": "^5.11.16", | ||
"@mui/material": "^5.12.3", | ||
"@tanstack/react-query": "5.0.0-alpha.26", | ||
"@tanstack/react-query-devtools": "5.0.0-alpha.30", | ||
"@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/react": "^14.0.0", | ||
"@testing-library/user-event": "^14.4.3", | ||
"axios": "^1.4.0", | ||
"clsx": "^1.2.1", | ||
"katex": "^0.16.7", | ||
"luxon": "^3.3.0", | ||
"@emotion/react": "^11.13.5", | ||
"@emotion/styled": "^11.13.5", | ||
"@mui/icons-material": "^5.16.7", | ||
"@mui/material": "^5.16.7", | ||
"@tanstack/react-query": "5.61.0", | ||
"@tanstack/react-query-devtools": "5.61.0", | ||
"@testing-library/jest-dom": "^5.17.0", | ||
"@testing-library/react": "^14.3.1", | ||
"@testing-library/user-event": "^14.5.2", | ||
"axios": "^1.7.7", | ||
"clsx": "^2.1.1", | ||
"katex": "^0.16.11", | ||
"luxon": "^3.5.0", | ||
"mathjax-full": "^3.2.2", | ||
"mathjax-react": "^2.0.1", | ||
"next": "^13.4.12", | ||
"react": "^18.2.0", | ||
"react-admin": "^4.16.15", | ||
"next": "15.0.3", | ||
"react": "19.0.0-rc-66855b96-20241106", | ||
"react-admin": "^4.16.20", | ||
"react-cookie": "^4.1.1", | ||
"react-dom": "^18.2.0", | ||
"react-dropzone": "^14.2.3", | ||
"react-hook-form": "^7.43.9", | ||
"react-markdown": "^8.0.7", | ||
"rehype-katex": "^6.0.3", | ||
"remark-gfm": "^3.0.1", | ||
"remark-math": "^5.1.1", | ||
"typescript": "^5.0.4", | ||
"react-dom": "19.0.0-rc-66855b96-20241106", | ||
"react-dropzone": "^14.3.5", | ||
"react-hook-form": "^7.53.2", | ||
"react-markdown": "^9.0.1", | ||
"rehype-katex": "^7.0.1", | ||
"remark-gfm": "^4.0.0", | ||
"remark-math": "^6.0.0", | ||
"typescript": "^5.7.2", | ||
"unstated-next": "^1.1.0", | ||
"usehooks-ts": "^2.9.1" | ||
"usehooks-ts": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"@svgr/webpack": "^8.0.1", | ||
"@testing-library/dom": "^9.2.0", | ||
"@types/jest": "^29.5.1", | ||
"@types/katex": "^0", | ||
"@types/luxon": "^3.3.0", | ||
"@types/node": "^20.1.0", | ||
"@types/react": "^18.2.6", | ||
"@types/react-dom": "^18.2.4", | ||
"@svgr/webpack": "^8.1.0", | ||
"@testing-library/dom": "^9.3.4", | ||
"@types/jest": "^29.5.14", | ||
"@types/katex": "^0.16.7", | ||
"@types/luxon": "^3.4.2", | ||
"@types/node": "^20.17.7", | ||
"@types/react": "^19.0.0-rc.1", | ||
"@types/react-dom": "^19.0.0-rc.1", | ||
"@types/react-router-dom": "^5.3.3", | ||
"@typescript-eslint/eslint-plugin": "^5.59.5", | ||
"@typescript-eslint/parser": "^5.59.5", | ||
"@typescript-eslint/eslint-plugin": "^8.15.0", | ||
"@typescript-eslint/parser": "^8.15.0", | ||
"confusing-browser-globals": "^1.0.11", | ||
"eslint": "^8.40.0", | ||
"eslint-config-next": "^13.4.12", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint": "^8.57.1", | ||
"eslint-config-next": "15.0.3", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-filenames": "^1.3.2", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-jest": "^27.2.1", | ||
"eslint-plugin-no-secrets": "^0.8.9", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-jest": "^28.9.0", | ||
"eslint-plugin-no-secrets": "^1.1.2", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"eslint-plugin-security": "^1.7.1", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"eslint-plugin-unicorn": "^47.0.0", | ||
"prettier": "^2.8.8", | ||
"sass": "^1.62.1", | ||
"typed-scss-modules": "^7.1.0" | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"eslint-plugin-promise": "^7.1.0", | ||
"eslint-plugin-security": "^3.0.1", | ||
"eslint-plugin-simple-import-sort": "^12.1.1", | ||
"eslint-plugin-unicorn": "^56.0.1", | ||
"prettier": "^3.3.3", | ||
"sass": "^1.81.0", | ||
"typed-scss-modules": "^8.0.1" | ||
}, | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]", | ||
"resolutions": { | ||
"@types/react": "npm:[email protected]", | ||
"@types/react-dom": "npm:[email protected]" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,9 @@ export const MyEditActions: FC = () => { | |
return ( | ||
<TopToolbar> | ||
{/* the `to` prop was omitted from ShowButton in recent RA version, but it's still working | ||
and RA doesn't provide better way to do this | ||
eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
@ts-ignore */} | ||
and RA doesn't provide better way to do this | ||
TODO: try again after RA upgrade */} | ||
{/* @ts-ignore */} | ||
Check warning on line 24 in src/components/Admin/custom/MyEditActions.tsx GitHub Actions / branch-test
|
||
<ShowButton to={to} /> | ||
<ListButton label="Back to list" /> | ||
</TopToolbar> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.