Skip to content

adds pre-release support#149

Draft
raleigh-g-thompson wants to merge 1 commit intomasterfrom
feature/prerelease-publishing
Draft

adds pre-release support#149
raleigh-g-thompson wants to merge 1 commit intomasterfrom
feature/prerelease-publishing

Conversation

@raleigh-g-thompson
Copy link
Contributor

closes #148

Problem

The extension had no way to track SNAPSHOT language server builds during active development. javaServiceInstaller.ts only knew how to download from Maven Central, which only hosts release artifacts. SNAPSHOT JARs live on the Sonatype Central snapshots repo and require resolving maven-metadata.xml to find the actual timestamped filename. The extension version was also stored with a -SNAPSHOT suffix, which vsce rejects as invalid semver.

Changes

javaServiceInstaller.ts — SNAPSHOT resolution

  • Adds resolveSnapshotUrl(), which fetches maven-metadata.xml from the Sonatype snapshots repo and extracts the timestamped artifact value to construct the final JAR URL.
  • getSearchUrl() is now async and branches on whether the version ends with -SNAPSHOT. SNAPSHOT JARs are never cached — installServiceIfMissing always re-downloads when a SNAPSHOT version is configured so the extension picks up the latest build on each activation. Release versions continue to resolve from Maven Central unchanged.
  • package.json — version + publish scripts
  • Strips -SNAPSHOT from the extension version since vsce requires valid semver. Adds publish and publish:prerelease npm scripts as convenience wrappers around vsce publish and vsce publish --pre-release.
  • README.md — updated versioning docs
  • Replaces the odd/even minor version scheme (which the team doesn't use) with docs for the --pre-release flag approach. - Covers both the pre-release and stable release processes.

No LS-side changes required. SNAPSHOT JARs are already published by the existing mvn deploy step in the LS CI.

@github-actions
Copy link

Coverage after merging feature/prerelease-publishing into master will be

66.13%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   extension.api.ts100%100%100%100%
   extension.ts64.29%60%62.50%64.67%107–110, 131–133, 139–141, 146–148, 31–38, 41–63, 70–74, 84–91
   protocol.ts100%100%100%100%
   statusBar.ts100%100%100%100%
src/commands
   commands.ts100%100%100%100%
   execute-cql.ts36.24%100%45.45%32.08%100–105, 108–162, 165–253, 255–277, 323–328, 330–335, 41, 44, 47, 53–99
   log-files.ts27.08%100%20%26.67%22–48, 50–53, 55–82, 84–90
   view-elm.ts94.44%100%100%93.33%12, 9
src/cql-language-server
   cqlLanguageClient.ts65.58%87.50%55.56%65.15%100–118, 122, 126–129, 141–146, 165–166, 173–177, 182–198, 37–39, 84, 88–99
   languageServerStarter.ts74.04%71.43%80%73.91%21–36, 44, 44–45, 71–77
src/cql-service
   cqlService.executeCql.ts73%100%66.67%70.79%10–34, 9
   cqlService.getElm.ts62.50%100%0%71.43%6–7
src/java-support
   findJavaRuntimes.ts55.58%66.67%78.57%53.31%100–104, 107–110, 120, 120–139, 14, 140–149, 15, 150–191, 197–213, 216–243, 251–253, 292–294, 320–322, 324–326, 332–334, 337–341, 346–362, 46–48, 78, 86–99
   javaServiceInstaller.ts83.20%70.83%93.33%83.89%100, 160–162, 200–202, 209, 22–24, 60–61, 70–95, 98–99
   requirements.ts69.88%73.68%66.67%69.50%10–11, 115–128, 130–141, 55–68, 72–77
src/log-services
   logger.ts85.25%71.43%83.33%87.50%20–22, 33–34, 37–39
   multi-transport-logger.ts81.29%100%46.67%84.35%100, 103–104, 107–108, 111–114, 55–56, 59–60, 63–64, 95–96, 99
src/model
   testCase.ts95.24%94.12%100%95.35%82–86
src/utils
   file-utils.ts100%100%100%100%

@raleigh-g-thompson raleigh-g-thompson marked this pull request as draft March 19, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support pre-release publishing with SNAPSHOT language server resolution

2 participants