Declaring VS Code Extension Dependencies

Recently, a VS Code extension I had been using stopped working. I assume this was due to a VS Code update as the extension itself has not been published in a number of months. When trying to execute commands the extension provides I was presented with the error message: ‘command '<command_name>' not found’.

Opening up VS Code’s developer tools via the Help menu I was able to see that activating the extension had failed due to one of the extensions dependencies not being activated: ‘Extension `vscode.git` is not known or not activated’.

After some digging around it turns out the extension did not declare the extensionDependecies array in package.json. Declaring the dependency this way got the extension working again.

VS Code