From 693cc3611c6587a1aa5dcb3b00acc5de65d16501 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 20 Sep 2021 12:29:15 +0200 Subject: [PATCH] Show release notes --- src/helpers/Extension.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/helpers/Extension.ts b/src/helpers/Extension.ts index 3c800f11..01e04b29 100644 --- a/src/helpers/Extension.ts +++ b/src/helpers/Extension.ts @@ -33,12 +33,16 @@ export class Extension { const frontMatter = extensions.getExtension(this.isBetaVersion() ? EXTENSION_BETA_ID : EXTENSION_ID)!; let installedVersion = frontMatter.packageJSON.version; const usedVersion = this.ctx.globalState.get(EXTENSION_STATE_VERSION); + + if (usedVersion !== installedVersion) { + Notifications.info(`Check out the v${installedVersion} release notes at [v${installedVersion} release notes](https://beta.frontmatter.codes/updates/v${installedVersion.split('.').join('_')})`); + } if (this.isBetaVersion()) { installedVersion = `${installedVersion}-beta`; } - if (!usedVersion) { + if (installedVersion) { this.setVersion(installedVersion); }; @@ -83,7 +87,7 @@ export class Extension { // Create team settings Settings.createTeamSettings(); - // Migration to version 3.2.0 + // Migration to version 4.0.0 const dateField = Settings.get(SETTING_DATE_FIELD); const lastModField = Settings.get(SETTING_MODIFIED_FIELD); const description = Settings.get(SETTING_SEO_DESCRIPTION_FIELD);