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 10.2.4 to 10.3.1

standalone/pact-1.79.0-linux-x86_64.tar.gz.checksum

19

CHANGELOG.md

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

## [10.3.1](https://github.com/pact-foundation/pact-node/compare/v10.3.0...v10.3.1) (2020-02-17)
### Bug Fixes
* missing api_key issue in travis https://travis-ci.community/t/missing-api-key-when-deploying-to-github-releases/5761/13 ([8f503b8](https://github.com/pact-foundation/pact-node/commit/8f503b8))
# [10.3.0](https://github.com/pact-foundation/pact-node/compare/v10.2.4...v10.3.0) (2020-02-14)
### Features
* add validation to broker token usage to avoid confusion ([2a4afa3](https://github.com/pact-foundation/pact-node/commit/2a4afa3))
* **upgrade:** update standalone to 1.79.0 ([f33cbb8](https://github.com/pact-foundation/pact-node/commit/f33cbb8))
## [10.2.4](https://github.com/pact-foundation/pact-node/compare/v10.2.3...v10.2.4) (2019-12-17)

@@ -7,0 +26,0 @@

2

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

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

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

- [Pact Node](#pact-node)
- [Installation](#installation)
- [Do Not Track](#do-not-track)
- [Pact Download Location](#pact-download-location)
- [Usage](#usage)
- [Documentation](#documentation)
- [Set Log Level](#set-log-level)
- [Mock Servers](#mock-servers)
- [Create Mock Server](#create-mock-server)
- [List Mock Servers](#list-mock-servers)
- [Remove All Mock Servers](#remove-all-mock-servers)
- [Start a Mock Server](#start-a-mock-server)
- [Stop a Mock server](#stop-a-mock-server)
- [Delete a Mock server](#delete-a-mock-server)
- [Check if a Mock server is running](#check-if-a-mock-server-is-running)
- [Mock Server Events](#mock-server-events)
- [Provider Verification](#provider-verification)
- [Pact Broker Publishing](#pact-broker-publishing)
- [Pact Broker Deployment Check](#pact-broker-deployment-check)
- [Stub Servers](#stub-servers)
- [Create Stub Server](#create-stub-server)
- [Message Pacts](#message-pacts)
- [Create Message Pacts](#create-message-pacts)
- [Example](#example)
- [Example CLI invocation:](#example-cli-invocation)
- [CLI Tools](#cli-tools)
- [Windows Issues](#windows-issues)
- [Enable Long Paths](#enable-long-paths)
- [Contributing](#contributing)
- [Testing](#testing)
- [Questions?](#questions)
- [Installation](#installation)
- [Do Not Track](#do-not-track)
- [Pact Download Location](#pact-download-location)
- [Which Library/Package should I use?](#which-librarypackage-should-i-use)
- [Usage](#usage)
- [Documentation](#documentation)
- [Set Log Level](#set-log-level)
- [Mock Servers](#mock-servers)
- [Create Mock Server](#create-mock-server)
- [List Mock Servers](#list-mock-servers)
- [Remove All Mock Servers](#remove-all-mock-servers)
- [Start a Mock Server](#start-a-mock-server)
- [Stop a Mock server](#stop-a-mock-server)
- [Delete a Mock server](#delete-a-mock-server)
- [Check if a Mock server is running](#check-if-a-mock-server-is-running)
- [Mock Server Events](#mock-server-events)
- [Provider Verification](#provider-verification)
- [Pact Broker Publishing](#pact-broker-publishing)
- [Pact Broker Deployment Check](#pact-broker-deployment-check)
- [Stub Servers](#stub-servers)
- [Create Stub Server](#create-stub-server)
- [Message Pacts](#message-pacts)
- [Create Message Pacts](#create-message-pacts)
- [Example](#example)
- [CLI Tools](#cli-tools)

@@ -89,2 +84,17 @@ <!-- /TOC -->

## Which Library/Package should I use?
TL;DR - you almost always want Pact JS.
| Purpose | Library | Comments |
| ------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------- |
| Synchronous / HTTP APIs | Pact JS | |
| Asynchronous APIs | Pact JS | |
| Node.js | Pact JS | |
| Browser testing | Pact Web | You probably still want Pact JS. See [Using Pact in non-Node environments](https://github.com/pact-foundation/pact-js#using-pact-in-non-node-environments) \* |
| Isomorphic testing | Pact Web | You probably still want Pact JS. See [Using Pact in non-Node environments](https://github.com/pact-foundation/pact-js#using-pact-in-non-node-environments) \* |
| Publishing to Pact Broker | Pact Node | Included in Pact JS distribution |
\* The "I need to run it in the browser" question comes up occasionally. The question is this - for your JS code to be able to make a call to another API, is this dependent on browser-specific code? In most cases, people use tools like React/Angular which have libraries that work on the server and client side, in which case, these tests don't need to run in a browser and could instead be executed in a Node.js environment.
## Usage

@@ -91,0 +101,0 @@

@@ -54,2 +54,5 @@ "use strict";

}
if (options.pactBrokerToken && (options.pactBrokerUsername || options.pactBrokerPassword)) {
throw new Error('Must provide pactBrokerToken or pactBrokerUsername/pactBrokerPassword but not both.');
}
this.options = options;

@@ -56,0 +59,0 @@ }

@@ -90,3 +90,29 @@ "use strict";

});
context('when a bearer token is provided', function () {
context("and specifies a username or password", function () {
it('should fail with an error', function () {
expect(function () {
return publisher_1.default({
pactBroker: 'http://localhost',
pactFilesOrDirs: [relativePath],
consumerVersion: '1.0.0',
pactBrokerToken: "1234",
pactBrokerUsername: "username",
pactBrokerPassword: "5678",
});
}).to.throw(Error);
});
});
it('should not fail', function () {
var p = publisher_1.default({
pactBroker: 'http://localhost',
pactFilesOrDirs: [pactFile],
consumerVersion: '1.0.0',
pactBrokerToken: "1234"
});
expect(p).to.be.ok;
expect(p.publish).to.be.a('function');
});
});
});
//# sourceMappingURL=publisher.spec.js.map

@@ -86,2 +86,5 @@ "use strict";

}
if (options.pactBrokerToken && (options.pactBrokerUsername || options.pactBrokerPassword)) {
throw new Error('Must provide pactBrokerToken or pactBrokerUsername/pactBrokerPassword but not both.');
}
if (options.pactBrokerUrl) {

@@ -88,0 +91,0 @@ checkTypes.assert.string(options.pactBrokerUrl);

@@ -282,3 +282,26 @@ "use strict";

});
context('when using a bearer token', function () {
context('and specifies a username or password', function () {
it('should fail with an error', function () {
expect(function () {
return verifier_1.default({
providerBaseUrl: 'http://localhost',
pactUrls: ['http://idontexist'],
pactBrokerToken: "1234",
pactBrokerUsername: "username",
pactBrokerPassword: "5678",
});
}).to.throw(Error);
});
});
it('should not fail', function () {
var v = verifier_1.default({
providerBaseUrl: 'http://localhost',
pactUrls: ['http://idontexist'],
pactBrokerToken: "1234",
});
expect(v.options.pactBrokerToken).to.eq("1234");
});
});
});
//# sourceMappingURL=verifier.spec.js.map

@@ -1,2 +0,2 @@

export declare const PACT_STANDALONE_VERSION = "1.73.0";
export declare const PACT_STANDALONE_VERSION = "1.79.0";
export declare function createConfig(): Config;

@@ -3,0 +3,0 @@ export declare function getBinaryEntry(platform?: string, arch?: string): BinaryEntry;

@@ -17,3 +17,3 @@ "use strict";

});
exports.PACT_STANDALONE_VERSION = '1.73.0';
exports.PACT_STANDALONE_VERSION = '1.79.0';
var PACT_DEFAULT_LOCATION = "https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v" + exports.PACT_STANDALONE_VERSION + "/";

@@ -20,0 +20,0 @@ var HTTP_REGEX = /^http(s?):\/\//;

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

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