Skip to content

Commit 7df07cc

Browse files
committed
deps: Upgrade karma and ava to get rid of critical vulnerabilities in deps
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 - Replace source-map-support with later fork @cspotcode/source-map-support - 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 7df07cc

File tree

11 files changed

+4730
-15008
lines changed

11 files changed

+4730
-15008
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/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+
"@cspotcode/source-map-support/register.js"
6564
]
6665
},
6766
"dependencies": {
@@ -82,10 +81,11 @@
8281
"@angular/compiler-cli": "^16.0.0",
8382
"@angular/core": "^16.0.0",
8483
"@angular/forms": "^16.0.0",
84+
"@cspotcode/source-map-support": "^0.8.1",
8585
"@jsonforms/core": "workspace:*",
8686
"@typescript-eslint/eslint-plugin": "^5.54.1",
8787
"@typescript-eslint/parser": "^5.54.1",
88-
"ava": "~2.4.0",
88+
"ava": "^6.1.2",
8989
"copy-webpack-plugin": "^5.0.5",
9090
"eslint": "^8.56.0",
9191
"eslint-config-prettier": "^8.7.0",

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+
"@cspotcode/source-map-support/register.js"
6059
]
6160
},
6261
"nyc": {
@@ -72,11 +71,12 @@
7271
"lodash": "^4.17.21"
7372
},
7473
"devDependencies": {
74+
"@cspotcode/source-map-support": "^0.8.1",
7575
"@istanbuljs/nyc-config-typescript": "^1.0.2",
7676
"@types/redux-mock-store": "^1.0.1",
7777
"@typescript-eslint/eslint-plugin": "^5.54.1",
7878
"@typescript-eslint/parser": "^5.54.1",
79-
"ava": "~2.4.0",
79+
"ava": "^6.1.2",
8080
"document-register-element": "^1.14.3",
8181
"eslint": "^8.56.0",
8282
"eslint-config-prettier": "^8.7.0",
@@ -93,7 +93,6 @@
9393
"rollup-plugin-cleanup": "^3.2.1",
9494
"rollup-plugin-typescript2": "^0.34.1",
9595
"rollup-plugin-visualizer": "^5.4.1",
96-
"source-map-support": "0.5.16",
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
};

packages/vanilla-renderers/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
"rollup-plugin-typescript2": "^0.34.1",
8787
"rollup-plugin-visualizer": "^5.4.1",
8888
"source-map-loader": "^0.2.4",
89-
"source-map-support": "0.5.16",
9089
"ts-jest": "^27.1.4",
9190
"ts-loader": "^9.5.1",
9291
"ts-node": "^10.4.0",

0 commit comments

Comments
 (0)