Skip to content

Commit

Permalink
Merge pull request #259 from UN-OCHA/update-libs
Browse files Browse the repository at this point in the history
Update dependencies & enable Dependabot version updates
  • Loading branch information
enxtur authored Aug 29, 2024
2 parents bee3896 + ecd557b commit daad113
Show file tree
Hide file tree
Showing 7 changed files with 599 additions and 484 deletions.
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Documentation for all configuration options:
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: 'monthly'
time: '11:00'
timezone: 'Europe/Zurich'
open-pull-requests-limit: 10
reviewers:
- '@UN-OCHA/hpc-js-reviewers'
allow:
- dependency-name: '@unocha/hpc-api-core'
- dependency-name: 'bunyan'
- dependency-name: '@types/bunyan'
- dependency-name: 'class-validator'
- dependency-name: 'knex'
- dependency-name: 'pg'
- dependency-name: '@types/pg'
- dependency-name: 'pm2'
- dependency-name: 'reflect-metadata'
- dependency-name: 'ts-node'
- dependency-name: 'ts-node-dev'
- dependency-name: 'typedi'
- dependency-name: 'jest'
- dependency-name: '@types/jest'
- dependency-name: 'ts-jest'
- dependency-name: '@types/node'
- dependency-name: '@unocha/hpc-repo-tools'
- dependency-name: 'husky'
- dependency-name: 'lint-staged'
- dependency-name: 'prettier'
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run check-types && npx lint-staged
npm run check-types && lint-staged
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,28 @@
"scripts": {
"check-types": "tsc --noEmit",
"install-and-link": "sh ./bin/install.sh",
"reinstall": "rm -rf node_modules/ && yarn install-and-link dev",
"start": "pm2 start start.js --no-daemon",
"dev": "ts-node-dev --inspect=127.0.0.1:9339 --transpile-only --no-notify -- start.js",
"prepare": "[ -d .git ] && git config blame.ignoreRevsFile .git-blame-ignore-revs; husky install",
"prepare": "[ -d .git ] && git config blame.ignoreRevsFile .git-blame-ignore-revs; husky",
"lint-prettier": "prettier -c .",
"lint-eslint": "eslint --quiet .",
"lint": "yarn lint-prettier && yarn lint-eslint"
},
"dependencies": {
"@unocha/hpc-api-core": "^7.0.0",
"@unocha/hpc-api-core": "^8.2.0",
"apollo-server-hapi": "^3.12.0",
"bunyan": "^1.8.15",
"class-validator": "^0.14.0",
"class-validator": "^0.14.1",
"graphql": "^15.7.2",
"knex": "0.21.1",
"pg": "^8.11.3",
"pm2": "^5.3.0",
"reflect-metadata": "^0.1.13",
"ts-node": "^10.9.1",
"pm2": "^5.4.2",
"reflect-metadata": "^0.2.2",
"ts-node": "^10.9.2",
"type-graphql": "^1.1.1",
"typedi": "^0.10.0",
"typescript": "^5.2.2"
"typescript": "^5.5.4"
},
"devDependencies": {
"@hapi/hapi": "^20.2.1",
Expand All @@ -37,18 +38,18 @@
"@types/jest": "^29.5.12",
"@types/node": "^20.8.10",
"@types/pg": "^8.11.3",
"@unocha/hpc-repo-tools": "^4.0.0",
"eslint": "^8.52.0",
"husky": "^8.0.3",
"@unocha/hpc-repo-tools": "^4.2.0",
"eslint": "^8.57.0",
"husky": "^9.1.5",
"jest": "^29.7.0",
"lint-staged": "^15.0.2",
"prettier": "3.0.3",
"ts-jest": "^29.1.2",
"lint-staged": "^15.2.9",
"prettier": "3.3.3",
"ts-jest": "^29.2.5",
"ts-node-dev": "^2.0.0"
},
"engines": {
"node": ">=18.18.2 || >=20.9.0",
"yarn": ">=1.22.10"
"node": ">=20.15.1",
"yarn": ">=1.22.22"
},
"lint-staged": {
"*.{ts,js}": [
Expand Down
2 changes: 1 addition & 1 deletion src/common-libs/logging/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import bunyan from 'bunyan';
import { promises as fs } from 'node:fs';
import * as path from 'node:path';
import path from 'node:path';
import { format } from 'node:util';

import { CONFIG } from '../../../config';
Expand Down
4 changes: 2 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ApolloServer,
ApolloServerPluginStopHapiServer,
} from 'apollo-server-hapi';
import { join } from 'node:path';
import path from 'node:path';
import 'reflect-metadata';
import { buildSchema } from 'type-graphql';
import { Container } from 'typedi';
Expand Down Expand Up @@ -34,7 +34,7 @@ async function startServer() {
const rootLogContext = await initializeLogging();

const schema = await buildSchema({
resolvers: [join(__dirname, 'domain-services/**/resolver.{ts,js}')],
resolvers: [path.join(__dirname, 'domain-services/**/resolver.{ts,js}')],
container: Container, // Register the 3rd party IOC container
});

Expand Down
7 changes: 2 additions & 5 deletions tests/utils/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ApolloServerPluginStopHapiServer,
} from 'apollo-server-hapi';
import type Knex from 'knex';
import PlatformPath from 'node:path';
import path from 'node:path';
import 'reflect-metadata';
import { buildSchema } from 'type-graphql';
import { Container } from 'typedi';
Expand All @@ -20,10 +20,7 @@ export default async function createApolloTestServer(
) {
const schema = await buildSchema({
resolvers: [
PlatformPath.join(
__dirname,
'../../src/domain-services/**/resolver.{ts,js}'
),
path.join(__dirname, '../../src/domain-services/**/resolver.{ts,js}'),
],
container: Container, // Register the 3rd party IOC container
});
Expand Down
Loading

0 comments on commit daad113

Please sign in to comment.