Skip to content

Commit

Permalink
Update non-major-devDependencies (#250)
Browse files Browse the repository at this point in the history
* Update non-major-devDependencies

* Disable @typescript-eslint/consistent-return rule, handle preProcessing validation error

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Emanuel Tesař <[email protected]>
  • Loading branch information
renovate[bot] and Siegrift authored Mar 7, 2024
1 parent d5bc055 commit d2af1a3
Show file tree
Hide file tree
Showing 6 changed files with 249 additions and 239 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ module.exports = {
'@typescript-eslint/max-params': 'off', // It is sometimes necessary to have enough arguments. This rule is too strict.

'@typescript-eslint/prefer-nullish-coalescing': 'off', // This rule throws an error with ESLint plugin and parser @6.19.0.
'@typescript-eslint/consistent-return': 'off', // Triggers multiple false positives, e.g. in exhaustive switch cases or zod transformations.
},
};
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"devDependencies": {
"@api3/commons": "^0.7.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.19",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"eslint": "^8.56.0",
"@types/node": "^20.11.22",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"husky": "^9.0.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-feed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"devDependencies": {
"@types/express": "^4.17.21",
"@types/lodash": "^4.14.202",
"nodemon": "^3.0.3"
"nodemon": "^3.1.0"
}
}
13 changes: 11 additions & 2 deletions packages/airnode-feed/src/validation/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
preProcessEndpointParameters,
} from '@api3/commons';
import { oisSchema, type OIS, type Endpoint as oisEndpoint } from '@api3/ois';
import { goSync } from '@api3/promise-utils';
import { go, goSync } from '@api3/promise-utils';
import { ethers } from 'ethers';
import { isNil, uniqWith, isEqual } from 'lodash';
import { z, type SuperRefinement } from 'zod';
Expand Down Expand Up @@ -203,7 +203,16 @@ const validateTriggerReferences: SuperRefinement<{
};
}, {});

return preProcessEndpointParameters(oisEndpoint, endpointParameters);
const goPreProcess = await go(async () => preProcessEndpointParameters(oisEndpoint, endpointParameters));
if (!goPreProcess.success) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: `Unable to pre-process endpoint parameters: ${goPreProcess.error.message}`,
path: ['templates', templateId, 'parameters'],
});
return;
}
return goPreProcess.data;
});

const operationsPayloads = await Promise.all(operationPayloadPromises);
Expand Down
2 changes: 1 addition & 1 deletion packages/signed-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@types/express": "^4.17.21",
"@types/lodash": "^4.14.202",
"nodemon": "^3.0.3",
"nodemon": "^3.1.0",
"ts-node": "^10.9.2"
},
"dependencies": {
Expand Down
Loading

0 comments on commit d2af1a3

Please sign in to comment.