@pact-foundation/pact 13.0.0 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +21 -5
- package/package.json +9 -3
- package/scripts/ci/build-and-test.sh +1 -1
- package/scripts/ci/test-examples.sh +13 -5
- package/scripts/install-plugins.sh +3 -2
- package/src/common/net.spec.js +2 -4
- package/src/common/net.spec.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [13.1.0](https://github.com/pact-foundation/pact-js/compare/v13.0.0...v13.1.0) (2024-06-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* support alpine via pact-js-core 15.1.0 ([1d35c82](https://github.com/pact-foundation/pact-js/commit/1d35c826b225d99943b733aa7939361b8d8dfd78))
|
|
11
|
+
|
|
5
12
|
## [13.0.0](https://github.com/pact-foundation/pact-js/compare/v12.5.2...v13.0.0) (2024-06-17)
|
|
6
13
|
|
|
7
14
|
|
package/README.md
CHANGED
|
@@ -250,16 +250,32 @@ It's best to run Pact verification tests as part of your unit testing suite, so
|
|
|
250
250
|
|
|
251
251
|
<details><summary>Specification Compatibility</summary>
|
|
252
252
|
|
|
253
|
-
| Version
|
|
254
|
-
| -------
|
|
255
|
-
| 11.x.x
|
|
256
|
-
| 10.x.x
|
|
257
|
-
| 9.x.x
|
|
253
|
+
| Version | Stable | [Spec] Compatibility | Install |
|
|
254
|
+
| ------- | ------ | -------------------- | ------------------ |
|
|
255
|
+
| 11.x.x + | Yes | 2, 3, 4 | See [installation] |
|
|
256
|
+
| 10.x.x | Yes | 2, 3, 4 | See [installation] |
|
|
257
|
+
| 9.x.x | Yes | 2, 3\* | [9xx] |
|
|
258
258
|
|
|
259
259
|
_\*_ v3 support is limited to the subset of functionality required to enable language inter-operable [Message support].
|
|
260
260
|
|
|
261
261
|
</details>
|
|
262
262
|
|
|
263
|
+
<details><summary>Supported Platforms</summary>
|
|
264
|
+
|
|
265
|
+
| OS | Architecture | Supported | Pact-JS Version |
|
|
266
|
+
| ------------- | ------------ | --------- | ---------------- |
|
|
267
|
+
| MacOS | x86_64 | ✅ | All |
|
|
268
|
+
| MacOS | arm64 | ✅ | 9.x + |
|
|
269
|
+
| Linux (libc) | x86_64 | ✅ | All |
|
|
270
|
+
| Linux (libc) | arm64 | ✅ | 10.x + |
|
|
271
|
+
| Linux (musl) | x86_64 | ✅ | 13.x + |
|
|
272
|
+
| Linux (musl) | arm64 | ✅ | 13.x + |
|
|
273
|
+
| Windows | x86_64 | ✅ | All |
|
|
274
|
+
| Windows | x86 | ❌ | 9.x - |
|
|
275
|
+
| Windows | arm64 | ❌ | - |
|
|
276
|
+
|
|
277
|
+
</details>
|
|
278
|
+
|
|
263
279
|
## Roadmap
|
|
264
280
|
|
|
265
281
|
The [roadmap](https://docs.pact.io/roadmap/) for Pact and Pact JS is outlined on our main website.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pact-foundation/pact",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"description": "Pact for all things Javascript",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
"predist": "npm run clean && npm run format:check && npm run lint",
|
|
19
19
|
"release": "commit-and-tag-version",
|
|
20
20
|
"test": "nyc --check-coverage --reporter=html --reporter=text-summary mocha -t 120000",
|
|
21
|
-
"pretest": "bash scripts/install-plugins.sh"
|
|
21
|
+
"pretest": "bash scripts/install-plugins.sh",
|
|
22
|
+
"docker:alpine:build": "docker build --build-arg NODE_VERSION=${NODE_VERSION:-current} -f Dockerfile.alpine -t pact-js:alpine .",
|
|
23
|
+
"docker:debian:build": "docker build --build-arg NODE_VERSION=${NODE_VERSION:-current} -f Dockerfile.debian -t pact-js:debian .",
|
|
24
|
+
"docker:alpine:run": "docker run -e LOG_LEVEL=${LOG_LEVEL:-info} -e GIT_REF=${GIT_REF:-test} -e GITHUB_ACTIONS=${GITHUB_ACTIONS:-false} -e SKIP_EXAMPLES=${SKIP_EXAMPLES:-''} -w /home -v $(pwd):/home --rm pact-js:alpine",
|
|
25
|
+
"docker:debian:run": "docker run -e LOG_LEVEL=${LOG_LEVEL:-info} -e GIT_REF=${GIT_REF:-test} -e GITHUB_ACTIONS=${GITHUB_ACTIONS:-false} -e SKIP_EXAMPLES=${SKIP_EXAMPLES:-''} -w /home -v $(pwd):/home --rm pact-js:debian",
|
|
26
|
+
"docker:alpine:attach": "docker run -w /home -v $(pwd):/home --entrypoint /bin/bash --rm -it pact-js:alpine",
|
|
27
|
+
"docker:debian:attach": "docker run -w /home -v $(pwd):/home --entrypoint /bin/bash --rm -it pact-js:debian"
|
|
22
28
|
},
|
|
23
29
|
"repository": {
|
|
24
30
|
"type": "git",
|
|
@@ -95,7 +101,7 @@
|
|
|
95
101
|
]
|
|
96
102
|
},
|
|
97
103
|
"dependencies": {
|
|
98
|
-
"@pact-foundation/pact-core": "^15.
|
|
104
|
+
"@pact-foundation/pact-core": "^15.1.0",
|
|
99
105
|
"@types/express": "^4.17.11",
|
|
100
106
|
"axios": "^1.6.1",
|
|
101
107
|
"body-parser": "^1.20.0",
|
|
@@ -8,7 +8,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)" # Figure out where the
|
|
|
8
8
|
|
|
9
9
|
# Link the build so that the examples are always testing the
|
|
10
10
|
# current build, in it's properly exported format
|
|
11
|
-
(cd dist && npm ci
|
|
11
|
+
(cd dist && npm ci)
|
|
12
12
|
|
|
13
13
|
echo "Running e2e examples build for node version $(node --version)"
|
|
14
14
|
for i in examples/*; do
|
|
@@ -23,8 +23,12 @@ for i in examples/*; do
|
|
|
23
23
|
if [ x"${SETUP_DIST_ONLY:-}" == "x" ]; then
|
|
24
24
|
echo "running all examples as SETUP_DIST_ONLY not set"
|
|
25
25
|
# npm ci does not work because we have just changed the package.json file
|
|
26
|
-
npm install
|
|
27
|
-
|
|
26
|
+
npm install
|
|
27
|
+
if [[ -f /.dockerenv && "$(uname -sm)" == 'Linux aarch64' && "$GITHUB_ACTIONS" == 'true' ]]; then
|
|
28
|
+
npm run test:no:publish || npm test
|
|
29
|
+
else
|
|
30
|
+
npm test
|
|
31
|
+
fi
|
|
28
32
|
else
|
|
29
33
|
echo "skipping testing of examples as SETUP_DIST_ONLY set"
|
|
30
34
|
fi
|
|
@@ -55,8 +59,12 @@ for i in examples/v*/*; do
|
|
|
55
59
|
if [ x"${SETUP_DIST_ONLY:-}" == "x" ]; then
|
|
56
60
|
echo "running all examples as SETUP_DIST_ONLY not set"
|
|
57
61
|
# npm ci does not work because we have just changed the package.json file
|
|
58
|
-
npm install
|
|
59
|
-
|
|
62
|
+
npm install
|
|
63
|
+
if [[ -f /.dockerenv && "$(uname -sm)" == 'Linux aarch64' && "$GITHUB_ACTIONS" == 'true' ]]; then
|
|
64
|
+
npm run test:no:publish || npm test
|
|
65
|
+
else
|
|
66
|
+
npm test
|
|
67
|
+
fi
|
|
60
68
|
else
|
|
61
69
|
echo "skipping testing of examples as SETUP_DIST_ONLY set"
|
|
62
70
|
fi
|
|
@@ -38,7 +38,7 @@ function detect_osarch() {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
VERSION="0.
|
|
41
|
+
VERSION="0.1.2"
|
|
42
42
|
detect_osarch
|
|
43
43
|
|
|
44
44
|
if [ ! -f ~/.pact/bin/pact-plugin-cli ]; then
|
|
@@ -48,7 +48,8 @@ if [ ! -f ~/.pact/bin/pact-plugin-cli ]; then
|
|
|
48
48
|
echo " Downloading from: ${DOWNLOAD_LOCATION}"
|
|
49
49
|
curl -L -o ~/.pact/bin/pact-plugin-cli-${os}-${arch}.gz "${DOWNLOAD_LOCATION}"
|
|
50
50
|
echo " Downloaded $(file ~/.pact/bin/pact-plugin-cli-${os}-${arch}.gz)"
|
|
51
|
-
gunzip -
|
|
51
|
+
gunzip -f ~/.pact/bin/pact-plugin-cli-${os}-${arch}.gz
|
|
52
|
+
mv ~/.pact/bin/pact-plugin-cli-${os}-${arch} ~/.pact/bin/pact-plugin-cli
|
|
52
53
|
chmod +x ~/.pact/bin/pact-plugin-cli
|
|
53
54
|
fi
|
|
54
55
|
|
package/src/common/net.spec.js
CHANGED
|
@@ -13,7 +13,7 @@ chai_1.default.use(chai_as_promised_1.default);
|
|
|
13
13
|
describe('Net', function () {
|
|
14
14
|
var port = 4567;
|
|
15
15
|
var defaultHost = '0.0.0.0';
|
|
16
|
-
var specialPort =
|
|
16
|
+
var specialPort = -1;
|
|
17
17
|
// Utility function to create a server on a given port and return a Promise
|
|
18
18
|
var createServer = function (p, host) {
|
|
19
19
|
if (host === void 0) { host = defaultHost; }
|
|
@@ -26,9 +26,7 @@ describe('Net', function () {
|
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
(
|
|
30
|
-
? describe.skip
|
|
31
|
-
: describe)('#isPortAvailable', function () {
|
|
29
|
+
describe('#isPortAvailable', function () {
|
|
32
30
|
context('when the port is not allowed to be bound', function () {
|
|
33
31
|
it('returns a rejected promise', function () {
|
|
34
32
|
return expect((0, net_2.isPortAvailable)(specialPort, defaultHost)).to.eventually.be
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"net.spec.js","sourceRoot":"","sources":["../../../src/common/net.spec.ts"],"names":[],"mappings":";;;;;AAAA,8CAAwB;AACxB,sEAA8C;AAC9C,4CAA0B;AAC1B,6BAAwC;AACxC,oDAA8B;AAEtB,IAAA,MAAM,GAAK,cAAI,OAAT,CAAU;AAExB,cAAI,CAAC,GAAG,CAAC,0BAAc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