@pact-foundation/pact 10.3.0 → 10.3.1
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/package.json +1 -1
- package/scripts/ci/build-and-test.sh +0 -45
- package/src/v4/index.js +3 -3
- package/src/v4/index.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 [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [10.3.1](https://github.com/pact-foundation/pact-js/compare/v10.3.0...v10.3.1) (2022-11-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Fixes and Improvements
|
|
9
|
+
|
|
10
|
+
* PactV4 feature flag check was causing import errors for all imports ([8897da7](https://github.com/pact-foundation/pact-js/commit/8897da76bdf145f0d3ffb53f7fca14cde2f659a9))
|
|
11
|
+
|
|
5
12
|
## [10.3.0](https://github.com/pact-foundation/pact-js/compare/v10.2.2...v10.3.0) (2022-11-29)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
|
@@ -27,48 +27,3 @@ echo "This will be version '$(npx absolute-version)'"
|
|
|
27
27
|
# Link the build so that the examples are always testing the
|
|
28
28
|
# current build, in it's properly exported format
|
|
29
29
|
(cd dist && npm ci)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
# echo "Running e2e examples build for node version $(node --version)"
|
|
33
|
-
# for i in examples/*; do
|
|
34
|
-
# [ -d "$i" ] || continue # prevent failure if not a directory
|
|
35
|
-
# [ -e "$i" ] || continue # prevent failure if there are no examples
|
|
36
|
-
# echo "--> running tests for: $i"
|
|
37
|
-
# pushd "$i"
|
|
38
|
-
# # replace pact dependency with locally build version
|
|
39
|
-
# contents="$(jq '.devDependencies."@pact-foundation/pact" = "file:../../dist"' package.json)" && \
|
|
40
|
-
# echo "${contents}" > package.json
|
|
41
|
-
# # npm ci does not work because we have just changed the package.json file
|
|
42
|
-
# npm install
|
|
43
|
-
# npm test
|
|
44
|
-
# popd
|
|
45
|
-
# done
|
|
46
|
-
|
|
47
|
-
# echo "--> Running coverage checks"
|
|
48
|
-
# npm run coverage
|
|
49
|
-
|
|
50
|
-
# echo "Running V3 e2e examples build"
|
|
51
|
-
|
|
52
|
-
# # Commented because:
|
|
53
|
-
# # 1. We can't run the broker on windows CI
|
|
54
|
-
# # 2. We use the live broker in the v3 examples now anyway
|
|
55
|
-
# # docker pull pactfoundation/pact-broker
|
|
56
|
-
# # BROKER_ID=$(docker run -e PACT_BROKER_DATABASE_ADAPTER=sqlite -d -p 9292:9292 pactfoundation/pact-broker)
|
|
57
|
-
|
|
58
|
-
# # trap "docker kill $BROKER_ID" EXIT
|
|
59
|
-
|
|
60
|
-
# for i in examples/v*/*; do
|
|
61
|
-
# [ -d "$i" ] || continue # prevent failure if not a directory
|
|
62
|
-
# [ -e "$i" ] || continue # prevent failure if there are no examples
|
|
63
|
-
# echo "------------------------------------------------"
|
|
64
|
-
# echo "------------> continuing to test V3/v$ example project: $i"
|
|
65
|
-
# node --version
|
|
66
|
-
# pushd "$i"
|
|
67
|
-
# # replace pact dependency with locally build version
|
|
68
|
-
# contents="$(jq '.devDependencies."@pact-foundation/pact" = "file:../../../dist"' package.json)" && \
|
|
69
|
-
# echo "${contents}" > package.json
|
|
70
|
-
# # npm ci does not work because we have just changed the package.json file
|
|
71
|
-
# npm install
|
|
72
|
-
# npm test
|
|
73
|
-
# popd
|
|
74
|
-
# done
|
package/src/v4/index.js
CHANGED
|
@@ -5,12 +5,12 @@ var pact_core_1 = require("@pact-foundation/pact-core");
|
|
|
5
5
|
var http_1 = require("./http");
|
|
6
6
|
var package_json_1 = require("../../package.json");
|
|
7
7
|
var message_1 = require("./message");
|
|
8
|
-
if (!process.env.ENABLE_FEATURE_V4) {
|
|
9
|
-
throw Error("The v4 package is currently in beta and requires the 'ENABLE_FEATURE_V4' environment variable to be set");
|
|
10
|
-
}
|
|
11
8
|
var PactV4 = /** @class */ (function () {
|
|
12
9
|
function PactV4(opts) {
|
|
13
10
|
this.opts = opts;
|
|
11
|
+
if (!process.env.ENABLE_FEATURE_V4) {
|
|
12
|
+
throw Error("The v4 package is currently in beta and requires the 'ENABLE_FEATURE_V4' environment variable to be set");
|
|
13
|
+
}
|
|
14
14
|
this.pact = (0, pact_core_1.makeConsumerPact)(opts.consumer, opts.provider, opts.spec, opts.logLevel);
|
|
15
15
|
this.pact.addMetadata('pact-js', 'version', package_json_1.version);
|
|
16
16
|
}
|
package/src/v4/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/index.ts"],"names":[],"mappings":";;;AAAA,wDAA4E;AAC5E,+BAAiD;AAGjD,mDAAmE;AAEnE,qCAA2D;AAE3D,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/index.ts"],"names":[],"mappings":";;;AAAA,wDAA4E;AAC5E,+BAAiD;AAGjD,mDAAmE;AAEnE,qCAA2D;AAE3D;IAGE,gBAAoB,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;QACrC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YAClC,MAAM,KAAK,CACT,yGAAyG,CAC1G,CAAC;SACH;QAED,IAAI,CAAC,IAAI,GAAG,IAAA,4BAAgB,EAC1B,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,QAAQ,CACd,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,sBAAkB,CAAC,CAAC;IAClE,CAAC;IAED,+BAAc,GAAd;QACE,OAAO,IAAI,8BAAuB,CAChC,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,EAC5B,IAAI,CAAC,IAAI,CACV,CAAC;IACJ,CAAC;IAED,0CAAyB,GAAzB,UACE,WAAmB;QAEnB,OAAO,IAAI,wCAA8B,CACvC,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAC5C,IAAI,CAAC,IAAI,CACV,CAAC;IACJ,CAAC;IACH,aAAC;AAAD,CAAC,AArCD,IAqCC;AArCY,wBAAM"}
|