diff --git a/.nvmrc b/.nvmrc index 049c407af7..41d9dbcf4d 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14.21.1 +18.18.1 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c11cfecbea..90b61f72c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Please note that this project has a [Contributor Code of Conduct](CODE_OF_CONDUC ## Getting Started -This app is written in [Typescript](https://www.typescriptlang.org/) and runs on [Node.js](https://nodejs.org/) **v14.x**. +This app is written in [Typescript](https://www.typescriptlang.org/) and runs on [Node.js](https://nodejs.org/) **v18.x**. Please install [Docker](https://www.docker.com/get-started) and [Docker Compose](https://docs.docker.com/compose/install/) to easily run the project locally. diff --git a/Dockerfile b/Dockerfile index 14f52de79a..7ea586c8b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.21-alpine3.16 as build +FROM node:18-alpine3.18 as build # adding python for node-gyp RUN apk add g++ make python3 diff --git a/Dockerfile.prod b/Dockerfile.prod index dba7924174..2124c5a1fb 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,4 +1,4 @@ -FROM node:14.21-alpine3.16 as build +FROM node:18-alpine3.18 as build # adding python for node-gyp RUN apk add g++ make python3 @@ -28,7 +28,7 @@ RUN yarn run build:release # https://stackoverflow.com/questions/57108751/docker-build-failed-when-copying-in-multi-step-build RUN chown root:root -R /app -FROM node:14.21-alpine3.16 +FROM node:18-alpine3.18 # adding to solve vuln RUN apk add --update --upgrade busybox diff --git a/package.json b/package.json index 73426fd279..4a5d209978 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "GitHub integration for Atlassian Jira", "repository": "https://github.com/atlassian/github-for-jira.git", "engines": { - "node": ">= 14.21 <15", + "node": ">= 18.18.1", "yarn": "^1.22.0" }, "main": "src/main", @@ -28,7 +28,7 @@ "lint:ts": "eslint . --ext .ts,.tsx", "lint:yaml": "yamllint github-for-jira.sd.yml", "pretest": "NODE_ENV=test run-p clean setup db:test", - "test": "yarn spa:test && jest --runInBand --forceExit --coverage", + "test": "yarn spa:test && jest --forceExit --coverage --runInBand --logHeapUsage --workerIdleMemoryLimit='2GB'", "test:watch": "jest --runInBand --watchAll --coverage=false", "db": "run-s db:create db:migrate", "db:create": "run-p db:create:dev db:create:test", @@ -95,6 +95,7 @@ "helmet": "^3.21.2", "hot-shots": "^8.3.2", "http-proxy": "^1.18.1", + "http-proxy-agent": "^7.0.0", "https-proxy-agent": "5.0.0", "ioredis": "^4.16.3", "is-base64": "^1.1.0", @@ -157,13 +158,14 @@ "eslint-import-resolver-typescript": "^2.5.0", "eslint-plugin-import": "^2.25.4", "eslint-plugin-jest": "^27.4.0", - "eslint-plugin-jsdoc": "^37.9.3", + "eslint-plugin-jsdoc": "^46.8.2", "eslint-plugin-no-only-tests": "^2.6.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.0", "husky": "^6.0.0", - "jest": "^27.5.1", - "jest-diff": "^27.5.1", + "jest": "^29.7.0", + "jest-diff": "^29.7", + "jest-environment-jsdom": "^29.7.0", "jest-when": "^3.5.1", "keygrip": "^1.0.2", "nock": "^13.2.4", @@ -175,7 +177,7 @@ "smee-client": "^1.2.2", "sqlite3": "^5.1.5", "supertest": "^6.2.2", - "ts-jest": "~27.1.3", + "ts-jest": "^29.1.1", "ts-node": "^10.5.0", "ts-node-dev": "^2.0.0", "yaml-lint": "^1.2.4" @@ -184,7 +186,7 @@ "@atlassian/sqs-queue-dlq-service": "^2.1.1" }, "volta": { - "node": "14.21.1", + "node": "18.18.1", "yarn": "1.22.18" } } diff --git a/spa/jest.config.json b/spa/jest.config.json index 79cd947e2a..d61e7d71d9 100644 --- a/spa/jest.config.json +++ b/spa/jest.config.json @@ -4,6 +4,6 @@ "^.+\\.tsx?$": "ts-jest" }, "setupFilesAfterEnv": [ - "@testing-library/jest-dom/extend-expect" + "./setup.ts" ] } diff --git a/spa/package.json b/spa/package.json index 980031b798..dda222a455 100644 --- a/spa/package.json +++ b/spa/package.json @@ -48,7 +48,7 @@ "simplebar-react": "^3.2.4" }, "devDependencies": { - "@testing-library/jest-dom": "^5.16.5", + "@testing-library/jest-dom": "^6.1.4", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.5.2", diff --git a/spa/setup.ts b/spa/setup.ts new file mode 100644 index 0000000000..02c423f5dc --- /dev/null +++ b/spa/setup.ts @@ -0,0 +1 @@ +import "@testing-library/jest-dom"; \ No newline at end of file diff --git a/spa/src/components/Error/KnownErrors/index.tsx b/spa/src/components/Error/KnownErrors/index.tsx index f5d00046bd..e45eed6630 100644 --- a/spa/src/components/Error/KnownErrors/index.tsx +++ b/spa/src/components/Error/KnownErrors/index.tsx @@ -17,6 +17,7 @@ import Modal, { import TextArea from "@atlaskit/textarea"; import Spinner from "@atlaskit/spinner"; import Button from "@atlaskit/button"; +import WarningIcon from "@atlaskit/icon/glyph/warning"; const olStyle = css` padding-left: 1.2em; @@ -35,6 +36,11 @@ const linkStyle = css` const textAreaStyle = css` margin-top: 20px; `; +const expireTextWrapperStyle = css` + display: flex; + align-items: center; + margin-top: ${token("space.100")}; +`; /************************************************************************ * UI view for the 3 known errors @@ -137,6 +143,10 @@ export const ErrorForNonAdmins = ({ orgName, adminOrgsUrl, onPopupBlocked, defer Find an organization owner +
+ + Note that the following link will expire after 2 days. +