Skip to content

Commit 115e428

Browse files
committed
Upgrade package dependencies
1 parent 0248845 commit 115e428

File tree

16 files changed

+2194
-1328
lines changed

16 files changed

+2194
-1328
lines changed

.husky/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.husky/pre-commit

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npm run lint
5-
# npm run test

package-lock.json

Lines changed: 2148 additions & 1277 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@
3232
"test": "jest",
3333
"coverage": "npm run test -- --coverage",
3434
"ci": "npm run lint && npm run coverage",
35-
"prepare": "husky install"
35+
"prepare": "husky"
3636
},
3737
"devDependencies": {
38-
"@babel/cli": "7.20.7",
39-
"@babel/preset-env": "7.20.2",
40-
"@types/jest": "29.4.0",
41-
"eslint": "8.33.0",
42-
"eslint-config-airbnb": "19.0.4",
43-
"eslint-plugin-import": "2.27.5",
44-
"eslint-plugin-jest": "27.2.1",
45-
"eslint-plugin-jsx-a11y": "6.7.1",
46-
"husky": "8.0.3",
47-
"jest": "29.4.1",
38+
"@babel/cli": "^7.28.6",
39+
"@babel/preset-env": "^7.29.0",
40+
"@types/jest": "^30.0.0",
41+
"eslint": "^8.57.1",
42+
"eslint-config-airbnb": "^19.0.4",
43+
"eslint-plugin-import": "^2.32.0",
44+
"eslint-plugin-jest": "^27.9.0",
45+
"eslint-plugin-jsx-a11y": "^6.10.2",
46+
"husky": "^9.1.7",
47+
"jest": "^30.2.0",
4848
"pngjs": "^7.0.0"
4949
},
5050
"engines": {

src/algorithms/cryptography/hill-cipher/_test_/hillCipher.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { hillCipherEncrypt, hillCipherDecrypt } from '../hillCipher';
22

33
describe('hillCipher', () => {
44
it('should throw an exception when trying to decipher', () => {
5-
expect(hillCipherDecrypt).toThrowError('This method is not implemented yet');
5+
expect(hillCipherDecrypt).toThrow('This method is not implemented yet');
66
});
77

88
it('should throw an error when message or keyString contains none letter character', () => {
@@ -12,10 +12,10 @@ describe('hillCipher', () => {
1212
const invalidCharacterInKeyString = () => {
1313
hillCipherEncrypt('hello', 'hel12world');
1414
};
15-
expect(invalidCharacterInMessage).toThrowError(
15+
expect(invalidCharacterInMessage).toThrow(
1616
'The message and key string can only contain letters',
1717
);
18-
expect(invalidCharacterInKeyString).toThrowError(
18+
expect(invalidCharacterInKeyString).toThrow(
1919
'The message and key string can only contain letters',
2020
);
2121
});
@@ -24,7 +24,7 @@ describe('hillCipher', () => {
2424
const invalidLengthOfKeyString = () => {
2525
hillCipherEncrypt('ab', 'ab');
2626
};
27-
expect(invalidLengthOfKeyString).toThrowError(
27+
expect(invalidLengthOfKeyString).toThrow(
2828
'Invalid key string length. The square root of the key string must be an integer',
2929
);
3030
});
@@ -33,7 +33,7 @@ describe('hillCipher', () => {
3333
const invalidLengthOfKeyString = () => {
3434
hillCipherEncrypt('ab', 'aaabbbccc');
3535
};
36-
expect(invalidLengthOfKeyString).toThrowError(
36+
expect(invalidLengthOfKeyString).toThrow(
3737
'Invalid key string length. The key length must be a square of message length',
3838
);
3939
});

src/algorithms/graph/eulerian-path/__test__/eulerianPath.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('eulerianPath', () => {
3030
eulerianPath(graph);
3131
}
3232

33-
expect(findEulerianPathInNotEulerianGraph).toThrowError();
33+
expect(findEulerianPathInNotEulerianGraph).toThrow();
3434
});
3535

3636
it('should find Eulerian Circuit in graph', () => {

src/algorithms/graph/kruskal/__test__/kruskal.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('kruskal', () => {
1111
kruskal(graph);
1212
}
1313

14-
expect(applyPrimToDirectedGraph).toThrowError();
14+
expect(applyPrimToDirectedGraph).toThrow();
1515
});
1616

1717
it('should find minimum spanning tree', () => {

src/algorithms/graph/prim/__test__/prim.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('prim', () => {
1111
prim(graph);
1212
}
1313

14-
expect(applyPrimToDirectedGraph).toThrowError();
14+
expect(applyPrimToDirectedGraph).toThrow();
1515
});
1616

1717
it('should find minimum spanning tree', () => {

src/algorithms/math/euclidean-distance/__tests__/euclideanDistance.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ describe('euclideanDistance', () => {
1212
});
1313

1414
it('should throw an error in case if two matrices are of different shapes', () => {
15-
expect(() => euclideanDistance([[1]], [[[2]]])).toThrowError(
15+
expect(() => euclideanDistance([[1]], [[[2]]])).toThrow(
1616
'Matrices have different dimensions',
1717
);
1818

19-
expect(() => euclideanDistance([[1]], [[2, 3]])).toThrowError(
19+
expect(() => euclideanDistance([[1]], [[2, 3]])).toThrow(
2020
'Matrices have different shapes',
2121
);
2222
});

src/algorithms/math/matrix/__tests__/Matrix.test.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ describe('Matrix', () => {
44
it('should throw when trying to add matrices of invalid shapes', () => {
55
expect(
66
() => mtrx.dot([0], [1]),
7-
).toThrowError('Invalid matrix format');
7+
).toThrow('Invalid matrix format');
88
expect(
99
() => mtrx.dot([[0]], [1]),
10-
).toThrowError('Invalid matrix format');
10+
).toThrow('Invalid matrix format');
1111
expect(
1212
() => mtrx.dot([[[0]]], [[1]]),
13-
).toThrowError('Matrix is not of 2D shape');
13+
).toThrow('Matrix is not of 2D shape');
1414
expect(
1515
() => mtrx.dot([[0]], [[1], [2]]),
16-
).toThrowError('Matrices have incompatible shape for multiplication');
16+
).toThrow('Matrices have incompatible shape for multiplication');
1717
});
1818

1919
it('should calculate matrices dimensions', () => {
@@ -252,7 +252,7 @@ describe('Matrix', () => {
252252
it('should throw when trying to transpose non 2D matrix', () => {
253253
expect(() => {
254254
mtrx.t([[[1]]]);
255-
}).toThrowError('Matrix is not of 2D shape');
255+
}).toThrow('Matrix is not of 2D shape');
256256
});
257257

258258
it('should add two matrices', () => {
@@ -316,11 +316,11 @@ describe('Matrix', () => {
316316
});
317317

318318
it('should throw when trying to add matrices of different shape', () => {
319-
expect(() => mtrx.add([[0]], [[[0]]])).toThrowError(
319+
expect(() => mtrx.add([[0]], [[[0]]])).toThrow(
320320
'Matrices have different dimensions',
321321
);
322322

323-
expect(() => mtrx.add([[0]], [[0, 0]])).toThrowError(
323+
expect(() => mtrx.add([[0]], [[0, 0]])).toThrow(
324324
'Matrices have different shapes',
325325
);
326326
});
@@ -380,11 +380,11 @@ describe('Matrix', () => {
380380
});
381381

382382
it('should throw when trying to multiply matrices element-wise of different shape', () => {
383-
expect(() => mtrx.mul([[0]], [[[0]]])).toThrowError(
383+
expect(() => mtrx.mul([[0]], [[[0]]])).toThrow(
384384
'Matrices have different dimensions',
385385
);
386386

387-
expect(() => mtrx.mul([[0]], [[0, 0]])).toThrowError(
387+
expect(() => mtrx.mul([[0]], [[0, 0]])).toThrow(
388388
'Matrices have different shapes',
389389
);
390390
});
@@ -444,11 +444,11 @@ describe('Matrix', () => {
444444
});
445445

446446
it('should throw when trying to subtract matrices element-wise of different shape', () => {
447-
expect(() => mtrx.sub([[0]], [[[0]]])).toThrowError(
447+
expect(() => mtrx.sub([[0]], [[[0]]])).toThrow(
448448
'Matrices have different dimensions',
449449
);
450450

451-
expect(() => mtrx.sub([[0]], [[0, 0]])).toThrowError(
451+
expect(() => mtrx.sub([[0]], [[0, 0]])).toThrow(
452452
'Matrices have different shapes',
453453
);
454454
});

0 commit comments

Comments
 (0)