Skip to content

FPA-6: Application patching#764

Merged
simonmoore100 merged 2 commits into
masterfrom
feature/fpa6/application-patching
Jun 17, 2026
Merged

FPA-6: Application patching#764
simonmoore100 merged 2 commits into
masterfrom
feature/fpa6/application-patching

Conversation

@simonmoore100

Copy link
Copy Markdown
Contributor

No description provided.

@ConorGallagher1 ConorGallagher1 left a comment

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.

LGTM, approved

Copilot AI left a comment

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.

Pull request overview

This PR is primarily a dependency/linting “patching” update that reformats TypeScript code to align with updated ESLint/TypeScript-ESLint tooling, while also making a few small runtime-safety adjustments (notably in scheduler flows and list item querying).

Changes:

  • Upgrades dependencies (e.g., axios) and modernizes ESLint tooling/config (eslint v8, @typescript-eslint v8, switch to eslint-config-standard + updated rules).
  • Applies widespread style/typing refactors (type-only imports, arrow-parens, trailing commas, removing redundant await/return await).
  • Adds/adjusts some runtime guards and control-flow clarity (e.g., handling missing nextAnnualReviewStartDate, explicit return after redirects).

Reviewed changes

Copilot reviewed 99 out of 102 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/server/services/secrets-manager/local.ts Minor formatting + removes redundant await in recursive call.
src/server/services/secrets-manager/index.ts Flattens config boolean expression formatting.
src/server/services/secrets-manager/aws.ts Import spacing formatting.
src/server/services/redis.ts Import formatting + expands dnsLookup callback block.
src/server/services/metadata.ts Collapses multi-line object entries for “Palestine” keys.
src/server/services/logger.ts Normalizes quote style in message checks.
src/server/services/govuk-notify.ts Removes redundant await/return await in promise flows; minor formatting.
src/server/services/country-codes/index.ts Formatting + arrow function inline cleanup.
src/server/services/mocks/aws-sdk.ts Collapses array formatting.
src/server/server.ts Import spacing formatting.
src/server/models/listItem/types.ts Converts imports to import type where applicable.
src/server/models/listItem/summary.ts Type-only imports + safer conditional spread for userId.
src/server/models/listItem/queryFactory.ts Type-only imports + function signature formatting.
src/server/models/listItem/providers/TranslatorsInterpreters.ts Arrow-parens + shorthand property usage.
src/server/models/listItem/providers/helpers.ts Wraps long expression across lines.
src/server/models/listItem/providers/FuneralDirectors.ts Converts import to import type.
src/server/models/listItem/providers/deserialisers/helpers.ts Converts namespace import to type-only.
src/server/models/listItem/listItemCreateInputFromWebhook.ts Type-only imports + import formatting.
src/server/models/listItem/listItem.ts Type-only imports + separates Prisma types vs values.
src/server/models/listItem/geoHelpers.ts Type-only imports + formatting adjustments.
src/server/models/helpers.ts Converts some imports to type-only.
src/server/models/feedback.ts Type-only imports + formatting; adds trailing comma in orderBy.
src/server/models/db/mocks/prisma-client.ts Splits type import from value imports.
src/server/models/mocks/user.ts Collapses mock implementation formatting.
src/server/middlewares/static.ts Splits Express to type-only import + expands server.use call formatting.
src/server/middlewares/rate-limit.ts Quote normalization + Express type-only import.
src/server/middlewares/logger.ts Express type-only import.
src/server/middlewares/compression.ts Converts Express imports to type-only.
src/server/middlewares/body-parser.ts Express type-only import.
src/server/config/server-config.ts Formatting + changes FEEDBACK email fallback default.
src/server/config/database-config.ts Flattens boolean assignment formatting.
src/server/components/sitemap/helpers.ts Express type-only import.
src/server/components/lists/find/handlers/funeral-directors/repatriation.ts Removes trailing whitespace line.
src/server/components/healthCheck/routes.ts Adds trailing comma in object.
src/server/components/healthCheck/index.ts Normalizes quotes.
src/server/components/healthCheck/helpers.ts Express type-only import.
src/server/components/formRunner/translatorsInterpreters.ts Type-only imports.
src/server/components/formRunner/lawyers.ts Type-only imports.
src/server/components/formRunner/helpers.ts Converts imports to type-only where applicable.
src/server/components/formRunner/funeralDirectors.ts Type-only imports.
src/server/components/formRunner/forms.ts Uses object property shorthand.
src/server/components/formRunner/constants.ts Adds missing semicolon.
src/server/components/feedback/index.ts Normalizes quotes + removes blank line.
src/server/components/feedback/helpers.ts Type-only import + template literal terminator formatting.
src/server/components/development/helpers.ts Express type-only import.
src/server/components/development/controllers.ts Request/Response type-only import.
src/server/components/dashboard/relatedLinks/handlers/relatedLinkIndexParam.ts Makes redirect/next flow explicit with return;.
src/server/components/dashboard/relatedLinks/handlers/confirm.ts Makes redirect flow explicit with return;.
src/server/components/dashboard/listsItems/validateAccessToList.ts Type-only imports + makes next() usage explicit with return;.
src/server/components/dashboard/listsItems/types.ts Converts several imports to type-only + formats type definition.
src/server/components/dashboard/listsItems/requestValidation.ts Type-only imports + makes redirect/next flow explicit.
src/server/components/dashboard/listsItems/item/update/actionHandlers/update.ts Type-only imports + explicit returns after redirects.
src/server/components/dashboard/listsItems/item/update/actionHandlers/remove.ts Type-only imports + explicit returns after redirects.
src/server/components/dashboard/listsItems/item/update/actionHandlers/publish.ts Removes redundant awaits when returning promises.
src/server/components/dashboard/listsItems/item/update/actionHandlers/pin.ts Request/Response type-only import.
src/server/components/dashboard/listsItems/item/update/actionHandlers/index.ts Uses object property shorthand.
src/server/components/dashboard/listsItems/item/update/actionHandlers/helpers.ts Removes redundant await; collapses call to one line.
src/server/components/dashboard/listsItems/item/update/actionHandlers/archive.ts Adds missing-user guard; explicit redirect returns; default change message.
src/server/components/dashboard/listsItems/controllers.ts Fixes indentation/brace alignment in try/catch.
src/server/components/dashboard/listsItems/controllers.development.ts Removes unused import + removes shadowed keyDates assignment.
src/server/components/dashboard/index.ts Express type-only import.
src/server/components/dashboard/annualReview/helpers.ts Type-only import + removes unnecessary cast.
src/server/components/dashboard/annualReview/helpers.keyDates.ts Type-only imports.
src/server/components/dashboard/annualReview/controllers.ts Makes control-flow explicit for redirect/render and returns.
src/server/components/cookies/controllers.ts Request/Response type-only import + collapses res.cookie call formatting.
src/server/components/auth/types.ts Converts import to type-only.
src/server/components/auth/router.ts Collapses controller imports into one line.
src/server/components/auth/passport.ts Type-only imports + formatting cleanup.
src/server/components/auth/json-web-token.ts Splits default/type import + formatting.
src/server/components/auth/express-session.ts Uses object shorthand for secret.
src/server/components/annual-review/controller.ts Makes render/redirect flows explicit with return;.
src/scheduler/workers/unpublish/weekly/sendUnpublishReminder.ts Type-only imports + split Notify client imports.
src/scheduler/workers/unpublish/weekly/sendEmailToNonRespondents.ts Type-only import + removes redundant awaits.
src/scheduler/workers/unpublish/weekly/index.ts Simplifies rejected-result logging; removes cast.
src/scheduler/workers/unpublish/weekly/getMetaForList.ts Type-only imports.
src/scheduler/workers/unpublish/weekly/findReminderToSend.ts Type-only imports.
src/scheduler/workers/unpublish/weekly/findNonRespondentsForList.ts Adds guard for missing nextAnnualReviewStartDate.
src/scheduler/workers/unpublish/types.ts Type-only import.
src/scheduler/workers/unpublish/dayBefore/sendDayBeforeProviderReminder.ts Type-only imports + split Notify client imports.
src/scheduler/workers/unpublish/dayBefore/sendDayBeforePostReminder.ts Type-only imports + separates Prisma types/values.
src/scheduler/workers/unpublish/dayBefore/sendDayBeforeEmails.ts Type-only imports + removes redundant awaits + task formatting.
src/scheduler/workers/unpublish/dayBefore/getMetaForList.ts Type-only imports.
src/scheduler/workers/unpublish/dayBefore/findNonRespondentsForList.ts Adds guard for missing nextAnnualReviewStartDate + logger formatting.
src/scheduler/workers/unpublish/dayBefore/addDayBeforePostReminderAudit.ts Type-only imports.
src/scheduler/workers/unpublish/day/sendUnpublishProviderConfirmation.ts Type-only imports + split Notify client imports.
src/scheduler/workers/unpublish/day/sendUnpublishPostConfirmation.ts Type-only imports + separates Prisma types/values.
src/scheduler/workers/unpublish/day/sendEmails.ts Type-only imports + removes redundant awaits + task formatting.
src/scheduler/workers/unpublish/day/getMetaForList.ts Type-only imports.
src/scheduler/workers/unpublish/day/findNonRespondentsForList.ts Adds guard for missing nextAnnualReviewStartDate.
src/scheduler/workers/unpublish/day/changeState/resetAnnualReviewForList.ts Type-only imports + separates Prisma types/values.
src/scheduler/workers/unpublish/day/changeState/changeState.ts Simplifies rejected-result logging; removes cast.
src/scheduler/workers/types.ts Type-only import.
src/scheduler/workers/main.ts Removes redundant await; returns Promise.allSettled directly.
src/scheduler/workers/createAnnualReviewProviderUrl.ts Type-only import.
src/scheduler/workers/analytics/views/LiveLists.ts Removes redundant await when returning promise.
src/scheduler/workers/analytics/views/intservicesprovided.ts Removes redundant await when returning promise.
src/scheduler/dbHelpers.ts Uses object property shorthand.
src/scheduler/batch/tasks/populateMissingAnnualReviewDates/index.ts Simplifies rejected-result logging; removes cast.
src/scheduler/batch/tasks/populateMissingAnnualReviewDates/addAnnualReviewStartDate.ts Removes redundant await when returning promise.
package.json Bumps axios + ESLint toolchain; updates overrides.
package-lock.json Lockfile updates aligning to new dependency versions.
.eslintrc.js Switches to standard config; expands TS overrides; adjusts rule set + TS project root.
Comments suppressed due to low confidence (1)

src/server/models/listItem/geoHelpers.ts:22

  • countryName/text default to 0.0 which then gets cast to string. This makes the call to geoLocatePlaceByText behave unexpectedly (e.g., searching for "0"), and defeats the type safety of the function signature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/server/components/dashboard/listsItems/types.ts
Comment thread src/scheduler/workers/unpublish/dayBefore/sendDayBeforeEmails.ts
Comment thread src/scheduler/workers/unpublish/dayBefore/sendDayBeforeEmails.ts Outdated
Comment thread src/scheduler/workers/unpublish/weekly/index.ts
Comment thread src/scheduler/batch/tasks/populateMissingAnnualReviewDates/index.ts
Comment thread src/scheduler/workers/unpublish/day/changeState/changeState.ts
Comment thread src/server/config/server-config.ts

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 99 out of 102 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/server/models/listItem/geoHelpers.ts:22

  • getPlaceGeoPoint destructures countryName/text with numeric defaults (0.0) even though they are typed as optional strings. This forces unsafe casts and can pass numbers into geoLocatePlaceByText, leading to incorrect requests or runtime issues. Use string defaults (or early-return) and remove the casts.

Comment thread src/server/config/server-config.ts
@simonmoore100
simonmoore100 merged commit 551684c into master Jun 17, 2026
1 check passed
@simonmoore100
simonmoore100 deleted the feature/fpa6/application-patching branch June 17, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants