diff --git a/.circleci/config.yml b/.circleci/config.yml index 0cc6fe0d..bdec13e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ references: - image: cimg/node:<< parameters.node-version >> parameters: node-version: - default: "22.13" # We default to the highest active LTS + default: "24.12" # We default to the highest active LTS type: string workspace_root: &workspace_root ~/project @@ -76,7 +76,7 @@ jobs: - checkout - *restore_cache - node/install-npm: - version: '10.2.5' + version: '11.7.0' - run: name: Install project dependencies command: npm install @@ -151,29 +151,29 @@ workflows: name: build-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - test: requires: - build-v<< matrix.node-version >> name: test-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - lint: requires: - build-v<< matrix.node-version >> name: lint-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - release-please: filters: <<: *filters_only_main requires: # We release on the highest active LTS version of # Node.js that we support - - test-v22.13 - - lint-v22.13 + - test-v24.12 + - lint-v24.12 build-test-publish: jobs: @@ -183,7 +183,7 @@ workflows: name: build-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - test: filters: <<: *filters_release_build @@ -192,7 +192,7 @@ workflows: name: test-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - lint: filters: <<: *filters_release_build @@ -201,7 +201,7 @@ workflows: name: lint-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - publish: context: npm-publish-token filters: @@ -209,8 +209,8 @@ workflows: requires: # We release on the highest active LTS version of # Node.js that we support - - lint-v22.13 - - test-v22.13 + - lint-v24.12 + - test-v24.12 build-test-prepublish: jobs: @@ -220,7 +220,7 @@ workflows: name: build-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - test: filters: <<: *filters_prerelease_build @@ -229,7 +229,7 @@ workflows: name: test-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - lint: filters: <<: *filters_prerelease_build @@ -238,7 +238,7 @@ workflows: name: lint-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - prepublish: context: npm-publish-token filters: @@ -246,8 +246,8 @@ workflows: requires: # We release on the highest active LTS version of # Node.js that we support - - lint-v22.13 - - test-v22.13 + - lint-v24.12 + - test-v24.12 nightly: triggers: @@ -261,7 +261,7 @@ workflows: name: build-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] - test: requires: - build-v<< matrix.node-version >> @@ -269,4 +269,4 @@ workflows: name: test-v<< matrix.node-version >> matrix: parameters: - node-version: [ "24.0", "22.13", "20.18" ] + node-version: [ "24.12", "22.21" ] diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 1d723746..766d57c2 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -15,7 +15,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 20 + node-version: 24 - name: Install dependencies run: npm install diff --git a/package-lock.json b/package-lock.json index 82aac634..be273768 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "typescript": "^5.9.3" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -12190,7 +12190,7 @@ "version": "4.2.1", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/biome-config": { @@ -12212,7 +12212,7 @@ "aws-rum-web": "^1.25.0" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/crash-handler": { @@ -12224,7 +12224,7 @@ "@dotcom-reliability-kit/logger": "^4.2.7" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/errors": { @@ -12232,7 +12232,7 @@ "version": "4.2.0", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/eslint-config": { @@ -12243,7 +12243,7 @@ "@types/eslint": "^8.56.6" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "peerDependencies": { "eslint": ">=8.27.0" @@ -12264,7 +12264,7 @@ "undici": "^7.18.2" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/log-error": { @@ -12281,7 +12281,7 @@ "@types/express": "^5.0.6" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/logger": { @@ -12300,7 +12300,7 @@ "@types/lodash.clonedeep": "^4.5.9" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "peerDependencies": { "pino-pretty": ">=7.0.0 <11.0.0" @@ -12317,7 +12317,7 @@ "@types/express": "^5.0.6" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/middleware-log-errors": { @@ -12333,7 +12333,7 @@ "express": "^5.2.1" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/middleware-render-error-info": { @@ -12351,7 +12351,7 @@ "@types/express": "^5.0.6" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/opentelemetry": { @@ -12375,7 +12375,7 @@ "express": "^5.2.1" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/serialize-error": { @@ -12383,7 +12383,7 @@ "version": "4.2.0", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "packages/serialize-request": { @@ -12394,7 +12394,7 @@ "@types/express": "^5.0.6" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "resources/logos": { @@ -12410,7 +12410,7 @@ "@types/svgo": "^3.0.0" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" } }, "resources/splunk-dashboards": { diff --git a/package.json b/package.json index 29d28005..cbf2e1cd 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,9 @@ "typescript": "^5.9.3" }, "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "volta": { - "node": "22.13.0" + "node": "24.12.0" } } diff --git a/packages/app-info/docs/migration.md b/packages/app-info/docs/migration.md index 122290e1..1a03d1de 100644 --- a/packages/app-info/docs/migration.md +++ b/packages/app-info/docs/migration.md @@ -14,6 +14,9 @@ Emoji | Label | Meaning * [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) * [Migrating from v3 to v4](#migrating-from-v3-to-v4) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v4 to v5](#migrating-from-v4-to-v5) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -35,3 +38,14 @@ Emoji | Label | Meaning ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v4 to v5 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/app-info/package.json b/packages/app-info/package.json index 45beb8b3..049cb646 100644 --- a/packages/app-info/package.json +++ b/packages/app-info/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: app-info\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts" diff --git a/packages/client-metrics-web/README.md b/packages/client-metrics-web/README.md index 3c742384..ac1a6fba 100644 --- a/packages/client-metrics-web/README.md +++ b/packages/client-metrics-web/README.md @@ -34,6 +34,7 @@ A client for sending operational metrics events to [AWS CloudWatch RUM](https:// * [Usage (infrastructure)](#usage-infrastructure) * [Customer Products Client Metrics](#customer-products-client-metrics) * [Running your own infrastructure](#running-your-own-infrastructure) +* [Migrating](#migrating) * [Contributing](#contributing) * [License](#license) @@ -362,6 +363,12 @@ Resources: - errors ``` + +## Migrating + +Consult the [Migration Guide](./docs/migration.md) if you're trying to migrate to a later major version of this package. + + ## Contributing See the [central contributing guide for Reliability Kit](https://github.com/Financial-Times/dotcom-reliability-kit/blob/main/docs/contributing.md). diff --git a/packages/client-metrics-web/docs/migration.md b/packages/client-metrics-web/docs/migration.md new file mode 100644 index 00000000..e26aa540 --- /dev/null +++ b/packages/client-metrics-web/docs/migration.md @@ -0,0 +1,25 @@ + +# Migration guide for @dotcom-reliability-kit/client-metrics-web + +This document outlines how to migrate to the latest version of the Reliability Kit client-metrics-web package. Throughout this guide we use the following emoji and labels to indicate the level of change required: + +Emoji | Label | Meaning +----------------|:------------------|:------- +:red_circle: | Breaking | A breaking change which will likely require code or config changes to resolve +:orange_circle: | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed +:yellow_circle: | Deprecation | A deprecated feature which will require code changes in the future + +* [Migrating from v0 to v1](#migrating-from-v0-to-v1) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) + + +## Migrating from v0 to v1 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/client-metrics-web/package.json b/packages/client-metrics-web/package.json index 3dfc3e91..611576e8 100644 --- a/packages/client-metrics-web/package.json +++ b/packages/client-metrics-web/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: client-metrics-web\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/crash-handler/docs/migration.md b/packages/crash-handler/docs/migration.md index feaba3ac..cb3dfd06 100644 --- a/packages/crash-handler/docs/migration.md +++ b/packages/crash-handler/docs/migration.md @@ -17,6 +17,9 @@ Emoji | Label | Meaning * [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) * [Migrating from v4 to v5](#migrating-from-v4-to-v5) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v5 to v6](#migrating-from-v5-to-v6) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -64,3 +67,14 @@ You can safely migrate to this version of Crash Handler if your app is either _n ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v5 to v6 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/crash-handler/package.json b/packages/crash-handler/package.json index 1f1893c9..82c4de2a 100644 --- a/packages/crash-handler/package.json +++ b/packages/crash-handler/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: crash-handler\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/errors/docs/migration.md b/packages/errors/docs/migration.md index 8a5ad3e0..3013f13f 100644 --- a/packages/errors/docs/migration.md +++ b/packages/errors/docs/migration.md @@ -14,6 +14,9 @@ Emoji | Label | Meaning * [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) * [Migrating from v3 to v4](#migrating-from-v3-to-v4) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v4 to v5](#migrating-from-v4-to-v5) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -35,3 +38,14 @@ Emoji | Label | Meaning ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v4 to v5 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/errors/package.json b/packages/errors/package.json index 4c538f59..053f53e5 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: errors\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts" diff --git a/packages/eslint-config/docs/migration.md b/packages/eslint-config/docs/migration.md index ccfcbb9a..556f503d 100644 --- a/packages/eslint-config/docs/migration.md +++ b/packages/eslint-config/docs/migration.md @@ -14,6 +14,9 @@ Emoji | Label | Meaning * [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) * [Migrating from v3 to v4](#migrating-from-v3-to-v4) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v4 to v5](#migrating-from-v4-to-v5) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -43,3 +46,14 @@ You may need to make changes to your code if these linting errors are found. ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v4 to v5 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index c02a50e1..a33e017f 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: eslint-config\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/fetch-error-handler/README.md b/packages/fetch-error-handler/README.md index 04b4f888..e8a12a88 100644 --- a/packages/fetch-error-handler/README.md +++ b/packages/fetch-error-handler/README.md @@ -19,6 +19,7 @@ Properly handle fetch errors and avoid a lot of boilerplate in your app. This mo * [Creating your own handler](#creating-your-own-handler) * [`createFetchErrorHandler` configuration options](#createfetcherrorhandler-configuration-options) * [`options.upstreamSystemCode`](#optionsupstreamsystemcode) +* [Migrating](#migrating) * [Contributing](#contributing) * [License](#license) @@ -219,6 +220,11 @@ const handleFetchErrors = createFetchErrorHandler({ When this is set, any errors thrown by `handleFetchErrors` will have a [`relatesToSystems` property](https://github.com/Financial-Times/dotcom-reliability-kit/tree/main/packages/errors#operationalerrorrelatestosystems) which includes the given system code. +## Migrating + +Consult the [Migration Guide](./docs/migration.md) if you're trying to migrate to a later major version of this package. + + ## Contributing See the [central contributing guide for Reliability Kit](https://github.com/Financial-Times/dotcom-reliability-kit/blob/main/docs/contributing.md). diff --git a/packages/fetch-error-handler/docs/migration.md b/packages/fetch-error-handler/docs/migration.md new file mode 100644 index 00000000..e5187498 --- /dev/null +++ b/packages/fetch-error-handler/docs/migration.md @@ -0,0 +1,25 @@ + +# Migration guide for @dotcom-reliability-kit/fetch-error-handler + +This document outlines how to migrate to the latest version of the Reliability Kit fetch-error-handler package. Throughout this guide we use the following emoji and labels to indicate the level of change required: + +Emoji | Label | Meaning +----------------|:------------------|:------- +:red_circle: | Breaking | A breaking change which will likely require code or config changes to resolve +:orange_circle: | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed +:yellow_circle: | Deprecation | A deprecated feature which will require code changes in the future + +* [Migrating from v1 to v2](#migrating-from-v1-to-v2) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) + + +## Migrating from v1 to v2 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/fetch-error-handler/package.json b/packages/fetch-error-handler/package.json index 5f42b8aa..211b199c 100644 --- a/packages/fetch-error-handler/package.json +++ b/packages/fetch-error-handler/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: fetch-error-handler\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/log-error/docs/migration.md b/packages/log-error/docs/migration.md index 438df63f..6f29687c 100644 --- a/packages/log-error/docs/migration.md +++ b/packages/log-error/docs/migration.md @@ -17,6 +17,9 @@ Emoji | Label | Meaning * [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) * [Migrating from v4 to v5](#migrating-from-v4-to-v5) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v5 to v6](#migrating-from-v5-to-v6) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -63,3 +66,14 @@ logHandledError({ ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v5 to v6 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/log-error/package.json b/packages/log-error/package.json index 691a8794..2f5ed856 100644 --- a/packages/log-error/package.json +++ b/packages/log-error/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: log-error\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/logger/docs/migration.md b/packages/logger/docs/migration.md index c394f272..2434ab34 100644 --- a/packages/logger/docs/migration.md +++ b/packages/logger/docs/migration.md @@ -36,6 +36,9 @@ Emoji | Label | Meaning * [Log times are now ISO 8601 timestamps](#log-times-are-now-iso-8601-timestamps) * [Migrating from v3 to v4](#migrating-from-v3-to-v4) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v4 to v5](#migrating-from-v4-to-v5) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from n-logger @@ -302,3 +305,14 @@ If neither of the above is true, this should be a safe update with no code chang ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v4 to v5 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/logger/package.json b/packages/logger/package.json index 7da501fc..1d4ff6b4 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: logger\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/middleware-allow-request-methods/README.md b/packages/middleware-allow-request-methods/README.md index 386dc119..7b026c19 100644 --- a/packages/middleware-allow-request-methods/README.md +++ b/packages/middleware-allow-request-methods/README.md @@ -81,11 +81,18 @@ An array of HTTP methods that are allowed for the route. This must be an `Array` This option defaults to `[]`. + +## Migrating + +Consult the [Migration Guide](./docs/migration.md) if you're trying to migrate to a later major version of this package. + + ## Contributing See the [central contributing guide for Reliability Kit](https://github.com/Financial-Times/dotcom-reliability-kit/blob/main/docs/contributing.md). + ## License Licensed under the [MIT](https://github.com/Financial-Times/dotcom-reliability-kit/blob/main/LICENSE) license.
-Copyright © 2025, The Financial Times Ltd. \ No newline at end of file +Copyright © 2025, The Financial Times Ltd. diff --git a/packages/middleware-allow-request-methods/docs/migration.md b/packages/middleware-allow-request-methods/docs/migration.md new file mode 100644 index 00000000..6f0e357c --- /dev/null +++ b/packages/middleware-allow-request-methods/docs/migration.md @@ -0,0 +1,25 @@ + +# Migration guide for @dotcom-reliability-kit/middleware-allow-request-methods + +This document outlines how to migrate to the latest version of the Reliability Kit middleware-allow-request-methods package. Throughout this guide we use the following emoji and labels to indicate the level of change required: + +Emoji | Label | Meaning +----------------|:------------------|:------- +:red_circle: | Breaking | A breaking change which will likely require code or config changes to resolve +:orange_circle: | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed +:yellow_circle: | Deprecation | A deprecated feature which will require code changes in the future + +* [Migrating from v1 to v2](#migrating-from-v1-to-v2) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) + + +## Migrating from v1 to v2 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/middleware-allow-request-methods/package.json b/packages/middleware-allow-request-methods/package.json index 31ce67a7..80385577 100644 --- a/packages/middleware-allow-request-methods/package.json +++ b/packages/middleware-allow-request-methods/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: middleware-allow-request-methods\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/middleware-log-errors/docs/migration.md b/packages/middleware-log-errors/docs/migration.md index 7d93c4b3..15b394ec 100644 --- a/packages/middleware-log-errors/docs/migration.md +++ b/packages/middleware-log-errors/docs/migration.md @@ -17,6 +17,9 @@ Emoji | Label | Meaning * [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) * [Migrating from v4 to v5](#migrating-from-v4-to-v5) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v5 to v6](#migrating-from-v5-to-v6) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -66,3 +69,14 @@ You can safely migrate to this version of the error logging middleware if your a ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v5 to v6 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/middleware-log-errors/package.json b/packages/middleware-log-errors/package.json index c3cd71df..5c972e8f 100644 --- a/packages/middleware-log-errors/package.json +++ b/packages/middleware-log-errors/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: middleware-log-errors\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/middleware-render-error-info/docs/migration.md b/packages/middleware-render-error-info/docs/migration.md index 3e2a8d54..c62f252b 100644 --- a/packages/middleware-render-error-info/docs/migration.md +++ b/packages/middleware-render-error-info/docs/migration.md @@ -19,6 +19,9 @@ Emoji | Label | Meaning * [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) * [Migrating from v5 to v6](#migrating-from-v5-to-v6) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v6 to v7](#migrating-from-v6-to-v7) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -62,3 +65,14 @@ You can safely migrate to this version of the error logging middleware if your a ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v6 to v7 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/middleware-render-error-info/package.json b/packages/middleware-render-error-info/package.json index b6414d48..0f865712 100644 --- a/packages/middleware-render-error-info/package.json +++ b/packages/middleware-render-error-info/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: middleware-render-error-info\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/opentelemetry/docs/migration.md b/packages/opentelemetry/docs/migration.md index 1ba0a06b..0c10bc43 100644 --- a/packages/opentelemetry/docs/migration.md +++ b/packages/opentelemetry/docs/migration.md @@ -13,6 +13,9 @@ Emoji | Label | Meaning * [JavaScript API changes](#javascript-api-changes) * [Migrating from v2 to v3](#migrating-from-v2-to-v3) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v3 to v4](#migrating-from-v3-to-v4) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -40,3 +43,14 @@ If you're using the `--require` method or importing `@dotcom-reliability-kit/ope ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v3 to v4 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index acd22730..093d98e3 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: opentelemetry\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/serialize-error/docs/migration.md b/packages/serialize-error/docs/migration.md index 5aac8cab..6aaa0353 100644 --- a/packages/serialize-error/docs/migration.md +++ b/packages/serialize-error/docs/migration.md @@ -14,6 +14,9 @@ Emoji | Label | Meaning * [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) * [Migrating from v3 to v4](#migrating-from-v3-to-v4) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v4 to v5](#migrating-from-v4-to-v5) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -35,3 +38,14 @@ Emoji | Label | Meaning ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v4 to v5 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/serialize-error/package.json b/packages/serialize-error/package.json index ea7c10af..6364c6d5 100644 --- a/packages/serialize-error/package.json +++ b/packages/serialize-error/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: serialize-error\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts" diff --git a/packages/serialize-request/docs/migration.md b/packages/serialize-request/docs/migration.md index c16b8fab..94384798 100644 --- a/packages/serialize-request/docs/migration.md +++ b/packages/serialize-request/docs/migration.md @@ -14,6 +14,9 @@ Emoji | Label | Meaning * [Node.js 16 is no longer supported](#nodejs-16-is-no-longer-supported) * [Migrating from v3 to v4](#migrating-from-v3-to-v4) * [Node.js 18 is no longer supported](#nodejs-18-is-no-longer-supported) +* [Migrating from v4 to v5](#migrating-from-v4-to-v5) + * [Node.js 20 is no longer supported](#nodejs-20-is-no-longer-supported) + * [Node.js 22.11 is no longer supported](#nodejs-2211-is-no-longer-supported) ## Migrating from v1 to v2 @@ -35,3 +38,14 @@ Emoji | Label | Meaning ### Node.js 18 is no longer supported **:red_circle: Breaking:** this version drops support for Node.js v18. If your app is already using Node.js v20 or above then you can migrate with no code changes. + + +## Migrating from v4 to v5 + +### Node.js 20 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v20. If your app is already using Node.js v22 then you may be able to migrate without code changes. + +### Node.js 22.11 is no longer supported + +**:red_circle: Breaking:** this version drops support for Node.js v22.11 or lower. If your app is already using Node.js v22.12 then you may be able to migrate without code changes. This is so that we can publish native ESM modules without requiring complex changes in our consuming applications. [See #1479 for more information](https://github.com/Financial-Times/dotcom-reliability-kit/issues/1479). diff --git a/packages/serialize-request/package.json b/packages/serialize-request/package.json index c8315698..1c817e8c 100644 --- a/packages/serialize-request/package.json +++ b/packages/serialize-request/package.json @@ -11,7 +11,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues?q=label:\"package: serialize-request\"", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/resources/logos/package.json b/resources/logos/package.json index 054af8ad..4183a03b 100644 --- a/resources/logos/package.json +++ b/resources/logos/package.json @@ -12,7 +12,7 @@ "bugs": "https://github.com/Financial-Times/dotcom-reliability-kit/issues", "license": "MIT", "engines": { - "node": "20.x || 22.x || 24.x" + "node": "^22.12 || ^24" }, "scripts": { "build": "./scripts/build.js"