Skip to content

Commit

Permalink
chore(): package updtes
Browse files Browse the repository at this point in the history
  • Loading branch information
chyzwar committed Oct 23, 2023
1 parent 3bef24e commit e65030e
Show file tree
Hide file tree
Showing 16 changed files with 651 additions and 742 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = {
project: [
"./tsconfig.eslint.json",
"./packages/*/tsconfig.json",
"./packages/*/vite.config.ts",
],
tsconfigRootDir: __dirname,
},
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn dlx commitlint --edit "$1"
npx commitlint --edit "$1"
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"postinstall": "husky install"
},
"dependencies": {
"@chyzwar/eslint-config": "^0.2.13",
"@commitlint/cli": "^17.7.2",
"@commitlint/config-conventional": "^17.7.0",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"eslint": "^8.51.0",
"@chyzwar/eslint-config": "^0.2.14",
"@commitlint/cli": "^18.0.0",
"@commitlint/config-conventional": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"eslint": "^8.52.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"lint-staged": "^14.0.1",
"lint-staged": "^15.0.2",
"typescript": "^5.2.2"
},
"lint-staged": {
Expand Down
22 changes: 11 additions & 11 deletions packages/admin-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.14.13",
"@mui/material": "^5.14.14",
"axios": "^1.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-refresh": "^0.14.0",
"react-router-dom": "^6.16.0"
"react-router-dom": "^6.17.0"
},
"devDependencies": {
"@chyzwar/eslint-config": "^0.2.13",
"@chyzwar/tsconfig": "^0.2.13",
"@chyzwar/eslint-config": "^0.2.14",
"@chyzwar/tsconfig": "^0.2.14",
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^6.1.3",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.5.1",
"@types/jest": "^29.5.5",
"@types/node": "^20.8.3",
"@types/react": "^18.2.25",
"@types/react-dom": "^18.2.11",
"@types/jest": "^29.5.6",
"@types/node": "^20.8.7",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"@vitejs/plugin-react-swc": "^3.4.0",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"typescript": "^5.2.2",
"vite": "^4.4.11"
"vite": "^4.5.0"
},
"scripts": {
"start": "vite",
Expand Down
1 change: 0 additions & 1 deletion packages/admin-ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
import Login from "./views/Login";
import {ThemeProvider, createTheme} from "@mui/material";


const defaultTheme = createTheme();

const App = (): JSX.Element => {
Expand Down
3 changes: 1 addition & 2 deletions packages/api/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"module": {
"type": "es6",
"strict": true,
"strictMode": true
"resolveFully": true
}
}
2 changes: 0 additions & 2 deletions packages/api/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const config: Config.InitialOptions = {
extensionsToTreatAsEsm: [".ts", ".tsx"],
setupFiles: ["../jest.setup.ts"],
moduleNameMapper: {
// https://github.com/nodejs/undici/issues/1878
"^(\\.{1,2}/.*/llhttp\\.wasm\\.js)$": "$1",
// https://kulshekhar.github.io/ts-jest/docs/guides/esm-support
"^(\\.{1,2}/.*)\\.js$": "$1",
},
Expand Down
20 changes: 10 additions & 10 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,31 @@
"@fastify/cookie": "^9.1.0",
"@fastify/helmet": "^11.1.1",
"@fastify/http-proxy": "^9.2.1",
"@fastify/jwt": "^7.2.1",
"@fastify/jwt": "^7.2.2",
"@fastify/oauth2": "^7.5.0",
"@fastify/static": "^6.11.2",
"@project/common": "workspace:packages/common",
"axios": "^1.5.1",
"fastify": "^4.23.2",
"fastify": "^4.24.3",
"fastify-plugin": "^4.5.1",
"pg": "^8.11.3",
"pino": "^8.15.6",
"pino": "^8.16.0",
"pino-pretty": "^10.2.3",
"sequelize": "^6.33.0"
},
"devDependencies": {
"@chyzwar/eslint-config": "^0.2.13",
"@chyzwar/tsconfig": "^0.2.13",
"@chyzwar/eslint-config": "^0.2.14",
"@chyzwar/tsconfig": "^0.2.14",
"@jest/globals": "^29.7.0",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.92",
"@swc/core": "^1.3.94",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.5.5",
"@types/node": "^20.8.3",
"@types/validator": "^13.11.2",
"@types/jest": "^29.5.6",
"@types/node": "^20.8.7",
"@types/validator": "^13.11.5",
"dotenv": "^16.3.1",
"env-cmd": "^10.1.0",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"nodemon": "^3.0.1",
"sequelize-cli": "^6.6.1",
"ts-node": "^10.9.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
},
"license": "UNLICENSED",
"devDependencies": {
"@chyzwar/eslint-config": "^0.2.13",
"@chyzwar/tsconfig": "^0.2.13",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"eslint": "^8.51.0",
"@chyzwar/eslint-config": "^0.2.14",
"@chyzwar/tsconfig": "^0.2.14",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"eslint": "^8.52.0",
"jest": "^29.7.0",
"typescript": "^5.2.2"
}
Expand Down
2 changes: 0 additions & 2 deletions packages/ui/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import type {Config} from "@jest/types";
* Use jest with ts-jest to transform
*
* @see https://facebook.github.io/jest/docs/en/configuration.html
* @see https://kulshekhar.github.io/ts-jest/user/config/
*/
const config: Config.InitialOptions = {
testEnvironment: "jsdom",
rootDir: "src",
testMatch: ["**/__tests__/**/*.ts?(x)", "**/?(*.)+(spec|test).ts?(x)"],
setupFilesAfterEnv: ["../jest.setup.ts"],
extensionsToTreatAsEsm: [".ts", ".tsx"],
transform: {
"^.+\\.(t|j)sx?$": "@swc/jest",
},
Expand Down
26 changes: 13 additions & 13 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,36 @@
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.13",
"@mui/material": "^5.14.13",
"@mui/icons-material": "^5.14.14",
"@mui/material": "^5.14.14",
"@project/common": "workspace:packages/common",
"axios": "^1.5.1",
"axios-hooks": "^5.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-refresh": "^0.14.0",
"react-router-dom": "^6.16.0"
"react-router-dom": "^6.17.0"
},
"devDependencies": {
"@chyzwar/eslint-config": "^0.2.13",
"@chyzwar/tsconfig": "^0.2.13",
"@swc/core": "^1.3.92",
"@chyzwar/eslint-config": "^0.2.14",
"@chyzwar/tsconfig": "^0.2.14",
"@swc/core": "^1.3.94",
"@swc/jest": "^0.2.29",
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^6.1.3",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.5.1",
"@types/jest": "^29.5.5",
"@types/node": "^20.8.3",
"@types/react": "^18.2.25",
"@types/react-dom": "^18.2.11",
"@types/jest": "^29.5.6",
"@types/node": "^20.8.7",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"@vitejs/plugin-react-swc": "^3.4.0",
"dotenv": "16.3.1",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"typescript": "^5.2.2",
"vite": "^4.4.11"
"vite": "^4.5.0"
},
"scripts": {
"start": "vite",
Expand Down
37 changes: 21 additions & 16 deletions packages/ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,30 @@ import Login from "./views/Login";
import Home from "./views/Home";
import ProtectedRoute from "./components/ProtectedRoute";
import {ThemeProvider, createTheme} from "@mui/material";
import CssBaseline from "@mui/material/CssBaseline";

const defaultTheme = createTheme();

const App = (): JSX.Element =>
<ThemeProvider theme={defaultTheme}>
<BrowserRouter>
<Routes>
<Route path="/login" element={<Login />} />
<Route
path="/"
element={(
<ProtectedRoute>
<Home />
</ProtectedRoute>
)}
/>
</Routes>
</BrowserRouter>
</ThemeProvider>
const App = (): JSX.Element => {
return (
<ThemeProvider theme={defaultTheme}>
<CssBaseline/>
<BrowserRouter>
<Routes>
<Route path="/login" element={<Login />} />
<Route
path="/"
element={(
<ProtectedRoute>
<Home />
</ProtectedRoute>
)}
/>
</Routes>
</BrowserRouter>
</ThemeProvider>
);
}


;
Expand Down
1 change: 0 additions & 1 deletion packages/ui/src/__tests__/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import {render} from "@testing-library/react";
import App from "../App";

Expand Down
Loading

0 comments on commit e65030e

Please sign in to comment.