Skip to content

Commit 8897da7

Browse files
committed
fix: PactV4 feature flag check was causing import errors for all imports
1 parent a7a84d5 commit 8897da7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/v4/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import { version as pactPackageVersion } from '../../package.json';
66
import { V4UnconfiguredSynchronousMessage } from './message/types';
77
import { UnconfiguredSynchronousMessage } from './message';
88

9-
if (!process.env.ENABLE_FEATURE_V4) {
10-
throw Error(
11-
"The v4 package is currently in beta and requires the 'ENABLE_FEATURE_V4' environment variable to be set"
12-
);
13-
}
14-
159
export class PactV4 implements V4ConsumerPact {
1610
private pact: ConsumerPact;
1711

1812
constructor(private opts: PactV4Options) {
13+
if (!process.env.ENABLE_FEATURE_V4) {
14+
throw Error(
15+
"The v4 package is currently in beta and requires the 'ENABLE_FEATURE_V4' environment variable to be set"
16+
);
17+
}
18+
1919
this.pact = makeConsumerPact(
2020
opts.consumer,
2121
opts.provider,

0 commit comments

Comments
 (0)