Skip to content

Commit 1cc63fa

Browse files
authored
chore(core): added v3 beta message update (event-catalog#1913)
* chore(core): added v3 beta message update * Create plenty-crabs-cheat.md
1 parent a365ad5 commit 1cc63fa

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.changeset/plenty-crabs-cheat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@eventcatalog/core": patch
3+
---
4+
5+
chore(core): added v3 beta message update

src/eventcatalog.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,27 @@ const checkForUpdate = () => {
139139

140140
if (!installedVersion) return;
141141

142+
// Check if user is on version < 3 and notify about V3
143+
const majorVersion = parseInt(installedVersion.replace(/[^0-9.]/g, '').split('.')[0], 10);
144+
if (majorVersion < 3) {
145+
const v3Message = `🚀 EventCatalog V3 is now available in beta!
146+
147+
You are currently on version ${installedVersion}.
148+
V3 brings exciting new features and improvements.
149+
150+
Upgrade now: npm i @eventcatalog/core@beta`;
151+
console.log(
152+
boxen(v3Message, {
153+
padding: 1,
154+
margin: 1,
155+
align: 'center',
156+
borderColor: 'magenta',
157+
borderStyle: 'round',
158+
})
159+
);
160+
return;
161+
}
162+
142163
const pkg = { name: '@eventcatalog/core', version: installedVersion };
143164
const notifier = updateNotifier({ pkg, updateCheckInterval: 0 });
144165

0 commit comments

Comments
 (0)