diff --git a/CHANGELOG.md b/CHANGELOG.md index 3991c40d..167d0993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelogs +## 2.1.3 - February 14, 2019 + +- Changed: Synchronize with the latest `octokit` api. + +- Changed: Upgrade the VSCode web api to version `5.1-preview.1`. + + ## 2.1.2 - February 13, 2019 - Changed: Increase the download speed and accelerate the process of adding and installing VSCode extensions. diff --git a/README.md b/README.md index 3501fd36..e2f03c6d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # Syncing -[![Version](https://vsmarketplacebadge.apphb.com/version/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing) +[![Version](https://vsmarketplacebadge.apphb.com/version-short/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing) -[![Ratings](https://vsmarketplacebadge.apphb.com/rating/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing#review-details) +[![Downloads](https://vsmarketplacebadge.apphb.com/downloads-short/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing) +[![Ratings](https://vsmarketplacebadge.apphb.com/rating-star/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing#review-details) [English](README.md) | [中文](README.zh-CN.md) diff --git a/README.zh-CN.md b/README.zh-CN.md index 78a1762d..c2fa7f01 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,8 +1,9 @@ # Syncing -[![Version](https://vsmarketplacebadge.apphb.com/version/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing) +[![Version](https://vsmarketplacebadge.apphb.com/version-short/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing) -[![Ratings](https://vsmarketplacebadge.apphb.com/rating/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing#review-details) +[![Downloads](https://vsmarketplacebadge.apphb.com/downloads-short/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing) +[![Ratings](https://vsmarketplacebadge.apphb.com/rating-star/nonoroazoro.syncing.svg)](https://marketplace.visualstudio.com/items?itemName=nonoroazoro.syncing#review-details) [English](README.md) | [中文](README.zh-CN.md) @@ -17,7 +18,7 @@ * 从 ***2.1.2*** 版本开始: - 1. 显著加快 VSCode 插件的下载和安装速度; + 1. 显著加快 VSCode 插件的下载和安装速度,尤其是中国用户在无代理情况下的下载和安装速度; 1. 增加对各种 VSCode 版本的支持,包括: diff --git a/package.json b/package.json index 985e89ba..04c39f23 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "syncing", "displayName": "%displayName%", "description": "%description%", - "version": "2.1.2", + "version": "2.1.3", "publisher": "nonoroazoro", "author": { "email": "xiaochao.k@gmail.com", @@ -29,8 +29,9 @@ ], "keywords": [ "sync", - "sync-settings", "syncing", + "sync-settings", + "settings-sync", "vscode-sync", "vscode-syncing" ], diff --git a/src/core/Gist.ts b/src/core/Gist.ts index 3fb1772a..36e1a928 100644 --- a/src/core/Gist.ts +++ b/src/core/Gist.ts @@ -31,18 +31,19 @@ export class Gist { this._proxy = proxy; - const options: Record = { timeout: 8000 }; + const options: Record = { request: { timeout: 8000 } }; if (proxy) { - options["agent"] = new HttpsProxyAgent(proxy); + options.request["agent"] = new HttpsProxyAgent(proxy); } - this._api = new Github(options); this._token = token; - if (token) + if (token != null) { - this._api.authenticate({ token, type: "oauth" }); + options["auth"] = `token ${token}`; } + + this._api = new Github(options); } /** diff --git a/src/utils/vscodeAPI.ts b/src/utils/vscodeAPI.ts index c318d9fc..1b59979d 100644 --- a/src/utils/vscodeAPI.ts +++ b/src/utils/vscodeAPI.ts @@ -21,7 +21,7 @@ export function getExtensionById(id: string, ignoreCase = true) } /** - * Gets the `editor.formatOnSave` setting from `VSCode User Settings`. + * Gets the setting from `VSCode User Settings`. */ export function getVSCodeSetting(section: string, key: string, defaultValue?: T): T { diff --git a/src/utils/vscodeWebAPI.ts b/src/utils/vscodeWebAPI.ts index 32c27f33..fa4e4e95 100644 --- a/src/utils/vscodeWebAPI.ts +++ b/src/utils/vscodeWebAPI.ts @@ -21,7 +21,7 @@ export async function queryExtensions(ids: string[], proxy?: string): Promise 0) { const api = "https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery"; - const headers = { Accept: "application/json;api-version=3.0-preview.1" }; + const headers = { Accept: "application/json;api-version=5.1-preview.1" }; const data = { filters: [ {