For some users old linux server that’ s not upgradable is used. I use cursor to do a repackaging. It wrote script:
#!/usr/bin/env bash
# Usage: ./repack-for-api1051.sh language-julia-X.Y.Z.vsix
set -euo pipefail
SRC=${1:?vsix path required}
TARGET_ENGINE=${TARGET_ENGINE:-^1.105.1}
WORKDIR=$(mktemp -d)
trap 'rm -rf "$WORKDIR"' EXIT
unzip -q "$SRC" -d "$WORKDIR/unpack"
UPSTREAM_VER=$(python3 -c "import json; print(json.load(open('$WORKDIR/unpack/extension/package.json'))['version'])")
# local patch version: N.N.1051 based on major.minor of upstream when patch is tiny,
# else encode as major.minor*1000+1051 — keep simple: replace patch with 1051
VERSION=$(python3 -c "v='$UPSTREAM_VER'.split('.'); print(f'{v[0]}.{v[1]}.1051')")
python3 - "$WORKDIR" "$TARGET_ENGINE" "$VERSION" "$UPSTREAM_VER" <<'PY'
import json, os, re, sys, zipfile
from pathlib import Path
workdir, engine, version, upstream = sys.argv[1:5]
root = Path(workdir) / 'unpack'
pkg_path = root / 'extension' / 'package.json'
pkg = json.loads(pkg_path.read_text())
pkg['engines']['vscode'] = engine
pkg['version'] = version
if 'API 1.105' not in pkg.get('description',''):
pkg['description'] = pkg.get('description','') + ' (repackaged for VS Code API ^1.105.1 / CentOS)'
pkg_path.write_text(json.dumps(pkg, indent=2)+'\n')
man_path = root / 'extension.vsixmanifest'
man = man_path.read_text()
man = re.sub(rf'Version="{re.escape(upstream)}"', f'Version="{version}"', man, count=1)
man = re.sub(
r'(Property Id="Microsoft\.VisualStudio\.Code\.Engine" Value=")[^"]+(")',
rf'\1{engine}\2', man, count=1)
man_path.write_text(man)
out = Path(f'language-julia-{version}-api1051.vsix').resolve()
with zipfile.ZipFile(out, 'w', compression=zipfile.ZIP_DEFLATED) as zf:
for dirpath, _, files in os.walk(root):
for f in files:
fp = Path(dirpath)/f
zf.write(fp, fp.relative_to(root).as_posix())
print(out)
PY
And packaged: https://github.com/xgdgsc/julia-vscode/releases/download/v1.127.0/language-julia-1.238.1051-api1051.vsix
Haven’ t done extensive test. Use it at your own risk.