Tooling refresh - #1164
Open
Michael1142 wants to merge 47 commits into
Open
Conversation
Upgrade GOV.UK Frontend to version 6.4. Remove unused frontend dependencies and obsolete Webpack configuration. Simplify the Sass loader chain and copy only the GOV.UK fonts and images required at runtime, while loading Nunjucks templates directly from the installed package. Retain the local TypeScript declaration required for the GOV.UK Frontend JavaScript entrypoint.
Upgrade Sass, sass-loader, css-loader and Mini CSS Extract Plugin. Replace the deprecated Sass import with the module-based GOV.UK Frontend entrypoint.
Upgrade the asset-copying, generated-template and TypeScript loader dependencies.
Upgrade to ESLint 10 and replace the legacy ESLint configuration with flat config. Use the consolidated TypeScript ESLint package, scope Jest and CommonJS rules to the relevant files, and replace eslint-plugin-import with simple import sorting. Remove the obsolete Babel ESLint dependencies and legacy configuration files, and exclude generated output from Prettier.
Upgrade Jest, ts-jest and the HTML smoke-test reporter. Replace the remaining Chai assertions with Jest assertions and remove unused test dependencies. Retain jest-util as an explicit peer dependency required by ts-jest under Yarn Plug'n'Play.
Upgrade Prettier, lint-staged and Husky. Migrate the Husky installation and pre-commit hook to the current format, skip hook installation in CI and production, and run staged-file fixes sequentially.
Use Playwright Test as the browser API entry point and remove the redundant direct Playwright and debug dependencies. Retain Chokidar for Nunjucks template watching and playwright-core for the Axe Playwright peer dependency. Remove the unused TypeScript decorator option.
Replace Nodemon and ts-node with tsx watch for local development. Remove redundant direct Playwright and debug dependencies, use Playwright Test as the browser API entry point, and retain Chokidar for Nunjucks template watching. Include route tests in the standard test command and remove the unused TypeScript decorator configuration.
Remove the form-data and js-yaml dependency overrides. Allow dependencies to resolve versions within their declared compatibility ranges. This updates form-data naturally and avoids forcing js-yaml 4 into tooling that declares support for js-yaml 3.
Upgrade the compiler and adopt the modern Node 20 module model with an ES2023 target. Explicitly configure Node and Jest types, enable isolated module transforms for ts-jest, and declare SCSS imports handled by Webpack.
Retain the production HTTP server so it can be closed on SIGTERM. Leave SIGINT to Node's default handling so local development exits immediately on Ctrl+C.
Use an application-owned Winston 3 logger with structured JSON output. Remove the direct dependency and local type declaration for @hmcts/nodejs-logging.
Declare the production runtime command so Node runs as PID 1 and receives Kubernetes termination signals. Include the Yarn PnP ESM loader in the Docker build context.
Update Playwright, linting, testing and runtime packages within their existing major versions.
Upgrade node-config and remove its obsolete DefinitelyTyped package. Upgrade express-rate-limit, align the Supertest types and move the Stylelint toolchain to its latest major versions.
Add the Yarn editor SDKs and workspace TypeScript configuration so dependencies resolve correctly in VS Code.
Michael1142
requested review from
Asaleem-hmcts,
SalimKainos and
jordankainos
and removed request for
a team
July 27, 2026 15:56
Contributor
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Upgrade Application Insights to v3 and migrate configuration from instrumentation keys to connection strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modernises the Express.js service template and brings its runtime, development tooling, frontend build and test stack up to date.
The changes remove obsolete dependencies and configuration, improve the local development experience, and simplify how applications created from the template are built and run.
Changes
Runtime and container
SIGTERM.TypeScript and development workflow
ts-nodewithtsx watch.Logging
@hmcts/nodejs-loggingwith an application-owned Winston 3 logger.Testing and linting
ts-jest, Playwright and related test tooling.eslint-plugin-importordering rules with simple import sorting.Frontend build
Dependency maintenance
form-dataandjs-yaml.copy-webpack-pluginrestriction from Renovate.@types/configpackage now thatconfigprovides its own types.Template maintenance
Why
The template had accumulated outdated dependencies, legacy configuration and compatibility workarounds. Updating these incrementally had become increasingly difficult because several parts of the toolchain were coupled to older versions of Node.js, TypeScript, Webpack and ESLint.
This change establishes a more current baseline for services created from the template and reduces the amount of migration work required by adopting teams.
Testing
yarn installyarn typecheckyarn lintyarn testyarn buildyarn start:devSIGTERMReview notes
This is a broad toolchain update, but the commits have been kept separate by concern to make review easier.
The areas most worth reviewing closely are:
@hmcts/nodejs-logging;Breaking changes
Services generated from the updated template will use newer versions of Node.js, TypeScript, ESLint, GOV.UK Frontend and associated tooling.
This PR updates the template itself and does not automatically migrate existing services.