Releases: Financial-Times/n-express
v32.1.4
What's Changed
- build(deps): bump the reliability-kit group with 2 updates by @dependabot[bot] in #1036
- build(deps): bump n-health from 14.1.3 to 14.1.4 by @dependabot[bot] in #1039
- build(deps): bump the reliability-kit group with 2 updates by @dependabot[bot] in #1043
- build(deps): bump the reliability-kit group with 2 updates by @dependabot[bot] in #1051
- Remove a redundant and noisy log by @rowanmanning in #1053
Full Changelog: v32.1.3...v32.1.4
v32.1.3
v32.1.2
What's Changed
- Various development dependency bumps by @ft-dependency-auto-merger
- CPP-2597 chore: remove references to legacy firstClickfreeModel from anon midd… by @zeinaaabbb in #1015
- Skip anon middleware for non-Preflight requests by @meel-io in #1005
- Explicitly name all middleware functions to improve OpenTelemetry spans by @ivomurrell in #1017
New Contributors
- @zeinaaabbb made their first contribution in #1015
Full Changelog: v32.1.1...v32.1.2
v31.12.0
What's Changed
- Remove references to legacy firstClickfreeModel from anon middleware by @zeinaaabbb in #1015
Full Changelog: v31.11.1...v31.12.0
v31.11.1
v32.1.1
What's Changed
- docs: remove yak shave button by @apaleslimghost in #968
- docs: remove badges by @apaleslimghost in #969
- Remove the
/__brew-coffeeendpoint by @rowanmanning in #977 - Simplify the
robots.txtmiddleware by @rowanmanning in #978 - Remove the via middleware by @rowanmanning in #979
- Remove the
EXPRESS_STARTwarning by @rowanmanning in #980 - build(deps): bump the reliability-kit group with 2 updates by @dependabot in #970
- build(deps-dev): bump the development-dependencies group with 2 updates by @dependabot in #971
- build(deps-dev): bump @types/node from 22.14.0 to 22.14.1 in the development-dependencies group by @dependabot in #972
- build(deps-dev): bump @types/node from 22.14.1 to 22.15.0 in the development-dependencies group by @dependabot in #973
- build(deps-dev): bump @types/node from 22.15.0 to 22.15.2 in the development-dependencies group by @dependabot in #974
- build(deps-dev): bump @types/node from 22.15.2 to 22.15.3 in the development-dependencies group by @dependabot in #975
- build(deps): bump n-health from 14.0.5 to 14.0.6 by @dependabot in #976
Full Changelog: v32.1.0...v32.1.1
v32.1.0
What's Changed
- Bump n-health from 13.1.4 to 14.0.2 by @dependabot in #938
- Bump @dotcom-reliability-kit/serialize-request from 3.1.1 to 4.0.0 by @dependabot in #920
- Bump @dotcom-reliability-kit/logger from 3.2.2 to 4.0.0 by @dependabot in #921
- Bump sinon from 19.0.4 to 20.0.0 by @dependabot in #947
- build(deps-dev): bump @types/express from 5.0.0 to 5.0.1 in the development-dependencies group by @dependabot in #949
- build(deps): bump @dotcom-reliability-kit/log-error from 5.0.0 to 5.0.1 in the reliability-kit group by @dependabot in #950
- build(deps): bump n-health from 14.0.2 to 14.0.3 by @dependabot in #951
- build(deps-dev): bump @types/node from 22.13.13 to 22.13.14 in the development-dependencies group by @dependabot in #952
- build(deps): bump the reliability-kit group with 2 updates by @dependabot in #953
- build(deps): bump n-health from 14.0.3 to 14.0.4 by @dependabot in #954
- build(deps-dev): bump @types/node from 22.13.14 to 22.13.17 in the development-dependencies group by @dependabot in #956
- build(deps-dev): bump @types/node from 22.13.17 to 22.14.0 in the development-dependencies group by @dependabot in #957
- build(deps-dev): bump the development-dependencies group across 1 directory with 9 updates by @dependabot in #964
- fix: remove the withAb option entirely by @rowanmanning in #966
- feat: remove logVary by @apaleslimghost in #960
- feat: remove default error middleware by @apaleslimghost in #959
- build(deps): bump n-health from 14.0.4 to 14.0.5 by @dependabot in #965
- feat: make express a peer dependency by @apaleslimghost in #961
Full Changelog: v32.0.0...v32.1.0
v32.0.0
Breaking Changes
This release includes a number of breaking changes that mean you'll need to make code or config changes in your app.
Dropped support for Node.js 18
n-express v32 now only supports Node.js 20 or above. Node.js 18 goes end-of-life 2025-04-30.
Remove Graphite metrics
n-express v32 includes next-metrics v13, which no longer sends metrics to Graphite. The API remains in place but now any calls to metrics methods will log a warning and send nothing. E.g.
const { metrics } = require('@financial-times/n-express');
metrics.count('example');will now log the following warning:
{
"level": "warn",
"event": "NEXT_METRICS_DEPRECATION",
"message": "Call to Metrics#count found",
"error": {
"message": "Metrics#count no longer does anything. Please remove it from your code",
"stack": "..."
}
}This means your code will continue to work but any dashboards and alarms that still rely on Graphite metrics will stop working. You should either remove these or add OpenTelemetry to your app.
You should aim to remove metrics calls over time, a later major version of n-express will fully remove the metrics property. You can find these with the following Splunk searches (replace <index> with heroku or hako, replace <system> with your system code):
index=<index> source=<system> event=NEXT_METRICS_DEPRECATION
Remove global fetch polyfill
n-express v32 no longer imports isomorphic-fetch, which means your system may end up without a global fetch method. If you do nothing, it's highly likely that your app will crash immediately due to no global fetch being available.
You have two options if you want things to continue working:
Option 1: (easier) use isomorphic-fetch explicitly
Install the module with:
npm install isomorphic-fetchAdd the following to the top of the main entry-point JS for your application:
require('isomorphic-fetch');This option is quick and gets the migration done, however Node.js 24 will remove the --no-experimental-fetch option, forcing our hand. Option 2 will need to be done at some point before 2027-04-30 but we don't blame you if you want to defer it!
Option 2: (harder) remove --no-experimental-fetch
Remove use of the --no-experimental-fetch flag from your application and rely on the native fetch provided by Node.js. This is a more complex migration because the fetch provided by isomorphic-fetch (node-fetch) is not spec-compliant, whereas Node.js fetch is.
If you use Tool Kit, add the following to your .toolkitrc.yml file:
options:
plugins:
dotcom-tool-kit:
allowNativeFetch: trueOne of the major differences is that native fetch does not have a timeout option - something we use extensively across the FT's tech estate. This is an oversimplified guide, but you can use abort signals instead:
await fetch('https://example.com/', {
- timeout: 5000
+ signal: AbortSignal.timeout(5000)
});What's Changed
- Bump @types/node from 22.13.10 to 22.13.11 in the development-dependencies group by @dependabot in #946
- Bump @types/node from 22.13.11 to 22.13.13 in the development-dependencies group by @dependabot in #948
- v32 by @rowanmanning in #885
Full Changelog: v31.11.0...v32.0.0
v31.11.0
What's Changed
- Bump @types/node from 22.10.7 to 22.10.10 in the development-dependencies group by @dependabot in #922
- Bump the development-dependencies group with 5 updates by @dependabot in #924
- Bump the development-dependencies group with 8 updates by @dependabot in #925
- Bump @types/node from 22.12.0 to 22.13.0 in the development-dependencies group by @dependabot in #926
- Bump @types/node from 22.13.0 to 22.13.1 in the development-dependencies group by @dependabot in #927
- Bump the development-dependencies group with 8 updates by @dependabot in #928
- Bump the development-dependencies group with 8 updates by @dependabot in #930
- Bump @types/node from 22.13.1 to 22.13.4 in the development-dependencies group by @dependabot in #931
- Bump the development-dependencies group with 3 updates by @dependabot in #932
- Bump the development-dependencies group across 1 directory with 9 updates by @dependabot in #935
- Bump the development-dependencies group across 1 directory with 10 updates by @dependabot in #937
- Bump @types/node from 22.13.9 to 22.13.10 in the development-dependencies group by @dependabot in #939
- Bump @financial-times/n-flags-client from 15.0.2 to 16.0.0 by @dependabot in #941
- Bump the development-dependencies group with 2 updates by @dependabot in #942
- Bump supertest from 7.0.0 to 7.1.0 in the development-dependencies group by @dependabot in #945
- CPP-2397: Derive isUserSubscribed property from ft-user-subscription header by @meel-io in #944
Full Changelog: v31.10.0...v31.11.0
v31.10.0
What's Changed
- Bump the development-dependencies group across 1 directory with 2 updates by @dependabot in #867
- Bump @types/node from 22.7.8 to 22.7.9 in the development-dependencies group by @dependabot in #868
- Bump chai from 4.3.6 to 4.5.0 by @dependabot in #869
- Bump sinon from 4.5.0 to 19.0.2 by @dependabot in #872
- Bump @types/express from 4.17.21 to 5.0.0 by @dependabot in #874
- Bump supertest from 3.4.2 to 7.0.0 by @dependabot in #871
- Bump @financial-times/n-flags-client from 15.0.1 to 15.0.2 by @dependabot in #880
- Bump the development-dependencies group across 1 directory with 2 updates by @dependabot in #888
- Bump n-health from 13.1.1 to 13.1.3 by @dependabot in #892
- Bump next-metrics from 12.15.1 to 12.15.2 by @dependabot in #893
- Bump @types/node from 22.9.0 to 22.9.1 in the development-dependencies group by @dependabot in #895
- Bump the development-dependencies group across 1 directory with 2 updates by @dependabot in #897
- Bump @types/node from 22.9.4 to 22.10.0 in the development-dependencies group by @dependabot in #898
- Bump the reliability-kit group with 2 updates by @dependabot in #899
- Bump @types/node from 22.10.0 to 22.10.1 in the development-dependencies group by @dependabot in #900
- Bump n-health from 13.1.3 to 13.1.4 by @dependabot in #901
- Bump express from 4.21.1 to 4.21.2 by @dependabot in #902
- Bump the development-dependencies group with 8 updates by @dependabot in #903
- Bump @types/node from 22.10.1 to 22.10.2 in the development-dependencies group by @dependabot in #904
- Bump the development-dependencies group with 8 updates by @dependabot in #905
- Bump @types/node from 22.10.2 to 22.10.3 in the development-dependencies group by @dependabot in #906
- Bump @types/node from 22.10.3 to 22.10.4 in the development-dependencies group by @dependabot in #907
- Bump the development-dependencies group across 1 directory with 10 updates by @dependabot in #912
- Bump the development-dependencies group with 8 updates by @dependabot in #913
- Bump @dotcom-reliability-kit/logger from 3.2.1 to 3.2.2 in the reliability-kit group by @dependabot in #914
- Bump the development-dependencies group with 9 updates by @dependabot in #915
- Support Node.js 22 by @rowanmanning in #918
Full Changelog: v31.9.4...v31.10.0