1

I need to build an offline setup for a VScode IDE with some required VScode extension packages for python. The only available version of the VScode IDE that I'm able to use is 1.77.3, so that is NOT a variable here (well, it might be, but isn't right now).

So, the simple question is: is there some way to just use vsce (or other convenience tool) to query not only the versions of the VSIX package that are out there for download, but for each one, also get the compatible VScode version WITHOUT having to download the VSIX package itself??

I have a set of python methods that will try to figure out the latest compatible VSIX package version when given a VScode extension name in the {publisher}.{package} format and the VScode version. It is slow because the only way that I know of to extract the compatibility information is to download all possible VSIX package versions (extracted using vsce) and then loop through all of them, unzipping, and ingesting the package.json information to get the minimum compatible VScode version in the "engines/vscode" field.

The problem with this approach is that for some of the more frequently updated extension packs, there are a bazillion versions and I have to download each into a temporary directory, parse it, blow it away, etc. etc... this is taking a really long time to complete, although it works.

rioV8
  • 24,506
  • 3
  • 32
  • 49
  • see also https://stackoverflow.com/a/76212824/11107541 – starball Jun 26 '23 at 18:38
  • can you share what you might have so far? I have been attempting something similar until you mention the [vsce](https://stackoverflow.com/a/76559642/13642249) tool. – kyrlon Jun 26 '23 at 21:55
  • 1
    Sure! Check out what I have so far here: https://github.com/seekingtruth88/VScode-offline/blob/main/vsix_extraction.py – seekingtruth88 Jun 27 '23 at 14:01
  • 1
    One approach would be to scrape through a consistent 3rd party site like https://www.vsixhub.com/ that provides vscode version of extensions – kyrlon Jun 27 '23 at 17:42
  • 2
    Since one of the contributors made a [comment](https://github.com/microsoft/vscode-vsce/issues/754#issuecomment-1185295824) about features not implemented due to no one asking for those API calls more or less, I have opened an [issue](https://github.com/microsoft/vscode-vsce/issues/875#issue-1778016567) for such a feature request. – kyrlon Jun 28 '23 at 15:16
  • 1
    Wow thank you for opening the issue request in vsce. That would solve the problem, and I’m sort of surprised that it wasn’t there in the first place. I originally expected it to work if you used something like “vsce —show {publisher}.{package}@” to get the specific version compatibility. – seekingtruth88 Jun 28 '23 at 20:44

0 Answers0