Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix publish script

Carl-Gerhard Lindesvärd7d474e8444a8
diff --git a/bun.lockb b/bun.lockb
index 73621efd1..b724108c5 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/package.json b/package.json
index 518e09290..e8d93c340 100644
--- a/package.json
+++ b/package.json
@@ -13,8 +13,5 @@
},
"peerDependencies": {
"typescript": "^5.0.0"
- },
- "dependencies": {
- "tsup": "^7.2.0"
}
}
\ No newline at end of file
diff --git a/publish.ts b/publish.ts
index a21063583..f9ab76b46 100644
--- a/publish.ts
+++ b/publish.ts
@@ -46,16 +46,23 @@ function main() {
...properties,
})
- execSync('bunx tsup', {
- cwd: './packages/sdk',
- })
+ try {
+ execSync('npx tsup', {
+ cwd: './packages/sdk',
+ })
+ execSync('npx tsup', {
+ cwd: './packages/types',
+ })
+ } catch(error) {
+ console.log('Build failed');
+ console.log(error);
+ process.exit(1)
+ }
+
execSync('npm publish --access=public', {
cwd: './packages/sdk',
})
- execSync('bunx tsup', {
- cwd: './packages/types',
- })
execSync('npm publish --access=public', {
cwd: './packages/types',
})