<#426 pact.publishPacts(opts) missing> Issue creat...
# pact-js-development
g
#426 pact.publishPacts(opts) missing Issue created by ireinhart Since 13.3.3 the function publishPacts() is not found. Software versionsOS: node:lts-bullseye-slim • Pact Node version: pact-foundation/pact@10.4.0 • Node Version: node:lts-bullseye-slim • Other Versions: @pact-foundation/pact-core@13.13.3 Issue Checklist Please confirm the following: ☑︎ I have upgraded to the latest ☑︎ I have the read the FAQs in the Readme ☑︎ I have triple checked, that there are no unhandled promises in my code ☐ I have set my log level to debug and attached a log file showing the complete request/response cycle ☐ For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem Expected behaviour If I run the code from https://github.com/pact-foundation/pact-js-core#pact-broker-publishing it should publish pacts. My version
Copy code
let publisher = require("@pact-foundation/pact-core");
let path = require("path");
if(process.env.bamboo_planRepository_branch == 'master') {
    let opts = {
        pactFilesOrDirs: [path.resolve(process.cwd(), "../../artifacts/contracts/js")],
        pactBroker: "<https://pact-broker.mydomain.net>",
        consumerVersion: "1.0-" + process.env.bamboo_repository_revision_number.substring(0, 8),
        tags: ['master']
    };
    publisher.publishPacts(opts);
} else {
    console.log('Pact publishing only at master branch on bamboo');
}
Actual behaviour
Copy code
build	27-Dec-2022 05:13:37	> app@1.0.0 publish:pact
build	27-Dec-2022 05:13:37	> node ./assets/js/pact/publish.js
build	27-Dec-2022 05:13:37	
error	27-Dec-2022 05:13:37	/opt/bamboo/xml-data/build-dir/APPLICATIONS-UM-JOB1/components/app/assets/js/pact/publish.js:10
error	27-Dec-2022 05:13:37	    publisher.publishPacts(opts);
error	27-Dec-2022 05:13:37	              ^
error	27-Dec-2022 05:13:37	
error	27-Dec-2022 05:13:37	TypeError: publisher.publishPacts is not a function
error	27-Dec-2022 05:13:37	    at Object.<anonymous> (/opt/bamboo/xml-data/build-dir/APPLICATIONS-UM-JOB1/components/app/assets/js/pact/publish.js:10:15)
error	27-Dec-2022 05:13:37	    at Module._compile (node:internal/modules/cjs/loader:1159:14)
error	27-Dec-2022 05:13:37	    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
error	27-Dec-2022 05:13:37	    at Module.load (node:internal/modules/cjs/loader:1037:32)
error	27-Dec-2022 05:13:37	    at Module._load (node:internal/modules/cjs/loader:878:12)
error	27-Dec-2022 05:13:37	    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
error	27-Dec-2022 05:13:37	    at node:internal/main/run_main_module:23:47
pact-foundation/pact-js-core