Skip to content

Commit 9ac10ff

Browse files
heath-freenomenickgros
authored andcommitted
Chore: Updated most packages to the latest versions
1 parent 5060539 commit 9ac10ff

13 files changed

+4446
-2028
lines changed

package-lock.json

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

package.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,60 +31,60 @@
3131
"license": "Apache-2.0",
3232
"homepage": "https://github.com/rjsf-team/react-jsonschema-form",
3333
"devDependencies": {
34-
"@babel/cli": "7.27.0",
35-
"@babel/core": "^7.23.9",
36-
"@babel/eslint-parser": "7.27.0",
34+
"@babel/cli": "7.28.0",
35+
"@babel/core": "7.28.0",
36+
"@babel/eslint-parser": "7.28.0",
3737
"@babel/plugin-proposal-class-properties": "^7.18.6",
3838
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
39-
"@babel/preset-env": "^7.23.9",
39+
"@babel/plugin-transform-class-static-block": "^7.26.0",
40+
"@babel/preset-env": "7.28.0",
4041
"@babel/preset-react": "^7.23.3",
4142
"@babel/preset-typescript": "^7.23.3",
42-
"@babel/plugin-transform-class-static-block": "^7.26.0",
43-
"@nx/js": "^20.8.1",
43+
"@nx/js": "21.3.11",
4444
"@swc-node/register": "^1.10.10",
45-
"@swc/core": "^1.11.24",
45+
"@swc/core": "1.13.3",
4646
"@swc/helpers": "^0.5.17",
47-
"@swc/jest": "^0.2.38",
48-
"@testing-library/jest-dom": "^6.4.2",
49-
"@testing-library/react": "^14.2.1",
50-
"@types/estree": "^1.0.7",
51-
"@types/jest": "^29.5.14",
52-
"@types/lodash": "^4.14.202",
47+
"@swc/jest": "0.2.39",
48+
"@testing-library/jest-dom": "6.6.4",
49+
"@testing-library/react": "16.3.0",
50+
"@types/estree": "1.0.8",
51+
"@types/jest": "30.0.0",
52+
"@types/lodash": "4.17.20",
5353
"@types/node": "^22.15.3",
5454
"@types/prettier": "^3.0.0",
5555
"@types/react": "^18.2.58",
5656
"@types/react-dom": "^18.2.19",
5757
"@types/react-test-renderer": "^18.0.7",
58-
"@typescript-eslint/eslint-plugin": "^8.31.1",
59-
"@typescript-eslint/parser": "^8.31.1",
60-
"babel-jest": "^29.7.0",
61-
"cross-env": "^7.0.3",
62-
"esbuild": "^0.25.3",
58+
"@typescript-eslint/eslint-plugin": "8.39.1",
59+
"@typescript-eslint/parser": "8.39.1",
60+
"babel-jest": "30.0.5",
61+
"cross-env": "10.0.0",
62+
"esbuild": "0.25.8",
6363
"eslint": "^8.56.0",
64-
"eslint-config-prettier": "10.1.2",
65-
"eslint-plugin-import": "^2.31.0",
64+
"eslint-config-prettier": "10.1.8",
65+
"eslint-plugin-import": "2.32.0",
6666
"eslint-plugin-jsx-a11y": "^6.10.2",
67-
"eslint-plugin-prettier": "^5.2.6",
67+
"eslint-plugin-prettier": "5.5.4",
6868
"eslint-plugin-react": "^7.37.5",
6969
"eslint-plugin-react-hooks": "^5.2.0",
7070
"husky": "^9.1.7",
71-
"jest": "^29.7.0",
72-
"jest-environment-jsdom": "^29.7.0",
73-
"jest-watch-typeahead": "^2.2.2",
74-
"lint-staged": "^15.5.1",
71+
"jest": "30.0.5",
72+
"jest-environment-jsdom": "30.0.5",
73+
"jest-watch-typeahead": "3.0.1",
74+
"lint-staged": "16.1.5",
7575
"move-file-cli": "^3.0.0",
76-
"nx": "^20.8.1",
77-
"prettier": "^3.5.3",
76+
"nx": "21.3.11",
77+
"prettier": "3.6.2",
7878
"react": "^18.2.0",
7979
"react-dom": "^18.2.0",
8080
"react-test-renderer": "^18.2.0",
8181
"rimraf": "^6.0.1",
82-
"rollup": "^4.34.8",
83-
"ts-jest": "^29.3.4",
82+
"rollup": "4.46.2",
83+
"ts-jest": "29.4.1",
8484
"tsc-alias": "^1.8.13",
8585
"tslib": "^2.6.2",
86-
"tsx": "^4.19.4",
87-
"typescript": "^5.8.3"
86+
"tsx": "4.20.4",
87+
"typescript": "5.9.2"
8888
},
8989
"workspaces": [
9090
"packages/antd",

packages/utils/test/dateRangeOptions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('dateRangeOptions()', () => {
6262
expect(dateRangeOptions(0, 0)).toEqual([{ value: startYear, label: `${startYear}` }]);
6363
});
6464
it('throws when start and stop are different signs', () => {
65-
expect(() => dateRangeOptions(1, -1)).toThrowError(
65+
expect(() => dateRangeOptions(1, -1)).toThrow(
6666
new Error(`Both start (${1}) and stop (${-1}) must both be <= 0 or > 0, got one of each`),
6767
);
6868
});

packages/utils/test/findSchemaDefinition.test.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ const EXTRA_EXPECTED = { type: 'string', title: 'foo' };
144144

145145
describe('findSchemaDefinition()', () => {
146146
it('throws error when ref is missing', () => {
147-
expect(() => findSchemaDefinition()).toThrowError('Could not find a definition for undefined');
147+
expect(() => findSchemaDefinition()).toThrow('Could not find a definition for undefined');
148148
});
149149
it('throws error when ref is malformed', () => {
150-
expect(() => findSchemaDefinition('definitions/missing')).toThrowError(
150+
expect(() => findSchemaDefinition('definitions/missing')).toThrow(
151151
'Could not find a definition for definitions/missing',
152152
);
153153
});
154154
it('throws error when ref does not exist', () => {
155-
expect(() => findSchemaDefinition('#/definitions/missing', schema)).toThrowError(
155+
expect(() => findSchemaDefinition('#/definitions/missing', schema)).toThrow(
156156
'Could not find a definition for #/definitions/missing',
157157
);
158158
});
@@ -166,22 +166,22 @@ describe('findSchemaDefinition()', () => {
166166
expect(findSchemaDefinition('#/definitions/extraNestedRef', schema)).toEqual(EXTRA_EXPECTED);
167167
});
168168
it('throws error when ref is a circular reference', () => {
169-
expect(() => findSchemaDefinition('#/definitions/badCircularNestedRef', schema)).toThrowError(
169+
expect(() => findSchemaDefinition('#/definitions/badCircularNestedRef', schema)).toThrow(
170170
'Definition for #/definitions/badCircularNestedRef is a circular reference',
171171
);
172172
});
173173
it('throws error when ref is a deep circular reference', () => {
174-
expect(() => findSchemaDefinition('#/definitions/badCircularDeepNestedRef', schema)).toThrowError(
174+
expect(() => findSchemaDefinition('#/definitions/badCircularDeepNestedRef', schema)).toThrow(
175175
'Definition for #/definitions/badCircularDeepNestedRef contains a circular reference through #/definitions/badCircularDeeperNestedRef -> #/definitions/badCircularDeepestNestedRef -> #/definitions/badCircularDeepNestedRef',
176176
);
177177
});
178178
it('throws error when bundled ref are not part of JSON Schema Draft 2020-12', () => {
179-
expect(() => findSchemaDefinition('#/definitions/bundledRef', schema)).toThrowError(
179+
expect(() => findSchemaDefinition('#/definitions/bundledRef', schema)).toThrow(
180180
'Could not find a definition for /bundled.ref.json',
181181
);
182182
});
183183
it('throws error when bundled ref with explicit baseURI are not part of JSON Schema Draft 2020-12', () => {
184-
expect(() => findSchemaDefinition('#/properties/num', schema, 'https://example.com/bundled.ref.json')).toThrowError(
184+
expect(() => findSchemaDefinition('#/properties/num', schema, 'https://example.com/bundled.ref.json')).toThrow(
185185
'Could not find a definition for #/properties/num',
186186
);
187187
});
@@ -224,43 +224,43 @@ describe('findSchemaDefinition()', () => {
224224
);
225225
});
226226
it('throws error when relative ref is undefined in a bundled JSON Schema', () => {
227-
expect(() => findSchemaDefinition('#/$defs/undefinedRef', bundledSchema)).toThrowError(
227+
expect(() => findSchemaDefinition('#/$defs/undefinedRef', bundledSchema)).toThrow(
228228
'Could not find a definition for /undefined.ref.json',
229229
);
230230
});
231231
it('throws error when relative ref with anchor is undefined in a bundled JSON Schema', () => {
232-
expect(() => findSchemaDefinition('#/$defs/undefinedRefWithAnchor', bundledSchema)).toThrowError(
232+
expect(() => findSchemaDefinition('#/$defs/undefinedRefWithAnchor', bundledSchema)).toThrow(
233233
'Could not find a definition for #/$defs/undefined',
234234
);
235235
});
236236
it('throws error when local ref is undefined in a bundled JSON Schema with explicit base URI', () => {
237237
expect(() =>
238238
findSchemaDefinition('#/properties/undefined', bundledSchema, 'https://example.com/bundled.ref.json'),
239-
).toThrowError('Could not find a definition for #/properties/undefined');
239+
).toThrow('Could not find a definition for #/properties/undefined');
240240
});
241241
it('throws error when explicit base URI is undefined in a bundled JSON Schema', () => {
242242
expect(() =>
243243
findSchemaDefinition('#/properties/undefined', bundledSchema, 'https://example.com/undefined.ref.json'),
244-
).toThrowError('Could not find a definition for #/properties/undefined');
244+
).toThrow('Could not find a definition for #/properties/undefined');
245245
});
246246
it('throws error when ref is a deep circular reference in a bundled JSON Schema', () => {
247-
expect(() => findSchemaDefinition('#/$defs/circularRef', bundledSchema)).toThrowError(
247+
expect(() => findSchemaDefinition('#/$defs/circularRef', bundledSchema)).toThrow(
248248
'Definition for #/$defs/circularRef contains a circular reference through /bundled.ref.json/#/$defs/circularRef -> /bundled.schema.json/#/$defs/circularRef -> #/$defs/circularRef',
249249
);
250250
});
251251
});
252252

253253
describe('findSchemaDefinitionRecursive()', () => {
254254
it('throws error when ref is missing', () => {
255-
expect(() => findSchemaDefinitionRecursive()).toThrowError('Could not find a definition for undefined');
255+
expect(() => findSchemaDefinitionRecursive()).toThrow('Could not find a definition for undefined');
256256
});
257257
it('throws error when ref is malformed', () => {
258-
expect(() => findSchemaDefinitionRecursive('definitions/missing')).toThrowError(
258+
expect(() => findSchemaDefinitionRecursive('definitions/missing')).toThrow(
259259
'Could not find a definition for definitions/missing',
260260
);
261261
});
262262
it('throws error when ref does not exist', () => {
263-
expect(() => findSchemaDefinitionRecursive('#/definitions/missing', schema)).toThrowError(
263+
expect(() => findSchemaDefinitionRecursive('#/definitions/missing', schema)).toThrow(
264264
'Could not find a definition for #/definitions/missing',
265265
);
266266
});
@@ -274,24 +274,24 @@ describe('findSchemaDefinitionRecursive()', () => {
274274
expect(findSchemaDefinitionRecursive('#/definitions/extraNestedRef', schema)).toEqual(EXTRA_EXPECTED);
275275
});
276276
it('throws error when ref is a circular reference', () => {
277-
expect(() => findSchemaDefinitionRecursive('#/definitions/badCircularNestedRef', schema)).toThrowError(
277+
expect(() => findSchemaDefinitionRecursive('#/definitions/badCircularNestedRef', schema)).toThrow(
278278
'Definition for #/definitions/badCircularNestedRef is a circular reference',
279279
);
280280
});
281281
it('throws error when ref is a deep circular reference', () => {
282-
expect(() => findSchemaDefinitionRecursive('#/definitions/badCircularDeepNestedRef', schema)).toThrowError(
282+
expect(() => findSchemaDefinitionRecursive('#/definitions/badCircularDeepNestedRef', schema)).toThrow(
283283
'Definition for #/definitions/badCircularDeepNestedRef contains a circular reference through #/definitions/badCircularDeeperNestedRef -> #/definitions/badCircularDeepestNestedRef -> #/definitions/badCircularDeepNestedRef',
284284
);
285285
});
286286
it('throws error when bundled ref are not part of JSON Schema Draft 2020-12', () => {
287-
expect(() => findSchemaDefinitionRecursive('#/definitions/bundledRef', schema)).toThrowError(
287+
expect(() => findSchemaDefinitionRecursive('#/definitions/bundledRef', schema)).toThrow(
288288
'Could not find a definition for /bundled.ref.json',
289289
);
290290
});
291291
it('throws error when bundled ref with explicit baseURI are not part of JSON Schema Draft 2020-12', () => {
292292
expect(() =>
293293
findSchemaDefinitionRecursive('#/properties/num', schema, [], 'https://example.com/bundled.ref.json'),
294-
).toThrowError('Could not find a definition for #/properties/num');
294+
).toThrow('Could not find a definition for #/properties/num');
295295
});
296296
it('correctly resolves absolute bundled refs within a JSON Schema Draft 2020-12', () => {
297297
expect(findSchemaDefinitionRecursive('#/$defs/bundledAbsoluteRef', bundledSchema)).toStrictEqual(internalSchema);
@@ -334,12 +334,12 @@ describe('findSchemaDefinitionRecursive()', () => {
334334
).toBe(internalSchema.properties!.num);
335335
});
336336
it('throws error when relative ref is undefined in a bundled JSON Schema', () => {
337-
expect(() => findSchemaDefinitionRecursive('#/$defs/undefinedRef', bundledSchema)).toThrowError(
337+
expect(() => findSchemaDefinitionRecursive('#/$defs/undefinedRef', bundledSchema)).toThrow(
338338
'Could not find a definition for /undefined.ref.json',
339339
);
340340
});
341341
it('throws error when relative ref with anchor is undefined in a bundled JSON Schema', () => {
342-
expect(() => findSchemaDefinitionRecursive('#/$defs/undefinedRefWithAnchor', bundledSchema)).toThrowError(
342+
expect(() => findSchemaDefinitionRecursive('#/$defs/undefinedRefWithAnchor', bundledSchema)).toThrow(
343343
'Could not find a definition for #/$defs/undefined',
344344
);
345345
});
@@ -351,15 +351,15 @@ describe('findSchemaDefinitionRecursive()', () => {
351351
[],
352352
'https://example.com/bundled.ref.json',
353353
),
354-
).toThrowError('Could not find a definition for #/properties/undefined');
354+
).toThrow('Could not find a definition for #/properties/undefined');
355355
});
356356
it('throws error when explicit base URI is undefined in a bundled JSON Schema', () => {
357357
expect(() =>
358358
findSchemaDefinition('#/properties/undefined', bundledSchema, 'https://example.com/undefined.ref.json'),
359-
).toThrowError('Could not find a definition for #/properties/undefined');
359+
).toThrow('Could not find a definition for #/properties/undefined');
360360
});
361361
it('throws error when ref is a deep circular reference in a bundled JSON Schema', () => {
362-
expect(() => findSchemaDefinitionRecursive('#/$defs/circularRef', bundledSchema, [])).toThrowError(
362+
expect(() => findSchemaDefinitionRecursive('#/$defs/circularRef', bundledSchema, [])).toThrow(
363363
'Definition for #/$defs/circularRef contains a circular reference through /bundled.ref.json/#/$defs/circularRef -> /bundled.schema.json/#/$defs/circularRef -> #/$defs/circularRef',
364364
);
365365
});

packages/utils/test/getWidget.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,19 @@ const widgetProps: WidgetProps = {
8888

8989
describe('getWidget()', () => {
9090
it('should fail if widget has incorrect type', () => {
91-
expect(() => getWidget(schema)).toThrowError('Unsupported widget definition: undefined');
91+
expect(() => getWidget(schema)).toThrow('Unsupported widget definition: undefined');
9292
});
9393

9494
it('should fail if widget has no type property', () => {
95-
expect(() => getWidget(schema, 'blabla')).toThrowError(`No widget for type 'object'`);
95+
expect(() => getWidget(schema, 'blabla')).toThrow(`No widget for type 'object'`);
9696
});
9797

9898
it('should fail if schema `type` has no widget property', () => {
99-
expect(() => getWidget(subschema, 'blabla')).toThrowError(`No widget 'blabla' for type 'boolean'`);
99+
expect(() => getWidget(subschema, 'blabla')).toThrow(`No widget 'blabla' for type 'boolean'`);
100100
});
101101

102102
it('should fail if schema has no type property', () => {
103-
expect(() => getWidget({}, 'blabla')).toThrowError(`No widget 'blabla' for type 'undefined'`);
103+
expect(() => getWidget({}, 'blabla')).toThrow(`No widget 'blabla' for type 'undefined'`);
104104
});
105105

106106
it('should return widget if in registered widgets', () => {

packages/utils/test/hasWidget.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('hasWidget()', () => {
2828
expect(hasWidget(schema, 'foo')).toBe(false);
2929
});
3030
it('rethrows error', () => {
31-
expect(() => hasWidget({ type: 'null' }, 'foo', { TextWidget: {} as Widget })).toThrowError(TypeError);
31+
expect(() => hasWidget({ type: 'null' }, 'foo', { TextWidget: {} as Widget })).toThrow(TypeError);
3232
});
3333
it('returns true when widget is available', () => {
3434
expect(hasWidget(schema, 'text')).toBe(true);

packages/utils/test/orderProperties.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,19 @@ describe('orderProperties()', () => {
3232
it('throws error when * is missing and there is one more prop than ordered', () => {
3333
const properties = ['foo', 'bar', 'baz'];
3434
const order = ['foo', 'baz'];
35-
expect(() => orderProperties(properties, order)).toThrowError(
36-
"uiSchema order list does not contain property 'bar'",
37-
);
35+
expect(() => orderProperties(properties, order)).toThrow("uiSchema order list does not contain property 'bar'");
3836
});
3937
it('throws error when * is missing and there are a few more props than ordered', () => {
4038
const properties = ['foo', 'bar', 'baz'];
4139
const order = ['foo'];
42-
expect(() => orderProperties(properties, order)).toThrowError(
40+
expect(() => orderProperties(properties, order)).toThrow(
4341
"uiSchema order list does not contain properties 'bar', 'baz'",
4442
);
4543
});
4644
it('throws error when there are multiple *s in order', () => {
4745
const properties = ['foo', 'bar', 'baz'];
4846
const order = ['*', 'foo', '*'];
49-
expect(() => orderProperties(properties, order)).toThrowError(
47+
expect(() => orderProperties(properties, order)).toThrow(
5048
'uiSchema order list contains more than one wildcard item',
5149
);
5250
});

packages/utils/test/parseDateString.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { parseDateString } from '../src';
22

33
describe('parseDateString()', () => {
44
it('should raise on invalid JSON datetime', () => {
5-
expect(() => parseDateString('plop')).toThrowError('Unable to parse');
5+
expect(() => parseDateString('plop')).toThrow('Unable to parse');
66
});
77

88
it('should return a default object when no datetime is passed', () => {

packages/utils/test/parser/ParserValidator.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ describe('ParserValidator', () => {
3434
});
3535
});
3636
it('isValid() throws error when rootSchema differs', () => {
37-
expect(() => validator.isValid(TINY_SCHEMA, undefined, ID_SCHEMA)).toThrowError(
37+
expect(() => validator.isValid(TINY_SCHEMA, undefined, ID_SCHEMA)).toThrow(
3838
new Error('Unexpectedly calling isValid() with a rootSchema that differs from the construction rootSchema'),
3939
);
4040
});
4141
it('rawValidation() throws error when called', () => {
42-
expect(() => validator.rawValidation(TINY_SCHEMA, undefined)).toThrowError(
42+
expect(() => validator.rawValidation(TINY_SCHEMA, undefined)).toThrow(
4343
new Error('Unexpectedly calling the `rawValidation()` method during schema parsing'),
4444
);
4545
});
4646
it('toErrorList() throws error when called', () => {
47-
expect(() => validator.toErrorList({})).toThrowError(
47+
expect(() => validator.toErrorList({})).toThrow(
4848
new Error('Unexpectedly calling the `toErrorList()` method during schema parsing'),
4949
);
5050
});
5151
it('validateFormData() throws error when called', () => {
52-
expect(() => validator.validateFormData({}, TINY_SCHEMA)).toThrowError(
52+
expect(() => validator.validateFormData({}, TINY_SCHEMA)).toThrow(
5353
new Error('Unexpectedly calling the `validateFormData()` method during schema parsing'),
5454
);
5555
});
@@ -78,7 +78,7 @@ describe('ParserValidator', () => {
7878
it('calling isValid() with a schema that has a matching key throws error', () => {
7979
// Force the error condition
8080
validator.schemaMap[DUPLICATE_HASH] = TINY_SCHEMA;
81-
expect(() => validator.isValid(DUPLICATE_SCHEMA, undefined, RECURSIVE_REF)).toThrowError(
81+
expect(() => validator.isValid(DUPLICATE_SCHEMA, undefined, RECURSIVE_REF)).toThrow(
8282
new Error(
8383
`Two different schemas exist with the same key ${DUPLICATE_HASH}! What a bad coincidence. If possible, try adding an $id to one of the schemas`,
8484
),

packages/utils/test/schema/getDefaultFormStateTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function getDefaultFormStateTest(testValidator: TestValidatorType
2222
consoleWarnSpy.mockRestore();
2323
});
2424
it('throws error when schema is not an object', () => {
25-
expect(() => getDefaultFormState(testValidator, null as unknown as RJSFSchema)).toThrowError('Invalid schema:');
25+
expect(() => getDefaultFormState(testValidator, null as unknown as RJSFSchema)).toThrow('Invalid schema:');
2626
});
2727

2828
describe('object schemas', () => {

0 commit comments

Comments
 (0)