Skip to content

Commit

Permalink
chore(app): upgrade dependencies (#82)
Browse files Browse the repository at this point in the history
* chore(app): upgrade dependencies

* chore(domain): generate prisma client before build

* fix: ci build

* fix: domain module dependency injection

* fix: tests in the ci

* fix: tests in the ci

* fix: tests in the ci

* fix: tests in the ci

* fix: build dependencies between domain and backend

* fix: turbo config

* fix: database url in ci

* fix: database url in ci

* fix: database url in ci

* fix: database url in ci
  • Loading branch information
tericcabrel committed Jun 27, 2024
1 parent 0270bbb commit 5f643a8
Show file tree
Hide file tree
Showing 27 changed files with 2,260 additions and 1,634 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
shell: bash
run: |
corepack enable
yarn set version 4.2.2
yarn set version 4.3.1
- name: Install projects dependencies
shell: bash
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ jobs:

- name: Print Released Packages
id: releasedPackages
run: yarn changeset status --output=release.json
run: |
yarn changeset status --output=release.json
cat release.json
- name: Upload Release File
uses: actions/upload-artifact@v4
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,23 @@ jobs:
runs-on: ubuntu-latest
# Defined in .github/workflows/build-release.yml at the "Create Release Pull Request" step
if: ${{ github.event.pull_request.title != 'update release versions' }}
env:
NODE_ENV: test
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
MYSQL_PORT: 3306
DATABASE_URL: mysql:https://root:[email protected]:3306/test
CONVERTKIT_API_KEY: api_key
CONVERTKIT_FORM_ID: form_id
steps:
- uses: actions/checkout@v4

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Start MySQL database
run: yarn workspace @snipcode/domain db:test

- name: Lint the projects
run: yarn lint

- name: Build the projects
run: yarn build

- name: Start MySQL server
run: sudo systemctl start mysql.service

- name: Run tests
run: |
yarn prisma migrate dev --schema=packages/domain/prisma/schema.prisma
yarn test -- --runInBand --coverage
run: yarn test -- --runInBand --coverage

should-preview-frontend:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -75,7 +65,7 @@ jobs:
- name: Install Yarn 4
run: |
corepack enable
yarn set version 4.2.2
yarn set version 4.3.1
- name: Install Vercel CLI
run: npm install --global vercel@latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install Yarn 4
run: |
corepack enable
yarn set version 4.2.2
yarn set version 4.3.1
- name: Install Vercel CLI
run: npm install --global vercel@latest
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ APP_VERSION=1.1.0
HOST=http:https://localhost
PORT=7509
INTROSPECTION_ENABLED=false
DATABASE_URL="mysql:https://root:[email protected]:3313/snipcode"
DATABASE_URL=mysql:https://root:[email protected]:3313/snipcode
ADMIN_PASSWORD=qwerty
CONVERTKIT_API_KEY=convertkit-api-key
CONVERTKIT_FORM_ID=convertkit-form-id
Expand Down
14 changes: 7 additions & 7 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@
"dependencies": {
"@apollo/server": "4.10.4",
"@nestjs/apollo": "12.1.0",
"@nestjs/common": "10.3.8",
"@nestjs/common": "10.3.9",
"@nestjs/config": "3.2.2",
"@nestjs/core": "10.3.8",
"@nestjs/core": "10.3.9",
"@nestjs/graphql": "12.1.1",
"@nestjs/platform-express": "10.3.8",
"@nestjs/platform-express": "10.3.9",
"@prisma/client": "5.14.0",
"@sentry/node": "8.3.0",
"graphql": "16.8.1",
"@sentry/node": "8.11.0",
"graphql": "16.9.0",
"reflect-metadata": "0.2.2",
"rxjs": "7.8.1",
"zod": "3.23.8"
},
"devDependencies": {
"@nestjs/cli": "10.3.2",
"@nestjs/schematics": "10.1.1",
"@nestjs/testing": "10.3.8",
"@nestjs/testing": "10.3.9",
"@ngneat/falso": "7.2.0",
"@types/express": "4.17.21",
"@types/supertest": "6.0.2",
"dotenv-cli": "7.4.2",
"source-map-support": "0.5.21",
"supertest": "7.0.0",
"ts-loader": "9.5.1",
"ts-morph": "22.0.0",
"ts-morph": "23.0.0",
"ts-node": "10.9.2",
"tsconfig-paths": "4.2.0"
}
Expand Down
3 changes: 1 addition & 2 deletions apps/web/__tests__/ui/newsletter.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { MockedProvider } from '@apollo/client/testing';
import { subscribeNewsletterMutation } from '@snipcode/front/graphql';
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';

import { NewsletterForm } from '@/components/home/newsletter/newsletter-form';

Expand Down
37 changes: 19 additions & 18 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,38 @@
"postbuild": "next-sitemap --config next-sitemap.js"
},
"dependencies": {
"@apollo/client": "3.9.9",
"@headlessui/react": "1.7.18",
"@hookform/resolvers": "3.3.4",
"@sentry/nextjs": "7.108.0",
"@apollo/client": "3.10.6",
"@headlessui/react": "2.1.0",
"@hookform/resolvers": "3.6.0",
"@sentry/nextjs": "8.11.0",
"@snipcode/front": "workspace:*",
"@snipcode/utils": "workspace:*",
"classnames": "2.5.1",
"graphql": "16.8.1",
"next": "14.1.4",
"next": "14.2.4",
"next-seo": "6.5.0",
"react": "18.2.0",
"react-cookie": "7.1.0",
"react-dom": "18.2.0",
"react-hook-form": "7.51.1",
"react": "18.3.1",
"react-cookie": "7.1.4",
"react-dom": "18.3.1",
"react-hook-form": "7.52.0",
"yup": "1.4.0"
},
"devDependencies": {
"@tailwindcss/forms": "0.5.7",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.2",
"@testing-library/dom": "10.1.0",
"@testing-library/jest-dom": "6.4.6",
"@testing-library/react": "16.0.0",
"@testing-library/user-event": "14.5.2",
"@types/react": "18.2.69",
"@types/react-dom": "18.2.22",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"autoprefixer": "10.4.19",
"eslint-config-next": "14.1.4",
"eslint-config-next": "14.2.4",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-jest-dom": "5.2.0",
"eslint-plugin-testing-library": "6.2.0",
"next-router-mock": "^0.9.12",
"eslint-plugin-jest-dom": "5.4.0",
"eslint-plugin-testing-library": "6.2.2",
"next-router-mock": "0.9.13",
"next-sitemap": "4.2.3",
"postcss": "8.4.38",
"tailwindcss": "3.4.1"
"tailwindcss": "3.4.4"
}
}
31 changes: 15 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@
}
},
"devDependencies": {
"@changesets/cli": "2.27.3",
"@commitlint/cli": "18.6.0",
"@commitlint/config-conventional": "18.6.0",
"@changesets/cli": "2.27.5",
"@commitlint/cli": "19.3.0",
"@commitlint/config-conventional": "19.2.2",
"@types/jest": "29.5.12",
"@types/lodash": "4.17.0",
"@types/node": "20.11.16",
"@typescript-eslint/eslint-plugin": "7.3.1",
"@typescript-eslint/parser": "7.3.1",
"@types/lodash": "4.17.5",
"@types/node": "20.14.8",
"@typescript-eslint/eslint-plugin": "7.13.1",
"@typescript-eslint/parser": "7.13.1",
"babel-jest": "29.7.0",
"dotenv": "16.4.5",
"dotenv-cli": "7.4.2",
"eslint": "8.56.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-turbo": "2.0.3",
"eslint-config-turbo": "2.0.4",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jest": "27.9.0",
"eslint-plugin-jest": "28.6.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-sort-destructure-keys": "1.5.0",
"eslint-plugin-sort-destructure-keys": "2.0.0",
"eslint-plugin-sort-keys-fix": "1.1.2",
"eslint-plugin-typescript-sort-keys": "3.2.0",
"husky": "9.0.11",
Expand All @@ -63,10 +63,9 @@
"jest-mock-extended": "3.0.7",
"msw": "2.3.1",
"prettier": "3.2.5",
"prisma": "5.11.0",
"ts-jest": "29.1.2",
"turbo": "1.13.3",
"typescript": "5.4.3"
"ts-jest": "29.1.5",
"turbo": "2.0.5",
"typescript": "5.5.2"
},
"packageManager": "yarn@4.2.2"
"packageManager": "yarn@4.3.1"
}
5 changes: 2 additions & 3 deletions packages/domain/.env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
DATABASE_URL="mysql:https://root:@127.0.0.1:3311/core-db"
SHADOW_DATABASE_URL="mysql:https://root:[email protected]:3312/snipcode"
TEST_DATABASE_URL="mysql:https://root:[email protected]:3313/snipcode"
DATABASE_URL=mysql:https://root:@127.0.0.1:3311/core-db
SHADOW_DATABASE_URL=mysql:https://root:[email protected]:3312/snipcode
1 change: 1 addition & 0 deletions packages/domain/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL=mysql:https://root:[email protected]:3313/snipcode
1 change: 0 additions & 1 deletion packages/domain/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ node_modules
dist
.env
.env.local
.env.test
coverage
9 changes: 5 additions & 4 deletions packages/domain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"license": "MIT",
"scripts": {
"build": "tsc --project tsconfig.prod.json",
"prebuild": "yarn db:generate",
"clean": "rm -rf .turbo dist coverage",
"lint": "eslint --fix",
"env": "dotenv -e .env.local",
Expand Down Expand Up @@ -36,14 +37,14 @@
"unique-username-generator": "1.3.0"
},
"devDependencies": {
"@nestjs/common": "10.3.8",
"@nestjs/testing": "10.3.8",
"@nestjs/common": "10.3.9",
"@nestjs/testing": "10.3.9",
"@ngneat/falso": "7.2.0",
"@types/bcryptjs": "2.4.6",
"dotenv-cli": "7.4.2",
"mysql2": "3.10.0",
"mysql2": "3.10.1",
"nock": "13.5.4",
"prisma": "5.14.0",
"zx": "8.0.2"
"zx": "8.1.3"
}
}
3 changes: 2 additions & 1 deletion packages/domain/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const DOMAIN_SERVICES_OPTIONS = 'DOMAIN_SERVICES_OPTIONS';
export const MODULE_OPTIONS = 'MODULE_OPTIONS';
export const NEWSLETTER_SERVICE_OPTIONS = 'NEWSLETTER_SERVICE_OPTIONS';
Loading

0 comments on commit 5f643a8

Please sign in to comment.