Pre-release versioning, SNAPSHOT language server builds, and CI-built VSIX packages

Open
#148 0 comments 0 reactions 1 assignee View on GitHub

@raleigh-g-thompson is already working on this.

Since Mar 17, 2026.

  • #149 by @raleigh-g-thompson — closed without merging

Assessment

This issue has not been assessed yet.

Description

enhancement

Updated 2026-11-17. This replaces the original description. The odd/even minor versioning is kept, not
replaced, and the extension version is no longer derived by stripping -SNAPSHOT. The original bullets are
covered under items 1 and 2 below.

Summary

Make pre-releases and beta builds cheap and hard to get wrong:

  • developers never hand-edit a pre-release patch number;
  • the build can bundle a SNAPSHOT (or branch-built) language server;
  • custom beta VSIX packages come from CI instead of local package:local builds copied by hand.

Problem

  • Publishing is manual. Every pre-release needs a hand-picked, never-reused version number and a remembered
    --pre-release flag. vsce has no package.json field for the channel. It's only the
    vsce package/publish --pre-release option.
  • The Marketplace rejects semver tags. 1.3.0-beta.1 fails at vsce publish, so the Maven -SNAPSHOT
    model can't be copied directly.
  • Beta builds are built by hand. Today they are made locally with npm run package:local, with a SNAPSHOT
    language server jar copied into dist/java-support/jars/ by hand, then shared on a drive.
    scripts/download-jar.js only fetches release jars from repo1.maven.org.
  • Merging is slow. PRs to master need approval, so testable builds of unmerged work have no supported path.

Proposal

1. Versioning: odd/even minor plus a stamped pre-release patch

Keep the convention (the VS Code recommendation,
already enforced by the verify-changelog CI job):

Channel Committed package.json Published version Who sets the patch
Release 1.2.0, 1.2.1 Same The developer, by standard semver (fixes → patch, features → next even minor)
Pre-release 1.3.0 (odd minor, patch 0) 1.3.<YYDDDHHMM>, e.g. 1.3.263211530 for 2026-11-17 15:30 UTC The packaging script, never committed
  • Patch format YYDDDHHMM: two-digit year, day of year, hour and minute, in UTC.
    • It always increases and needs no stored counter.
    • It stays under 2³¹ (the largest value is 993662359).
    • Microsoft's ms-python.python builds the patch the same way (day of year plus time). ms-vscode.remote-server and
      others also put timestamps in the patch.
  • Stamping: use vsce package <version> --no-update-package-json --pre-release. vsce writes the version into
    the VSIX only, so the repo's package.json and history are untouched.
  • New script scripts/vsce.js:
    • takes the channel from the minor's parity;
    • adds --pre-release and the stamp for odd minors;
    • rejects --pre-release on an even minor;
    • shares the parity rule with verify-changelog, so the two can't drift.
  • npm scripts: package, package:local and a new publish:marketplace go through scripts/vsce.js.
  • Traceability: the git SHA (and CI run number, when built in CI) go in the VSIX file name and metadata, not
    in the version.
2. SNAPSHOT language server resolution (original #148 scope)

SNAPSHOTs are deployed to https://central.sonatype.com/repository/maven-snapshots/. Their maven-metadata.xml
gives the timestamped jar, for example 5.1.0-20261105.155158-1.

  • scripts/download-jar.js: for a -SNAPSHOT version, read maven-metadata.xml and download the timestamped
    jar. Save it as cql-ls-server-<version>.jar, the name the extension loads.
  • javaServiceInstaller.ts: resolve SNAPSHOT jars at runtime the same way. Re-download when the metadata
    timestamp changes, instead of caching forever.
  • Tests: release and SNAPSHOT coordinates, a missing SNAPSHOT, and path handling on macOS/Linux, C:\… and
    C:/….
3. Beta VSIX workflow (no Marketplace, any branch)

A workflow_dispatch workflow (.github/workflows/beta-vsix.yml) that can run on any branch, including unmerged
feature branches. Inputs:

  • ls: which language server to bundle:
    • pinned, the javaDependencies version;
    • snapshot, the latest SNAPSHOT;
    • ref:<branch>, cql-language-server built from source at that branch.

Steps:

  1. Run the CI tests.
  2. Set javaDependencies in the CI checkout only, never committed, and place the jar.
  3. Package with .vscodeignore.local and the stamped version.

File name: cql-<version>-<branch>-<sha7>-ls-<lsVersion>.vsix.

Delivery, starting simple:

  1. Workflow artifact: no setup, kept up to 90 days.
  2. Optional, later: a GitHub pre-release on a fork, or an upload to a shared drive. A drive upload needs a
    service-account secret, which belongs in a fork the owning team controls, not in the public cqframework repo.

Optionally, run the same job on pull_request and attach the VSIX, so reviewers can install a PR without building
it.

4. Marketplace pre-release pipeline (later)
  • From master, with trunk-based development: a workflow packages through scripts/vsce.js and publishes with
    vsce publish --packagePath … --pre-release.
  • A GitHub environment with a required reviewer keeps a manual approval before anything is published.
  • Credential: a Marketplace PAT secret, or workload identity (vsce publish --azure-credential) to avoid expiring
    tokens.
  • Releases stay manual, per the Release Guide.
5. Documentation
  • Update the wiki Release Guide:
    • pre-releases no longer need a patch-bump branch;
    • packaging goes through npm run package or npm run publish:marketplace rather than bare vsce;
    • beta builds come from the workflow.
  • Update the Developer Guide's SNAPSHOT jar instructions.

Non-goals

  • Changing the odd/even convention, or the release-version rules (developers still set release versions by semver).
  • Automating releases. They stay manual.
  • Marketplace changes for cql-language-server or cql-mcp.

Acceptance criteria

  • npm run package on an odd minor produces a pre-release VSIX versioned X.ODD.<YYDDDHHMM>, with
    package.json unchanged in git.
  • npm run package on an even minor produces a release VSIX with the committed version, and rejects
    --pre-release.
  • download-jar.js and javaServiceInstaller.ts resolve -SNAPSHOT versions from Central snapshots.
  • beta-vsix.yml builds an installable VSIX from any branch with each ls option.
  • Unit tests cover the stamp format (year and day rollover, under 2³¹), the parity rules, SNAPSHOT resolution
    and cross-platform paths.
  • The Release Guide and Developer Guide are updated.

Suggested order

Items 1 and 2 are independent and small. Item 3 depends on both. Item 4 depends on 1 and needs maintainer sign-off
and a Marketplace credential.

References

  • VS Code, Publishing Extensions: pre-release extensions
  • @vscode/vsce 4.1.1:
    • --no-update-package-json (out/package.js);
    • semver tags rejected at publish (out/publish.js);
    • --pre-release requires engines.vscode >= 1.63.
  • Timestamped pre-release patches on the Marketplace: ms-python.python (2026.11.2026110601),
    ms-vscode.remote-server (1.6.2026092109), stateful.marquee (3.3.1682654242).
  • microsoft/vscode-python build/update_ext_version.py:
    parity checks and the day-of-year patch.
  • Related: #151 (pre-release support, closed).
Dominant language
TypeScript
Stars
14
Forks
8
Avg merge
1d 22h
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cqframework/vscode-cql

All issues in cqframework/vscode-cql

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.