Socket
Socket
Sign inDemoInstall

@pact-foundation/pact-node

Package Overview
Dependencies
Maintainers
4
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pact-foundation/pact-node - npm Package Compare versions

Comparing version 6.4.1 to 6.5.0

1

bin/pact-cli.js

@@ -22,2 +22,3 @@ #!/usr/bin/env node

.option("-i, --pact-version [n]", "The Pact specification version to use when writing the Pact files. Default is 1.", cli.INT)
.option("-w, --pact-file-write-mode [m]", "Controls how pact files are written to disk. One of 'overwrite', 'update', 'merge'")
.option("--consumer [consumerName]", "Specify consumer name for written Pact files.")

@@ -24,0 +25,0 @@ .option("--provider [providerName]", "Specify provider name for written Pact files.")

@@ -24,2 +24,3 @@ #!/usr/bin/env node

.option("-i, --pact-version [n]", "The Pact specification version to use when writing the Pact files. Default is 1.", cli.INT)
.option("-w, --pact-file-write-mode [m]", "Controls how pact files are written to disk. One of 'overwrite', 'update', 'merge'")
.option("--consumer [consumerName]", "Specify consumer name for written Pact files.")

@@ -26,0 +27,0 @@ .option("--provider [providerName]", "Specify provider name for written Pact files.")

@@ -5,2 +5,12 @@ # Change Log

<a name="6.5.0"></a>
# [6.5.0](https://github.com/pact-foundation/pact-node/compare/v6.4.1...v6.5.0) (2017-12-10)
### Features
* **pactFileWriteMode:** add pactFileWriteMode to server. Fixes [#50](https://github.com/pact-foundation/pact-node/issues/50) ([0f8658b](https://github.com/pact-foundation/pact-node/commit/0f8658b))
<a name="6.4.1"></a>

@@ -7,0 +17,0 @@ ## [6.4.1](https://github.com/pact-foundation/pact-node/compare/v6.4.0...v6.4.1) (2017-12-08)

2

package.json
{
"name": "@pact-foundation/pact-node",
"version": "6.4.1",
"version": "6.5.0",
"description": "A wrapper for the Ruby version of Pact to work within Node",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -92,5 +92,7 @@ <img src="https://raw.githubusercontent.com/pact-foundation/pact-logo/master/media/logo-black.png" width="200">

publishVerificationResult: <Boolean> // Publish verification result to Broker. Optional
customProviderHeaders: <Array> // Header(s) to add to provider state set up and pact verification requests. eg 'Authorization: Basic cGFjdDpwYWN0'.
customProviderHeaders: <Array> // Header(s) to add to provider state set up and pact verification
requests. eg 'Authorization: Basic cGFjdDpwYWN0'.
providerVersion: <Boolean> // Provider version, required to publish verification result to Broker. Optional otherwise.
timeout: <Number> // The duration in ms we should wait to confirm verification process was successful. Defaults to 30000, Optional.
pactFileWriteMode: <String> // Control how the pact file is created. One of 'overwrite', 'update' or 'merge'. Defaults to 'overwrite'.
});

@@ -97,0 +99,0 @@ ```

@@ -39,2 +39,3 @@ /// <reference types="node" />

provider?: string;
pactFileWriteMode?: "overwrite" | "update" | "merge";
}

@@ -40,2 +40,3 @@ "use strict";

"spec": "--pact_specification_version",
"pactFileWriteMode": "--pact-file-write-mode",
"consumer": "--consumer",

@@ -65,2 +66,3 @@ "provider": "--provider"

options.host = options.host || "localhost";
options.pactFileWriteMode = options.pactFileWriteMode || "overwrite";
if (options.port) {

@@ -130,2 +132,3 @@ checkTypes.assert.number(options.port);

}
checkTypes.assert.includes(["overwrite", "update", "merge"], options.pactFileWriteMode);
return new Server(options);

@@ -132,0 +135,0 @@ };

@@ -49,2 +49,7 @@ "use strict";

});
it("should fail if incorrect pactFileWriteMode provided", function () {
expect(function () { return server_1.default({
pactFileWriteMode: "notarealoption",
}); }).to.throw(Error);
});
});

@@ -51,0 +56,0 @@ context("when valid options are set", function () {

@@ -57,2 +57,8 @@ // tslint:disable:no-string-literal

});
it("should fail if incorrect pactFileWriteMode provided", () => {
expect(() => serverFactory({
pactFileWriteMode: "notarealoption",
})).to.throw(Error);
});
});

@@ -59,0 +65,0 @@

@@ -34,2 +34,3 @@ // tslint:disable:no-string-literal

options.host = options.host || "localhost";
options.pactFileWriteMode = options.pactFileWriteMode || "overwrite";

@@ -123,2 +124,5 @@ // port checking

// pactFileWriteMode check
checkTypes.assert.includes(["overwrite", "update", "merge"], options.pactFileWriteMode);
return new Server(options);

@@ -140,2 +144,3 @@ }

"spec": "--pact_specification_version",
"pactFileWriteMode": "--pact-file-write-mode",
"consumer": "--consumer",

@@ -292,2 +297,3 @@ "provider": "--provider"

provider?: string;
pactFileWriteMode?: "overwrite" | "update" | "merge";
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc