visual-studio-codevsix

How can I get a list of a VS Code extension's versions?


Is there a consistent/universal way to query a list of previous versions of a VS Code extension similar to how it is displayed after selecting the option Install another version... from the extension page as mentioned here? I am aware of checking the version history of an extension on the marketplace, but that usually only shows the recent 5 versions as mentioned in this SO post. I have also seen that some github pages for an extension keep a relative updated changelog and even tags such as the python extension, but some such as the extension Database Client do not show a detailed changelog of versions like it is displayed in VS Code's extension page. For instance for this extension cweijan.vscode-mysql-client2, I can see version 6.4.3 all the way back to version 2.0.0. mysql_db_gif_vscode If I wanted to download version 2.5.7, I can download the .vsix file directly from https://marketplace.visualstudio.com/_apis/public/gallery/publishers/cweijan/vsextensions/vscode-mysql-client2/2.5.7/vspackage.

Long story short, is there a straightforward way to query such a list of all previous versions of an extension?


Solution

  • You can use the vsce api tool from the terminal to query the list of published versions of the extension pack.

    on Linux OS, you can install it with the npm package manager:

    sudo apt update    
    sudo apt install nodejs
    npm install -g npm@latest
    npm install -g vsce
    

    And then to query the available versions:

    vsce show <publisher>.<package> --json
    

    The version numbers are found in the "versions" field of the json structure