Skip to content

Commit

Permalink
chore(deps): bumped Typescript version (#2797)
Browse files Browse the repository at this point in the history
* feat: Bumped Typescript version to 5.7.2

Signed-off-by: ivaylogarnev-limechain <[email protected]>

* fix: Ignored buffer type error

Signed-off-by: ivaylogarnev-limechain <[email protected]>

* chore: Bumped cryptography package typescript version and ignored/fixed some type errors

Signed-off-by: ivaylogarnev-limechain <[email protected]>

* chore: Bumped TypeScript version to 5.7.2 for the proto package

Signed-off-by: ivaylogarnev-limechain <[email protected]>

* fix: Fixed packages versions

Signed-off-by: ivaylogarnev-limechain <[email protected]>

---------

Signed-off-by: ivaylogarnev-limechain <[email protected]>
  • Loading branch information
ivaylogarnev-limechain authored Jan 21, 2025
1 parent 2c26ed0 commit 4d085ea
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"nyc": "^15.1.0",
"prettier": "^3.0.3",
"typedoc": "^0.25.1",
"typescript": "5.5.4"
"typescript": "^5.7.2"
}
}
2 changes: 1 addition & 1 deletion examples/react-native-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@types/react": "~18.2.14",
"@types/react-native": "~0.71.8",
"react-native-dotenv": "^3.4.9",
"typescript": "5.5.4"
"typescript": "^5.7.2"
},
"private": true
}
2 changes: 1 addition & 1 deletion examples/simple_rest_signature_provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"mocha": "~10.6.0",
"prettier": "^3.0.3",
"typedoc": "^0.25.1",
"typescript": "5.5.4",
"typescript": "^5.7.2",
"vite": "~3.2.11"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
"nyc": "^17.1.0",
"prettier": "^3.0.3",
"sinon": "^19.0.2",
"typescript": "^5.7.2",
"typedoc": "^0.27.6",
"typescript": "5.5.4",
"vite": "^5.3.5",
"yalc": "1.0.0-pre.53"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cryptography/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"npx": "^10.2.2",
"prettier": "^3.0.3",
"serve": "^14.1.2",
"typescript": "5.5.4",
"typescript": "^5.7.2",
"vite": "^4.5.3"
}
}
1 change: 1 addition & 0 deletions packages/cryptography/src/EcdsaPrivateKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default class EcdsaPrivateKey {
* @returns {EcdsaPrivateKey}
*/
static fromBytesDer(data) {
/** @type {Uint8Array} */
let ecdsaPrivateKeyBytes = new Uint8Array();

if (arrayStartsWith(data, derPrefixBytes)) {
Expand Down
1 change: 1 addition & 0 deletions packages/cryptography/src/EcdsaPublicKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default class EcdsaPublicKey extends Key {
* @returns {EcdsaPublicKey}
*/
static fromBytesDer(data) {
/** @type {Uint8Array} */
let ecdsaPublicKeyBytes = new Uint8Array();

switch (data.length) {
Expand Down
1 change: 1 addition & 0 deletions packages/cryptography/src/Ed25519PrivateKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default class Ed25519PrivateKey {
* @returns {Ed25519PrivateKey}
*/
static fromBytesDer(data) {
// @ts-ignore
const asn = forge.asn1.fromDer(new forge.util.ByteStringBuffer(data));

/** * @type {Uint8Array} */
Expand Down
1 change: 1 addition & 0 deletions packages/cryptography/src/Ed25519PublicKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default class Ed25519PublicKey extends Key {
* @returns {Ed25519PublicKey}
*/
static fromBytesDer(data) {
// @ts-ignore
const asn = forge.asn1.fromDer(new forge.util.ByteStringBuffer(data));

/** * @type {Uint8Array} */
Expand Down
1 change: 1 addition & 0 deletions packages/cryptography/src/primitive/aes.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export async function messageDigest(passphrase, iv) {
const pass = utf8.encode(passphrase);
const sliced = hex.decode(iv).slice(0, 8);
const result = SparkMD5.ArrayBuffer.hash(
// @ts-ignore
Buffer.concat([Buffer.from(pass), Buffer.from(sliced)]),
);

Expand Down
1 change: 1 addition & 0 deletions packages/cryptography/src/primitive/aes.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export async function messageDigest(passphrase, iv) {
const pass = utf8.encode(passphrase);
const sliced = hex.decode(iv).slice(0, 8);
const result = SparkMD5.ArrayBuffer.hash(
// @ts-ignore
Buffer.concat([Buffer.from(pass), Buffer.from(sliced)]),
);

Expand Down
2 changes: 1 addition & 1 deletion packages/proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"replace-in-file": "^8.3.0",
"semver": "^7.3.8",
"tmp": "^0.2.1",
"typescript": "5.5.4",
"typescript": "^5.7.2",
"protobufjs-cli": "^1.0.2"
}
}
3 changes: 2 additions & 1 deletion packages/proto/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src"]
"include": ["src"],
"exclude": ["src/proto.js"]
}
1 change: 1 addition & 0 deletions src/channel/NativeChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export default class NativeChannel extends Channel {
}

const unaryResponse = decodeUnaryResponse(
// @ts-ignore
responseBuffer.buffer,
responseBuffer.byteOffset,
responseBuffer.byteLength,
Expand Down

0 comments on commit 4d085ea

Please sign in to comment.