Skip to content

Commit

Permalink
feat: remove deprecated VerifierV3 from beta interface. BREAKING CHANGE
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Jul 4, 2022
1 parent 903fd36 commit 25dc07e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 59 deletions.
7 changes: 6 additions & 1 deletion MIGRATION.md
@@ -1,10 +1,15 @@
# Pact-js migration guide

# beta.60

* new `addInteraction` method on PactV3 to support previous JSON-style interactions
* remove `VerifierV3` as many beta versions have passed with this deprecation notice and won't be in final release

# beta.56

Migrates to a new handle based verifier. This adds several layers of improvement, including better error handling/response output (which will be added in later versions).

* Drop support for migrating `disableSSLVerification` (correct field is `disableSslVerification`)
* Drop support for migrating `disableSSLVerification` (correct field is `**disableSslVerification**`)
* Handle based verifier doesn't support environment variables (i.e. `PACT_BROKER_*`)

This guide is for migrating to a new version of pact-js.
Expand Down
4 changes: 2 additions & 2 deletions examples/v3/e2e/test/provider.spec.js
@@ -1,4 +1,4 @@
const { VerifierV3 } = require('@pact-foundation/pact/v3');
const { Verifier } = require('@pact-foundation/pact');
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
Expand All @@ -16,7 +16,7 @@ describe('Pact Verification', () => {
it('validates the expectations of Matching Service', () => {
let token = 'INVALID TOKEN';

return new VerifierV3({
return new Verifier({
logLevel: 'info',
provider: 'Animal Profile Service V3',
providerBaseUrl: 'http://localhost:8081',
Expand Down
@@ -1,5 +1,5 @@
const path = require('path');
const { VerifierV3 } = require('@pact-foundation/pact/v3');
const { Verifier } = require('@pact-foundation/pact');
const { accountService } = require('./account-service');
const {
Account,
Expand Down Expand Up @@ -54,6 +54,6 @@ describe('Account Service', () => {
],
};

return new VerifierV3(opts).verifyProvider();
return new Verifier(opts).verifyProvider();
});
});
8 changes: 4 additions & 4 deletions examples/v3/run-specific-verifications/test/provider.spec.js
@@ -1,4 +1,4 @@
const { VerifierV3 } = require('@pact-foundation/pact/v3');
const { Verifier } = require('@pact-foundation/pact');
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
Expand All @@ -13,7 +13,7 @@ server.listen(8081, '127.0.0.1', () => {
describe('Pact Verification', () => {
it('filter by PACT_DESCRIPTION', () => {
process.env.PACT_DESCRIPTION = 'a request to be used';
return new VerifierV3({
return new Verifier({
provider: 'filter-provider',
providerBaseUrl: 'http://127.0.0.1:8081',
pactUrls: [
Expand All @@ -28,7 +28,7 @@ describe('Pact Verification', () => {
});
it('filter by PACT_PROVIDER_STATE', () => {
process.env.PACT_PROVIDER_STATE = 'a state to be used';
return new VerifierV3({
return new Verifier({
provider: 'filter-provider',
providerBaseUrl: 'http://127.0.0.1:8081',
pactUrls: [
Expand All @@ -43,7 +43,7 @@ describe('Pact Verification', () => {
});
it('filter by PACT_PROVIDER_NO_STATE', () => {
process.env.PACT_PROVIDER_NO_STATE = 'TRUE';
return new VerifierV3({
return new Verifier({
provider: 'filter-provider',
providerBaseUrl: 'http://127.0.0.1:8081',
pactUrls: [
Expand Down
10 changes: 3 additions & 7 deletions examples/v3/todo-consumer/test/provider.spec.js
@@ -1,9 +1,5 @@
const {
PactV3,
MatchersV3,
XmlBuilder,
VerifierV3,
} = require('@pact-foundation/pact/v3');
const { PactV3, MatchersV3, XmlBuilder } = require('@pact-foundation/pact/v3');
const { Verifier } = require('@pact-foundation/pact');
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
Expand All @@ -26,7 +22,7 @@ describe('Pact XML Verification', () => {
},
};

return new VerifierV3(opts).verifyProvider().then((output) => {
return new Verifier(opts).verifyProvider().then((output) => {
console.log('Pact Verification Complete!');
console.log(output);
});
Expand Down
7 changes: 0 additions & 7 deletions src/v3/index.ts
Expand Up @@ -7,13 +7,6 @@ export * from './pact';
*/
export * as MatchersV3 from './matchers';

/**
* Exposes {@link VerifierV3}
* @memberof Pact
* @static
*/
export * from './verifier';

/**
* Exposes {@link xml}
* @memberof Pact
Expand Down
36 changes: 0 additions & 36 deletions src/v3/verifier.ts

This file was deleted.

0 comments on commit 25dc07e

Please sign in to comment.