@@ -25,20 +25,20 @@ const packages = [
2525 {
2626 name : 'vue3-pivottable' ,
2727 path : '.' ,
28- buildCmd : 'pnpm build' ,
28+ buildCmd : 'pnpm clean && pnpm build' ,
2929 publishCmd : 'pnpm changeset publish'
3030 } ,
3131 {
3232 name : '@vue-pivottable/plotly-renderer' ,
3333 path : './packages/plotly-renderer' ,
34- buildCmd : 'pnpm --filter @vue-pivottable/plotly-renderer build' ,
34+ buildCmd : 'pnpm --filter @vue-pivottable/plotly-renderer clean && pnpm --filter @vue-pivottable/plotly-renderer build' ,
3535 publishCmd : 'pnpm changeset publish --filter @vue-pivottable/plotly-renderer' ,
3636 tokenEnv : 'NPM_TOKEN_SUMIN'
3737 } ,
3838 {
3939 name : '@vue-pivottable/lazy-table-renderer' ,
4040 path : './packages/lazy-table-renderer' ,
41- buildCmd : 'pnpm --filter @vue-pivottable/lazy-table-renderer build' ,
41+ buildCmd : 'pnpm --filter @vue-pivottable/lazy-table-renderer clean && pnpm --filter @vue-pivottable/lazy-table-renderer build' ,
4242 publishCmd : 'pnpm changeset publish --filter @vue-pivottable/lazy-table-renderer' ,
4343 tokenEnv : 'NPM_TOKEN_SUMIN'
4444 }
@@ -62,6 +62,17 @@ async function releasePackages() {
6262 throw new Error ( `Package directory not found: ${ pkg . path } ` ) ;
6363 }
6464
65+ // Get package version
66+ const packageJsonPath = `${ pkg . path } /package.json` ;
67+ const packageJson = JSON . parse ( fs . readFileSync ( packageJsonPath , 'utf8' ) ) ;
68+ const currentVersion = packageJson . version ;
69+
70+ // Skip if not a beta version (no changeset)
71+ if ( ! currentVersion . includes ( '-beta' ) ) {
72+ log . info ( `Skipping ${ pkg . name } - no beta version (${ currentVersion } )` ) ;
73+ continue ;
74+ }
75+
6576 // Build package
6677 log . info ( `Building ${ pkg . name } ...` ) ;
6778 execSync ( pkg . buildCmd , {
0 commit comments