Skip to content

Commit

Permalink
Update dependencies and switch to Node 18
Browse files Browse the repository at this point in the history
  • Loading branch information
chinthakagodawita committed Mar 26, 2023
1 parent 3d7d7b8 commit f1e356d
Show file tree
Hide file tree
Showing 8 changed files with 1,948 additions and 3,016 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js 16.x
- name: Set up Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- name: Install dependencies
run: yarn install --dev
- name: Lint files
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.15.0
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine as builder
FROM node:18-alpine as builder

RUN mkdir -p /opt/autoupdate/dist

Expand All @@ -8,7 +8,7 @@ COPY . /opt/autoupdate/

RUN yarn install --frozen-lockfile && yarn run build

FROM node:16-alpine as runner
FROM node:18-alpine as runner

LABEL com.github.actions.name="Auto-update pull requests with changes from their base branch"
LABEL com.github.actions.description="A GitHub Action that auto-updates PRs with changes from their base branch"
Expand Down
20 changes: 20 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
"clearMocks": true,
"collectCoverage": true,
"coverageDirectory": "coverage",
"coverageProvider": "v8",
"preset": "ts-jest",
"setupFiles": [
"<rootDir>/test/config.ts"
],
"testEnvironment": "node",
"transform": {
".(ts|tsx)": [
"ts-jest",
{
tsconfig: "tsconfig.tests.json",
compiler: "ttypescript",
}
]
},
}
57 changes: 19 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,29 @@
},
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.0.0",
"@octokit/types": "^6.31.3",
"@octokit/webhooks": "^9.12.0",
"@octokit/webhooks-definitions": "^3.67.3",
"@types/node": "^16.10.2",
"@vercel/ncc": "^0.28.6",
"ttypescript": "^1.5.12",
"typescript": "^4.4.2"
"@actions/github": "^5.1.1",
"@octokit/types": "^9.0.0",
"@octokit/webhooks": "^10.7.0",
"@octokit/webhooks-types": "^6.10.0",
"@types/node": "^18.15.10",
"@vercel/ncc": "^0.36.1",
"ttypescript": "^1.5.15",
"typescript": "^4.9.5"
},
"devDependencies": {
"@types/jest": "^27.0.2",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^24.3.6",
"@types/jest": "^29.5.0",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^3.4.0",
"jest": "^26.6.3",
"jest-ts-auto-mock": "^2.0.0",
"jest": "^29.5.0",
"jest-ts-auto-mock": "^2.1.0",
"nock": "^13.1.3",
"prettier": "^2.3.2",
"ts-auto-mock": "^3.5.0",
"ts-jest": "^26.5.6"
},
"jest": {
"clearMocks": true,
"collectCoverage": true,
"coverageDirectory": "coverage",
"coverageProvider": "v8",
"globals": {
"ts-jest": {
"compiler": "ttypescript"
}
},
"preset": "ts-jest",
"setupFiles": [
"<rootDir>/test/config.ts"
],
"testEnvironment": "node",
"transform": {
".(ts|tsx)": "ts-jest"
}
"ts-auto-mock": "^3.6.4",
"ts-jest": "^29.0.5"
}
}
13 changes: 2 additions & 11 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,8 @@
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,
"baseUrl": ".",
"paths": {
"*": ["src/*", "bin/*"]
},
"plugins": [
{
"transform": "ts-auto-mock/transformer",
"cacheBetweenTests": false
},
]
"rootDir": "."
},
"include": ["src/**/*"],
"include": ["src/**/*", "bin/**/*"],
"exclude": ["**/*.test.ts"]
}
12 changes: 12 additions & 0 deletions tsconfig.tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"plugins": [
{
"transform": "ts-auto-mock/transformer",
"cacheBetweenTests": false
},
]
},
"exclude": ["node_modules"]
}
Loading

0 comments on commit f1e356d

Please sign in to comment.