Skip to content

Commit e7e7333

Browse files
authored
chore: fix bin path (#497)
1 parent 79e02dc commit e7e7333

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

.changeset/whole-actors-sink.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pactflow/openapi-pact-comparator": patch
3+
---
4+
5+
Fix bin path in package.json

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"description": "An OpenAPI Specification and Pact Comparison library",
55
"main": "dist/index.cjs",
66
"module": "dist/index.mjs",
7-
"bin": "dist/cli.cjs",
7+
"bin": {
8+
"opc": "dist/cli.cjs"
9+
},
810
"files": [
911
"dist"
1012
],

rollup.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,20 @@ import json from "@rollup/plugin-json";
55

66
const plugins = [commonjs(), typescript(), nodeResolve(), json()];
77

8+
const onwarn = (warning, warn) => {
9+
if (
10+
warning.code === "CIRCULAR_DEPENDENCY" &&
11+
warning.message.includes("node_modules")
12+
) {
13+
return;
14+
}
15+
warn(warning);
16+
};
17+
818
export default [
919
{
1020
input: "src/cli.ts",
21+
onwarn,
1122
output: {
1223
file: "dist/cli.cjs",
1324
format: "cjs",
@@ -17,6 +28,7 @@ export default [
1728
},
1829
{
1930
input: "src/index.ts",
31+
onwarn,
2032
output: {
2133
file: "dist/index.mjs",
2234
format: "es",
@@ -26,6 +38,7 @@ export default [
2638
},
2739
{
2840
input: "src/index.ts",
41+
onwarn,
2942
output: {
3043
file: "dist/index.cjs",
3144
format: "cjs",

0 commit comments

Comments
 (0)