From ee15f7135a5c630e6bd839fdabbd474cd6c01e69 Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Tue, 2 Apr 2024 13:01:37 -0400 Subject: [PATCH] Fix typing, re-add linting --- .github/workflows/ci.yaml | 2 +- package-lock.json | 4 ++-- src/lib/utils.ts | 7 +------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 273db4d..28295dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,6 +20,6 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm ci - # - run: npm run lint + - run: npm run lint - run: npm run test - run: npm run build diff --git a/package-lock.json b/package-lock.json index 7c06baf..57ff418 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "warcio", - "version": "2.2.0", + "version": "2.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "warcio", - "version": "2.2.0", + "version": "2.2.1", "license": "Apache-2.0", "dependencies": { "base32-encode": "^2.0.0", diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 540b177..b3e0921 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -163,12 +163,7 @@ export function jsonToQueryParams(json: string | any, ignoreInvalid = true) { // if object, attempt to recurse through key/value pairs if (typeof(jsonObj) === "object" && !(jsonObj instanceof Array)) { try { - const keys = Object.keys(jsonObj); - for (let i=0; i < keys.length; i++) { - // @ts-ignore - const key = keys[i]; - // @ts-ignore - const value = jsonObj[key]; + for (const [key, value] of Object.entries(jsonObj)) { parser(value, key); } } catch (e) {