Skip to content

Commit

Permalink
Update npm dependencies to resolve dependabot alerts (#5844)
Browse files Browse the repository at this point in the history
* Update npm dependencies

* Update deprecated version of CodeQL Action

* Add tailwind eslint and prettier

* run prettier and fix eslint errors

* fix eslint rules

* Fix cypress test

* add tailwind rules

* Fix patient card

* fix prescription dropdown

* Force type dosage
  • Loading branch information
Ashesh3 committed Jul 25, 2023
1 parent cb055ff commit 4bc182d
Show file tree
Hide file tree
Showing 272 changed files with 10,165 additions and 5,352 deletions.
11 changes: 9 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:i18next/recommended"
"plugin:i18next/recommended",
"plugin:tailwindcss/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand Down Expand Up @@ -53,8 +54,14 @@
"exclude": [".*"]
}
}
]
],
"tailwindcss/no-custom-classname": "off",
"tailwindcss/migration-from-tailwind-2": "error",
"tailwindcss/classnames-order": "error",
"tailwindcss/enforces-shorthand": "error",
"tailwindcss/no-contradicting-classname": "error"
},

"ignorePatterns": [
"dist",
"public",
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
credentials: ${{ secrets.GKE_SA_KEY }}

- name: install kubectl
uses: azure/setup-kubectl@v2.0
uses: azure/setup-kubectl@v3.0
with:
version: "v1.23.6"
id: install
Expand Down Expand Up @@ -252,7 +252,7 @@ jobs:
credentials: ${{ secrets.GKE_SA_KEY }}

- name: install kubectl
uses: azure/setup-kubectl@v2.0
uses: azure/setup-kubectl@v3.0
with:
version: "v1.23.6"
id: install
Expand Down Expand Up @@ -294,7 +294,7 @@ jobs:
credentials: ${{ secrets.GKE_SA_KEY }}

- name: install kubectl
uses: azure/setup-kubectl@v2.0
uses: azure/setup-kubectl@v3.0
with:
version: "v1.23.6"
id: install
Expand Down Expand Up @@ -336,7 +336,7 @@ jobs:
credentials: ${{ secrets.GKE_SA_KEY }}

- name: install kubectl
uses: azure/setup-kubectl@v2.0
uses: azure/setup-kubectl@v3.0
with:
version: "v1.23.6"
id: install
Expand Down Expand Up @@ -378,7 +378,7 @@ jobs:
credentials: ${{ secrets.GKE_SA_KEY }}

- name: install kubectl
uses: azure/setup-kubectl@v2.0
uses: azure/setup-kubectl@v3.0
with:
version: "v1.23.6"
id: install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ossar-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:

# Upload results to the Security tab
- name: Upload OSSAR results
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.ossar.outputs.sarifFile }}
18 changes: 12 additions & 6 deletions .husky/_/husky.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/sh
#!/usr/bin/env sh
if [ -z "$husky_skip_init" ]; then
debug () {
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1"
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}

readonly hook_name="$(basename "$0")"
readonly hook_name="$(basename -- "$0")"
debug "starting $hook_name..."

if [ "$HUSKY" = "0" ]; then
Expand All @@ -17,14 +19,18 @@ if [ -z "$husky_skip_init" ]; then
. ~/.huskyrc
fi

export readonly husky_skip_init=1
readonly husky_skip_init=1
export husky_skip_init
sh -e "$0" "$@"
exitCode="$?"

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
exit $exitCode
fi

exit 0
if [ $exitCode = 127 ]; then
echo "husky - command not found in PATH=$PATH"
fi

exit $exitCode
fi
3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"tabWidth": 2,
"semi": true,
"jsxSingleQuote": false,
"arrowParens": "always"
"arrowParens": "always",
"tailwindFunctions": ["classNames"]
}
12 changes: 11 additions & 1 deletion cypress/e2e/external_results_spec/external_result.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@ describe("Edit Profile Testing", () => {
});

it("export", () => {
cy.intercept("/api/v1/external_result/?csv=true&").as("export");
cy.intercept("**", (req: Cypress.Request) => {
const url = new URL(req.url);
const params = new URLSearchParams(url.search);
if (
req.method === "GET" &&
url.pathname === "/api/v1/external_result/" &&
params.get("csv") === "true"
) {
req.alias = "export";
}
});
cy.contains("Import/Export").click().wait(100);
cy.contains("Export Results").click();
cy.wait("@export").then((interception) => {
Expand Down
7 changes: 2 additions & 5 deletions cypress/e2e/patient_spec/patient_crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,8 @@ describe("Patient Creation with consultation", () => {
cy.get("div#medicine_object input[placeholder='Select'][role='combobox']")
.click()
.type("dolo");
cy.get("div#medicine_object [role='option']")
.contains("DOLO")
.should("be.visible")
.click();
cy.get("#dosage").click().type("3");
cy.get("#medicine_object-option-DOLO").click();
cy.get("#dosage").type("3", { force: true });
cy.get("#frequency")
.click()
.then(() => {
Expand Down
Loading

0 comments on commit 4bc182d

Please sign in to comment.