From bae47da5c85f22c8e128a7e68e1a5bd226ff1079 Mon Sep 17 00:00:00 2001 From: Mayank Kumar Chaudhari Date: Tue, 7 May 2024 12:13:37 +0530 Subject: [PATCH] fix publish & trigger --- lib/package.json | 3 ++- scripts/publish.js | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/package.json b/lib/package.json index 4fbb8f35..2a4d9f73 100644 --- a/lib/package.json +++ b/lib/package.json @@ -2,7 +2,7 @@ "name": "react18-loaders", "author": "Mayank Kumar Chaudhari ", "private": false, - "version": "1.0.0-canary.1", + "version": "1.0.0", "description": "A comprehensive library that unleashes the full potential of React 18 server components, providing customizable loading animation components alongside a fullscreen loader container. Designed to seamlessly integrate with React and Next.js.", "license": "MPL-2.0", "main": "./dist/index.js", @@ -70,6 +70,7 @@ "Loading animations", "Fullscreen loader", "React", + "React Loaders", "React 18", "React 19", "Next.js", diff --git a/scripts/publish.js b/scripts/publish.js index 16c621e5..562ca72c 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -5,10 +5,14 @@ const { execSync } = require("child_process"); try { execSync("pnpm changeset pre exit"); } catch {} -execSync("pnpm changeset version"); -execSync( - `git add . && git commit -m "Apply changesets and update CHANGELOG" && git push origin ${process.env.BRANCH}`, -); +try { + execSync("pnpm changeset version"); + execSync( + `git add . && git commit -m "Apply changesets and update CHANGELOG" && git push origin ${process.env.BRANCH}`, + ); +} catch { + // no changesets to be applied +} const LATEST_VERSION = execSync("npm view react18-loaders version").toString(); const VERSION = require("../lib/package.json").version;