Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b5a6a81
chore!: drop support for Node.js 20
rowanmanning Jan 7, 2026
05eff7f
build: bump Node.js versions to the latest minors
rowanmanning Jan 9, 2026
4b4910b
chore!: drop support for Node.js <=22.11
rowanmanning Jan 9, 2026
0017141
refactor: switch to use exports rather than main
rowanmanning Jan 15, 2026
c52d583
build: migrate serializers to node test
rowanmanning Jan 23, 2026
4ac8916
build: migrate errors to node-test
rowanmanning Jan 26, 2026
f5243a1
build: migrate logger to node-test
rowanmanning Jan 27, 2026
f8c94b1
build: migrate app-info to node-test
rowanmanning Jan 27, 2026
2d76a8a
build: remove tests from eslint-config
rowanmanning Jan 27, 2026
4a0e282
build: migrate client-metrics-web to node-test
rowanmanning Jan 27, 2026
4df7c87
build: migrate crash-handler to node-test
rowanmanning Jan 27, 2026
46fb9d1
build: migrate fetch-error-handler to node-test
rowanmanning Jan 27, 2026
7d09655
build: migrate log-error to node-test
rowanmanning Jan 28, 2026
0ca7650
build: migrate middleware-allow... to node-test
rowanmanning Jan 28, 2026
63febd2
build: migrate middleware-log-errors to node-test
rowanmanning Jan 28, 2026
386e647
build: migrate middleware-render... to node-test
rowanmanning Jan 28, 2026
a5b6ec3
build: migrate opentelemetry to node-test
rowanmanning Jan 28, 2026
65c5ac7
chore: correct the test coverage include flag
rowanmanning Jan 28, 2026
f05dd8c
build: remove Jest, everything is node-test now!
rowanmanning Jan 28, 2026
3075516
docs: remove an out-of-date comment
rowanmanning Feb 2, 2026
5fac1c6
docs: remove an old TODO comment
rowanmanning Feb 2, 2026
2708b4b
test: remove a redundant afterEach block
rowanmanning Feb 2, 2026
cf8507e
docs: correct a typo in a copy/pasted doc comment
rowanmanning Feb 2, 2026
cadf47d
test: fix the snapshot tests for errors
rowanmanning Feb 3, 2026
c71fb7c
test: remove test-coverage-include settings
rowanmanning Feb 3, 2026
c0794fb
refactor!: migrate errors to ESM
rowanmanning Jan 30, 2026
8066b11
refactor!: migrate app-info to ESM
rowanmanning Feb 17, 2026
e657b32
refactor!: migrate serialize-error to ESM
rowanmanning Feb 18, 2026
18ecde5
refactor!: migrate serialize-request to ESM
rowanmanning Feb 18, 2026
4acde28
refactor!: migrate logger to ESM
rowanmanning Mar 2, 2026
028aa92
refactor!: migrate allow request middleware to ESM
rowanmanning Mar 6, 2026
0a3818a
refactor!: migrate log-error to ESM
rowanmanning Mar 6, 2026
ef54c2b
refactor!: migrate error logging middleware to ESM
rowanmanning Mar 9, 2026
10cc3d1
refactor!: migrate error render middleware to ESM
rowanmanning Mar 10, 2026
398279a
refactor!: migrate fetch error handler to ESM
rowanmanning Mar 11, 2026
d277230
refactor!: migrate crash handler to ESM
rowanmanning Mar 10, 2026
e8f18a2
refactor!: migrate client-metrics-web to esm
camillecroci Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -201,16 +201,16 @@ 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:
<<: *filters_release_build
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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -238,16 +238,16 @@ 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:
<<: *filters_prerelease_build
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:
Expand All @@ -261,12 +261,12 @@ 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 >>
context: next-nightly-build
name: test-v<< matrix.node-version >>
matrix:
parameters:
node-version: [ "24.0", "22.13", "20.18" ]
node-version: [ "24.12", "22.21" ]
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 1 addition & 11 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,7 @@
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"trailingCommas": "none"
},
"globals": [
"afterAll",
"afterEach",
"beforeAll",
"beforeEach",
"describe",
"expect",
"it",
"jest"
]
}
},
"json": {
"formatter": {
Expand Down
11 changes: 9 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ As with Biome, we check types in pull requests and errors will block merging, so

### Unit tests

We run unit tests with [Jest](https://jestjs.io/) across most of our packages and aim for [100% coverage](#coverage). Tests are written within each package (e.g. `packages/example/test/example.spec.js`). You can run the tests with the following:
We run unit tests with [the Node test runner](https://nodejs.org/api/test.html) across most of our packages and aim for [100% coverage](#coverage). Tests are written within each package (e.g. `packages/example/test/example.spec.js`). You can run the tests with the following:

```
npm run test
Expand All @@ -195,14 +195,21 @@ To run the tests for a single package, use:
npm run test -w packages/<name>
```

You can also run unit and end-to-end tests specifically. You might want to do this to get a quick sense check on your code, because unit tests generally run a lot faster. To do this, replace the `test` command above with either `test:unit` or `test:end-to-end`, e.g.

```
npm run test:unit
npm run test:end-to-end -w packages/<name>
```

Tests are also run on pull requests and failing tests will block merging, so it's useful to check before opening a PR.

#### Coverage

We intentionally fail the unit tests if coverage drops below 100%. This library is meant to help our applications be more reliable and so it's important that we cover as many edge cases as possible. If you have a valid reason for some code not to be covered, e.g. an empty function as a default parameter, then [use code comments to disable coverage](https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md) for that line or block:

```js
/* istanbul ignore next */
/* node:coverage ignore next */
function example() { console.log('this is not covered'); }
```

Expand Down
4 changes: 2 additions & 2 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If we wanted to support ES Modules (which _is_ the future direction I think we'l

2. We write our code in ES Modules and publish them as ES Modules with no cross-compilation. This makes them incompatible with a large number of our apps (many of them use CommonJS exclusively) and would tie adopting Reliability Kit to an unrelated migration step

A note that for now there is a small downside to sticking with CommonJS. It will continue to work [for the forseeable future](https://github.com/nodejs/node/issues/33954) in Node.js itself, but more modules on npm are switching to native ESM which is not very compatible with CommonJS. We may find ourselves forced to reconsider at some point if any of our key dependencies (e.g. Express or Jest) migrate to ESM-only and drop support for their old CommonJS versions.
A note that for now there is a small downside to sticking with CommonJS. It will continue to work [for the forseeable future](https://github.com/nodejs/node/issues/33954) in Node.js itself, but more modules on npm are switching to native ESM which is not very compatible with CommonJS. We may find ourselves forced to reconsider at some point if any of our key dependencies (e.g. Express) migrates to ESM-only and drop support for their old CommonJS versions.


## Tooling
Expand All @@ -52,7 +52,7 @@ When testing a monorepo, running tests and linting can happen in one of two ways

2. Have tooling installed in each package and have commands in the top level package to run these

We have opted to have tooling installed at the top level. This speeds up build times, because Jest has a non-trivial start up time and multiplying this by the number of packages can lead to a lot of overhead. This also means that the tooling is consistent between all of the different packages and upgrading the tooling happens in one place. There is more information on [how to run tests](./contributing.md#testing) in the contributing guide.
We have opted to have tooling installed at the top level in most cases. This speeds up build times because multiplying startup times by the number of packages can lead to a lot of overhead. The exception is our tests, which are run via `node --test` from within each of the packages. There is more information on [how to run tests](./contributing.md#testing) in the contributing guide.

### Monorepo management

Expand Down
6 changes: 4 additions & 2 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"compilerOptions": {
"alwaysStrict": true,
"checkJs": true,
"esModuleInterop": true,
"maxNodeModuleJsDepth": 0,
"module": "commonjs",
"module": "nodenext",
"moduleResolution": "nodenext",
"noEmit": true,
"noImplicitOverride": true,
"noImplicitThis": true,
Expand All @@ -12,7 +14,7 @@
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"target": "es2022",
"target": "es2024",
"useUnknownInCatchVariables": true,
"types": []
},
Expand Down
Loading
Loading