You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: if package B is a dependency of application A, and package B makes a request to a external API service, then we want this interaction to be included in contracts of application A.
Solution proposal:
package B declares contracts for its interactions:
pact file is generated during build process, without consumer field
reference to this pact files is defined via new pacts field in package.json
generated pact file in included in the tarball published to the npm registry (for example using files property)
judge-d-js command when executed in application A root directory with new --include-dependencies-pacts flag
1. look at application A dependencies list from package.json
2. read each dependency package.json files and check if it contains pacts field
3. if it does, then read those pacts, set consumer field to the one passed as serviceName, a publish with the rest of the contracts
Application A will always publish contracts for all interactions implemented in package B, even if only a subset of functionality and interactions of package B is imported in the application
The text was updated successfully, but these errors were encountered:
Problem: if package B is a dependency of application A, and package B makes a request to a external API service, then we want this interaction to be included in contracts of application A.
Solution proposal:
package B declares contracts for its interactions:
consumer
fieldpacts
field inpackage.json
files
property)Example:
application A declares "package B" at its dependency:
judge-d-js command when executed in application A root directory with new
--include-dependencies-pacts
flag1. look at application A dependencies list from package.json
2. read each dependency package.json files and check if it contains pacts field
3. if it does, then read those pacts, set
consumer
field to the one passed asserviceName
, a publish with the rest of the contractsPotential drawback
The text was updated successfully, but these errors were encountered: