Skip to content

Commit

Permalink
Merge pull request #83 from cerinoligutom/task/upgrade-deps-june-2024…
Browse files Browse the repository at this point in the history
…-edition

build: Upgrade deps June 2024 edition
  • Loading branch information
cerinoligutom authored Jun 2, 2024
2 parents d259c88 + f9334e9 commit 5bee7b8
Show file tree
Hide file tree
Showing 26 changed files with 6,863 additions and 6,509 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

35 changes: 0 additions & 35 deletions .eslintrc.cjs

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0);
}
const husky = (await import('husky')).default;
console.log(husky());
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ WORKDIR /usr/src/app

RUN npm install -g pnpm

COPY .husky/install.mjs .husky/install.mjs
COPY package.json ./
COPY pnpm-lock.yaml ./
COPY patches ./patches
Expand Down Expand Up @@ -36,14 +37,11 @@ EXPOSE 8080
WORKDIR /usr/src/app

# Copy the necessary files from the builder stage to this stage
COPY .husky/install.mjs .husky/install.mjs
COPY --chown=node:node --from=builder /usr/src/app/build .

RUN npm install -g pnpm

# On npm@9, `npm set-script` has been removed: https://github.blog/changelog/2022-10-24-npm-v9-0-0-released/
# This is mainly for disabling Husky on Docker and CI.
RUN npm pkg set scripts.prepare=" "

COPY pnpm-lock.yaml ./
COPY patches ./patches
# Install production dependencies only
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ WORKDIR /usr/src/app

RUN npm install -g pnpm

COPY .husky/install.mjs .husky/install.mjs
COPY package.json ./
COPY pnpm-lock.yaml ./
COPY patches ./patches
Expand Down
7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
api:
build:
Expand All @@ -24,7 +23,7 @@ services:
REDIS_CONNECTION_URL: redis://redis

db:
image: postgres:15-alpine
image: postgres:16-alpine
user: root
restart: always
ports:
Expand All @@ -37,7 +36,7 @@ services:

# https://www.pgadmin.org/docs/pgadmin4/6.5/container_deployment.html
pgadmin:
image: dpage/pgadmin4:7.4
image: dpage/pgadmin4:latest
user: root
restart: always
ports:
Expand Down Expand Up @@ -67,7 +66,7 @@ services:
- REDIS_HOSTS=local:redis:6379

supertokens:
image: supertokens/supertokens-postgresql:6.0
image: supertokens/supertokens-postgresql:9.0
user: root
restart: always
environment:
Expand Down
63 changes: 63 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';

/**
* @type {import('eslint').Linter.FlatConfig[]}
*/
const customConfig = [
{
rules: {
'no-console': [
'warn',
{
allow: ['info', 'error'],
},
],

quotes: ['error', 'single'],
'arrow-body-style': ['error', 'as-needed'],
'no-underscore-dangle': 'off',
'no-restricted-syntax': 'off',

'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: 'ctx|args|req|res|next|^_',
},
],

'@typescript-eslint/no-empty-interface': 'off',
},
},
{
files: ['src/**/*.error.ts', 'src/**/*.handler.ts', 'src/**/*.factory.ts'],

rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
];

export default tseslint.config(
// Global ignores
// https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
{
ignores: ['**/node_modules', 'build', 'docker-volumes', '.husky', 'src/db/**/*.d.ts'],
},
{
languageOptions: {
globals: {
process: 'writable',
console: 'readonly',
},
},
},
eslint.configs.recommended,
...tseslint.configs.strict,
...customConfig,
// ESLint Config last
eslintConfigPrettier,
);
12 changes: 4 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* eslint-disable global-require */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-env node */

import gulp from 'gulp';
// Read Gulp@4 support: https://www.npmjs.com/package/gulp-run-command#faq
import gulpRunCommand from 'gulp-run-command';
Expand All @@ -18,7 +14,7 @@ const PATHS = {
],
srcGraphqlFiles: ['src/**/*.graphql'],
srcNonTsFiles: ['src/**', '!src/**/*.ts'],
configFiles: ['package*.json', '.env*', 'LICENSE'],
configFiles: ['package.json', 'pnpm-lock.yaml', '.env', 'LICENSE'],
destinationDir: 'build',
};

Expand Down Expand Up @@ -51,17 +47,17 @@ async function cleanBuildDir() {
}

async function lint() {
const command = 'eslint --cache ./src';
const command = 'eslint --cache .';

return run(command)();
}

async function copyConfigFiles() {
return src(PATHS.configFiles, { base: '.' }).pipe(dest(PATHS.destinationDir));
return src(PATHS.configFiles, { base: '.', dot: true, allowEmpty: true }).pipe(dest(PATHS.destinationDir));
}

async function copyNonTypeScriptFiles() {
return src(PATHS.srcNonTsFiles, { base: '.' }).pipe(dest(PATHS.destinationDir));
return src(PATHS.srcNonTsFiles, { base: '.', dot: true }).pipe(dest(PATHS.destinationDir));
}

async function generateGqlTsFiles() {
Expand Down
106 changes: 53 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,83 +3,83 @@
"type": "module",
"private": true,
"scripts": {
"prepare": "husky install",
"prepare": "node .husky/install.mjs",
"start": "gulp dev",
"build": "gulp build",
"build:prod": "gulp build --prod",
"lint": "eslint ./src",
"lint": "eslint .",
"prettier": "prettier --write \"src/**/*.{js,ts,json,css,scss,md}\"",
"test": "echo \"No test specified\" && exit 0",
"tsc-check": "tsc --noEmit",
"generate:gql-types": "graphql-codegen"
},
"dependencies": {
"@apollo/server": "4.9.1",
"@apollo/server": "4.10.4",
"@godaddy/terminus": "4.12.1",
"@graphql-tools/load-files": "7.0.0",
"@graphql-tools/merge": "9.0.0",
"@graphql-tools/schema": "10.0.0",
"@graphql-tools/merge": "9.0.4",
"@graphql-tools/schema": "10.0.4",
"bcryptjs": "2.4.3",
"cookie-parser": "1.4.6",
"cors": "2.8.5",
"dataloader": "2.2.2",
"dotenv": "16.3.1",
"express": "4.18.2",
"graphql": "16.7.1",
"dotenv": "16.4.5",
"express": "4.19.2",
"graphql": "16.8.1",
"graphql-depth-limit": "1.1.0",
"graphql-redis-subscriptions": "2.6.0",
"graphql-scalars": "1.22.2",
"graphql-redis-subscriptions": "2.6.1",
"graphql-scalars": "1.23.0",
"graphql-subscriptions": "2.0.0",
"graphql-ws": "5.14.0",
"helmet": "7.0.0",
"ioredis": "5.3.2",
"kysely": "0.26.1",
"pg": "8.11.2",
"supertokens-node": "15.0.2",
"graphql-ws": "5.16.0",
"helmet": "7.1.0",
"ioredis": "5.4.1",
"kysely": "0.27.3",
"pg": "8.11.5",
"supertokens-node": "18.0.0",
"tsconfig-paths": "4.2.0",
"uuid": "9.0.0",
"ws": "8.13.0",
"zod": "3.21.4"
"uuid": "9.0.1",
"ws": "8.17.0",
"zod": "3.23.8"
},
"devDependencies": {
"@graphql-codegen/add": "5.0.0",
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/introspection": "4.0.0",
"@graphql-codegen/typescript": "4.0.1",
"@graphql-codegen/typescript-resolvers": "4.0.1",
"@rushstack/eslint-patch": "1.3.2",
"@types/bcryptjs": "2.4.2",
"@types/cookie-parser": "1.4.3",
"@types/cors": "2.8.13",
"@types/express": "4.17.17",
"@types/graphql-depth-limit": "1.1.3",
"@types/gulp": "4.0.13",
"@types/node": "20.4.8",
"@types/pg": "8.10.2",
"@types/uuid": "9.0.2",
"@types/ws": "8.5.5",
"@typescript-eslint/eslint-plugin": "6.2.1",
"@typescript-eslint/parser": "6.2.1",
"eslint": "8.46.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.28.0",
"gulp": "4.0.2",
"@eslint/js": "9.4.0",
"@graphql-codegen/add": "5.0.2",
"@graphql-codegen/cli": "5.0.2",
"@graphql-codegen/introspection": "4.0.3",
"@graphql-codegen/typescript": "4.0.7",
"@graphql-codegen/typescript-resolvers": "4.1.0",
"@types/bcryptjs": "2.4.6",
"@types/cookie-parser": "1.4.7",
"@types/cors": "2.8.17",
"@types/eslint__js": "8.42.3",
"@types/express": "4.17.21",
"@types/graphql-depth-limit": "1.1.6",
"@types/gulp": "4.0.17",
"@types/node": "20.13.0",
"@types/pg": "8.11.6",
"@types/uuid": "9.0.8",
"@types/ws": "8.5.10",
"eslint": "9.4.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1",
"gulp": "5.0.0",
"gulp-run-command": "0.0.10",
"husky": "8.0.3",
"lint-staged": "13.2.3",
"prettier": "3.0.1",
"prisma": "5.1.1",
"prisma-kysely": "1.5.0",
"rimraf": "5.0.1",
"ts-node": "10.9.1",
"tsc-alias": "1.8.7",
"tsx": "3.12.7",
"typescript": "5.1.6"
"husky": "9.0.11",
"lint-staged": "15.2.5",
"prettier": "3.3.0",
"prisma": "5.14.0",
"prisma-kysely": "1.8.0",
"rimraf": "5.0.7",
"ts-node": "10.9.2",
"tsc-alias": "1.8.10",
"tsx": "4.11.0",
"typescript": "5.4.5",
"typescript-eslint": "7.11.0"
},
"pnpm": {
"patchedDependencies": {
"graphql-redis-subscriptions@2.6.0": "patches/graphql-redis-subscriptions@2.6.0.patch",
"graphql-subscriptions@2.0.0": "patches/graphql-subscriptions@2.0.0.patch"
"graphql-subscriptions@2.0.0": "patches/graphql-subscriptions@2.0.0.patch",
"graphql-redis-subscriptions@2.6.1": "patches/graphql-redis-subscriptions@2.6.1.patch"
}
},
"prisma": {
Expand Down
4 changes: 2 additions & 2 deletions ...s/[email protected] → ...s/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dist/redis-pubsub.d.ts b/dist/redis-pubsub.d.ts
index 4fe658b1ec4afb1a69d702c0981a165e44f26f34..89b32e589a5813f647219615d496fb687242dfe0 100644
index 4bdc1abe0102c8dd505adc6cac10edb9cda3a9c0..ce7c74ba3b421f5ee8ec8edc402f87fd8474698e 100644
--- a/dist/redis-pubsub.d.ts
+++ b/dist/redis-pubsub.d.ts
@@ -24,7 +24,7 @@ export declare class RedisPubSub implements PubSubEngine {
Expand All @@ -10,4 +10,4 @@ index 4fe658b1ec4afb1a69d702c0981a165e44f26f34..89b32e589a5813f647219615d496fb68
+ asyncIterator<T>(triggers: string | string[], options?: unknown): AsyncIterable<T>;
getSubscriber(): RedisClient;
getPublisher(): RedisClient;
close(): Promise<'OK'[]>;
close(): Promise<'OK'[]>;
Loading

0 comments on commit 5bee7b8

Please sign in to comment.