Skip to content

Commit a640d5c

Browse files
authored
chore: node js 18 upgrd (#2519)
* chore: node js upgrd * fix: test case failure
1 parent fbe60c8 commit a640d5c

27 files changed

+1329
-1025
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.21.1
1+
18.18.1

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.21-alpine3.16 as build
1+
FROM node:18-alpine3.18 as build
22

33
# adding python for node-gyp
44
RUN apk add g++ make python3

Dockerfile.prod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.21-alpine3.16 as build
1+
FROM node:18-alpine3.18 as build
22

33
# adding python for node-gyp
44
RUN apk add g++ make python3
@@ -28,7 +28,7 @@ RUN yarn run build:release
2828
# https://stackoverflow.com/questions/57108751/docker-build-failed-when-copying-in-multi-step-build
2929
RUN chown root:root -R /app
3030

31-
FROM node:14.21-alpine3.16
31+
FROM node:18-alpine3.18
3232

3333
# adding to solve vuln
3434
RUN apk add --update --upgrade busybox

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "GitHub integration for Atlassian Jira",
55
"repository": "https://github.com/atlassian/github-for-jira.git",
66
"engines": {
7-
"node": ">= 14.21 <15",
7+
"node": ">= 18.18.1",
88
"yarn": "^1.22.0"
99
},
1010
"main": "src/main",
@@ -28,7 +28,7 @@
2828
"lint:ts": "eslint . --ext .ts,.tsx",
2929
"lint:yaml": "yamllint github-for-jira.sd.yml",
3030
"pretest": "NODE_ENV=test run-p clean setup db:test",
31-
"test": "yarn spa:test && jest --runInBand --forceExit --coverage",
31+
"test": "yarn spa:test && jest --forceExit --coverage --runInBand --logHeapUsage --workerIdleMemoryLimit='2GB'",
3232
"test:watch": "jest --runInBand --watchAll --coverage=false",
3333
"db": "run-s db:create db:migrate",
3434
"db:create": "run-p db:create:dev db:create:test",
@@ -95,6 +95,7 @@
9595
"helmet": "^3.21.2",
9696
"hot-shots": "^8.3.2",
9797
"http-proxy": "^1.18.1",
98+
"http-proxy-agent": "^7.0.0",
9899
"https-proxy-agent": "5.0.0",
99100
"ioredis": "^4.16.3",
100101
"is-base64": "^1.1.0",
@@ -157,13 +158,14 @@
157158
"eslint-import-resolver-typescript": "^2.5.0",
158159
"eslint-plugin-import": "^2.25.4",
159160
"eslint-plugin-jest": "^27.4.0",
160-
"eslint-plugin-jsdoc": "^37.9.3",
161+
"eslint-plugin-jsdoc": "^46.8.2",
161162
"eslint-plugin-no-only-tests": "^2.6.0",
162163
"eslint-plugin-node": "^11.1.0",
163164
"eslint-plugin-promise": "^6.0.0",
164165
"husky": "^6.0.0",
165-
"jest": "^27.5.1",
166-
"jest-diff": "^27.5.1",
166+
"jest": "^29.7.0",
167+
"jest-diff": "^29.7",
168+
"jest-environment-jsdom": "^29.7.0",
167169
"jest-when": "^3.5.1",
168170
"keygrip": "^1.0.2",
169171
"nock": "^13.2.4",
@@ -175,7 +177,7 @@
175177
"smee-client": "^1.2.2",
176178
"sqlite3": "^5.1.5",
177179
"supertest": "^6.2.2",
178-
"ts-jest": "~27.1.3",
180+
"ts-jest": "^29.1.1",
179181
"ts-node": "^10.5.0",
180182
"ts-node-dev": "^2.0.0",
181183
"yaml-lint": "^1.2.4"
@@ -184,7 +186,7 @@
184186
"@atlassian/sqs-queue-dlq-service": "^2.1.1"
185187
},
186188
"volta": {
187-
"node": "14.21.1",
189+
"node": "18.18.1",
188190
"yarn": "1.22.18"
189191
}
190192
}

spa/jest.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"^.+\\.tsx?$": "ts-jest"
55
},
66
"setupFilesAfterEnv": [
7-
"@testing-library/jest-dom/extend-expect"
7+
"./setup.ts"
88
]
99
}

spa/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"simplebar-react": "^3.2.4"
4949
},
5050
"devDependencies": {
51-
"@testing-library/jest-dom": "^5.16.5",
51+
"@testing-library/jest-dom": "^6.1.4",
5252
"@testing-library/react": "^14.0.0",
5353
"@testing-library/user-event": "^14.4.3",
5454
"@types/jest": "^29.5.2",

spa/setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import "@testing-library/jest-dom";

spa/yarn.lock

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
resolved "https://packages.atlassian.com/api/npm/npm-remote/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf"
88
integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==
99

10-
"@adobe/css-tools@^4.0.1":
11-
version "4.2.0"
12-
resolved "https://packages.atlassian.com/api/npm/npm-remote/@adobe/css-tools/-/css-tools-4.2.0.tgz#e1a84fca468f4b337816fcb7f0964beb620ba855"
13-
integrity sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==
10+
"@adobe/css-tools@^4.3.1":
11+
version "4.3.1"
12+
resolved "https://packages.atlassian.com/api/npm/npm-remote/@adobe/css-tools/-/css-tools-4.3.1.tgz#abfccb8ca78075a2b6187345c26243c1a0842f28"
13+
integrity sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==
1414

1515
"@alloc/quick-lru@^5.2.0":
1616
version "5.2.0"
@@ -2878,14 +2878,13 @@
28782878
lz-string "^1.5.0"
28792879
pretty-format "^27.0.2"
28802880

2881-
"@testing-library/jest-dom@^5.16.5":
2882-
version "5.16.5"
2883-
resolved "https://packages.atlassian.com/api/npm/npm-remote/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz#3912846af19a29b2dbf32a6ae9c31ef52580074e"
2884-
integrity sha512-N5ixQ2qKpi5OLYfwQmUb/5mSV9LneAcaUfp32pn4yCnpb8r/Yz0pXFPck21dIicKmi+ta5WRAknkZCfA8refMA==
2881+
"@testing-library/jest-dom@^6.1.4":
2882+
version "6.1.4"
2883+
resolved "https://packages.atlassian.com/api/npm/npm-remote/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz#cf0835c33bc5ef00befb9e672b1e3e6a710e30e3"
2884+
integrity sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==
28852885
dependencies:
2886-
"@adobe/css-tools" "^4.0.1"
2886+
"@adobe/css-tools" "^4.3.1"
28872887
"@babel/runtime" "^7.9.2"
2888-
"@types/testing-library__jest-dom" "^5.9.1"
28892888
aria-query "^5.0.0"
28902889
chalk "^3.0.0"
28912890
css.escape "^1.5.1"
@@ -3092,7 +3091,7 @@
30923091
dependencies:
30933092
"@types/istanbul-lib-report" "*"
30943093

3095-
"@types/jest@*", "@types/jest@^29.5.2":
3094+
"@types/jest@^29.5.2":
30963095
version "29.5.2"
30973096
resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/jest/-/jest-29.5.2.tgz#86b4afc86e3a8f3005b297ed8a72494f89e6395b"
30983097
integrity sha512-mSoZVJF5YzGVCk+FsDxzDuH7s+SCkzrgKZzf0Z0T2WudhBUPoF6ktoTPC4R0ZoCPCV5xUvuU6ias5NvxcBcMMg==
@@ -3284,13 +3283,6 @@
32843283
resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
32853284
integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==
32863285

3287-
"@types/testing-library__jest-dom@^5.9.1":
3288-
version "5.14.6"
3289-
resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.6.tgz#4887f6e1af11215428ab02777873bcede98a53b0"
3290-
integrity sha512-FkHXCb+ikSoUP4Y4rOslzTdX5sqYwMxfefKh1GmZ8ce1GOkEHntSp6b5cGadmNfp5e4BMEWOMx+WSKd5/MqlDA==
3291-
dependencies:
3292-
"@types/jest" "*"
3293-
32943286
"@types/tough-cookie@*":
32953287
version "4.0.2"
32963288
resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397"

src/config/feature-flags.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import LaunchDarkly, { LDClient } from "launchdarkly-node-server-sdk";
2-
import { mocked } from "ts-jest/utils";
2+
import { mocked } from "jest-mock";
33

44
jest.mock("launchdarkly-node-server-sdk");
55

src/github/client/token-cache.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { AuthToken, TEN_MINUTES } from "./auth-token";
33
import { AppTokenHolder } from "./app-token-holder";
44
import { getInstallationId } from "./installation-id";
55
import { keyLocator } from "./key-locator";
6-
import { mocked } from "ts-jest/utils";
6+
import { mocked } from "jest-mock";
77
import { Subscription } from "~/src/models/subscription";
88
import { envVars } from "config/env";
99
import fs from "fs";

0 commit comments

Comments
 (0)