Skip to content

Commit 258b18c

Browse files
committed
deps: Upgrade karma & ava to get rid of critical vulnerabilities
Upgrade various dependencies to get rid of critical vulnerabilities in dependencies as reported by `pnpm audit`: - Remove obsolete ava and source-map-support root dev dependencies - Upgrade ava dependencies to ^6.1.2 and adapt tests and config accordingly - Completely remove obsolete source-map-support dep from vanilla-renderers - Upgrade karma dependencies to ^6.4.1 and karma-webpack to ^5.0.0
1 parent 652d622 commit 258b18c

File tree

12 files changed

+4739
-15017
lines changed

12 files changed

+4739
-15017
lines changed

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"@types/lodash": "^4.14.149",
2929
"ajv": "^8.6.1",
3030
"ajv-formats": "^2.1.0",
31-
"ava": "~2.4.0",
3231
"babel-loader": "^8.0.6",
3332
"core-js": "^3.9.1",
3433
"coveralls": "^3.0.9",
@@ -41,7 +40,6 @@
4140
"nyc": "^15.1.0",
4241
"prettier": "^2.8.4",
4342
"source-map-loader": "^0.2.4",
44-
"source-map-support": "0.5.16",
4543
"style-loader": "^1.0.1",
4644
"ts-loader": "^9.5.1",
4745
"ts-node": "^10.4.0",

packages/angular-test/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
"eslint-plugin-prettier": "^4.2.1",
2828
"jasmine": "^3.99.0",
2929
"jasmine-spec-reporter": "^4.2.1",
30-
"karma": "^3.1.4",
30+
"karma": "^6.4.1",
3131
"karma-chrome-launcher": "^3.2.0",
3232
"karma-coverage-istanbul-reporter": "^2.1.1",
3333
"karma-jasmine": "^2.0.1",
3434
"karma-sourcemap-loader": "^0.3.8",
35-
"karma-webpack": "^4.0.2",
35+
"karma-webpack": "^5.0.0",
3636
"prettier": "^2.8.4",
3737
"tslib": "^2.3.0",
3838
"typescript": "~4.9.5"

packages/angular/.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,12 @@ module.exports = {
3333
caughtErrorsIgnorePattern: '^_',
3434
},
3535
],
36+
'import/no-unresolved': [
37+
'error',
38+
{
39+
// Ignore ava import because it is incorrectly reported as unresolved despite working as expected.
40+
ignore: ['^ava$'],
41+
},
42+
],
3643
},
3744
};

packages/angular/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,12 @@
5555
"files": [
5656
"test/**/*"
5757
],
58-
"compileEnhancements": false,
5958
"extensions": [
6059
"ts"
6160
],
6261
"require": [
6362
"./test-config/ts-node.config.js",
64-
"source-map-support/register"
63+
"source-map-support/register.js"
6564
]
6665
},
6766
"dependencies": {
@@ -85,7 +84,7 @@
8584
"@jsonforms/core": "workspace:*",
8685
"@typescript-eslint/eslint-plugin": "^5.54.1",
8786
"@typescript-eslint/parser": "^5.54.1",
88-
"ava": "~2.4.0",
87+
"ava": "^6.1.2",
8988
"copy-webpack-plugin": "^5.0.5",
9089
"eslint": "^8.56.0",
9190
"eslint-config-prettier": "^8.7.0",
@@ -96,6 +95,7 @@
9695
"prettier": "^2.8.4",
9796
"rimraf": "^3.0.2",
9897
"rxjs": "^6.6.0",
98+
"source-map-support": "^0.5.21",
9999
"tslib": "^2.3.0",
100100
"typedoc": "~0.25.3",
101101
"typescript": "~4.9.5"

packages/core/.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,12 @@ module.exports = {
3131
caughtErrorsIgnorePattern: '^_',
3232
},
3333
],
34+
'import/no-unresolved': [
35+
'error',
36+
{
37+
// Ignore ava import because it is incorrectly reported as unresolved despite working as expected.
38+
ignore: ['^ava$'],
39+
},
40+
],
3441
},
3542
};

packages/core/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,12 @@
5050
"files": [
5151
"test/**/*"
5252
],
53-
"compileEnhancements": false,
5453
"extensions": [
5554
"ts"
5655
],
5756
"require": [
5857
"./test-config/ts-node.config.js",
59-
"source-map-support/register"
58+
"source-map-support/register.js"
6059
]
6160
},
6261
"nyc": {
@@ -76,7 +75,7 @@
7675
"@types/redux-mock-store": "^1.0.1",
7776
"@typescript-eslint/eslint-plugin": "^5.54.1",
7877
"@typescript-eslint/parser": "^5.54.1",
79-
"ava": "~2.4.0",
78+
"ava": "^6.1.2",
8079
"document-register-element": "^1.14.3",
8180
"eslint": "^8.56.0",
8281
"eslint-config-prettier": "^8.7.0",
@@ -93,7 +92,7 @@
9392
"rollup-plugin-cleanup": "^3.2.1",
9493
"rollup-plugin-typescript2": "^0.34.1",
9594
"rollup-plugin-visualizer": "^5.4.1",
96-
"source-map-support": "0.5.16",
95+
"source-map-support": "^0.5.21",
9796
"ts-node": "^10.4.0",
9897
"tslib": "^2.5.0",
9998
"typedoc": "~0.25.3",

packages/core/test/testers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2323
THE SOFTWARE.
2424
*/
25-
import anyTest, { TestInterface } from 'ava';
25+
import anyTest, { TestFn } from 'ava';
2626
import {
2727
and,
2828
formatIs,
@@ -57,7 +57,7 @@ import {
5757
hasOption,
5858
} from '../src';
5959

60-
const test = anyTest as TestInterface<{ uischema: ControlElement }>;
60+
const test = anyTest as TestFn<{ uischema: ControlElement }>;
6161

6262
const createTesterContext = (
6363
rootSchema: JsonSchema,

packages/core/test/util/array.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { moveDown, moveUp } from '../../src/util/';
2-
import anyTest, { TestInterface } from 'ava';
2+
import anyTest, { TestFn } from 'ava';
33

4-
const test = anyTest as TestInterface<{ array: number[] }>;
4+
const test = anyTest as TestFn<{ array: number[] }>;
55

66
test.beforeEach((t) => {
77
t.context.array = [1, 2, 3, 4, 5];

packages/core/test/util/derivetype.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ test('derive type with type - union', (t) => {
8787
type: ['string', 'number'],
8888
};
8989
t.is(deriveTypes(schema).length, 2);
90-
t.is(deriveTypes(schema), schema.type);
90+
t.is(deriveTypes(schema), schema.type as string[]);
9191
});
9292

9393
test('derive type with type - allOf first has type', (t) => {

packages/vanilla-renderers/.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,12 @@ module.exports = {
3131
caughtErrorsIgnorePattern: '^_',
3232
},
3333
],
34+
'import/no-unresolved': [
35+
'error',
36+
{
37+
// Ignore ava import because it is incorrectly reported as unresolved despite working as expected.
38+
ignore: ['^ava$'],
39+
},
40+
],
3441
},
3542
};

0 commit comments

Comments
 (0)