Skip to content

Commit d2af1a3

Browse files
Update non-major-devDependencies (#250)
* 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]>
1 parent d5bc055 commit d2af1a3

File tree

6 files changed

+249
-239
lines changed

6 files changed

+249
-239
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ module.exports = {
88
'@typescript-eslint/max-params': 'off', // It is sometimes necessary to have enough arguments. This rule is too strict.
99

1010
'@typescript-eslint/prefer-nullish-coalescing': 'off', // This rule throws an error with ESLint plugin and parser @6.19.0.
11+
'@typescript-eslint/consistent-return': 'off', // Triggers multiple false positives, e.g. in exhaustive switch cases or zod transformations.
1112
},
1213
};

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
"devDependencies": {
2727
"@api3/commons": "^0.7.0",
2828
"@types/jest": "^29.5.12",
29-
"@types/node": "^20.11.19",
30-
"@typescript-eslint/eslint-plugin": "^7.0.1",
31-
"@typescript-eslint/parser": "^7.0.1",
32-
"eslint": "^8.56.0",
29+
"@types/node": "^20.11.22",
30+
"@typescript-eslint/eslint-plugin": "^7.1.0",
31+
"@typescript-eslint/parser": "^7.1.0",
32+
"eslint": "^8.57.0",
3333
"eslint-plugin-import": "^2.29.1",
3434
"eslint-plugin-jest": "^27.9.0",
3535
"husky": "^9.0.11",

packages/airnode-feed/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@
4040
"devDependencies": {
4141
"@types/express": "^4.17.21",
4242
"@types/lodash": "^4.14.202",
43-
"nodemon": "^3.0.3"
43+
"nodemon": "^3.1.0"
4444
}
4545
}

packages/airnode-feed/src/validation/schema.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
preProcessEndpointParameters,
99
} from '@api3/commons';
1010
import { oisSchema, type OIS, type Endpoint as oisEndpoint } from '@api3/ois';
11-
import { goSync } from '@api3/promise-utils';
11+
import { go, goSync } from '@api3/promise-utils';
1212
import { ethers } from 'ethers';
1313
import { isNil, uniqWith, isEqual } from 'lodash';
1414
import { z, type SuperRefinement } from 'zod';
@@ -203,7 +203,16 @@ const validateTriggerReferences: SuperRefinement<{
203203
};
204204
}, {});
205205

206-
return preProcessEndpointParameters(oisEndpoint, endpointParameters);
206+
const goPreProcess = await go(async () => preProcessEndpointParameters(oisEndpoint, endpointParameters));
207+
if (!goPreProcess.success) {
208+
ctx.addIssue({
209+
code: z.ZodIssueCode.custom,
210+
message: `Unable to pre-process endpoint parameters: ${goPreProcess.error.message}`,
211+
path: ['templates', templateId, 'parameters'],
212+
});
213+
return;
214+
}
215+
return goPreProcess.data;
207216
});
208217

209218
const operationsPayloads = await Promise.all(operationPayloadPromises);

packages/signed-api/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"devDependencies": {
2626
"@types/express": "^4.17.21",
2727
"@types/lodash": "^4.14.202",
28-
"nodemon": "^3.0.3",
28+
"nodemon": "^3.1.0",
2929
"ts-node": "^10.9.2"
3030
},
3131
"dependencies": {

0 commit comments

Comments
 (0)