Include installed extensions missing from VS Code API#1462
Open
landeqiming666 wants to merge 1 commit into
Open
Include installed extensions missing from VS Code API#1462landeqiming666 wants to merge 1 commit into
landeqiming666 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description of what this resolves:
This adds a conservative first step for #143: when building
extensions.json, Settings Sync now also reads installed extensionpackage.jsonfiles from the VS Code extensions folder and merges any extensions that are installed on disk but not returned by the VS Code extension API.That covers the user-facing failure mode discussed in #143 where disabled extensions can be omitted from upload and then treated as missing on another machine. This does not try to write VS Code's disabled-extension internals or restore enable/disable state; it keeps the change limited to preserving the installed extension list.
Changes proposed in this pull request:
InstalledExtensionsServicefor pure package.json-based extension discovery.PluginService.CreateExtensionList()after collecting API-visible extensions.publisher.nameso API-visible extensions keep their existing metadata.How Has This Been Tested?
npm run tslint-checkgit -c core.whitespace=cr-at-eol diff --check./node_modules/.bin/tsc --target es5 --module commonjs --moduleResolution node --lib es2015,es2016,es2017,es2018,esnext,dom --types node,chai,mocha --skipLibCheck --outDir /tmp/code-settings-sync-test-out src/service/installedExtensions.service.ts test/service/pluginService/pluginService.test.tsNODE_PATH="$PWD/node_modules" ./node_modules/.bin/mocha --recursive "/tmp/code-settings-sync-test-out/test/service/pluginService/**/*.js"Note: a full fresh
npm testcurrently fails before reaching this change because the unpinned dependency tree installs newer@octokit/rest/ type packages that no longer match the repository's TypeScript 3.x code (github.oauth.service.tsfetch typing andgithub.service.tsOctokit response types). I left package metadata untouched.Checklist: