Skip to content

Commit

Permalink
deps: Upgrade karma & ava to get rid of critical vulnerabilities
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lucas-koehler committed Apr 9, 2024
1 parent 53e6780 commit 146f683
Show file tree
Hide file tree
Showing 12 changed files with 4,739 additions and 15,017 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@types/lodash": "^4.14.149",
"ajv": "^8.6.1",
"ajv-formats": "^2.1.0",
"ava": "~2.4.0",
"babel-loader": "^8.0.6",
"core-js": "^3.9.1",
"coveralls": "^3.0.9",
Expand All @@ -41,7 +40,6 @@
"nyc": "^15.1.0",
"prettier": "^2.8.4",
"source-map-loader": "^0.2.4",
"source-map-support": "0.5.16",
"style-loader": "^1.0.1",
"ts-loader": "^9.5.1",
"ts-node": "^10.4.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/angular-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"eslint-plugin-prettier": "^4.2.1",
"jasmine": "^3.99.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^3.1.4",
"karma": "^6.4.1",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "^2.0.1",
"karma-sourcemap-loader": "^0.3.8",
"karma-webpack": "^4.0.2",
"karma-webpack": "^5.0.0",
"prettier": "^2.8.4",
"tslib": "^2.3.0",
"typescript": "~4.9.5"
Expand Down
7 changes: 7 additions & 0 deletions packages/angular/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,12 @@ module.exports = {
caughtErrorsIgnorePattern: '^_',
},
],
'import/no-unresolved': [
'error',
{
// Ignore ava import because it is incorrectly reported as unresolved despite working as expected.
ignore: ['^ava$'],
},
],
},
};
6 changes: 3 additions & 3 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@
"files": [
"test/**/*"
],
"compileEnhancements": false,
"extensions": [
"ts"
],
"require": [
"./test-config/ts-node.config.js",
"source-map-support/register"
"source-map-support/register.js"
]
},
"dependencies": {
Expand All @@ -85,7 +84,7 @@
"@jsonforms/core": "workspace:*",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"ava": "~2.4.0",
"ava": "^6.1.2",
"copy-webpack-plugin": "^5.0.5",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.7.0",
Expand All @@ -96,6 +95,7 @@
"prettier": "^2.8.4",
"rimraf": "^3.0.2",
"rxjs": "^6.6.0",
"source-map-support": "^0.5.21",
"tslib": "^2.3.0",
"typedoc": "~0.25.3",
"typescript": "~4.9.5"
Expand Down
7 changes: 7 additions & 0 deletions packages/core/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,12 @@ module.exports = {
caughtErrorsIgnorePattern: '^_',
},
],
'import/no-unresolved': [
'error',
{
// Ignore ava import because it is incorrectly reported as unresolved despite working as expected.
ignore: ['^ava$'],
},
],
},
};
7 changes: 3 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,12 @@
"files": [
"test/**/*"
],
"compileEnhancements": false,
"extensions": [
"ts"
],
"require": [
"./test-config/ts-node.config.js",
"source-map-support/register"
"source-map-support/register.js"
]
},
"nyc": {
Expand All @@ -76,7 +75,7 @@
"@types/redux-mock-store": "^1.0.1",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"ava": "~2.4.0",
"ava": "^6.1.2",
"document-register-element": "^1.14.3",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.7.0",
Expand All @@ -93,7 +92,7 @@
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-visualizer": "^5.4.1",
"source-map-support": "0.5.16",
"source-map-support": "^0.5.21",
"ts-node": "^10.4.0",
"tslib": "^2.5.0",
"typedoc": "~0.25.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/test/testers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import anyTest, { TestInterface } from 'ava';
import anyTest, { TestFn } from 'ava';
import {
and,
formatIs,
Expand Down Expand Up @@ -57,7 +57,7 @@ import {
hasOption,
} from '../src';

const test = anyTest as TestInterface<{ uischema: ControlElement }>;
const test = anyTest as TestFn<{ uischema: ControlElement }>;

const createTesterContext = (
rootSchema: JsonSchema,
Expand Down
4 changes: 2 additions & 2 deletions packages/core/test/util/array.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { moveDown, moveUp } from '../../src/util/';
import anyTest, { TestInterface } from 'ava';
import anyTest, { TestFn } from 'ava';

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

test.beforeEach((t) => {
t.context.array = [1, 2, 3, 4, 5];
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/util/derivetype.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ test('derive type with type - union', (t) => {
type: ['string', 'number'],
};
t.is(deriveTypes(schema).length, 2);
t.is(deriveTypes(schema), schema.type);
t.is(deriveTypes(schema), schema.type as string[]);
});

test('derive type with type - allOf first has type', (t) => {
Expand Down
7 changes: 7 additions & 0 deletions packages/vanilla-renderers/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,12 @@ module.exports = {
caughtErrorsIgnorePattern: '^_',
},
],
'import/no-unresolved': [
'error',
{
// Ignore ava import because it is incorrectly reported as unresolved despite working as expected.
ignore: ['^ava$'],
},
],
},
};
1 change: 0 additions & 1 deletion packages/vanilla-renderers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-visualizer": "^5.4.1",
"source-map-loader": "^0.2.4",
"source-map-support": "0.5.16",
"ts-jest": "^27.1.4",
"ts-loader": "^9.5.1",
"ts-node": "^10.4.0",
Expand Down
Loading

0 comments on commit 146f683

Please sign in to comment.