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 <hyangah@gmail.com>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
kokoro-CI: kokoro <noreply+kokoro@google.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4ebf6be..70059a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,11 @@
## 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 9e6c128..70ebf31 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 fa53e3a..6306554 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 8f2a532..5519e3b 100644
--- a/extension/src/config.ts
+++ b/extension/src/config.ts
@@ -46,8 +46,11 @@
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' ||