Skip to content

chore: dependency management#421

Open
alexluckett wants to merge 27 commits into
mainfrom
chore/dependency-management-2026-06-05
Open

chore: dependency management#421
alexluckett wants to merge 27 commits into
mainfrom
chore/dependency-management-2026-06-05

Conversation

@alexluckett

Copy link
Copy Markdown
Contributor

Dependency management

Removed (unused)

  • @hapi/catbox — not directly imported (codebase uses @hapi/catbox-memory and @hapi/catbox-redis)
  • @types/humanize-duration — no usage (was in production deps)
  • atob — no import; codebase uses global atob built-in (Node.js v16+)
  • blankie — only in stale type declarations, never registered as hapi plugin
  • btoa — no import; codebase uses global btoa built-in (Node.js v16+)
  • humanize-duration — no source usage
  • maplibre-gl — no source usage
  • @types/atob, @types/btoa — removed with their packages
  • @types/eslint — no source imports from 'eslint'
  • @types/hapi, @types/hoek, @types/wreck — types for old unscoped packages not used
  • @types/hapi__catbox-memory, @types/hapi__cookie, @types/hapi__yar — no usage
  • @types/mysql, @types/url-parse, @types/webpack-assets-manifest — no usage
  • core-js — not referenced in babel config or source

Updated (minor/patch)

  • @defra/forms-model, @defra/hapi-tracing, @hapi/*, @turf/*, date-fns, dotenv, expr-eval-fork, ioredis, liquidjs, lodash, obscenity, pino-pretty, resolve, yaml and all @babel/*, @types/lodash, autoprefixer, babel-loader, babel-plugin-module-resolver, cookie, globals, jest (minor within v30), nock, postcss, postcss-loader, prettier, react, react-dom, sass-embedded, terser-webpack-plugin, tsc-alias, tsx, webpack, webpack-assets-manifest
  • typescript-eslint pinned at 8.56.1 — v8.60.1 introduced new no-unsafe-* warnings in Joi extension callbacks (telephone.ts) that were previously passing
  • neostandard pinned at 0.12.2 — 0.13.0 breaks eslint via eslint-plugin-import-x (import-x drops Node.js require support)

Major updates — applied in this PR

  • pino: 9 → 10 — no code changes required
  • eslint-plugin-jsdoc: 50 → 63 — added reject-any-type: 'off' and reject-function-type: 'off' to both ESLint config blocks; fixed two escape-inline-tags violations
  • eslint-plugin-jest: 28 → 29 — no code changes required
  • lint-staged: 15 → 17 — no code changes required
  • concurrently: 9 → 10 — no code changes required
  • @types/node: 24 → 25 — no code changes required
  • webpack-cli: 6 → 7 — no code changes required
  • copy-webpack-plugin: 13 → 14 — no code changes required
  • sass-loader: 16 → 17 — no code changes required
  • cssnano + cssnano-preset-default: 7 → 8 — no code changes required
  • joi: 17 → 18 — ArraySchema<T> generic changed; added as unknown as casts in CheckboxesField.ts, DeclarationField.ts, FileUploadField.ts. Note: @defra/forms-model@3.0.675 declares peer joi@"^17.0.0" — functionally compatible but peer constraint will need updating upstream
  • govuk-frontend: 5 → 6 — removed Header (dropped from v6 exports); removed $govuk-new-organisation-colours SCSS variable (became default in v6)

Major updates — deferred (large)

  • eslint v10 — neostandard@0.12.2 declares peer eslint@"^9.0.0"; v10 incompatible
  • global-jsdom v29 / jsdom v29 / @types/jsdom v28 — @exodus/bytes ESM-only nested dep causes Jest transform failure
  • stylelint v17 / stylelint-config-gds v3 — introduces ~128 new selector-no-qualifying-type violations
  • typescript v6 — requires ignoreDeprecations: "6.0" and ambient type changes; deferred across all repos
  • proxy-agent v8 — ESM-only; SyntaxError: Cannot use import statement outside a module in Jest
  • chokidar v5 — ESM-only; pinned at 3.6.0 to satisfy CJS transitive dep; watch requires chokidar to be installed error
  • marked v16+ — ESM-only; SyntaxError: Unexpected token 'export' in Jest

@alexluckett alexluckett force-pushed the chore/dependency-management-2026-06-05 branch from 6d8996f to b6842be Compare June 5, 2026 14:58
@alexluckett alexluckett marked this pull request as draft June 8, 2026 11:04
Plugin targets govuk-frontend v6.2.0 features; ^6.0.0 would have
allowed consumers to satisfy the peer with an older minor.
govukHeader no longer accepts serviceName/serviceUrl in v6; move
them to govukServiceNavigation as per the updated design system.
@alexluckett alexluckett force-pushed the chore/dependency-management-2026-06-05 branch from 3f3250c to 8ad9386 Compare June 8, 2026 13:54
joi was reverted to v17; these casts were only needed for v18's stricter
type inference and are not required (or correct) on v17.
@alexluckett alexluckett marked this pull request as ready for review June 8, 2026 14:10
govuk-frontend v6 dropped the value param from govukFileUpload entirely.
The override was a workaround for v5's template rendering a truthy FileState
object as value="[object Object]" on the input.
- govukSkipLink block instead of skipLink
- containerStart block instead of beforeContent
Overriding the outer header/footer blocks bypassed the v6 template's
_govukTemplateHeader and _govukTemplateFooter macros, which provide the
<header> and <footer> element wrappers. Switch to the inner blocks
(govukHeader, govukServiceNavigation, govukFooter) so the macros run
as intended.
@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

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.

2 participants