Skip to content
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
27 changes: 27 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "CI/CD: Continuous integration and continuous deployment"
on: [pull_request]
permissions:
contents: read

jobs:
build-check:
name: 'Build & check format'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "npm"

- name: Install NPM dependencies
run: yarn install --frozen-lockfile

- name: Check code formatting
run: npm run format:check


4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
build
coverage
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"bracketSpacing": true,
"trailingComma": "es5",
"tabWidth": 2
}
}
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"codestyle": "prettier \"src/**/*.{ts,js,json}\" --write",
"test": "node scripts/test.js",
"test:ci": "CI=true node scripts/test.js",
"test:staged": "CI=true node scripts/test.js --bail --findRelatedTests"
"test:staged": "CI=true node scripts/test.js --bail --findRelatedTests",
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\""
},
"lint-staged": {
"*.{ts,js}": [
Expand Down Expand Up @@ -98,7 +100,7 @@
"jest-resolve": "^24.5.0",
"lint-staged": "^9.0.0",
"nodemon": "^1.18.10",
"prettier": "^2.3.0",
"prettier": "^2.8.8",
"ts-jest": "^24.1.0",
"ts-node-dev": "^1.1.6",
"tslint": "^6.1.3",
Expand All @@ -109,6 +111,7 @@
"underscore": "^1.12.1",
"minimist": "^1.2.6",
"json-schema": "^0.4.0",
"@babel/traverse": "^7.23.2"
"@babel/traverse": "^7.23.2",
"form-data": "^4.0.1"
}
}
5 changes: 3 additions & 2 deletions src/types/generated/resolver-types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'
export type Maybe<T> = T | null
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
export type RequireFields<T, K extends keyof T> = { [X in Exclude<keyof T, K>]?: T[X] } &
{ [P in K]-?: NonNullable<T[P]> }
export type RequireFields<T, K extends keyof T> = { [X in Exclude<keyof T, K>]?: T[X] } & {
[P in K]-?: NonNullable<T[P]>
}
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8783,10 +8783,10 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=

prettier@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18"
integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==
prettier@^2.8.8:
version "2.8.8"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==

pretty-format@^24.9.0:
version "24.9.0"
Expand Down
Loading