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

Update dependency typescript to v3.9.5 #278

Merged
merged 12 commits into from
Jun 17, 2020
Merged
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
4 changes: 2 additions & 2 deletions olimat.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"folders": [
{
// Servidor Apollo + Prisma
"path": "api"
"path": "packages/api"
},
{
// Aplicação Next.js + React.js
"path": "web"
"path": "packages/web"
}
],
"launch": {
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
"npm-run-all": "4.1.5",
"prettier": "1.18.2",
"ts-jest": "24.3.0",
"typescript": "3.5.3"
"typescript": "3.9.5"
},
"repository": "github:iquabius/olimat",
"scripts": {
"bootstrap": "npm i && lerna bootstrap && npm run build:skip-web",
"clean": "lerna clean -y && rm -rf node_modules",
"build": "lerna run prebuild && lerna run build && tsc --build --verbose packages",
"build": "lerna run prebuild && lerna run build && tsc --build --verbose packages/tsconfig.build.json",
"build:clean": "lerna run build:clean",
"build:skip-web": "lerna run prebuild && tsc --build --verbose packages",
"build:skip-web": "lerna run prebuild && tsc --build --verbose packages/tsconfig.build.json",
"build:watch": "lerna run prebuild && tsc --build --verbose --watch packages",
"cy:run": "cypress run",
"cy:open": "cypress open",
Expand All @@ -48,7 +48,7 @@
"test:codecov:validate": "curl --data-binary @codecov.yml https://codecov.io/validate",
"test:watch": "jest --watch",
"typecheck": "npm-run-all --parallel typecheck:*",
"typecheck:api": "tsc --noEmit --project packages/api/tsconfig.json",
"typecheck:web": "tsc --noEmit --project packages/web/tsconfig.json"
"typecheck:api": "tsc --noEmit --composite false --project packages/api/tsconfig.json",
"typecheck:web": "tsc --noEmit --composite false --project packages/web/tsconfig.json"
}
}
29 changes: 19 additions & 10 deletions packages/api/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,26 @@ generates:
avoidOptionals: true
contextType: ../utils#OliContext
# Corresponding mapped types should be excluded from generated file
# since they're imported from prisma-client
# since they're imported from prisma-client. But it doesn't look possible.
# So we add a suffix to the imported names to prevent name clashes.
# mapperTypeSuffix: Model
# But it's not supported until v1.13.0
# https://github.com/dotansimha/graphql-code-generator/releases/tag/v1.13.0
# So make this hack for now, as per:
# https://github.com/dotansimha/graphql-code-generator/issues/2932#issuecomment-552910765
mappers:
City: ./prisma-client#City
# Node: ./prisma-client#Node
Olympiad: ./prisma-client#Olympiad
OlympiadConnection: ./prisma-client#OlympiadConnection
Question: ./prisma-client#Question
QuestionConnection: ./prisma-client#QuestionConnection
School: ./prisma-client#School
Exam: ./prisma-client#Exam
User: ./prisma-client#User
# Types from codegen and prisma are incompatible...
AuthPayload: ../utils#AuthPayloadHack
QuestionPayload: ../utils#QuestionPayloadHack
City: import('./prisma-client').City
# Node: import('./prisma-client').Node
Olympiad: import('./prisma-client').Olympiad
OlympiadConnection: import('./prisma-client').OlympiadConnection
Question: import('./prisma-client').Question
QuestionConnection: import('./prisma-client').QuestionConnection
School: import('./prisma-client').School
Exam: import('./prisma-client').Exam
User: import('./prisma-client').User
plugins:
- "typescript-common"
- "typescript-server"
Expand Down
Loading