Skip to content

chore: Dependency updates 24/03/2026#3352

Merged
AshCorr merged 5 commits into
mainfrom
ash/dependencies-24032026
Mar 26, 2026
Merged

chore: Dependency updates 24/03/2026#3352
AshCorr merged 5 commits into
mainfrom
ash/dependencies-24032026

Conversation

@AshCorr

@AshCorr AshCorr commented Mar 24, 2026

Copy link
Copy Markdown
Member

What does this change?

Updates various dependencies in Gateway to their latest versions, its been a while so theres been quite a few major dependency upgrades.

I've skipped the following dependency updates:

How has this change been tested?

Deployed to CODE, tried creating a new account with passcode and social, signing in with passcode and social, and also deleting my account. Everything seems to be working as expected.

@@ -1,14 +1,10 @@
import { writeFileSync } from 'node:fs';
import zodToJsonSchema from 'zod-to-json-schema';

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were previously using https://github.com/StefanTerdell/zod-to-json-schema to generate the JSON schema however this dependency has been deprecated.

As of November 2025, this project will no longer be receiving updates. Zod v4 natively supports generating JSON schemas, so I recommend you switch to the new major, or better yet, a decent language ;)

Zod now supports natively generating a JSON schema so we don't need it anymore.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or we could migrate the whole thing to rust I guess

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets finish the db migration first.

Comment thread scripts/log.js
const log = (...messages) => logIt(messages);
const warn = (...messages) => logIt(messages, red);
const prompt = (...messages) => logIt(messages, yellow);
const localPrompt = (...messages) => logIt(messages, yellow);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of upgrading @guardian/eslint-config it seems like the no-redeclare rule has been enabled, which now complains because prompt is an existing global in browsers

advertising, and disable the sharing of data with partners for
personalised advertising purposes by clicking the "Privacy settings"
link in the footer of every page of our site.
personalised advertising purposes by clicking the "Privacy

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of upgrading @guardian/eslint-config it seems like the react/no-unescaped-entities rule has been enabled which requires us to escape special characters such as "

...(structuredError?.severity === 'CSRF'
? [
<p>
<p key={'CSRF'}>

@AshCorr AshCorr Mar 24, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto the previous eslint comments about react/jsx-key which requires elements created in an iterator to have a key set.

return (
<InformationBoxText isGoogleOneTap={isGoogleOneTap}>
<InformationBoxText
key={index}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not recommended to use index here, but we don't have another ID that we can use for creating these elements.

margin: 0;
`;

const ConditionalIframeThemeWrapper = ({

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto the previous eslint comments, although this time about react-hooks/static-components. This rule requires us to not create React components from within a function, apparently this makes them more efficient as it doesn't have to re-render the entire component each time.

path,
}: {
req: Request;
req: Request<{ token: string }>;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrading to the latest version of @types/express introduces a change where query parameters become a string | string[] type, instead of a string type unless we specify the type of query parameters ourselves.

const { clientId, useOktaClassic } = res.locals.queryParams;
handleAsyncErrors(
async (req: Request<{ token: string }>, res: ResponseWithRequestState) => {
const { token: encryptedRecoveryToken } = req.params;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theres a lot of diffs in this function, but its all indentation changes.

req: Request<{ emailType: string; data: string; token: string }>,
res: ResponseWithRequestState,
) => {
const { emailType, data, token } = req.params;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again all just indentation changes in this function beyond this point.

Comment thread eslint.config.mjs
'prefer-const': 'error',

// Requires some significant refactors to PasswordForm and SignedInAs components
'react-hooks/set-state-in-effect': 'off',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule got enabled when we upgraded our eslint config versions, it seems like it would take some significant refactors to comply with it though.

Comment thread knip.ts
// but still allows us to see the issues and fix them
rules: {
binaries: 'warn',
classMembers: 'warn',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Knip no longer supports this option in the latest major version.

}),
handleAsyncErrors(
async (req: Request<{ token: string }>, res: ResponseWithRequestState) => {
const { token } = req.params;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All indentation changes in this function.

@AshCorr AshCorr force-pushed the ash/dependencies-24032026 branch from ca381b4 to 7be7adc Compare March 24, 2026 15:23
@AshCorr AshCorr added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Mar 24, 2026
@AshCorr AshCorr force-pushed the ash/dependencies-24032026 branch from 7be7adc to 4a7ed6b Compare March 24, 2026 15:28
@AshCorr AshCorr added the run_tests Run Playwright & Chromatic label Mar 24, 2026
@github-actions

github-actions Bot commented Mar 24, 2026

Copy link
Copy Markdown

@AshCorr AshCorr force-pushed the ash/dependencies-24032026 branch from 4a7ed6b to 989188e Compare March 24, 2026 15:46
@AshCorr AshCorr added run_tests Run Playwright & Chromatic and removed run_tests Run Playwright & Chromatic labels Mar 24, 2026
@AshCorr AshCorr marked this pull request as ready for review March 24, 2026 15:48
@AshCorr AshCorr requested a review from a team as a code owner March 24, 2026 15:48
@AshCorr AshCorr force-pushed the ash/dependencies-24032026 branch from 989188e to 0ff894d Compare March 24, 2026 15:57
Comment thread package.json Outdated
"@eslint/js": "^9.39.4",
"@guardian/eslint-config": "14.0.0",
"@guardian/prettier": "^10.0.0",
"@playwright/test": "^1.58.2",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason the latest version of playwright can't handle intercepting redirects properly. This test hangs in the latest version of Playwright.

Its potentially related to this issue? microsoft/playwright#39823

@AshCorr AshCorr added run_tests Run Playwright & Chromatic and removed run_tests Run Playwright & Chromatic labels Mar 24, 2026
@AshCorr AshCorr force-pushed the ash/dependencies-24032026 branch from 6606af6 to f435350 Compare March 25, 2026 08:48
@AshCorr AshCorr removed the run_tests Run Playwright & Chromatic label Mar 25, 2026
@AshCorr AshCorr added the run_tests Run Playwright & Chromatic label Mar 25, 2026
@AshCorr AshCorr added run_tests Run Playwright & Chromatic and removed run_tests Run Playwright & Chromatic labels Mar 25, 2026
Comment thread src/client/lib/hooks/useAdFreeCookie.ts
Comment thread cdk/package.json Outdated
"overrides": {
"minimatch@3.1.2": "3.1.4",
"minimatch@>=9.0.0 <9.0.7": "9.0.7",
"flatted@3.3.3": "3.4.2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps remove this as well from the overrides for consistency with the other package.json?

ioannakok
ioannakok previously approved these changes Mar 26, 2026
@ioannakok

Copy link
Copy Markdown
Contributor

🥳

@AshCorr AshCorr added run_tests Run Playwright & Chromatic and removed run_tests Run Playwright & Chromatic labels Mar 26, 2026
@AshCorr AshCorr added run_tests Run Playwright & Chromatic and removed run_tests Run Playwright & Chromatic labels Mar 26, 2026
@AshCorr AshCorr merged commit 2db6fcb into main Mar 26, 2026
34 checks passed
@AshCorr AshCorr deleted the ash/dependencies-24032026 branch March 26, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature run_tests Run Playwright & Chromatic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants