Skip to content

Commit 12c59a2

Browse files
committed
Upgrade dependencies
1 parent 1353295 commit 12c59a2

File tree

13 files changed

+837
-794
lines changed

13 files changed

+837
-794
lines changed

.github/workflows/approve-snapshots.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ jobs:
5959
run: pnpm serve & pnpm wait-on http://localhost:5173 -t 1m
6060

6161
- name: Run Cypress 🌳
62-
run: pnpm cypress:run --env updateSnapshots=true
63-
env:
64-
CYPRESS_TAKE_SNAPSHOTS: true
62+
run: pnpm cypress:run --env updateSnapshots=true --expose takeSnapshots=true
6563

6664
- name: Upload debug screenshots and diffs on failure 🖼️
6765
uses: actions/upload-artifact@v4

.github/workflows/lint-test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ jobs:
181181
run: pnpm serve & pnpm wait-on http://localhost:5173 -t 1m
182182

183183
- name: Run Cypress 🌳
184-
run: pnpm cypress:run --env requireSnapshots=true
185-
env:
186-
CYPRESS_TAKE_SNAPSHOTS: true
184+
run: pnpm cypress:run --env requireSnapshots=true --expose takeSnapshots=true
187185

188186
- name: Upload debug screenshots and diffs on failure 🖼️
189187
uses: actions/upload-artifact@v4

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ created.
453453

454454
Taking consistent screenshots across platforms is impossible because the exact
455455
rendering of the app depends on the GPU. For this reason, visual regression
456-
tests are run only on the CI. This is done through an environment variable
457-
called `CYPRESS_TAKE_SNAPSHOTS`.
456+
tests are run only on the CI. This is done by running cypress with the
457+
`takeSnapshots` feature flag: `pnpm cypress:run --expose takeSnapshots=true`.
458458

459459
> Locally, we run the tests without snapshots in Firefox, since it's our main
460460
> target browser. On the CI, Firefox takes flaky snapshots, so we have to run

apps/demo/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
"normalize.css": "8.0.1",
2121
"react": "18.3.1",
2222
"react-dom": "18.3.1",
23-
"react-dropzone": "14.3.8",
23+
"react-dropzone": "15.0.0",
2424
"react-icons": "5.4.0",
2525
"wouter": "3.9.0"
2626
},
2727
"devDependencies": {
2828
"@esrf/eslint-config": "2.2.2",
29-
"@types/node": "^24.10.4",
30-
"@types/react": "^18.3.27",
29+
"@types/node": "^24.10.13",
30+
"@types/react": "^18.3.28",
3131
"@types/react-dom": "^18.3.7",
32-
"@vitejs/plugin-react-swc": "4.2.2",
32+
"@vitejs/plugin-react-swc": "4.2.3",
3333
"eslint": "9.39.2",
3434
"typescript": "5.9.3",
35-
"vite": "7.3.0",
35+
"vite": "7.3.1",
3636
"vite-css-modules": "1.12.0",
3737
"vite-plugin-checker": "0.12.0",
3838
"vite-plugin-eslint": "1.8.1"

apps/storybook/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@react-hookz/web": "25.1.1",
1818
"@react-three/fiber": "8.18.0",
1919
"d3-array": "3.2.4",
20-
"d3-format": "3.1.0",
20+
"d3-format": "3.1.2",
2121
"greenlet": "1.1.0",
2222
"ndarray": "1.0.19",
2323
"normalize.css": "8.0.1",
@@ -28,21 +28,21 @@
2828
},
2929
"devDependencies": {
3030
"@esrf/eslint-config": "2.2.2",
31-
"@storybook/addon-docs": "10.2.6",
32-
"@storybook/addon-links": "10.2.6",
33-
"@storybook/react-vite": "10.2.6",
31+
"@storybook/addon-docs": "10.2.8",
32+
"@storybook/addon-links": "10.2.8",
33+
"@storybook/react-vite": "10.2.8",
3434
"@types/d3-array": "~3.2.2",
3535
"@types/d3-format": "~3.0.4",
3636
"@types/ndarray": "1.0.14",
37-
"@types/node": "^24.10.4",
38-
"@types/react": "^18.3.27",
37+
"@types/node": "^24.10.13",
38+
"@types/react": "^18.3.28",
3939
"@types/react-dom": "^18.3.7",
4040
"@types/three": "0.182.0",
4141
"eslint": "9.39.2",
4242
"remark-gfm": "4.0.1",
43-
"storybook": "10.2.6",
43+
"storybook": "10.2.8",
4444
"typescript": "5.9.3",
45-
"vite": "7.3.0"
45+
"vite": "7.3.1"
4646
},
4747
"browserslist": {
4848
"production": [

cypress.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfig({
1010
},
1111
},
1212
defaultBrowser: 'firefox',
13-
retries: process.env.CYPRESS_TAKE_SNAPSHOTS ? 2 : null,
13+
retries: process.env.CI ? 2 : null,
1414
screenshotsFolder: 'cypress/debug',
1515
fixturesFolder: false,
1616
});

cypress/e2e/app.cy.ts

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const { takeSnapshots } = Cypress.expose();
2+
13
// For ARIA-based checks
24
const BE_SELECTED = ['have.attr', 'aria-selected', 'true'] as const;
35
const BE_CHECKED = ['have.attr', 'aria-checked', 'true'] as const;
@@ -18,7 +20,7 @@ describe('/mock', () => {
1820
'be.visible',
1921
);
2022

21-
if (Cypress.env('TAKE_SNAPSHOTS')) {
23+
if (takeSnapshots) {
2224
cy.matchImageSnapshot('line_1D');
2325
}
2426
});
@@ -33,7 +35,7 @@ describe('/mock', () => {
3335
'be.visible',
3436
);
3537

36-
if (Cypress.env('TAKE_SNAPSHOTS')) {
38+
if (takeSnapshots) {
3739
cy.matchImageSnapshot('line_complex_1D');
3840
}
3941
});
@@ -53,7 +55,7 @@ describe('/mock', () => {
5355
.should('have.attr', 'role', 'row')
5456
.and('have.attr', 'aria-rowindex', 1);
5557

56-
if (Cypress.env('TAKE_SNAPSHOTS')) {
58+
if (takeSnapshots) {
5759
cy.matchImageSnapshot('matrix_1D');
5860
}
5961
});
@@ -78,7 +80,7 @@ describe('/mock', () => {
7880
.should('have.attr', 'aria-colindex', 1)
7981
.and('have.text', 'string');
8082

81-
if (Cypress.env('TAKE_SNAPSHOTS')) {
83+
if (takeSnapshots) {
8284
cy.matchImageSnapshot('compound_1D');
8385
}
8486
});
@@ -93,15 +95,15 @@ describe('/mock', () => {
9395
'be.visible',
9496
);
9597

96-
if (Cypress.env('TAKE_SNAPSHOTS')) {
98+
if (takeSnapshots) {
9799
cy.matchImageSnapshot('heatmap_2D');
98100
}
99101

100102
cy.findByRole('button', { name: 'More controls' }).click();
101103
cy.findByRole('button', { name: 'Invert' }).click();
102104
cy.waitForStableDOM();
103105

104-
if (Cypress.env('TAKE_SNAPSHOTS')) {
106+
if (takeSnapshots) {
105107
cy.matchImageSnapshot('heatmap_2D_inverted_cmap');
106108
}
107109
});
@@ -118,7 +120,7 @@ describe('/mock', () => {
118120
'be.visible',
119121
);
120122

121-
if (Cypress.env('TAKE_SNAPSHOTS')) {
123+
if (takeSnapshots) {
122124
cy.matchImageSnapshot('heatmap_2D_complex');
123125
}
124126
});
@@ -129,14 +131,14 @@ describe('/mock', () => {
129131
cy.selectExplorerNode('_FillValue');
130132
cy.findByRole('figure', { name: '_FillValue' }).should('be.visible');
131133

132-
if (Cypress.env('TAKE_SNAPSHOTS')) {
134+
if (takeSnapshots) {
133135
cy.matchImageSnapshot('fillvalue_2D');
134136
}
135137

136138
cy.selectVisTab('Line');
137139
cy.waitForStableDOM();
138140

139-
if (Cypress.env('TAKE_SNAPSHOTS')) {
141+
if (takeSnapshots) {
140142
cy.matchImageSnapshot('fillvalue_1D');
141143
}
142144
});
@@ -167,7 +169,7 @@ describe('/mock', () => {
167169
cy.get('@xAxis').should('have.text', [0, 10, 20, 30, 40].join(''));
168170
cy.get('@yAxis').should('have.text', ['−10', 0, 10, 20, 30].join('')); // minus sign − (U+2212), not hyphen - (U+002D)
169171

170-
if (Cypress.env('TAKE_SNAPSHOTS')) {
172+
if (takeSnapshots) {
171173
cy.matchImageSnapshot('heatmap_4d_default');
172174
}
173175

@@ -181,7 +183,7 @@ describe('/mock', () => {
181183
cy.findByRole('radio', { name: 'D1' }).should(...BE_CHECKED);
182184
});
183185

184-
if (Cypress.env('TAKE_SNAPSHOTS')) {
186+
if (takeSnapshots) {
185187
cy.matchImageSnapshot('heatmap_4d_remapped');
186188
}
187189
});
@@ -210,7 +212,7 @@ describe('/mock', () => {
210212
.should('contain.text', '9.996e-1')
211213
.and('contain.text', '−1e+0');
212214

213-
if (Cypress.env('TAKE_SNAPSHOTS')) {
215+
if (takeSnapshots) {
214216
cy.matchImageSnapshot('heatmap_4d_sliced');
215217
}
216218

@@ -222,7 +224,7 @@ describe('/mock', () => {
222224
cy.get('@d1Slider').should('have.attr', 'aria-valuenow', 4);
223225
cy.get('@vis').should('contain.text', '+∞').and('contain.text', '−∞');
224226

225-
if (Cypress.env('TAKE_SNAPSHOTS')) {
227+
if (takeSnapshots) {
226228
cy.matchImageSnapshot('heatmap_4d_zeros');
227229
}
228230
});
@@ -236,14 +238,14 @@ describe('/mock', () => {
236238
cy.findByLabelText('Constant').click();
237239
cy.waitForStableDOM();
238240

239-
if (Cypress.env('TAKE_SNAPSHOTS')) {
241+
if (takeSnapshots) {
240242
cy.matchImageSnapshot('line_constant');
241243
}
242244

243245
cy.selectExplorerNode('oneD_cplx');
244246
cy.waitForStableDOM();
245247

246-
if (Cypress.env('TAKE_SNAPSHOTS')) {
248+
if (takeSnapshots) {
247249
cy.matchImageSnapshot('line_complex_constant');
248250
}
249251
});
@@ -266,7 +268,7 @@ describe('/mock', () => {
266268
cy.findByText('4e+2').should('be.visible');
267269
});
268270

269-
if (Cypress.env('TAKE_SNAPSHOTS')) {
271+
if (takeSnapshots) {
270272
cy.matchImageSnapshot('heatmap_domain');
271273
}
272274
});
@@ -287,7 +289,7 @@ describe('/mock', () => {
287289

288290
cy.waitForStableDOM();
289291

290-
if (Cypress.env('TAKE_SNAPSHOTS')) {
292+
if (takeSnapshots) {
291293
cy.matchImageSnapshot('heatmap_flip');
292294
}
293295
});
@@ -302,14 +304,14 @@ describe('/mock', () => {
302304
'be.visible',
303305
);
304306

305-
if (Cypress.env('TAKE_SNAPSHOTS')) {
307+
if (takeSnapshots) {
306308
cy.matchImageSnapshot('rgb_image');
307309
}
308310

309311
cy.findByRole('radio', { name: 'BGR' }).click();
310312
cy.waitForStableDOM();
311313

312-
if (Cypress.env('TAKE_SNAPSHOTS')) {
314+
if (takeSnapshots) {
313315
cy.matchImageSnapshot('bgr_image');
314316
}
315317
});
@@ -365,7 +367,7 @@ describe('/mock', () => {
365367

366368
cy.get('svg[data-type="abscissa"] svg').should('have.text', 'X (nm)');
367369

368-
if (Cypress.env('TAKE_SNAPSHOTS')) {
370+
if (takeSnapshots) {
369371
cy.matchImageSnapshot('nxline');
370372
}
371373
});
@@ -387,7 +389,7 @@ describe('/mock', () => {
387389
'Angle (degrees)',
388390
);
389391

390-
if (Cypress.env('TAKE_SNAPSHOTS')) {
392+
if (takeSnapshots) {
391393
cy.matchImageSnapshot('nxheatmap');
392394
}
393395
});
@@ -423,7 +425,7 @@ describe('/mock', () => {
423425
2,
424426
);
425427

426-
if (Cypress.env('TAKE_SNAPSHOTS')) {
428+
if (takeSnapshots) {
427429
cy.matchImageSnapshot('default_slice');
428430
}
429431
});
@@ -439,7 +441,7 @@ describe('/mock', () => {
439441

440442
cy.findAllByRole('combobox', { name: /Log/u }).should('have.length', 2);
441443

442-
if (Cypress.env('TAKE_SNAPSHOTS')) {
444+
if (takeSnapshots) {
443445
cy.waitForStableDOM();
444446
cy.matchImageSnapshot('logspectrum');
445447
}
@@ -453,7 +455,7 @@ describe('/mock', () => {
453455
name: 'nexus_entry / spectrum_with_aux',
454456
}).should('be.visible');
455457

456-
if (Cypress.env('TAKE_SNAPSHOTS')) {
458+
if (takeSnapshots) {
457459
cy.matchImageSnapshot('auxspectrum');
458460
}
459461
});
@@ -474,7 +476,7 @@ describe('/mock', () => {
474476
.should('be.visible')
475477
.and('contain.text', '−4.75e+1'); // color bar min
476478

477-
if (Cypress.env('TAKE_SNAPSHOTS')) {
479+
if (takeSnapshots) {
478480
cy.matchImageSnapshot('auximage');
479481
}
480482
});
@@ -487,7 +489,7 @@ describe('/mock', () => {
487489
name: 'nexus_entry / complex_spectrum',
488490
}).should('be.visible');
489491

490-
if (Cypress.env('TAKE_SNAPSHOTS')) {
492+
if (takeSnapshots) {
491493
cy.matchImageSnapshot('nxline_complex_2d_aux');
492494
}
493495
});
@@ -500,7 +502,7 @@ describe('/mock', () => {
500502
name: 'nexus_entry / complex_image',
501503
}).should('be.visible');
502504

503-
if (Cypress.env('TAKE_SNAPSHOTS')) {
505+
if (takeSnapshots) {
504506
cy.matchImageSnapshot('nxheatmap_complex_2d');
505507
}
506508

@@ -511,7 +513,7 @@ describe('/mock', () => {
511513
cy.findByRole('figure', { name: 'tertiary_float' }).should('be.visible');
512514
cy.waitForStableDOM();
513515

514-
if (Cypress.env('TAKE_SNAPSHOTS')) {
516+
if (takeSnapshots) {
515517
cy.matchImageSnapshot('nxheatmap_complex_2d_float_aux');
516518
}
517519
});
@@ -527,7 +529,7 @@ describe('/mock', () => {
527529
);
528530
cy.waitForStableDOM();
529531

530-
if (Cypress.env('TAKE_SNAPSHOTS')) {
532+
if (takeSnapshots) {
531533
cy.matchImageSnapshot('nxrgb');
532534
}
533535
});
@@ -542,7 +544,7 @@ describe('/mock', () => {
542544
'be.visible',
543545
);
544546

545-
if (Cypress.env('TAKE_SNAPSHOTS')) {
547+
if (takeSnapshots) {
546548
cy.matchImageSnapshot('nxscatter');
547549
}
548550
});
@@ -558,7 +560,7 @@ describe('/mock?wide', () => {
558560
it('start with sidebar closed', () => {
559561
cy.findByRole('tree').should('not.exist');
560562

561-
if (Cypress.env('TAKE_SNAPSHOTS')) {
563+
if (takeSnapshots) {
562564
cy.matchImageSnapshot('wide');
563565
}
564566
});

0 commit comments

Comments
 (0)