From 25448e0a5ef454054c35bd3979c44df7ac94bef1 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 25 Sep 2024 12:45:57 -0400 Subject: [PATCH] extension/src/config.ts: handle the version with '-dev' as prerelease And change the version string in package.json on master to v0.44.0-dev to indicate it is the dev version for v0.44.0. Prerelease versions will use v0.43.X. While doing so, I learned that the version string must have Major.Minor.Patch[-prerelease] format, and strings like "v0.44-dev" are not acceptable. Otherwise, `vsce` and vscode test framework fails to build the extension quite mysteriously. Change-Id: I6e73b2bf6d0f41b491844345193064320dd401e3 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/615775 Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Hongxiang Jiang kokoro-CI: kokoro --- CHANGELOG.md | 5 +++++ extension/package-lock.json | 4 ++-- extension/package.json | 2 +- extension/src/config.ts | 7 +++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ebf6be399..70059a8563 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ## Unreleased +### Code Health + +* Extension build target is set to `es2022`. ([Issue 3540](https://github.com/golang/vscode-go/issues/3540)) +* The extension release workflow is migrated to the Go project's [Relui](https://pkg.go.dev/golang.org/x/build/cmd/relui#section-readme). ([Issue 3500](https://github.com/golang/vscode-go/issues/3500)) + ## v0.42.1 Date: 9 Sep, 2024 diff --git a/extension/package-lock.json b/extension/package-lock.json index 9e6c1281f3..70ebf3154e 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.43.0-dev", + "version": "0.44.0-dev", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.43.0-dev", + "version": "0.44.0-dev", "license": "MIT", "dependencies": { "diff": "4.0.2", diff --git a/extension/package.json b/extension/package.json index fa53e3a60d..6306554f46 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.43.0-dev", + "version": "0.44.0-dev", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { diff --git a/extension/src/config.ts b/extension/src/config.ts index 8f2a532d83..5519e3b3fd 100644 --- a/extension/src/config.ts +++ b/extension/src/config.ts @@ -46,8 +46,11 @@ export class ExtensionInfo { this.version = version?.format(); this.appName = vscode.env.appName; - // golang.go prerelease: minor version is an odd number. - this.isPreview = !!(extensionId === 'golang.go' && version && version.minor % 2 === 1); + // golang.go prerelease: minor version is an odd number, or has the "-dev" suffix. + this.isPreview = + extensionId === 'golang.go' && !!version + ? version.minor % 2 === 1 || version.toString().endsWith('-dev') + : false; this.isInCloudIDE = process.env.CLOUD_SHELL === 'true' || process.env.MONOSPACE_ENV === 'true' ||