GitHub
10/30/2025, 10:26 AMnpm run dist works locally (this will run tests, lint and build)
• Commit messages are ready to go in the changelog (see below for details)
• PR template filled in (see below for details)
### PR Template
This PR fixes a grammatical error in README
pact-foundation/pact-jsGitHub
10/30/2025, 11:38 PMGitHub
10/31/2025, 12:05 AMGitHub
10/31/2025, 1:40 AMGitHub
10/31/2025, 6:03 AM<https://github.com/pact-foundation/jest-pact/tree/master|master> by renovate[bot]
<https://github.com/pact-foundation/jest-pact/commit/fea18a2356f57113b3f1849efec43f0d4e619595|fea18a23> - chore(deps): update dependency rimraf to v6.1.0 (#447)
pact-foundation/jest-pactGitHub
10/31/2025, 9:14 PMGitHub
11/01/2025, 9:45 AMGitHub
11/01/2025, 3:48 PMGitHub
11/03/2025, 2:01 AMGitHub
11/03/2025, 3:04 AMGitHub
11/03/2025, 7:36 PMGitHub
11/04/2025, 2:56 AMGitHub
11/04/2025, 10:09 PMGitHub
11/05/2025, 5:41 AMrequire errors from *ts files (#5498) (d89dbaf)
##### 🧹 Chores
• run tests on PRs for and pushes to v11.x (#5525) (8b21b38)
• setup release-please for v11 (#5522) (663fff4)
---
### Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻️ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
---
• If you want to rebase/retry this PR, check this box
---
This PR was generated by Mend Renovate. View the repository job log.
pact-foundation/pact-js-coreGitHub
11/05/2025, 6:47 AMrequire errors from *ts files (#5498) (d89dbaf)
##### 🧹 Chores
• run tests on PRs for and pushes to v11.x (#5525) (8b21b38)
• setup release-please for v11 (#5522) (663fff4)
---
### Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻️ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
---
• If you want to rebase/retry this PR, check this box
---
This PR was generated by Mend Renovate. View the repository job log.
pact-foundation/pact-jsGitHub
11/06/2025, 8:37 PMGitHub
11/07/2025, 10:13 PMGitHub
11/10/2025, 5:41 PMprojectService and project are set (#11333)
• eslint-plugin: handle override modifier in promise-function-async fixer (#11730)
• eslint-plugin: [no-deprecated] fix double-report on computed literal identifiers (#11006, #10958)
##### ❤️ Thank You
• Evgeny Stepanovych @undsoft
• Kentaro Suzuki @sushichan044
• Maria Solano @MariaSolOs
You can read about our versioning strategy and releases on our website.
typescript-eslint/typescript-eslint (@typescript-eslint/parser)
### `v8.46.4`
Compare Source
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our versioning strategy and releases on our website.
typescript-eslint/typescript-eslint (typescript-eslint)
### `v8.46.4`
Compare Source
This was a version bump only for typescript-eslint to align it with other projects, there were no code changes.
You can read about our versioning strategy and <https://typescript-eslint.io/users/releases|releases…
pact-foundation/pact-js-coreGitHub
11/11/2025, 10:12 AMGitHub
11/11/2025, 2:05 PMGitHub
11/11/2025, 4:51 PMGitHub
11/11/2025, 4:52 PMGitHub
11/11/2025, 9:04 PMv15.0.1
• Provider Pact library: @pact-foundation/pact 16.0.2
• Node Version: v22.19.0
• ExpressJS: 4.21.2
### Issue Checklist
Please confirm the following:
• I have upgraded to the latest
• I have the read the FAQs in the Readme
• I have triple checked, that there are no unhandled promises in my code and have read the section on intermittent test failures
• I have set my log level to debug and attached a log file showing the complete request/response cycle
• For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem
### Expected behaviour
Verification running OK, and shuts down gracefully.
### Actual behaviour
Tests are not running if I allow pact to set the content length (2), when body = {}.
If I delete the content-length header, in the requestFilter, everything runs as it should.
I am not able to measure really what is going wrong. It calculates content-length of 2 (which is printed on the server, before the json middleware), which seems correct to me, but express clearly sees something else in the body, probably less than 2 bytes (since it keeps looking for more).
I would assume that it probably something utf-8 encoding related, counting string characters (incorrect) instead of bytes (correct) or similar, but should be careful about jumping to conclusions.
Note that I get the same behavior from node if I curl into this app, with a too long content-lenght header, which makes the express.json() middleware to fail.
# Good - correct content-length:
curl -X PUT -H "Content-Length: 2" -H "Content-Type: application/json" -d '{}' "http://localhost:8081/test"
# Returns:
# {"error":"must have required stuff in the body"}
# Bad, too long content-length:
curl -X PUT -H "Content-Length: 3" -H "Content-Type: application/json" -d '{}' "http://localhost:8081/test"
# Never returns, same as described error here
# Also bad, too short content-length:
curl -X PUT -H "Content-Length: 1" -H "Content-Type: application/json" -d '{}' "http://localhost:8081/test"
# Returns immediately, with no content, so different from this issue.
The last curl makes server log this:
SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
...( stacktrace)
### Steps to reproduce
Sample pact, stored in `repro-pact.js`:
{
"consumer": {
"name": "MyConsumer"
},
"interactions": [
{
"description": "a request to update stuff without body",
"request": {
"body": {},
"headers": {
"Accept": "application/json",
"Authorization": "Bearer I am a token",
"Content-Type": "application/json"
},
"method": "PUT",
"path": "/test"
},
"response": {
"body": {
"error": "must have required stuff in the body"
},
"headers": {
"Content-Type": "application/json"
},
"status": 400
}
}
],
"metadata": {
"pact-js": {
"version": "15.0.1"
},
"pactRust": {
"ffi": "0.4.22",
"models": "1.2.3"
},
"pactSpecification": {
"version": "3.0.0"
}
},
"provider": {
"name": "MyProvider"
}
}
Minimal node.js / express test code, stored in `pact-content-length-bug-minimal.cjs`:
const { describe, it, beforeEach, afterEach } = require('node:test');
const express = require('express');
// Create Express server that hangs on Content-Length mismatches
const app = express();
app.use((req, res, next) => {
console.log('Received request', req.url, req.headers);
next();
});
app.use(express.json());
app.put('/test', (req, res) => {
console.log('Never gets here, if content-length header is kept as it is from pact...');
if (!req.body || Object.keys(req.body).length === 0) {
return res.status(400).json({ error: 'must have required stuff in the body' });
}
res.json({ success: true });
});
// In your provider test file (e.g., provider.spec.js)
const { Verifier } = require('@pact-foundation/pact');
const path = require('path');
const port = 8081;
describe('Pact Verification', () => {
let server;
beforeEach(() => {
server = app.listen(port, () => {
console.log(Server running on port ${port});
});
});
afterEach(() => {
server.close();
});
it('validates the expectations of Matching Service', () => {
return new Verifier({
providerBaseUrl: <http://localhost:${port}>,
pactUrls: [
path.resolve(process.cwd(), "./repro-pact.json")
],
requestFilter: (req, res, next) => {
// Remove Content-Length header to avoid hanging issue
delete req.headers['content-length'];
next();
},
logLevel: 'debug',
})
.verifyProvider()
.then(() => {
console.log('Pact Verification Complete!');
});
});
});
Then run it with native node test runner:
node --test pact-content-length-bug-minimal.cjs
### Relevant log files
Failure case:
```
[213646.740] INFO (262377): pact@16.0.2: Verifying provider
Server running on port 8081
[213646.761] INFO (262377): pact-core@17.0.1: Verifying Pacts.
[213646.763] INFO (262377): pact-core@17.0.1: Verifying Pact Files
[213646.770] INFO (262377): 0.4.28: pact native library successfully found, and the correct version
2025-11-11T203646.801712Z INFO ThreadId(21) pact_verifier: Running setup provider state change handler with empty state for 'a request to update stuff without body'
[213646.837] WARN (262377): pact@16.0.2: no state handler found for state: ""
2025-11-11T203646.841040Z INFO ThreadId(21) pact_verifier: Running provider verification for 'a request to update stuff without body'
2025-11-11T203646.841186Z INFO ThreadId(21) pact_verifier:provider client Sending request to provider at http://127.0.0.1:36335/
2025-11-11T203646.841201Z INFO ThreadId(21) pact_verifier:provider client Sending request HTTP Request ( method: PUT, path: /test, query: None, headers: Some({"Authorization": ["Bearer I am a token"], "Content-Type": ["application/json"], "Accept": ["application/json"]}), body: Present(2 bytes) )
(node:262377) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead.
(Use node --trace-deprecation ... to show where the warning was created)
Received request /test {
'content-length': '2',
host: '127.0.0.1:36335',
'accept-encoding': 'gzip, deflate',
accept: 'application/json',
'content-type': 'application/json',
authorization: 'Bearer I am a token',
connection: 'close'
}
2025-11-11T203718.282632Z INFO ThreadId(21) pact_verifier: Running teardown provider state change handler with empty state for 'a request to update stuff without body'
2025-11-11T203718.288562Z WARN ThreadId(21) pact_matching:metrics
Please note:
We are tracking events anonymously to gather important usage statistics like Pact version and operating system. To disable tracking, set the 'PACT_DO_NOT_TRACK' environment variable to 'true'.
Verifying a pact between MyConsumer and MyProvider
a request to update stuff without body (0s loading, 30s 49ms verification)
Request Failed - error sending request for url (http://127.0.0.1:36335/test)
Failures:
1) Verifying a pact between MyConsumer and MyProvider - a request to update stuff without body - error sending request for url (http://127.0.0.1:36335/test)
There were 1 pact failures
[213718.366] ERROR (262377): pact-core@17.0.1: Verification unsuccessful
▶ Pact Verification
✖ validates the expectations of Matching Service (30191.212445ms)
✖ Pact Verificatio…
pact-foundation/pact-jsGitHub
11/12/2025, 2:38 AMGitHub
11/12/2025, 3:36 AMGitHub
11/12/2025, 9:52 AMGitHub
11/12/2025, 11:50 AMGitHub
11/13/2025, 5:59 AMGitHub
11/14/2025, 7:09 PMGitHub
11/14/2025, 9:46 PM