Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete Lerna, Init Vitest and Add Husky #263

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: yarn
- run: npx lerna run format
- run: npx lerna run lint
- run: yarn install
- run: yarn run format:check
- run: yarn run lint
- run: yarn test --watch=false
- run: yarn build
- uses: actions/upload-artifact@v4
with:
name: drama
path: drama-queen/dist
path: dist

check_if_version_upgraded:
needs: build
Expand Down Expand Up @@ -48,7 +50,7 @@ jobs:
id: check-drama
uses: EndBug/version-check@v2
with:
file-name: drama-queen/package.json
file-name: package.json

docker_drama:
needs: check_if_version_upgraded
Expand All @@ -70,7 +72,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: drama
path: drama-queen/dist
path: dist
- uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- uses: actions/setup-node@v4
- run: yarn
# Run tests sonar reports
- run: yarn test:coverage
- run: yarn run test:coverage
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: drama-queen/coverage
path: coverage

sonarcloud:
name: SonarCloud
Expand All @@ -33,7 +33,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: coverage
path: drama-queen/coverage
path: coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
coverage
Expand All @@ -23,5 +22,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
drama-queen/.env
queen
.env
3 changes: 3 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn run format:check
yarn run lint
yarn run test --watch=false
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ Web application for the management of questionnaires powered by Lunatic (https:/
## Getting Started

```
cp .env.drama.sample ./drama-queen/.env
cp .env.queen.sample ./queen/.env.local
npx lerna bootstrap
yarn dev:drama-queen
yarn dev:queen
cp .env.drama.sample .env
yarn
yarn dev
yarn build
```
File renamed without changes.
12 changes: 6 additions & 6 deletions drama-queen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,25 @@
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@eslint/js": "^9.13.0",
"@types/node": "^20.16.10",
"@types/react": "^18.3.10",
"@types/node": "^22.8.6",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react": "^4.3.2",
"@vitest/coverage-v8": "^2.1.3",
"jsdom": "^25.0.1",
"eslint": "^9.13.0",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"jsdom": "^25.0.1",
"globals": "^15.11.0",
"prettier": "^3.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.8",
"vite": "^5.4.10",
"vite-envs": "^4.4.5",
"vite-plugin-pwa": "^0.19.8",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^2.1.3"
"vitest": "^2.1.4"
}
}
98 changes: 0 additions & 98 deletions drama-queen/src/core/usecases/visualizeSurvey/thunks.ts

This file was deleted.

17 changes: 0 additions & 17 deletions drama-queen/vitest.config.ts

This file was deleted.

2 changes: 2 additions & 0 deletions drama-queen/eslint.config.js → eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import pluginJs from '@eslint/js'
import tseslint from 'typescript-eslint'
import pluginReact from 'eslint-plugin-react'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import vitest from 'eslint-plugin-vitest'

export default [
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
Expand All @@ -11,6 +12,7 @@ export default [
...tseslint.configs.recommended,
pluginReact.configs.flat['jsx-runtime'],
eslintPluginPrettierRecommended,
vitest.configs.recommended,
{
settings: { react: { version: '18.3' } },
rules: {
Expand Down
File renamed without changes.
5 changes: 0 additions & 5 deletions lerna.json

This file was deleted.

File renamed without changes.
31 changes: 0 additions & 31 deletions nx.json

This file was deleted.

76 changes: 64 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,74 @@
{
"name": "drama-queen-container",
"name": "drama-queen",
"private": true,
"version": "2.3.0-rc.5",
"workspaces": [
"drama-queen"
],
"type": "module",
"scripts": {
"test": "lerna run test",
"test:coverage": "lerna run test:coverage",
EmmanuelDemey marked this conversation as resolved.
Show resolved Hide resolved
"build": "lerna run build",
"build:drama-queen": "lerna run build --scope 'drama-queen'",
"serve:drama-queen": "lerna run serve --scope 'drama-queen'",
"dev:drama-queen": "lerna run dev --scope 'drama-queen'",
"stop": "kill-port --port 5000,5001,5002"
"dev": "vite --port 5001 --strictPort",
"test": "vitest",
"test:coverage": "vitest --coverage",
"build": "tsc && vite build",
"postbuild": "node build/remote-env.cjs remoteEntry.js",
"preview": "vite preview --port 5001 --strictPort",
"_format": "prettier 'src/**/*.{ts,tsx,js,jsx,json,md}'",
"format": "npm run _format -- --write",
"lint": "eslint src/",
"format:check": "npm run _format -- --list-different",
"stop": "kill-port --port 5000,5001,5002",
"prepare": "husky"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@inseefr/lunatic": "^3.4.3",
"@mui/icons-material": "^5.15.14",
"@mui/material": "^5.15.14",
"@types/memoizee": "^0.4.11",
"axios": "^1.7.7",
"dexie": "^3.2.7",
"dexie-react-hooks": "^1.1.7",
"evt": "^2.5.7",
"i18nifty": "^3.2.1",
"jwt-decode": "^4.0.0",
"oidc-spa": "^5.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.1",
"react-hot-keys": "^2.7.3",
"react-router-dom": "^6.26.2",
"redux-clean-architecture": "^4.3.2",
"tsafe": "^1.8.4",
"tss-react": "^4.9.13",
"zod": "^3.22.4"
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@originjs/vite-plugin-federation": "^1.2.3",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@types/node": "^22.8.6",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react": "^4.3.2",
"@vitest/coverage-v8": "^2.1.3",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-vitest": "^0.5.4",
"globals": "^15.11.0",
"husky": "^9.1.6",
"jsdom": "^25.0.1",
"kill-port": "^2.0.1",
"lerna": "^7.1.1"
"prettier": "^3.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.10",
"vite-envs": "^4.4.5",
"vite-plugin-pwa": "^0.19.8",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^2.1.4"
}
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading