Skip to content

Commit cf84039

Browse files
authored
Typescript and eslint upgrade (#828)
* fix: ugpraded typescript to 4.5.4 fix: upraded lint, prettier, and plugins to latests fix: new warnings and errors. * fix: updated typedoc to the latest typescript compatible
1 parent bb27571 commit cf84039

File tree

9 files changed

+1104
-807
lines changed

9 files changed

+1104
-807
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
22
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
3+
plugins: ['@typescript-eslint/eslint-plugin'],
34
extends: [
45
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
5-
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
66
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
77
],
88
parserOptions: {

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
44

55
The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [1.0.4] - NEXY
8+
9+
**Milestone**: Symbol Mainnet
10+
Package | Version | Link
11+
---|---|---
12+
SDK Core| v1.0.4 | [symbol-sdk](https://www.npmjs.com/package/symbol-sdk)
13+
Catbuffer | v1.0.1 | [catbuffer-typescript](https://www.npmjs.com/package/catbuffer-typescript)
14+
Client Library | v1.0.3 | [symbol-openapi-typescript-fetch-client](https://www.npmjs.com/package/symbol-openapi-typescript-fetch-client)
15+
16+
- fix: Upgraded Node to 12.22.1.
17+
- fix: Upgraded typescript to 4.5.4.
18+
719
## [1.0.3] - 16-Nov-2021
820

921
**Milestone**: Symbol Mainnet

e2e/infrastructure/IntegrationTestHelper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ export class IntegrationTestHelper {
129129
.toPromise();
130130
}
131131

132-
public static sleep(ms: number): Promise<any> {
132+
public static sleep(ms: number): Promise<void> {
133133
// Create a promise that rejects in <ms> milliseconds
134134
return new Promise((resolve) => {
135135
setTimeout(() => {
136-
resolve();
136+
resolve(undefined);
137137
}, ms);
138138
});
139139
}

e2e/infrastructure/Listener.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,11 @@ describe('Listener', () => {
302302
.search(criteria)
303303
.pipe(
304304
mergeMap((page) => {
305-
return transactionRepository.getTransaction(page.data[0].transactionInfo?.hash!, TransactionGroup.Partial);
305+
const hash = page.data[0].transactionInfo?.hash;
306+
if (!hash) {
307+
throw new Error('Hash must be defined!');
308+
}
309+
return transactionRepository.getTransaction(hash, TransactionGroup.Partial);
306310
}),
307311
)
308312
.subscribe((transactions) => {

e2e/infrastructure/TransactionHttp.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,10 @@ describe('TransactionHttp', () => {
14121412
it('should return transaction info given transactionHash', async () => {
14131413
const transaction = await transactionRepository.getTransaction(transactionHash, TransactionGroup.Confirmed).toPromise();
14141414
expect(transaction.transactionInfo!.hash).to.be.equal(transactionHash);
1415-
transactionId = transaction.transactionInfo?.id!;
1415+
if (!transaction.transactionInfo?.id) {
1416+
throw new Error('transactionId must be defined');
1417+
}
1418+
transactionId = transaction.transactionInfo?.id;
14161419
});
14171420

14181421
it('should return transaction info given transactionId', async () => {

0 commit comments

Comments
 (0)