Skip to content

Commit 31e188b

Browse files
authored
Merge pull request #28 from NodeFactoryIo/mpetrunic/update-deps
Major update
2 parents bbfbcdb + 8da782f commit 31e188b

File tree

24 files changed

+1432
-1380
lines changed

24 files changed

+1432
-1380
lines changed

.env.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ METRICS_IP_WHITELIST=*
2222
# Winston-loki default url is empty
2323
# WINSTON_LOKI_URL=
2424
# WINSTON_LOKI_BASIC_AUTH=
25-
WINSTON_LOKI_APP_NAME=myApp
26-
WINSTON_LOKI_BATCHING=false
25+
# WINSTON_LOKI_APP_NAME=myApp
26+
# WINSTON_LOKI_BATCHING=false

.eslintrc

Lines changed: 0 additions & 38 deletions
This file was deleted.

.eslintrc.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
module.exports = {
2+
"root": true,
3+
"env": {
4+
"mocha": true,
5+
"node": true,
6+
"es6": true
7+
},
8+
"parser": "@typescript-eslint/parser",
9+
"plugins": [
10+
"@typescript-eslint",
11+
"prettier"
12+
],
13+
"extends": [
14+
"eslint:recommended",
15+
"plugin:@typescript-eslint/eslint-recommended",
16+
"plugin:@typescript-eslint/recommended",
17+
"prettier"
18+
],
19+
"rules": {
20+
"@typescript-eslint/no-require-imports": "error",
21+
"@typescript-eslint/no-unused-vars": ["error", {
22+
"varsIgnorePattern": "^_"
23+
}],
24+
"@typescript-eslint/explicit-function-return-type": ["error", {
25+
"allowExpressions": true
26+
}],
27+
"@typescript-eslint/ban-ts-comment": "error",
28+
"@typescript-eslint/no-explicit-any": "error",
29+
"@typescript-eslint/explicit-module-boundary-types": "error",
30+
"@typescript-eslint/no-use-before-define": "off",
31+
"prefer-const": "error",
32+
"no-consecutive-blank-lines": 0,
33+
"no-console": "error",
34+
"@typescript-eslint/naming-convention": ["error",
35+
{selector: "default", format: ['camelCase']},
36+
{
37+
selector: [
38+
"classProperty", "parameterProperty", "objectLiteralProperty",
39+
"classMethod", "parameter"
40+
],
41+
format: ['camelCase'], leadingUnderscore: "allow"
42+
},
43+
//variable must be in camel or upper case
44+
{selector: "variable", format: ["camelCase", "UPPER_CASE"], leadingUnderscore: "allow"},
45+
//classes and types must be in PascalCase
46+
{selector: ["typeLike", "enum"], format: ['PascalCase']},
47+
{selector: "enumMember", format: null},
48+
{selector: "typeProperty", format: ['PascalCase', 'camelCase']},
49+
//ignore rules on destructured params
50+
{
51+
selector: "variable",
52+
modifiers: ["destructured"],
53+
format: null
54+
}
55+
],
56+
}
57+
}

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Set up Node.js
1212
uses: actions/setup-node@master
1313
with:
14-
node-version: 12.4.0
14+
node-version: 14
1515
- run: cp .env.sample .env
1616
- run: yarn install --frozen-lockfile
1717
- run: yarn run build:docker

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Node.js
1515
uses: actions/setup-node@master
1616
with:
17-
node-version: 12.4.0
17+
node-version: 14
1818
- run: cp .env.sample .env
1919
- uses: azure/docker-login@v1
2020
with:

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
14

.prettierc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": false,
7+
"quoteProps": "as-needed",
8+
"trailingComma": "es5",
9+
"bracketSpacing": true,
10+
"arrowParens": "always"
11+
}

@types/fastify-env/index.d.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

@types/fastify-healthcheck/index.d.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:12.13-alpine as dev
1+
FROM node:14.15-alpine as dev
22

33
RUN apk update && apk add --no-cache libpq postgresql-dev g++ make python && rm -rf /var/cache/apk/*
44

@@ -14,7 +14,7 @@ COPY . .
1414

1515
RUN yarn run build
1616

17-
FROM node:12.13-alpine as production
17+
FROM node:14.15-alpine as production
1818

1919
RUN apk update && apk add --no-cache libpq postgresql-dev g++ make python && rm -rf /var/cache/apk/*
2020

package.json

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"Marin Petrunić <[email protected]>",
77
"Belma Gutlić <[email protected]>"
88
],
9+
"engines": {
10+
"node": "14.x"
11+
},
912
"license": "MIT",
1013
"scripts": {
1114
"start:dev": "npx task dev",
@@ -36,53 +39,55 @@
3639
"nodemon": "cross-env NODE_ENV=development ./node_modules/nodemon/bin/nodemon.js"
3740
},
3841
"dependencies": {
39-
"@nodefactory/fastify-blipp": "^2.2.1",
4042
"@nodefactory/winston": "^3.2.1",
41-
"fastify": "^2.15.1",
42-
"fastify-compress": "^2.0.1",
43-
"fastify-cors": "^3.0.3",
44-
"fastify-env": "^1.0.1",
45-
"fastify-formbody": "^3.1.0",
46-
"fastify-healthcheck": "^2.1.0",
47-
"fastify-helmet": "^3.0.2",
48-
"fastify-metrics": "5.0.1",
49-
"fastify-rate-limit": "^3.0.1",
50-
"fastify-sensible": "^2.1.1",
51-
"fastify-swagger": "^2.5.1",
43+
"fastify": "^3.10.1",
44+
"fastify-compress": "^3.4.1",
45+
"fastify-cors": "^5.1.0",
46+
"fastify-env": "^2.1.0",
47+
"fastify-formbody": "^5.0.0",
48+
"fastify-healthcheck": "^3.0.0",
49+
"fastify-helmet": "^5.1.0",
50+
"fastify-metrics": "^6.0.3",
51+
"fastify-rate-limit": "^5.0.1",
52+
"fastify-sensible": "^3.1.0",
53+
"fastify-swagger": "^3.5.0",
5254
"node-cleanup": "^2.1.2",
53-
"pg": "^8.0.2",
55+
"pg": "^8.5.1",
5456
"pg-native": "^3.0.0",
55-
"typeorm": "^0.2.24",
56-
"typeorm-seeding": "^1.4.4",
57-
"winston-loki": "6.0.0-rc.4"
57+
"typeorm": "^0.2.30",
58+
"typeorm-seeding": "^1.6.1",
59+
"winston-loki": "6.0.0-rc.9"
5860
},
5961
"devDependencies": {
60-
"@types/chai": "^4.1.7",
61-
"@types/faker": "^4.1.11",
62-
"@types/mocha": "^5.2.7",
63-
"@types/node": "^12.12.20",
62+
"@types/chai": "^4.2.14",
63+
"@types/faker": "^5.1.5",
64+
"@types/mocha": "^8.2.0",
65+
"@types/node": "^14.14.22",
6466
"@types/node-cleanup": "^2.1.1",
65-
"@types/sinon": "^7.0.13",
66-
"@types/supertest": "^2.0.5",
67-
"@typescript-eslint/eslint-plugin": "^2.12.0",
68-
"@typescript-eslint/parser": "^2.12.0",
67+
"@types/sinon": "^9.0.10",
68+
"@types/supertest": "^2.0.10",
69+
"@typescript-eslint/eslint-plugin": "^4.14.0",
70+
"@typescript-eslint/parser": "^4.14.0",
6971
"chai": "^4.2.0",
70-
"coveralls": "^3.0.2",
71-
"cross-env": "^7.0.2",
72-
"dotenv": "^5.0.1",
73-
"env-prompt": "^1.0.7",
74-
"eslint": "^6.7.2",
75-
"mocha": "^6.1.4",
76-
"nodemon": "^2.0.2",
77-
"nyc": "^15.0.1",
78-
"sinon": "^7.3.2",
79-
"supertest": "^3.1.0",
80-
"tasksfile": "5.1.0",
81-
"ts-node": "^8.5.4",
82-
"typescript": "^3.7.3",
83-
"typescript-eslint-parser": "^18.0.0"
72+
"coveralls": "^3.1.0",
73+
"cross-env": "^7.0.3",
74+
"dotenv": "^8.2.0",
75+
"env-prompt": "^1.2.3",
76+
"eslint": "^7.18.0",
77+
"eslint-config-prettier": "^7.2.0",
78+
"eslint-plugin-prettier": "^3.3.1",
79+
"mocha": "^8.2.1",
80+
"nodemon": "^2.0.7",
81+
"nyc": "^15.1.0",
82+
"prettier": "^2.2.1",
83+
"sinon": "^9.2.3",
84+
"supertest": "^6.1.1",
85+
"tasksfile": "5.1.1",
86+
"ts-node": "^9.1.1",
87+
"typescript": "^4.1.3",
88+
"typescript-eslint-parser": "^22.0.0"
8489
},
8590
"resolutions": {
86-
"lodash": "4.17.19"
91+
"lodash": "4.17.20"
8792
}
8893
}

0 commit comments

Comments
 (0)