From 8befa1554e3bceccb5ed514cae91de38dcbffe3f Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 14:45:08 -0500 Subject: [PATCH 01/15] fix typo in packagemanager field in package.json --- containers/ecr-viewer/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/ecr-viewer/package.json b/containers/ecr-viewer/package.json index 54c4d19778..045f97ee6f 100644 --- a/containers/ecr-viewer/package.json +++ b/containers/ecr-viewer/package.json @@ -1,6 +1,6 @@ { "name": "ecr-viewer", - "packageManager": "^npm@10.8.1", + "packageManager": "npm@10.8.1", "description": "The DIBBs eCR Viewer app offers a REST API for processing FHIR messages into an HTML page with key insights.", "version": "1.0.1", "private": true, From 1ab719757316fafdda92d601b156edafcb08ad88 Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 14:52:00 -0500 Subject: [PATCH 02/15] update next eslint dev deps --- containers/ecr-viewer/package-lock.json | 79 ++++++------------------- containers/ecr-viewer/package.json | 4 +- 2 files changed, 19 insertions(+), 64 deletions(-) diff --git a/containers/ecr-viewer/package-lock.json b/containers/ecr-viewer/package-lock.json index 3cb42043fb..8772d4cd91 100644 --- a/containers/ecr-viewer/package-lock.json +++ b/containers/ecr-viewer/package-lock.json @@ -51,7 +51,7 @@ }, "devDependencies": { "@dotenvx/dotenvx": "^1.22.0", - "@next/eslint-plugin-next": "^14.2.5", + "@next/eslint-plugin-next": "^14.2.14", "@smithy/util-stream": "^2.1.2", "@testing-library/jest-dom": "^6.1.5", "@testing-library/react": "^15.0.7", @@ -70,7 +70,7 @@ "concurrently": "^9.0.1", "cypress": "^13.6.6", "eslint": "^8.56.0", - "eslint-config-next": "14.0.3", + "eslint-config-next": "^14.2.14", "eslint-config-prettier": "^9.1.0", "eslint-plugin-jsdoc": "^48.2.3", "eslint-plugin-unused-imports": "^3.1.0", @@ -2012,6 +2012,7 @@ "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.46.0.tgz", "integrity": "sha512-C3Axuq1xd/9VqFZpW4YAzOx5O9q/LP46uIQy/iNDpHG3fmPa6TBtvfglMCs3RBiBxAIi0Go97r8+jvTt55XMyQ==", "dev": true, + "license": "MIT", "dependencies": { "comment-parser": "1.4.1", "esquery": "^1.6.0", @@ -2816,10 +2817,11 @@ "integrity": "sha512-MCgO7VHxXo8sYR/0z+sk9fGyJJU636JyRmkjc7ZJY8Hurl8df35qG5hoAh5KMs75FLjhlEo9bb2LGe89Y/scDA==" }, "node_modules/@next/eslint-plugin-next": { - "version": "14.2.17", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.17.tgz", - "integrity": "sha512-fW6/u1jjlBQrMs1ExyINehaK3B+LEW5UqdF6QYL07QK+SECkX0hnEyPMaNKj0ZFzirQ9D8jLWQ00P8oua4yx9g==", + "version": "14.2.22", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.22.tgz", + "integrity": "sha512-8xCmBMd+hUapMpviPp5g3oDhoWRtbE/QeN/Nvth+SZrdt7xt9TBsH8cePkRwRjXFpwHndpRDNVQROxR/1HiVbg==", "dev": true, + "license": "MIT", "dependencies": { "glob": "10.3.10" } @@ -7321,6 +7323,7 @@ "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 12.0.0" } @@ -8336,14 +8339,16 @@ } }, "node_modules/eslint-config-next": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.0.3.tgz", - "integrity": "sha512-IKPhpLdpSUyKofmsXUfrvBC49JMUTdeaD8ZIH4v9Vk0sC1X6URTuTJCLtA0Vwuj7V/CQh0oISuSTvNn5//Buew==", + "version": "14.2.22", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.2.22.tgz", + "integrity": "sha512-4C26Xkqh5RWO9ieNOg7flfWsGiIfzblhXWQHUCa4wgswfjeFm4ku4M/Zc2IGBwA2BmrSn5kyJ8vt+JQg55g65Q==", "dev": true, + "license": "MIT", "dependencies": { - "@next/eslint-plugin-next": "14.0.3", + "@next/eslint-plugin-next": "14.2.22", "@rushstack/eslint-patch": "^1.3.3", - "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", + "@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.28.1", @@ -8361,58 +8366,6 @@ } } }, - "node_modules/eslint-config-next/node_modules/@next/eslint-plugin-next": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.0.3.tgz", - "integrity": "sha512-j4K0n+DcmQYCVnSAM+UByTVfIHnYQy2ODozfQP+4RdwtRDfobrIvKq1K4Exb2koJ79HSSa7s6B2SA8T/1YR3RA==", - "dev": true, - "dependencies": { - "glob": "7.1.7" - } - }, - "node_modules/eslint-config-next/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-config-next/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/eslint-config-next/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/eslint-config-prettier": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", @@ -8596,6 +8549,7 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.11.0.tgz", "integrity": "sha512-d12JHJDPNo7IFwTOAItCeJY1hcqoIxE0lHA8infQByLilQ9xkqrRa6laWCnsuCrf+8rUnvxXY1XuTbibRBNylA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@es-joy/jsdoccomment": "~0.46.0", "are-docs-informative": "^0.0.2", @@ -11946,6 +11900,7 @@ "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.0.0" } diff --git a/containers/ecr-viewer/package.json b/containers/ecr-viewer/package.json index 045f97ee6f..a916164893 100644 --- a/containers/ecr-viewer/package.json +++ b/containers/ecr-viewer/package.json @@ -66,7 +66,7 @@ }, "devDependencies": { "@dotenvx/dotenvx": "^1.22.0", - "@next/eslint-plugin-next": "^14.2.5", + "@next/eslint-plugin-next": "^14.2.14", "@smithy/util-stream": "^2.1.2", "@testing-library/jest-dom": "^6.1.5", "@testing-library/react": "^15.0.7", @@ -85,7 +85,7 @@ "concurrently": "^9.0.1", "cypress": "^13.6.6", "eslint": "^8.56.0", - "eslint-config-next": "14.0.3", + "eslint-config-next": "^14.2.14", "eslint-config-prettier": "^9.1.0", "eslint-plugin-jsdoc": "^48.2.3", "eslint-plugin-unused-imports": "^3.1.0", From 18e9eddb4401da383ab66b9eeeae46b153b8faa1 Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 14:53:11 -0500 Subject: [PATCH 03/15] add lint fix option --- containers/ecr-viewer/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/containers/ecr-viewer/package.json b/containers/ecr-viewer/package.json index a916164893..d33673a048 100644 --- a/containers/ecr-viewer/package.json +++ b/containers/ecr-viewer/package.json @@ -11,6 +11,7 @@ "build": "next build", "start": "next start", "lint": "next lint", + "lint:fix": "next lint --fix", "test": "TZ=America/New_York jest", "test:watch": "TZ=America/New_York jest --watch", "clear-local": "docker compose -f ./docker-compose.yml --profile \"*\" down -v", From dd970b7f90883de6d481123e41de9caf2d85f1ba Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 15:12:51 -0500 Subject: [PATCH 04/15] fix react/no-unescaped-entities --- .../ecr-viewer/src/app/tests/components/Clinical.test.tsx | 2 +- containers/ecr-viewer/src/app/view-data/retrieval-failed.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/containers/ecr-viewer/src/app/tests/components/Clinical.test.tsx b/containers/ecr-viewer/src/app/tests/components/Clinical.test.tsx index 966810963c..d412d04c36 100644 --- a/containers/ecr-viewer/src/app/tests/components/Clinical.test.tsx +++ b/containers/ecr-viewer/src/app/tests/components/Clinical.test.tsx @@ -179,7 +179,7 @@ describe("Snapshot test for Clinical Notes", () => { - Parkinson's syndrome + Parkinson's syndrome 7/25/22 diff --git a/containers/ecr-viewer/src/app/view-data/retrieval-failed.tsx b/containers/ecr-viewer/src/app/view-data/retrieval-failed.tsx index 65002aa2cd..c1fa6d8d94 100644 --- a/containers/ecr-viewer/src/app/view-data/retrieval-failed.tsx +++ b/containers/ecr-viewer/src/app/view-data/retrieval-failed.tsx @@ -21,10 +21,11 @@ const RetrievalFailed = () => ( eCR retrieval failed
- The eCR Viewer couldn't retrieve the associated eCR file + The eCR Viewer couldn't retrieve the associated eCR file
- This is likely because the DIBBs pipeline hasn't processed this eCR. + This is likely because the DIBBs pipeline hasn't processed this + eCR.

Contact support: If the problem persists, please reach out to From c5317c3fcc7430e67aa0e7f9dc9c9e6b1032af0c Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 15:20:16 -0500 Subject: [PATCH 05/15] fix https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md --- .../app/tests/services/labsService.test.tsx | 2 +- .../view-data/components/LoadingComponent.tsx | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/containers/ecr-viewer/src/app/tests/services/labsService.test.tsx b/containers/ecr-viewer/src/app/tests/services/labsService.test.tsx index 5692957058..7c3f744205 100644 --- a/containers/ecr-viewer/src/app/tests/services/labsService.test.tsx +++ b/containers/ecr-viewer/src/app/tests/services/labsService.test.tsx @@ -495,7 +495,7 @@ describe("Evaluate Organization with ID", () => { }); it("should combine the data into new format", () => { const testResultObject: ResultObject = { - "Organization/22c6cdd0-bde1-e220-9ba4-2c2802f795ad": [
], + "Organization/22c6cdd0-bde1-e220-9ba4-2c2802f795ad": [], }; const result = combineOrgAndReportData( testResultObject, diff --git a/containers/ecr-viewer/src/app/view-data/components/LoadingComponent.tsx b/containers/ecr-viewer/src/app/view-data/components/LoadingComponent.tsx index 82e112ff12..c9a3949faf 100644 --- a/containers/ecr-viewer/src/app/view-data/components/LoadingComponent.tsx +++ b/containers/ecr-viewer/src/app/view-data/components/LoadingComponent.tsx @@ -13,6 +13,7 @@ import PatientBanner from "./PatientBanner"; import { BackButton } from "./BackButton"; import React from "react"; import { range } from "../utils/utils"; +import { toKebabCase } from "@/app/services/formatService"; /** * Renders the loading blobs in gray or in blue @@ -76,9 +77,10 @@ const SideNavLoadingSkeleton = ({ isNonIntegratedViewer: boolean; }) => { const sideNavLoadingItems = [ - eCR Summary, - eCR Document, + eCR Summary, + eCR Document, [ - {title}, - ]} isSubnav={true}>, + {title}, + , + ]} + isSubnav={true} + >, ])} isSubnav={true} />, From 6211586e46605f7e70c30a9e42c58dbadf11444b Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 15:42:18 -0500 Subject: [PATCH 06/15] fix https://react.dev/warnings/invalid-hook-call-warning --- .../src/app/components/Pagination.tsx | 20 +++++++++++++------ .../app/view-data/components/DataDisplay.tsx | 9 +++++---- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/containers/ecr-viewer/src/app/components/Pagination.tsx b/containers/ecr-viewer/src/app/components/Pagination.tsx index 52dd7ddea6..19f9baf61b 100644 --- a/containers/ecr-viewer/src/app/components/Pagination.tsx +++ b/containers/ecr-viewer/src/app/components/Pagination.tsx @@ -1,7 +1,7 @@ import React from "react"; import classnames from "classnames"; import { Button, Icon } from "@trussworks/react-uswds"; -import { useSearchParams } from "next/navigation"; +import { ReadonlyURLSearchParams, useSearchParams } from "next/navigation"; import Link from "next/link"; type PaginationProps = { @@ -22,6 +22,7 @@ const PaginationPage = ({ isCurrent, pathname, onClickPageNumber, + searchParams, }: { pathname: string; page: number; @@ -30,6 +31,7 @@ const PaginationPage = ({ event: React.MouseEvent, page: number, ) => void; + searchParams: ReadonlyURLSearchParams; }) => { const linkClasses = classnames("usa-pagination__button text-bold", { "usa-current": isCurrent, @@ -56,7 +58,7 @@ const PaginationPage = ({ ) : ( { + const searchParams = useSearchParams(); const navClasses = classnames("usa-pagination", className); const isOnFirstPage = currentPage === 1; @@ -203,7 +206,7 @@ export const Pagination = ({ ) : ( ), )} @@ -251,7 +255,7 @@ export const Pagination = ({ ) : ( { - const searchParams = useSearchParams(); +const createPageURL = ( + searchParams: ReadonlyURLSearchParams, + pathname: string, + pageNumber: number | string, +) => { const params = new URLSearchParams(searchParams); params.set("page", pageNumber.toString()); return `${pathname}?${params.toString()}`; diff --git a/containers/ecr-viewer/src/app/view-data/components/DataDisplay.tsx b/containers/ecr-viewer/src/app/view-data/components/DataDisplay.tsx index 0845f0a767..7cf439bfba 100644 --- a/containers/ecr-viewer/src/app/view-data/components/DataDisplay.tsx +++ b/containers/ecr-viewer/src/app/view-data/components/DataDisplay.tsx @@ -100,7 +100,7 @@ const FieldValue: React.FC<{ const [hidden, setHidden] = useState(true); const [fieldValue, setFieldValue] = useState(children); const valueLength = getReactNodeLength(children); - const cutField = trimField(children, cutLength, setHidden).value; + const cutField = trimField(children, cutLength, setHidden, useId()).value; const id = useId(); useEffect(() => { if (valueLength > maxLength) { @@ -149,14 +149,15 @@ const getReactNodeLength = (value: React.ReactNode): number => { * @param value - the value that will be cut * @param remainingLength - the length of how long the returned element will be * @param setHidden - a function used to signify that the view more button has been clicked. + * @param id - an id to identify the trimmed string. * @returns - an object with the shortened value and the length left over. */ const trimField = ( value: React.ReactNode, remainingLength: number, setHidden: (val: boolean) => void, + id: string, ): { value: React.ReactNode; remainingLength: number } => { - const id = useId(); if (remainingLength < 1) { return { value: null, remainingLength }; } @@ -188,7 +189,7 @@ const trimField = ( } else if (Array.isArray(value)) { let newValArr = []; for (let i = 0; i < value.length; i++) { - let splitVal = trimField(value[i], remainingLength, setHidden); + let splitVal = trimField(value[i], remainingLength, setHidden, id); remainingLength = splitVal.remainingLength; newValArr.push( @@ -204,7 +205,7 @@ const trimField = ( } else { childrenCopy = value.props.children; } - let split = trimField(childrenCopy, remainingLength, setHidden); + let split = trimField(childrenCopy, remainingLength, setHidden, id); const newElement = React.cloneElement( value, { ...value.props }, From ba72cda37d948ac6d82721206c08222f872c3d69 Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 15:49:32 -0500 Subject: [PATCH 07/15] remove pretty-format-json format in favor of using prettier --- .pre-commit-config.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e87889c2da..6966a7329c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,11 +7,6 @@ repos: args: [--fix] # Run the formatter. - id: ruff-format - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: pretty-format-json - args: [--autofix, --no-sort-keys] - repo: https://github.com/pre-commit/mirrors-eslint rev: "v9.16.0" hooks: @@ -34,7 +29,6 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier - types_or: [css, javascript, tsx, ts, yaml] - repo: local hooks: # run `terraform fmt` if tf files are modified and terraform is installed @@ -54,6 +48,6 @@ ci: autoupdate_branch: "" autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate" autoupdate_schedule: weekly - skip: [pretty-format-json, terraform-fmt] + skip: [pretty-terraform-fmt] submodules: false exclude: examples/* From de5df31c581edfa5ada3b5c02ea82dd4c64f1bf0 Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 15:49:56 -0500 Subject: [PATCH 08/15] add new rules to eslint (including commnted out rules for now) --- containers/ecr-viewer/.eslintrc.json | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/containers/ecr-viewer/.eslintrc.json b/containers/ecr-viewer/.eslintrc.json index 0ee79dc82d..4ba0a1b7a7 100644 --- a/containers/ecr-viewer/.eslintrc.json +++ b/containers/ecr-viewer/.eslintrc.json @@ -1,17 +1,20 @@ { "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint", - "unused-imports", - "jsdoc" - ], + "plugins": ["@typescript-eslint", "unused-imports", "jsdoc"], "extends": [ - "plugin:@next/next/recommended", + // "eslint:recommended", "plugin:jsdoc/recommended-typescript-error", + "plugin:@next/next/recommended", + // "plugin:@typescript-eslint/strict-type-checked", + // "plugin:@typescript-eslint/stylistic-type-checked", + "next/core-web-vitals", "prettier" ], "env": { - "es6": true + "browser": true, + "node": true, + "es6": true, + "jest": true }, "parserOptions": { "ecmaVersion": 12, @@ -43,9 +46,12 @@ }, "overrides": [ { - "files": [ - "*.test*", - "**/tests/**/*" + "files": ["*.test*", "tests/**"], + // "plugins": ["jest"], + "extends": [ + // "plugin:jest/recommended" + // "plugin:jest-dom/recommended", + // "plugin:testing-library/react" ], "rules": { "jsdoc/require-jsdoc": "off" From 54b7438fe221dc756629b54e9668bffdccb9fade Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 15:50:18 -0500 Subject: [PATCH 09/15] disable react/no-children-prop for now until button refactored --- containers/ecr-viewer/src/app/components/SortButton.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/containers/ecr-viewer/src/app/components/SortButton.tsx b/containers/ecr-viewer/src/app/components/SortButton.tsx index 31f513437f..3eff473f04 100644 --- a/containers/ecr-viewer/src/app/components/SortButton.tsx +++ b/containers/ecr-viewer/src/app/components/SortButton.tsx @@ -85,7 +85,9 @@ export const SortButton: React.FC = ({ resetHeaderMarker(); changeHeaderMarker(); }} - children={""} + // TODO: refactor in the future to set image inside button + // eslint-disable-next-line react/no-children-prop + children={undefined} > ); }; From 6a159dce1ebc03d57d9550be518cd8ac569cb9cf Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 15:50:46 -0500 Subject: [PATCH 10/15] remove terraform from pre-commit-config since we don't use it --- .pre-commit-config.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6966a7329c..caf55f3fce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,18 +29,6 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier - - repo: local - hooks: - # run `terraform fmt` if tf files are modified and terraform is installed - # when terraform is not installed, this check will succeed even if tf files - # would not pass the format check - - id: terraform-fmt - name: terraform-fmt - entry: bash -c 'if command -v terraform >/dev/null 2>&1; then terraform fmt -recursive -check operations; else exit 0; fi' - language: system - types: - - terraform - pass_filenames: false ci: autofix_commit_msg: | [pre-commit.ci] auto fixes from pre-commit hooks @@ -48,6 +36,5 @@ ci: autoupdate_branch: "" autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate" autoupdate_schedule: weekly - skip: [pretty-terraform-fmt] submodules: false exclude: examples/* From d948bcb2a31a3d00e2da51b6078f1b9a7cb61a00 Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 16:42:23 -0500 Subject: [PATCH 11/15] run dedupe --- containers/ecr-viewer/package-lock.json | 220 ++++++++++++------------ 1 file changed, 114 insertions(+), 106 deletions(-) diff --git a/containers/ecr-viewer/package-lock.json b/containers/ecr-viewer/package-lock.json index 8772d4cd91..daef35c539 100644 --- a/containers/ecr-viewer/package-lock.json +++ b/containers/ecr-viewer/package-lock.json @@ -359,13 +359,14 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@smithy/util-stream": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.2.1.tgz", - "integrity": "sha512-R3ufuzJRxSJbE58K9AEnL/uSZyVdHzud9wLS8tIbXclxKzoe09CRohj2xV8wpx5tj7ZbiJaKYcutMm1eYgz/0A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.3.3.tgz", + "integrity": "sha512-bOm0YMMxRjbI3X6QkWwADPFkh2AH2xBMQIB1IQgCsCRqXXpSJatgjUR3oxHthpYwFkw3WPkOt8VgMpJxC0rFqg==", + "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^4.0.0", - "@smithy/node-http-handler": "^3.2.5", - "@smithy/types": "^3.6.0", + "@smithy/fetch-http-handler": "^4.1.2", + "@smithy/node-http-handler": "^3.3.3", + "@smithy/types": "^3.7.2", "@smithy/util-base64": "^3.0.0", "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-hex-encoding": "^3.0.0", @@ -583,13 +584,14 @@ } }, "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-stream": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.2.1.tgz", - "integrity": "sha512-R3ufuzJRxSJbE58K9AEnL/uSZyVdHzud9wLS8tIbXclxKzoe09CRohj2xV8wpx5tj7ZbiJaKYcutMm1eYgz/0A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.3.3.tgz", + "integrity": "sha512-bOm0YMMxRjbI3X6QkWwADPFkh2AH2xBMQIB1IQgCsCRqXXpSJatgjUR3oxHthpYwFkw3WPkOt8VgMpJxC0rFqg==", + "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^4.0.0", - "@smithy/node-http-handler": "^3.2.5", - "@smithy/types": "^3.6.0", + "@smithy/fetch-http-handler": "^4.1.2", + "@smithy/node-http-handler": "^3.3.3", + "@smithy/types": "^3.7.2", "@smithy/util-base64": "^3.0.0", "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-hex-encoding": "^3.0.0", @@ -754,13 +756,14 @@ } }, "node_modules/@aws-sdk/middleware-flexible-checksums/node_modules/@smithy/util-stream": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.2.1.tgz", - "integrity": "sha512-R3ufuzJRxSJbE58K9AEnL/uSZyVdHzud9wLS8tIbXclxKzoe09CRohj2xV8wpx5tj7ZbiJaKYcutMm1eYgz/0A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.3.3.tgz", + "integrity": "sha512-bOm0YMMxRjbI3X6QkWwADPFkh2AH2xBMQIB1IQgCsCRqXXpSJatgjUR3oxHthpYwFkw3WPkOt8VgMpJxC0rFqg==", + "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^4.0.0", - "@smithy/node-http-handler": "^3.2.5", - "@smithy/types": "^3.6.0", + "@smithy/fetch-http-handler": "^4.1.2", + "@smithy/node-http-handler": "^3.3.3", + "@smithy/types": "^3.7.2", "@smithy/util-base64": "^3.0.0", "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-hex-encoding": "^3.0.0", @@ -850,13 +853,14 @@ } }, "node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-stream": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.2.1.tgz", - "integrity": "sha512-R3ufuzJRxSJbE58K9AEnL/uSZyVdHzud9wLS8tIbXclxKzoe09CRohj2xV8wpx5tj7ZbiJaKYcutMm1eYgz/0A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.3.3.tgz", + "integrity": "sha512-bOm0YMMxRjbI3X6QkWwADPFkh2AH2xBMQIB1IQgCsCRqXXpSJatgjUR3oxHthpYwFkw3WPkOt8VgMpJxC0rFqg==", + "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^4.0.0", - "@smithy/node-http-handler": "^3.2.5", - "@smithy/types": "^3.6.0", + "@smithy/fetch-http-handler": "^4.1.2", + "@smithy/node-http-handler": "^3.3.3", + "@smithy/types": "^3.7.2", "@smithy/util-base64": "^3.0.0", "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-hex-encoding": "^3.0.0", @@ -4532,11 +4536,12 @@ "dev": true }, "node_modules/@smithy/abort-controller": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.6.tgz", - "integrity": "sha512-0XuhuHQlEqbNQZp7QxxrFTdVWdwxch4vjxYgfInF91hZFkPxf9QDrdQka0KfxFMPqLNzSw0b95uGTrLliQUavQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.9.tgz", + "integrity": "sha512-yiW0WI30zj8ZKoSYNx90no7ugVn3khlyH/z5W8qtKBtVE6awRALbhSG+2SAHA1r6bO/6M9utxYKVZ3PCJ1rWxw==", + "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.6.0", + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { @@ -4594,13 +4599,14 @@ } }, "node_modules/@smithy/core/node_modules/@smithy/util-stream": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.2.1.tgz", - "integrity": "sha512-R3ufuzJRxSJbE58K9AEnL/uSZyVdHzud9wLS8tIbXclxKzoe09CRohj2xV8wpx5tj7ZbiJaKYcutMm1eYgz/0A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.3.3.tgz", + "integrity": "sha512-bOm0YMMxRjbI3X6QkWwADPFkh2AH2xBMQIB1IQgCsCRqXXpSJatgjUR3oxHthpYwFkw3WPkOt8VgMpJxC0rFqg==", + "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^4.0.0", - "@smithy/node-http-handler": "^3.2.5", - "@smithy/types": "^3.6.0", + "@smithy/fetch-http-handler": "^4.1.2", + "@smithy/node-http-handler": "^3.3.3", + "@smithy/types": "^3.7.2", "@smithy/util-base64": "^3.0.0", "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-hex-encoding": "^3.0.0", @@ -4689,13 +4695,14 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-4.0.0.tgz", - "integrity": "sha512-MLb1f5tbBO2X6K4lMEKJvxeLooyg7guq48C2zKr4qM7F2Gpkz4dc+hdSgu77pCJ76jVqFBjZczHYAs6dp15N+g==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-4.1.2.tgz", + "integrity": "sha512-R7rU7Ae3ItU4rC0c5mB2sP5mJNbCfoDc8I5XlYjIZnquyUwec7fEo78F6DA3SmgJgkU1qTMcZJuGblxZsl10ZA==", + "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^4.1.5", - "@smithy/querystring-builder": "^3.0.8", - "@smithy/types": "^3.6.0", + "@smithy/protocol-http": "^4.1.8", + "@smithy/querystring-builder": "^3.0.11", + "@smithy/types": "^3.7.2", "@smithy/util-base64": "^3.0.0", "tslib": "^2.6.2" } @@ -4857,14 +4864,15 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.2.5.tgz", - "integrity": "sha512-PkOwPNeKdvX/jCpn0A8n9/TyoxjGZB8WVoJmm9YzsnAgggTj4CrjpRHlTQw7dlLZ320n1mY1y+nTRUDViKi/3w==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.3.3.tgz", + "integrity": "sha512-BrpZOaZ4RCbcJ2igiSNG16S+kgAc65l/2hmxWdmhyoGWHTLlzQzr06PXavJp9OBlPEG/sHlqdxjWmjzV66+BSQ==", + "license": "Apache-2.0", "dependencies": { - "@smithy/abort-controller": "^3.1.6", - "@smithy/protocol-http": "^4.1.5", - "@smithy/querystring-builder": "^3.0.8", - "@smithy/types": "^3.6.0", + "@smithy/abort-controller": "^3.1.9", + "@smithy/protocol-http": "^4.1.8", + "@smithy/querystring-builder": "^3.0.11", + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { @@ -4884,11 +4892,12 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.5.tgz", - "integrity": "sha512-hsjtwpIemmCkm3ZV5fd/T0bPIugW1gJXwZ/hpuVubt2hEUApIoUTrf6qIdh9MAWlw0vjMrA1ztJLAwtNaZogvg==", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.8.tgz", + "integrity": "sha512-hmgIAVyxw1LySOwkgMIUN0kjN8TG9Nc85LJeEmEE/cNEe2rkHDUWhnJf2gxcSRFLWsyqWsrZGw40ROjUogg+Iw==", + "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.6.0", + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { @@ -4896,11 +4905,12 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.8.tgz", - "integrity": "sha512-btYxGVqFUARbUrN6VhL9c3dnSviIwBYD9Rz1jHuN1hgh28Fpv2xjU1HeCeDJX68xctz7r4l1PBnFhGg1WBBPuA==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.11.tgz", + "integrity": "sha512-u+5HV/9uJaeLj5XTb6+IEF/dokWWkEqJ0XiaRRogyREmKGUgZnNecLucADLdauWFKUNbQfulHFEZEdjwEBjXRg==", + "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.6.0", + "@smithy/types": "^3.7.2", "@smithy/util-uri-escape": "^3.0.0", "tslib": "^2.6.2" }, @@ -4979,13 +4989,14 @@ } }, "node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.2.1.tgz", - "integrity": "sha512-R3ufuzJRxSJbE58K9AEnL/uSZyVdHzud9wLS8tIbXclxKzoe09CRohj2xV8wpx5tj7ZbiJaKYcutMm1eYgz/0A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.3.3.tgz", + "integrity": "sha512-bOm0YMMxRjbI3X6QkWwADPFkh2AH2xBMQIB1IQgCsCRqXXpSJatgjUR3oxHthpYwFkw3WPkOt8VgMpJxC0rFqg==", + "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^4.0.0", - "@smithy/node-http-handler": "^3.2.5", - "@smithy/types": "^3.6.0", + "@smithy/fetch-http-handler": "^4.1.2", + "@smithy/node-http-handler": "^3.3.3", + "@smithy/types": "^3.7.2", "@smithy/util-base64": "^3.0.0", "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-hex-encoding": "^3.0.0", @@ -4997,9 +5008,10 @@ } }, "node_modules/@smithy/types": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.6.0.tgz", - "integrity": "sha512-8VXK/KzOHefoC65yRgCn5vG1cysPJjHnOVt9d0ybFQSmJgQj152vMn4EkYhGuaOmnnZvCPav/KnYyE6/KsNZ2w==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.7.2.tgz", + "integrity": "sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -5809,10 +5821,11 @@ } }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz", - "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==", - "dev": true + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true, + "license": "MIT" }, "node_modules/@types/sizzle": { "version": "2.3.9", @@ -6166,12 +6179,10 @@ } }, "node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dependencies": { - "debug": "^4.3.4" - }, + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "license": "MIT", "engines": { "node": ">= 14" } @@ -6847,9 +6858,10 @@ } }, "node_modules/bl/node_modules/readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", + "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", + "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", @@ -7398,9 +7410,10 @@ } }, "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "license": "MIT" }, "node_modules/create-jest": { "version": "29.7.0", @@ -7553,12 +7566,6 @@ "node": "^16.0.0 || ^18.0.0 || >=20.0.0" } }, - "node_modules/cypress/node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", - "dev": true - }, "node_modules/cypress/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -7673,9 +7680,10 @@ "dev": true }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -9931,11 +9939,12 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "4" }, "engines": { @@ -10191,9 +10200,10 @@ } }, "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "license": "MIT", "dependencies": { "hasown": "^2.0.2" }, @@ -14110,17 +14120,21 @@ "dev": true }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -15605,12 +15619,6 @@ "extsprintf": "^1.2.0" } }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, "node_modules/w3c-xmlserializer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", From 7893e8b9d2a5771871ea04a2064e72319d0633ce Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 16:58:42 -0500 Subject: [PATCH 12/15] Revert "remove terraform from pre-commit-config since we don't use it" This reverts commit 6a159dce1ebc03d57d9550be518cd8ac569cb9cf. --- .pre-commit-config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index caf55f3fce..6966a7329c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,6 +29,18 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier + - repo: local + hooks: + # run `terraform fmt` if tf files are modified and terraform is installed + # when terraform is not installed, this check will succeed even if tf files + # would not pass the format check + - id: terraform-fmt + name: terraform-fmt + entry: bash -c 'if command -v terraform >/dev/null 2>&1; then terraform fmt -recursive -check operations; else exit 0; fi' + language: system + types: + - terraform + pass_filenames: false ci: autofix_commit_msg: | [pre-commit.ci] auto fixes from pre-commit hooks @@ -36,5 +48,6 @@ ci: autoupdate_branch: "" autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate" autoupdate_schedule: weekly + skip: [pretty-terraform-fmt] submodules: false exclude: examples/* From 7cc560d4fd440fa575387b41faac3eb89f53bee8 Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Thu, 26 Dec 2024 16:58:51 -0500 Subject: [PATCH 13/15] Revert "remove pretty-format-json format in favor of using prettier" This reverts commit ba72cda37d948ac6d82721206c08222f872c3d69. --- .pre-commit-config.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6966a7329c..e87889c2da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,11 @@ repos: args: [--fix] # Run the formatter. - id: ruff-format + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: pretty-format-json + args: [--autofix, --no-sort-keys] - repo: https://github.com/pre-commit/mirrors-eslint rev: "v9.16.0" hooks: @@ -29,6 +34,7 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier + types_or: [css, javascript, tsx, ts, yaml] - repo: local hooks: # run `terraform fmt` if tf files are modified and terraform is installed @@ -48,6 +54,6 @@ ci: autoupdate_branch: "" autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate" autoupdate_schedule: weekly - skip: [pretty-terraform-fmt] + skip: [pretty-format-json, terraform-fmt] submodules: false exclude: examples/* From b924e77f3e6d30e5877f585647648e8de31ee609 Mon Sep 17 00:00:00 2001 From: Boban Ljuljdjurovic Date: Fri, 27 Dec 2024 11:51:11 -0500 Subject: [PATCH 14/15] fix non exhaustive dependency warnings --- .../src/app/components/BaseFilter.tsx | 4 +- .../app/components/EcrPaginationWrapper.tsx | 2 +- .../src/app/components/EcrTableClient.tsx | 2 +- .../ecr-viewer/src/app/components/Filters.tsx | 72 +++++++++---------- .../app/view-data/components/DataDisplay.tsx | 47 ++++++------ .../ecr-viewer/src/app/view-data/page.tsx | 8 +-- 6 files changed, 68 insertions(+), 67 deletions(-) diff --git a/containers/ecr-viewer/src/app/components/BaseFilter.tsx b/containers/ecr-viewer/src/app/components/BaseFilter.tsx index 8a8e93d7c2..75bdd840ac 100644 --- a/containers/ecr-viewer/src/app/components/BaseFilter.tsx +++ b/containers/ecr-viewer/src/app/components/BaseFilter.tsx @@ -101,7 +101,9 @@ export const Filter = ({
- , - ); + return cutField; } + return ( + <> + {children}  + + + ); } - }, [hidden]); + return children; + }, [children, cutField, hidden, id, valueLength]); return fieldValue; }; diff --git a/containers/ecr-viewer/src/app/view-data/page.tsx b/containers/ecr-viewer/src/app/view-data/page.tsx index 208caa05d3..32b386f382 100644 --- a/containers/ecr-viewer/src/app/view-data/page.tsx +++ b/containers/ecr-viewer/src/app/view-data/page.tsx @@ -33,10 +33,8 @@ const ECRViewerPage: React.FC = () => { const [mappings, setMappings] = useState({}); const [errors, setErrors] = useState(); const searchParams = useSearchParams(); - const fhirId = searchParams ? (searchParams.get("id") ?? "") : ""; - const snomedCode = searchParams - ? (searchParams.get("snomed-code") ?? "") - : ""; + const fhirId = searchParams ? searchParams.get("id") ?? "" : ""; + const snomedCode = searchParams ? searchParams.get("snomed-code") ?? "" : ""; const isNonIntegratedViewer = process.env.NEXT_PUBLIC_NON_INTEGRATED_VIEWER === "true"; @@ -75,7 +73,7 @@ const ECRViewerPage: React.FC = () => { } }; fetchData(); - }, []); + }, [fhirId]); if (errors) { if (errors.status === 404) { From 8e2a37f009482221c140967f24ac502a5f7fe275 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 16:51:49 +0000 Subject: [PATCH 15/15] [pre-commit.ci] auto fixes from pre-commit hooks --- containers/ecr-viewer/src/app/view-data/page.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/containers/ecr-viewer/src/app/view-data/page.tsx b/containers/ecr-viewer/src/app/view-data/page.tsx index 32b386f382..6e12558284 100644 --- a/containers/ecr-viewer/src/app/view-data/page.tsx +++ b/containers/ecr-viewer/src/app/view-data/page.tsx @@ -33,8 +33,10 @@ const ECRViewerPage: React.FC = () => { const [mappings, setMappings] = useState({}); const [errors, setErrors] = useState(); const searchParams = useSearchParams(); - const fhirId = searchParams ? searchParams.get("id") ?? "" : ""; - const snomedCode = searchParams ? searchParams.get("snomed-code") ?? "" : ""; + const fhirId = searchParams ? (searchParams.get("id") ?? "") : ""; + const snomedCode = searchParams + ? (searchParams.get("snomed-code") ?? "") + : ""; const isNonIntegratedViewer = process.env.NEXT_PUBLIC_NON_INTEGRATED_VIEWER === "true";