Skip to content

Commit 18a73e3

Browse files
committed
Update Transition and packages to match
* i18next: 24.0.5 => 25.7.4 * date-fns: 2.29.1 => 4.1.0 * i18next-browser-languagedetector: 8.0.0 => 8.2.0 * react: 19.0.0 => 19.2.3 * react-datepicker: 7.6.0 => 9.1.0 * react-dom: 19.0.0 => 19.2.3 * react-i18next: 12.3.1 => 16.5.3 * react-markdown: 9.0.1 => 10.1.0 * react-router: 7.5.2 => 7.12.0 * react-select: 5.8.3 => 5.10.2 * react-spinners: 0.14.1 => 0.17.0 * remark-gfm: 4.0.0 => 4.0.1 * @testing-library/jest-dom: 6.6.3 => 6.9.1 * @testing-library/react: 16.3.0 => 16.3.1 * @types/reactj-dom: 19.0.2 => 19.2.3 * drop @types/react-select * i18next-fs-backend:2.6.0 => 2.6.1 The `Markdown` component does not take a `className` anymore, so the class needs to be added manually to a parent `div`. Update snapshots accordingly. The update the chaire-lib's bcrypt package changed the format of password hash, so the `participantAuthModel.test.ts` needed updating. Also, with the @testing-library/react update, it seems that the typing in tests is now more enforced, requiring better test data.
1 parent 85bfff5 commit 18a73e3

File tree

27 files changed

+610
-474
lines changed

27 files changed

+610
-474
lines changed

example/demo_generator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"evolution-common": "^0.5.0",
3838
"evolution-frontend": "^0.5.0",
3939
"evolution-generator": "^0.5.0",
40-
"i18next": "^24.0.5",
40+
"i18next": "^25.7.4",
4141
"lodash": "^4.17.21",
4242
"moment": "^2.30.1",
4343
"moment-business-days": "^1.2.0"

example/demo_survey/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"moment": "^2.30.1",
4545
"moment-business-days": "^1.2.0",
4646
"moment-timezone": "^0.5.46",
47-
"react": "^19.0.0",
48-
"react-i18next": "^12.3.1",
49-
"react-router": "^7.5.2",
47+
"react": "^19.2.3",
48+
"react-i18next": "^16.5.3",
49+
"react-router": "^7.12.0",
5050
"slugify": "^1.6.6",
5151
"uuid": "^11.1.0"
5252
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"dependencies": {},
5858
"devDependencies": {
5959
"depcheck": "^1.4.3",
60-
"rimraf": "^6.0.1",
60+
"rimraf": "^6.1.2",
6161
"wsrun": "^5.2.4"
6262
}
6363
}

packages/evolution-backend/src/services/auth/__tests__/participantAuthModel.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ describe('ParticipantAuthModel: createAndSave', () => {
277277
email: newUserParams.email,
278278
google_id: null,
279279
facebook_id: null,
280-
password: expect.stringContaining('$2a$10$'),
280+
password: expect.stringContaining('$2b$10$'),
281281
first_name: '',
282282
last_name: '',
283283
is_valid: false,
@@ -291,7 +291,7 @@ describe('ParticipantAuthModel: createAndSave', () => {
291291
email: newUserParams.email,
292292
google_id: null,
293293
facebook_id: null,
294-
password: expect.stringContaining('$2a$10$'),
294+
password: expect.stringContaining('$2b$10$'),
295295
first_name: '',
296296
last_name: '',
297297
is_valid: false,

packages/evolution-common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@turf/turf": "^7.3.1",
2727
"chaire-lib-common": "^0.2.2",
2828
"geojson-validation": "^1.0.2",
29-
"i18next": "^24.0.5",
29+
"i18next": "^25.7.4",
3030
"lodash": "^4.17.21",
3131
"moment": "^2.30.1",
3232
"uuid": "^11.1.0"

packages/evolution-frontend/package.json

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,57 +42,56 @@
4242
"bowser": "^2.11.0",
4343
"chaire-lib-common": "^0.2.2",
4444
"chaire-lib-frontend": "^0.2.2",
45-
"date-fns": "^2.29.1",
45+
"date-fns": "^4.1.0",
4646
"dompurify": "^3.2.4",
4747
"evolution-common": "^0.5.0",
4848
"geojson": "^0.5.0",
4949
"geojson-validation": "^1.0.2",
5050
"gl-matrix": "^3.4.3",
5151
"highcharts": "^12.1.2",
5252
"highcharts-react-official": "^3.2.1",
53-
"i18next": "^24.0.5",
54-
"i18next-browser-languagedetector": "^8.0.0",
53+
"i18next": "^25.7.4",
54+
"i18next-browser-languagedetector": "^8.2.0",
5555
"lodash": "^4.17.21",
5656
"maplibre-gl": "^5.7.1",
5757
"moment": "^2.30.1",
5858
"node-fetch": "^2.6.7",
5959
"p-queue": "^6.6.2",
60-
"react": "^19.0.0",
61-
"react-datepicker": "^7.6.0",
62-
"react-dom": "^19.0.0",
63-
"react-i18next": "^12.3.1",
60+
"react": "^19.2.3",
61+
"react-datepicker": "^9.1.0",
62+
"react-dom": "^19.2.3",
63+
"react-i18next": "^16.5.3",
6464
"react-input-range": "^1.3.0",
6565
"react-map-gl": "^8.0.4",
66-
"react-markdown": "^9.0.1",
66+
"react-markdown": "^10.1.0",
6767
"react-modal": "^3.16.3",
6868
"react-redux": "^9.2.0",
69-
"react-router": "^7.5.2",
70-
"react-select": "^5.8.3",
71-
"react-spinners": "^0.14.1",
69+
"react-router": "^7.12.0",
70+
"react-select": "^5.10.2",
71+
"react-spinners": "^0.17.0",
7272
"react-table": "^7.8.0",
7373
"redux": "^5.0.1",
7474
"redux-thunk": "^3.1.0",
75-
"remark-gfm": "^4.0.0"
75+
"remark-gfm": "^4.0.1"
7676
},
7777
"devDependencies": {
7878
"@playwright/test": "^1.56.1",
79-
"@testing-library/jest-dom": "^6.6.3",
80-
"@testing-library/react": "^16.3.0",
79+
"@testing-library/jest-dom": "^6.9.1",
80+
"@testing-library/react": "^16.3.1",
8181
"@testing-library/user-event": "^14.6.1",
8282
"@types/geojson": "^7946.0.16",
8383
"@types/jest": "^30.0.0",
8484
"@types/jest-axe": "^3.5.5",
8585
"@types/lodash": "^4.17.21",
8686
"@types/node": "^24.10.4",
87-
"@types/react-dom": "^19.0.2",
88-
"@types/react-select": "^5.0.1",
87+
"@types/react-dom": "^19.2.3",
8988
"@typescript-eslint/eslint-plugin": "^8.50.0",
9089
"@typescript-eslint/parser": "^8.50.0",
9190
"cross-env": "^10.1.0",
9291
"eslint": "^8.57.1",
9392
"eslint-plugin-n": "^15.7.0",
9493
"eslint-plugin-react": "^7.37.2",
95-
"i18next-fs-backend": "^2.6.0",
94+
"i18next-fs-backend": "^2.6.1",
9695
"jest": "^30.2.0",
9796
"jest-axe": "^10.0.0",
9897
"jest-each": "^30.2.0",

packages/evolution-frontend/src/components/admin/validations/ValidationAuditFilter.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,13 @@ export const ValidationAuditFilter = ({
143143
</label>
144144
<Select
145145
styles={{
146-
option: (baseStyles, _state) => ({
147-
...baseStyles,
148-
paddingTop: 0,
149-
paddingBottom: 0
150-
})
146+
// FIXME Remove the need for 'as any' by typing the styles properly. But there is compilation error even though it should be correct.
147+
option: (baseStyles, _state) =>
148+
({
149+
...baseStyles,
150+
paddingTop: 0,
151+
paddingBottom: 0
152+
}) as any
151153
}}
152154
defaultValue={undefined}
153155
isMulti

packages/evolution-frontend/src/components/inputs/InputDatePicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import React from 'react';
88
// TODO this package hasn't been updated in a while. Consider changing for a more maintained one
99
import DatePicker, { registerLocale } from 'react-datepicker';
1010
import { withTranslation, WithTranslation } from 'react-i18next';
11-
import fr from 'date-fns/locale/fr';
12-
import enCA from 'date-fns/locale/en-CA';
11+
import { fr } from 'date-fns/locale/fr';
12+
import { enCA } from 'date-fns/locale/en-CA';
1313
import 'react-datepicker/dist/react-datepicker.css';
1414

1515
import { InputDatePickerType } from 'evolution-common/lib/services/questionnaire/types';

packages/evolution-frontend/src/components/inputs/__tests__/InputRadioNumber.test.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const interview = {
1717
response: {},
1818
validations: {},
1919
is_valid: true
20-
}
20+
};
2121

2222
const user = {
2323
id: 1,
@@ -28,20 +28,29 @@ const user = {
2828
is_admin: false,
2929
pages: [],
3030
showUserInfo: false,
31-
}
31+
};
32+
33+
const baseWidgetConfig = {
34+
type: 'question' as const,
35+
label: 'test',
36+
path: 'test.radioNumber'
37+
};
3238

3339
describe('Render InputRadioNumber', () => {
40+
3441
const widgetConfig = {
42+
...baseWidgetConfig,
3543
inputType: 'radioNumber' as const,
3644
valueRange: { min: 1, max: 3 },
3745
overMaxAllowed: false
38-
}
46+
};
3947

4048
const widgetConfigOverMax = {
49+
...baseWidgetConfig,
4150
inputType: 'radioNumber' as const,
4251
valueRange: { min: 1, max: 3 },
4352
overMaxAllowed: true
44-
}
53+
};
4554

4655
test('InputRadioNumber without "over max" option', () => {
4756
const { container } = render(
@@ -82,6 +91,7 @@ describe('Render InputRadioNumber', () => {
8291

8392
describe('InputRadioNumber onChange', () => {
8493
const widgetConfig = {
94+
...baseWidgetConfig,
8595
inputType: 'radioNumber' as const,
8696
valueRange: { min: 0, max: 3 },
8797
overMaxAllowed: true

packages/evolution-frontend/src/components/inputs/__tests__/InputTime.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ describe('Should correctly render InputTime with minimal parameters', () => {
2626
const widgetConfig = {
2727
type: 'question' as const,
2828
twoColumns: true,
29+
datatype: 'integer' as const,
2930
path: 'test.foo',
3031
containsHtml: true,
3132
label: {
@@ -78,6 +79,7 @@ describe('Should correctly render InputTime with various parameters', () => {
7879
type: 'question' as const,
7980
twoColumns: true,
8081
path: 'test.foo',
82+
datatype: 'integer' as const,
8183
containsHtml: true,
8284
label: {
8385
fr: `Texte en français`,

0 commit comments

Comments
 (0)