Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)

* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c

* remove files we don't want

* fix hygiene

* update distro

* update distro

* fix hygiene

* fix strict nulls

* distro

* distro

* fix tests

* fix tests

* add another edit

* fix viewlet icon

* fix azure dialog

* fix some padding

* fix more padding issues
This commit is contained in:
Anthony Dresser
2019-12-04 19:28:22 -08:00
committed by GitHub
parent a8818ab0df
commit f5ce7fb2a5
1507 changed files with 42813 additions and 27370 deletions

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1 @@
blank_issues_enabled: false

19
.vscode/launch.json vendored
View File

@@ -67,17 +67,16 @@
"request": "launch", "request": "launch",
"name": "Launch azuredatastudio", "name": "Launch azuredatastudio",
"windows": { "windows": {
"runtimeExecutable": "${workspaceFolder}/scripts/sql.bat", "runtimeExecutable": "${workspaceFolder}/scripts/sql.bat"
"timeout": 45000
}, },
"osx": { "osx": {
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh", "runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
"timeout": 45000
}, },
"linux": { "linux": {
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh", "runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
"timeout": 45000
}, },
"port": 9222,
"timeout": 20000,
"env": { "env": {
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null "VSCODE_EXTHOST_WILL_SEND_SOCKET": null
}, },
@@ -260,6 +259,14 @@
"Attach to Main Process" "Attach to Main Process"
] ]
}, },
{
"name": "Debug azuredatastudio Main, Renderer & Extension Host",
"configurations": [
"Launch azuredatastudio",
"Attach to Main Process",
"Attach to Extension Host"
]
},
{ {
"name": "Debug Renderer and search processes", "name": "Debug Renderer and search processes",
"configurations": [ "configurations": [

View File

@@ -39,6 +39,7 @@
], ],
"typescript.tsdk": "node_modules/typescript/lib", "typescript.tsdk": "node_modules/typescript/lib",
"npm.exclude": "**/extensions/**", "npm.exclude": "**/extensions/**",
"npm.packageManager": "yarn",
"emmet.excludeLanguages": [], "emmet.excludeLanguages": [],
"typescript.preferences.importModuleSpecifier": "non-relative", "typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.quoteStyle": "single", "typescript.preferences.quoteStyle": "single",

6
.vscode/tasks.json vendored
View File

@@ -33,15 +33,15 @@
}, },
{ {
"type": "npm", "type": "npm",
"script": "strict-initialization-watch", "script": "strict-function-types-watch",
"label": "TS - Strict Initialization", "label": "TS - Strict Function Types",
"isBackground": true, "isBackground": true,
"presentation": { "presentation": {
"reveal": "never" "reveal": "never"
}, },
"problemMatcher": { "problemMatcher": {
"base": "$tsc-watch", "base": "$tsc-watch",
"owner": "typescript-strict-initialization", "owner": "typescript-function-types",
"applyTo": "allDocuments" "applyTo": "allDocuments"
} }
}, },

View File

@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron" disturl "https://atom.io/download/electron"
target "6.0.12" target "6.1.5"
runtime "electron" runtime "electron"

View File

@@ -0,0 +1,132 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as fs from 'fs';
import { Readable } from 'stream';
import * as crypto from 'crypto';
import * as azure from 'azure-storage';
import * as mime from 'mime';
import { CosmosClient } from '@azure/cosmos';
interface Asset {
platform: string;
type: string;
url: string;
mooncakeUrl?: string;
hash: string;
sha256hash: string;
size: number;
supportsFastUpdate?: boolean;
}
if (process.argv.length !== 6) {
console.error('Usage: node createAsset.js PLATFORM TYPE NAME FILE');
process.exit(-1);
}
function hashStream(hashName: string, stream: Readable): Promise<string> {
return new Promise<string>((c, e) => {
const shasum = crypto.createHash(hashName);
stream
.on('data', shasum.update.bind(shasum))
.on('error', e)
.on('close', () => c(shasum.digest('hex')));
});
}
async function doesAssetExist(blobService: azure.BlobService, quality: string, blobName: string): Promise<boolean | undefined> {
const existsResult = await new Promise<azure.BlobService.BlobResult>((c, e) => blobService.doesBlobExist(quality, blobName, (err, r) => err ? e(err) : c(r)));
return existsResult.exists;
}
async function uploadBlob(blobService: azure.BlobService, quality: string, blobName: string, file: string): Promise<void> {
const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = {
contentSettings: {
contentType: mime.lookup(file),
cacheControl: 'max-age=31536000, public'
}
};
await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, file, blobOptions, err => err ? e(err) : c()));
}
function getEnv(name: string): string {
const result = process.env[name];
if (typeof result === 'undefined') {
throw new Error('Missing env: ' + name);
}
return result;
}
async function main(): Promise<void> {
const [, , platform, type, name, file] = process.argv;
const quality = getEnv('VSCODE_QUALITY');
const commit = getEnv('BUILD_SOURCEVERSION');
console.log('Creating asset...');
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(file, (err, stat) => err ? e(err) : c(stat)));
const size = stat.size;
console.log('Size:', size);
const stream = fs.createReadStream(file);
const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]);
console.log('SHA1:', sha1hash);
console.log('SHA256:', sha256hash);
const blobName = commit + '/' + name;
const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!;
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
const blobExists = await doesAssetExist(blobService, quality, blobName);
if (blobExists) {
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
return;
}
console.log('Uploading blobs to Azure storage...');
await uploadBlob(blobService, quality, blobName, file);
console.log('Blobs successfully uploaded.');
const asset: Asset = {
platform,
type,
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
hash: sha1hash,
sha256hash,
size
};
// Remove this if we ever need to rollback fast updates for windows
if (/win32/.test(platform)) {
asset.supportsFastUpdate = true;
}
console.log('Asset:', JSON.stringify(asset, null, ' '));
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
const scripts = client.database('builds').container(quality).scripts;
await scripts.storedProcedure('createAsset').execute('', [commit, asset, true]);
}
main().then(() => {
console.log('Asset successfully created');
process.exit(0);
}, err => {
console.error(err);
process.exit(1);
});

View File

@@ -0,0 +1,60 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { CosmosClient } from '@azure/cosmos';
if (process.argv.length !== 3) {
console.error('Usage: node createBuild.js VERSION');
process.exit(-1);
}
function getEnv(name: string): string {
const result = process.env[name];
if (typeof result === 'undefined') {
throw new Error('Missing env: ' + name);
}
return result;
}
async function main(): Promise<void> {
const [, , _version] = process.argv;
const quality = getEnv('VSCODE_QUALITY');
const commit = getEnv('BUILD_SOURCEVERSION');
const queuedBy = getEnv('BUILD_QUEUEDBY');
const sourceBranch = getEnv('BUILD_SOURCEBRANCH');
const version = _version + (quality === 'stable' ? '' : `-${quality}`);
console.log('Creating build...');
console.log('Quality:', quality);
console.log('Version:', version);
console.log('Commit:', commit);
const build = {
id: commit,
timestamp: (new Date()).getTime(),
version,
isReleased: false,
sourceBranch,
queuedBy,
assets: [],
updates: {}
};
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
const scripts = client.database('builds').container(quality).scripts;
await scripts.storedProcedure('createBuild').execute('', [{ ...build, _partitionKey: '' }]);
}
main().then(() => {
console.log('Build successfully created');
process.exit(0);
}, err => {
console.error(err);
process.exit(1);
});

View File

@@ -0,0 +1,70 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { CosmosClient } from '@azure/cosmos';
function getEnv(name: string): string {
const result = process.env[name];
if (typeof result === 'undefined') {
throw new Error('Missing env: ' + name);
}
return result;
}
interface Config {
id: string;
frozen: boolean;
}
function createDefaultConfig(quality: string): Config {
return {
id: quality,
frozen: false
};
}
async function getConfig(client: CosmosClient, quality: string): Promise<Config> {
const query = `SELECT TOP 1 * FROM c WHERE c.id = "${quality}"`;
const res = await client.database('builds').container('config').items.query(query).fetchAll();
if (res.resources.length === 0) {
return createDefaultConfig(quality);
}
return res.resources[0] as Config;
}
async function main(): Promise<void> {
const commit = getEnv('BUILD_SOURCEVERSION');
const quality = getEnv('VSCODE_QUALITY');
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
const config = await getConfig(client, quality);
console.log('Quality config:', config);
if (config.frozen) {
console.log(`Skipping release because quality ${quality} is frozen.`);
return;
}
console.log(`Releasing build ${commit}...`);
const scripts = client.database('builds').container(quality).scripts;
await scripts.storedProcedure('releaseBuild').execute('', [commit]);
}
main().then(() => {
console.log('Build successfully released');
process.exit(0);
}, err => {
console.error(err);
process.exit(1);
});

View File

@@ -8,7 +8,7 @@
import * as url from 'url'; import * as url from 'url';
import * as azure from 'azure-storage'; import * as azure from 'azure-storage';
import * as mime from 'mime'; import * as mime from 'mime';
import { DocumentClient, RetrievedDocument } from 'documentdb'; import { CosmosClient } from '@azure/cosmos';
function log(...args: any[]) { function log(...args: any[]) {
console.log(...[`[${new Date().toISOString()}]`, ...args]); console.log(...[`[${new Date().toISOString()}]`, ...args]);
@@ -23,7 +23,7 @@ if (process.argv.length < 3) {
process.exit(-1); process.exit(-1);
} }
interface Build extends RetrievedDocument { interface Build {
assets: Asset[]; assets: Asset[];
} }
@@ -38,62 +38,20 @@ interface Asset {
supportsFastUpdate?: boolean; supportsFastUpdate?: boolean;
} }
function updateBuild(commit: string, quality: string, platform: string, type: string, asset: Asset): Promise<void> {
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
const collection = 'dbs/builds/colls/' + quality;
const updateQuery = {
query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
parameters: [{ name: '@id', value: commit }]
};
let updateTries = 0;
function _update(): Promise<void> {
updateTries++;
return new Promise<void>((c, e) => {
client.queryDocuments(collection, updateQuery).toArray((err, results) => {
if (err) { return e(err); }
if (results.length !== 1) { return e(new Error('No documents')); }
const release = results[0];
release.assets = [
...release.assets.filter((a: any) => !(a.platform === platform && a.type === type)),
asset
];
client.replaceDocument(release._self, release, err => {
if (err && err.code === 409 && updateTries < 5) { return c(_update()); }
if (err) { return e(err); }
log('Build successfully updated.');
c();
});
});
});
}
return _update();
}
async function sync(commit: string, quality: string): Promise<void> { async function sync(commit: string, quality: string): Promise<void> {
log(`Synchronizing Mooncake assets for ${quality}, ${commit}...`); log(`Synchronizing Mooncake assets for ${quality}, ${commit}...`);
const cosmosdb = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
const collection = `dbs/builds/colls/${quality}`; const container = client.database('builds').container(quality);
const query = {
query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
parameters: [{ name: '@id', value: commit }]
};
const build = await new Promise<Build>((c, e) => { const query = `SELECT TOP 1 * FROM c WHERE c.id = "${commit}"`;
cosmosdb.queryDocuments(collection, query).toArray((err, results) => { const res = await container.items.query<Build>(query, {}).fetchAll();
if (err) { return e(err); }
if (results.length !== 1) { return e(new Error('No documents')); } if (res.resources.length !== 1) {
c(results[0] as Build); throw new Error(`No builds found for ${commit}`);
}); }
});
const build = res.resources[0];
log(`Found build for ${commit}, with ${build.assets.length} assets`); log(`Found build for ${commit}, with ${build.assets.length} assets`);
@@ -140,8 +98,9 @@ async function sync(commit: string, quality: string): Promise<void> {
await new Promise((c, e) => readStream.pipe(writeStream).on('finish', c).on('error', e)); await new Promise((c, e) => readStream.pipe(writeStream).on('finish', c).on('error', e));
log(` Updating build in DB...`); log(` Updating build in DB...`);
asset.mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`; const mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`;
await updateBuild(commit, quality, asset.platform, asset.type, asset); await container.scripts.storedProcedure('setAssetMooncakeUrl')
.execute('', [commit, asset.platform, asset.type, mooncakeUrl]);
log(` Done ✔️`); log(` Done ✔️`);
} catch (err) { } catch (err) {

View File

@@ -1,21 +1,21 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
inputs:
versionSpec: "1.x"
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs: inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock' keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules' targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
vstsFeed: '$(build-cache)' # {{SQL CARBON EDIT}} update build cache vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
- task: AzureKeyVault@1 - task: AzureKeyVault@1
displayName: 'Azure Key Vault: Get Secrets' displayName: 'Azure Key Vault: Get Secrets'
inputs: inputs:
azureSubscription: 'azuredatastudio-adointegration' azureSubscription: 'azuredatastudio-adointegration'
KeyVaultName: ado-secrets KeyVaultName: ado-secrets
SecretsFilter: 'github-distro-mixin-password' SecretsFilter: 'github-distro-mixin-password'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
inputs:
versionSpec: "1.x"
- script: | - script: |
CHILD_CONCURRENCY=1 yarn --frozen-lockfile CHILD_CONCURRENCY=1 yarn --frozen-lockfile
displayName: Install Dependencies displayName: Install Dependencies
@@ -26,7 +26,7 @@ steps:
inputs: inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock' keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules' targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
vstsFeed: '$(build-cache)' # {{SQL CARBON EDIT}} update build cache vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- script: | - script: |
yarn electron x64 yarn electron x64

View File

@@ -21,7 +21,7 @@ steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@@ -5,28 +5,20 @@ set -e
zip -d ../VSCode-darwin.zip "*.pkg" zip -d ../VSCode-darwin.zip "*.pkg"
# publish the build # publish the build
PACKAGEJSON=`ls ../VSCode-darwin/*.app/Contents/Resources/app/package.json` node build/azure-pipelines/common/createAsset.js \
VERSION=`node -p "require(\"$PACKAGEJSON\").version"`
node build/azure-pipelines/common/publish.js \
"$VSCODE_QUALITY" \
darwin \ darwin \
archive \ archive \
"VSCode-darwin-$VSCODE_QUALITY.zip" \ "VSCode-darwin-$VSCODE_QUALITY.zip" \
$VERSION \
true \
../VSCode-darwin.zip ../VSCode-darwin.zip
# package Remote Extension Host # package Remote Extension Host
pushd .. && mv vscode-reh-darwin vscode-server-darwin && zip -Xry vscode-server-darwin.zip vscode-server-darwin && popd pushd .. && mv vscode-reh-darwin vscode-server-darwin && zip -Xry vscode-server-darwin.zip vscode-server-darwin && popd
# publish Remote Extension Host # publish Remote Extension Host
node build/azure-pipelines/common/publish.js \ node build/azure-pipelines/common/createAsset.js \
"$VSCODE_QUALITY" \
server-darwin \ server-darwin \
archive-unsigned \ archive-unsigned \
"vscode-server-darwin.zip" \ "vscode-server-darwin.zip" \
$VERSION \
true \
../vscode-server-darwin.zip ../vscode-server-darwin.zip
# publish hockeyapp symbols # publish hockeyapp symbols

View File

@@ -11,7 +11,7 @@ pr:
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: AzureKeyVault@1 - task: AzureKeyVault@1
displayName: 'Azure Key Vault: Get Secrets' displayName: 'Azure Key Vault: Get Secrets'

View File

@@ -7,7 +7,7 @@ pr: none
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: AzureKeyVault@1 - task: AzureKeyVault@1
displayName: 'Azure Key Vault: Get Secrets' displayName: 'Azure Key Vault: Get Secrets'

View File

@@ -9,21 +9,21 @@ steps:
sudo service xvfb start sudo service xvfb start
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
inputs: inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock' versionSpec: "1.x"
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
vstsFeed: '$(build-cache)' # {{SQL CARBON EDIT}} update build cache
- task: AzureKeyVault@1 - task: AzureKeyVault@1
displayName: 'Azure Key Vault: Get Secrets' displayName: 'Azure Key Vault: Get Secrets'
inputs: inputs:
azureSubscription: 'azuredatastudio-adointegration' azureSubscription: 'azuredatastudio-adointegration'
KeyVaultName: ado-secrets KeyVaultName: ado-secrets
SecretsFilter: 'github-distro-mixin-password' SecretsFilter: 'github-distro-mixin-password'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs: inputs:
versionSpec: "1.x" keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
- script: | - script: |
CHILD_CONCURRENCY=1 yarn --frozen-lockfile CHILD_CONCURRENCY=1 yarn --frozen-lockfile
displayName: Install Dependencies displayName: Install Dependencies
@@ -34,7 +34,7 @@ steps:
inputs: inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock' keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules' targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
vstsFeed: '$(build-cache)' # {{SQL CARBON EDIT}} update build cache vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- script: | - script: |
yarn electron x64 yarn electron x64

View File

@@ -1,40 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const documentdb_1 = require("documentdb");
function createDefaultConfig(quality) {
return {
id: quality,
frozen: false
};
}
function getConfig(quality) {
const client = new documentdb_1.DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
const collection = 'dbs/builds/colls/config';
const query = {
query: `SELECT TOP 1 * FROM c WHERE c.id = @quality`,
parameters: [
{ name: '@quality', value: quality }
]
};
return new Promise((c, e) => {
client.queryDocuments(collection, query).toArray((err, results) => {
if (err && err.code !== 409) {
return e(err);
}
c(!results || results.length === 0 ? createDefaultConfig(quality) : results[0]);
});
});
}
getConfig(process.argv[2])
.then(config => {
console.log(config.frozen);
process.exit(0);
})
.catch(err => {
console.error(err);
process.exit(1);
});

View File

@@ -21,7 +21,7 @@ steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@@ -21,7 +21,7 @@ steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:
@@ -118,6 +118,32 @@ steps:
displayName: Run integration tests displayName: Run integration tests
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- script: |
set -e
yarn gulp "vscode-linux-x64-build-deb"
yarn gulp "vscode-linux-x64-build-rpm"
yarn gulp "vscode-linux-x64-prepare-snap"
displayName: Build packages
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
inputs:
ConnectedServiceName: 'ESRP CodeSign'
FolderPath: '.build/linux/rpm/x86_64'
Pattern: '*.rpm'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"keyCode": "CP-450779-Pgp",
"operationSetCode": "LinuxSign",
"parameters": [ ],
"toolName": "sign",
"toolVersion": "1.0"
}
]
SessionTimeout: 120
displayName: Codesign rpm
- script: | - script: |
set -e set -e
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \

View File

@@ -10,13 +10,11 @@ BUILD="$ROOT/$BUILDNAME"
BUILD_VERSION="$(date +%s)" BUILD_VERSION="$(date +%s)"
[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz" [ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz"
TARBALL_PATH="$ROOT/$TARBALL_FILENAME" TARBALL_PATH="$ROOT/$TARBALL_FILENAME"
PACKAGEJSON="$BUILD/resources/app/package.json"
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
rm -rf $ROOT/code-*.tar.* rm -rf $ROOT/code-*.tar.*
(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME) (cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME)
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_LINUX" archive-unsigned "$TARBALL_FILENAME" "$VERSION" true "$TARBALL_PATH" node build/azure-pipelines/common/createAsset.js "$PLATFORM_LINUX" archive-unsigned "$TARBALL_FILENAME" "$TARBALL_PATH"
# Publish Remote Extension Host # Publish Remote Extension Host
LEGACY_SERVER_BUILD_NAME="vscode-reh-$PLATFORM_LINUX" LEGACY_SERVER_BUILD_NAME="vscode-reh-$PLATFORM_LINUX"
@@ -27,32 +25,28 @@ SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME"
rm -rf $ROOT/vscode-server-*.tar.* rm -rf $ROOT/vscode-server-*.tar.*
(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME) (cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME)
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "server-$PLATFORM_LINUX" archive-unsigned "$SERVER_TARBALL_FILENAME" "$VERSION" true "$SERVER_TARBALL_PATH" node build/azure-pipelines/common/createAsset.js "server-$PLATFORM_LINUX" archive-unsigned "$SERVER_TARBALL_FILENAME" "$SERVER_TARBALL_PATH"
# Publish hockeyapp symbols # Publish hockeyapp symbols
node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" "x64" "$VSCODE_HOCKEYAPP_ID_LINUX64" node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" "x64" "$VSCODE_HOCKEYAPP_ID_LINUX64"
# Publish DEB # Publish DEB
yarn gulp "vscode-linux-x64-build-deb"
PLATFORM_DEB="linux-deb-x64" PLATFORM_DEB="linux-deb-x64"
DEB_ARCH="amd64" DEB_ARCH="amd64"
DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)"
DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME"
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_DEB" package "$DEB_FILENAME" "$VERSION" true "$DEB_PATH" node build/azure-pipelines/common/createAsset.js "$PLATFORM_DEB" package "$DEB_FILENAME" "$DEB_PATH"
# Publish RPM # Publish RPM
yarn gulp "vscode-linux-x64-build-rpm"
PLATFORM_RPM="linux-rpm-x64" PLATFORM_RPM="linux-rpm-x64"
RPM_ARCH="x86_64" RPM_ARCH="x86_64"
RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)"
RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_RPM" package "$RPM_FILENAME" "$VERSION" true "$RPM_PATH" node build/azure-pipelines/common/createAsset.js "$PLATFORM_RPM" package "$RPM_FILENAME" "$RPM_PATH"
# Publish Snap # Publish Snap
yarn gulp "vscode-linux-x64-prepare-snap"
# Pack snap tarball artifact, in order to preserve file perms # Pack snap tarball artifact, in order to preserve file perms
mkdir -p $REPO/.build/linux/snap-tarball mkdir -p $REPO/.build/linux/snap-tarball
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-x64.tar.gz" SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-x64.tar.gz"

View File

@@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:
@@ -43,12 +43,10 @@ steps:
# Create snap package # Create snap package
BUILD_VERSION="$(date +%s)" BUILD_VERSION="$(date +%s)"
SNAP_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.snap" SNAP_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.snap"
PACKAGEJSON="$(ls $SNAP_ROOT/code*/usr/share/code*/resources/app/package.json)"
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
SNAP_PATH="$SNAP_ROOT/$SNAP_FILENAME" SNAP_PATH="$SNAP_ROOT/$SNAP_FILENAME"
(cd $SNAP_ROOT/code-* && sudo --preserve-env snapcraft snap --output "$SNAP_PATH") (cd $SNAP_ROOT/code-* && sudo --preserve-env snapcraft snap --output "$SNAP_PATH")
# Publish snap package # Publish snap package
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \ AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "linux-snap-x64" package "$SNAP_FILENAME" "$VERSION" true "$SNAP_PATH" node build/azure-pipelines/common/createAsset.js "linux-snap-x64" package "$SNAP_FILENAME" "$SNAP_PATH"

View File

@@ -67,7 +67,7 @@ jobs:
- template: linux/product-build-linux-multiarch.yml - template: linux/product-build-linux-multiarch.yml
- job: LinuxArm64 - job: LinuxArm64
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'), ne(variables['VSCODE_QUALITY'], 'stable')) condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'))
pool: pool:
vmImage: 'Ubuntu-16.04' vmImage: 'Ubuntu-16.04'
variables: variables:
@@ -118,6 +118,7 @@ jobs:
- Linux - Linux
- LinuxSnap - LinuxSnap
- LinuxArmhf - LinuxArmhf
- LinuxArm64
- LinuxAlpine - LinuxAlpine
- macOS - macOS
steps: steps:
@@ -133,6 +134,7 @@ jobs:
- Linux - Linux
- LinuxSnap - LinuxSnap
- LinuxArmhf - LinuxArmhf
- LinuxArm64
- LinuxAlpine - LinuxAlpine
- LinuxWeb - LinuxWeb
- macOS - macOS

View File

@@ -12,23 +12,24 @@ steps:
vstsFeed: 'npm-vscode' vstsFeed: 'npm-vscode'
platformIndependent: true platformIndependent: true
alias: 'Compilation' alias: 'Compilation'
dryRun: true
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:
versionSpec: "1.x" versionSpec: "1.x"
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- task: AzureKeyVault@1 - task: AzureKeyVault@1
displayName: 'Azure Key Vault: Get Secrets' displayName: 'Azure Key Vault: Get Secrets'
inputs: inputs:
azureSubscription: 'vscode-builds-subscription' azureSubscription: 'vscode-builds-subscription'
KeyVaultName: vscode KeyVaultName: vscode
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- script: | - script: |
set -e set -e
@@ -41,7 +42,7 @@ steps:
git config user.email "vscode@microsoft.com" git config user.email "vscode@microsoft.com"
git config user.name "VSCode" git config user.name "VSCode"
displayName: Prepare tooling displayName: Prepare tooling
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- script: | - script: |
set -e set -e
@@ -49,33 +50,33 @@ steps:
git fetch distro git fetch distro
git merge $(node -p "require('./package.json').distro") git merge $(node -p "require('./package.json').distro")
displayName: Merge distro displayName: Merge distro
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs: inputs:
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules' targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: 'npm-vscode' vstsFeed: 'npm-vscode'
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- script: | - script: |
set -e set -e
CHILD_CONCURRENCY=1 yarn --frozen-lockfile CHILD_CONCURRENCY=1 yarn --frozen-lockfile
displayName: Install dependencies displayName: Install dependencies
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), ne(variables['CacheRestored'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs: inputs:
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules' targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: 'npm-vscode' vstsFeed: 'npm-vscode'
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), ne(variables['CacheRestored'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
- script: | - script: |
set -e set -e
yarn postinstall yarn postinstall
displayName: Run postinstall scripts displayName: Run postinstall scripts
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['CacheRestored'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), eq(variables['CacheRestored'], 'true'))
# Mixin must run before optimize, because the CSS loader will # Mixin must run before optimize, because the CSS loader will
# inline small SVGs # inline small SVGs
@@ -83,7 +84,7 @@ steps:
set -e set -e
node build/azure-pipelines/mixin node build/azure-pipelines/mixin
displayName: Mix in quality displayName: Mix in quality
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- script: | - script: |
set -e set -e
@@ -91,20 +92,20 @@ steps:
yarn gulp tslint yarn gulp tslint
yarn monaco-compile-check yarn monaco-compile-check
displayName: Run hygiene, tslint and monaco compile checks displayName: Run hygiene, tslint and monaco compile checks
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- script: | - script: |
set - set -
./build/azure-pipelines/common/extract-telemetry.sh ./build/azure-pipelines/common/extract-telemetry.sh
displayName: Extract Telemetry displayName: Extract Telemetry
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- script: | - script: |
set -e set -e
AZURE_WEBVIEW_STORAGE_ACCESS_KEY="$(vscode-webview-storage-key)" \ AZURE_WEBVIEW_STORAGE_ACCESS_KEY="$(vscode-webview-storage-key)" \
./build/azure-pipelines/common/publish-webview.sh ./build/azure-pipelines/common/publish-webview.sh
displayName: Publish Webview displayName: Publish Webview
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- script: | - script: |
set -e set -e
@@ -114,14 +115,22 @@ steps:
yarn gulp minify-vscode-reh yarn gulp minify-vscode-reh
yarn gulp minify-vscode-reh-web yarn gulp minify-vscode-reh-web
displayName: Compile displayName: Compile
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- script: | - script: |
set -e set -e
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \ AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
node build/azure-pipelines/upload-sourcemaps node build/azure-pipelines/upload-sourcemaps
displayName: Upload sourcemaps displayName: Upload sourcemaps
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- script: |
set -e
VERSION=`node -p "require(\"./package.json\").version"`
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
node build/azure-pipelines/common/createBuild.js $VERSION
displayName: Create build
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs: inputs:
@@ -130,4 +139,4 @@ steps:
vstsFeed: 'npm-vscode' vstsFeed: 'npm-vscode'
platformIndependent: true platformIndependent: true
alias: 'Compilation' alias: 'Compilation'
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))

View File

@@ -35,9 +35,9 @@ function isValidTag(t: string) {
return false; return false;
} }
if (parseInt(major, 10) === NaN || parseInt(minor, 10) === NaN) { if (isNaN(parseInt(major, 10)) || isNaN(parseInt(minor, 10))) {
return false; return false;
} }
return true; return true;
} }

View File

@@ -9,7 +9,7 @@ pr: none
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@@ -19,4 +19,4 @@ steps:
(cd build ; yarn) (cd build ; yarn)
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
node build/azure-pipelines/common/release.js node build/azure-pipelines/common/releaseBuild.js

View File

@@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@@ -21,7 +21,7 @@ steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@@ -7,12 +7,9 @@ ROOT="$REPO/.."
WEB_BUILD_NAME="vscode-web" WEB_BUILD_NAME="vscode-web"
WEB_TARBALL_FILENAME="vscode-web.tar.gz" WEB_TARBALL_FILENAME="vscode-web.tar.gz"
WEB_TARBALL_PATH="$ROOT/$WEB_TARBALL_FILENAME" WEB_TARBALL_PATH="$ROOT/$WEB_TARBALL_FILENAME"
BUILD="$ROOT/$WEB_BUILD_NAME"
PACKAGEJSON="$BUILD/package.json"
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
rm -rf $ROOT/vscode-web.tar.* rm -rf $ROOT/vscode-web.tar.*
(cd $ROOT && tar --owner=0 --group=0 -czf $WEB_TARBALL_PATH $WEB_BUILD_NAME) (cd $ROOT && tar --owner=0 --group=0 -czf $WEB_TARBALL_PATH $WEB_BUILD_NAME)
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "web-standalone" archive-unsigned "$WEB_TARBALL_FILENAME" "$VERSION" true "$WEB_TARBALL_PATH" node build/azure-pipelines/common/createAsset.js web-standalone archive-unsigned "$WEB_TARBALL_FILENAME" "$WEB_TARBALL_PATH"

View File

@@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
inputs: inputs:
versionSpec: "1.x" versionSpec: "1.x"
@@ -19,7 +19,7 @@ steps:
inputs: inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock' keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules' targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
vstsFeed: '$(build-cache)' # {{SQL CARBON EDIT}} update build cache vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
- powershell: | - powershell: |
yarn --frozen-lockfile yarn --frozen-lockfile
env: env:
@@ -31,7 +31,7 @@ steps:
inputs: inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock' keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules' targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
vstsFeed: '$(build-cache)' # {{SQL CARBON EDIT}} update build cache vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- powershell: | - powershell: |
yarn electron yarn electron

View File

@@ -21,7 +21,7 @@ steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.15.1" versionSpec: "12.13.0"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@@ -23,14 +23,13 @@ exec { .\node_modules\7zip\7zip-lite\7z.exe a -tzip $ServerZip $Server -r }
# get version # get version
$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json $PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
$Version = $PackageJson.version $Version = $PackageJson.version
$Quality = "$env:VSCODE_QUALITY"
$AssetPlatform = if ("$Arch" -eq "ia32") { "win32" } else { "win32-x64" } $AssetPlatform = if ("$Arch" -eq "ia32") { "win32" } else { "win32-x64" }
exec { node build/azure-pipelines/common/publish.js $Quality "$AssetPlatform-archive" archive "VSCode-win32-$Arch-$Version.zip" $Version true $Zip } exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-archive" archive "VSCode-win32-$Arch-$Version.zip" $Zip }
exec { node build/azure-pipelines/common/publish.js $Quality "$AssetPlatform" setup "VSCodeSetup-$Arch-$Version.exe" $Version true $SystemExe } exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform" setup "VSCodeSetup-$Arch-$Version.exe" $SystemExe }
exec { node build/azure-pipelines/common/publish.js $Quality "$AssetPlatform-user" setup "VSCodeUserSetup-$Arch-$Version.exe" $Version true $UserExe } exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-user" setup "VSCodeUserSetup-$Arch-$Version.exe" $UserExe }
exec { node build/azure-pipelines/common/publish.js $Quality "server-$AssetPlatform" archive "vscode-server-win32-$Arch.zip" $Version true $ServerZip } exec { node build/azure-pipelines/common/createAsset.js "server-$AssetPlatform" archive "vscode-server-win32-$Arch.zip" $ServerZip }
# publish hockeyapp symbols # publish hockeyapp symbols
$hockeyAppId = if ("$Arch" -eq "ia32") { "$env:VSCODE_HOCKEYAPP_ID_WIN32" } else { "$env:VSCODE_HOCKEYAPP_ID_WIN64" } $hockeyAppId = if ("$Arch" -eq "ia32") { "$env:VSCODE_HOCKEYAPP_ID_WIN32" } else { "$env:VSCODE_HOCKEYAPP_ID_WIN64" }

View File

@@ -57,7 +57,6 @@ var BUNDLED_FILE_HEADER = [
const languages = i18n.defaultLanguages.concat([]); // i18n.defaultLanguages.concat(process.env.VSCODE_QUALITY !== 'stable' ? i18n.extraLanguages : []); const languages = i18n.defaultLanguages.concat([]); // i18n.defaultLanguages.concat(process.env.VSCODE_QUALITY !== 'stable' ? i18n.extraLanguages : []);
const extractEditorSrcTask = task.define('extract-editor-src', () => { const extractEditorSrcTask = task.define('extract-editor-src', () => {
console.log(`If the build fails, consider tweaking shakeLevel below to a lower value.`);
const apiusages = monacoapi.execute().usageContent; const apiusages = monacoapi.execute().usageContent;
const extrausages = fs.readFileSync(path.join(root, 'build', 'monaco', 'monaco.usage.recipe')).toString(); const extrausages = fs.readFileSync(path.join(root, 'build', 'monaco', 'monaco.usage.recipe')).toString();
standalone.extractEditor({ standalone.extractEditor({
@@ -71,14 +70,6 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
apiusages, apiusages,
extrausages extrausages
], ],
typings: [
'typings/lib.ie11_safe_es6.d.ts',
'typings/thenable.d.ts',
'typings/es6-promise.d.ts',
'typings/require-monaco.d.ts',
"typings/lib.es2018.promise.d.ts",
'vs/monaco.d.ts'
],
libs: [ libs: [
`lib.es5.d.ts`, `lib.es5.d.ts`,
`lib.dom.d.ts`, `lib.dom.d.ts`,
@@ -86,7 +77,8 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
], ],
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
importIgnorePattern: /(^vs\/css!)|(promise-polyfill\/polyfill)/, importIgnorePattern: /(^vs\/css!)|(promise-polyfill\/polyfill)/,
destRoot: path.join(root, 'out-editor-src') destRoot: path.join(root, 'out-editor-src'),
redirects: []
}); });
}); });
@@ -137,18 +129,70 @@ const createESMSourcesAndResourcesTask = task.define('extract-editor-esm', () =>
}); });
const compileEditorESMTask = task.define('compile-editor-esm', () => { const compileEditorESMTask = task.define('compile-editor-esm', () => {
console.log(`Launching the TS compiler at ${path.join(__dirname, '../out-editor-esm')}...`);
let result;
if (process.platform === 'win32') { if (process.platform === 'win32') {
const result = cp.spawnSync(`..\\node_modules\\.bin\\tsc.cmd`, { result = cp.spawnSync(`..\\node_modules\\.bin\\tsc.cmd`, {
cwd: path.join(__dirname, '../out-editor-esm') cwd: path.join(__dirname, '../out-editor-esm')
}); });
console.log(result.stdout.toString());
console.log(result.stderr.toString());
} else { } else {
const result = cp.spawnSync(`node`, [`../node_modules/.bin/tsc`], { result = cp.spawnSync(`node`, [`../node_modules/.bin/tsc`], {
cwd: path.join(__dirname, '../out-editor-esm') cwd: path.join(__dirname, '../out-editor-esm')
}); });
console.log(result.stdout.toString()); }
console.log(result.stderr.toString());
console.log(result.stdout.toString());
console.log(result.stderr.toString());
if (result.status !== 0) {
console.log(`The TS Compilation failed, preparing analysis folder...`);
const destPath = path.join(__dirname, '../../vscode-monaco-editor-esm-analysis');
return util.rimraf(destPath)().then(() => {
fs.mkdirSync(destPath);
// initialize a new repository
cp.spawnSync(`git`, [`init`], {
cwd: destPath
});
// build a list of files to copy
const files = util.rreddir(path.join(__dirname, '../out-editor-esm'));
// copy files from src
for (const file of files) {
const srcFilePath = path.join(__dirname, '../src', file);
const dstFilePath = path.join(destPath, file);
if (fs.existsSync(srcFilePath)) {
util.ensureDir(path.dirname(dstFilePath));
const contents = fs.readFileSync(srcFilePath).toString().replace(/\r\n|\r|\n/g, '\n');
fs.writeFileSync(dstFilePath, contents);
}
}
// create an initial commit to diff against
cp.spawnSync(`git`, [`add`, `.`], {
cwd: destPath
});
// create the commit
cp.spawnSync(`git`, [`commit`, `-m`, `"original sources"`, `--no-gpg-sign`], {
cwd: destPath
});
// copy files from esm
for (const file of files) {
const srcFilePath = path.join(__dirname, '../out-editor-esm', file);
const dstFilePath = path.join(destPath, file);
if (fs.existsSync(srcFilePath)) {
util.ensureDir(path.dirname(dstFilePath));
const contents = fs.readFileSync(srcFilePath).toString().replace(/\r\n|\r|\n/g, '\n');
fs.writeFileSync(dstFilePath, contents);
}
}
console.log(`Open in VS Code the folder at '${destPath}' and you can alayze the compilation error`);
throw new Error('Standalone Editor compilation failed. If this is the build machine, simply launch `yarn run gulp editor-distro` on your machine to further analyze the compilation problem.');
});
} }
}); });

View File

@@ -115,7 +115,8 @@ const tasks = compilations.map(function (tsconfigFile) {
const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => { const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => {
const pipeline = createPipeline(sqlLocalizedExtensions.includes(name), true); // {{SQL CARBON EDIT}} const pipeline = createPipeline(sqlLocalizedExtensions.includes(name), true); // {{SQL CARBON EDIT}}
const input = pipeline.tsProjectSrc(); const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts']));
const input = es.merge(nonts, pipeline.tsProjectSrc());
return input return input
.pipe(pipeline()) .pipe(pipeline())
@@ -124,7 +125,8 @@ const tasks = compilations.map(function (tsconfigFile) {
const watchTask = task.define(`watch-extension:${name}`, task.series(cleanTask, () => { const watchTask = task.define(`watch-extension:${name}`, task.series(cleanTask, () => {
const pipeline = createPipeline(false); const pipeline = createPipeline(false);
const input = pipeline.tsProjectSrc(); const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts']));
const input = es.merge(nonts, pipeline.tsProjectSrc());
const watchInput = watcher(src, { ...srcOpts, ...{ readDelay: 200 } }); const watchInput = watcher(src, { ...srcOpts, ...{ readDelay: 200 } });
return watchInput return watchInput
@@ -134,7 +136,8 @@ const tasks = compilations.map(function (tsconfigFile) {
const compileBuildTask = task.define(`compile-build-extension-${name}`, task.series(cleanTask, () => { const compileBuildTask = task.define(`compile-build-extension-${name}`, task.series(cleanTask, () => {
const pipeline = createPipeline(true, true); const pipeline = createPipeline(true, true);
const input = pipeline.tsProjectSrc(); const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts']));
const input = es.merge(nonts, pipeline.tsProjectSrc());
return input return input
.pipe(pipeline()) .pipe(pipeline())

View File

@@ -125,6 +125,7 @@ const copyrightFilter = [
'!**/*.opts', '!**/*.opts',
'!**/*.disabled', '!**/*.disabled',
'!**/*.code-workspace', '!**/*.code-workspace',
'!**/*.js.map',
'!**/promise-polyfill/polyfill.js', '!**/promise-polyfill/polyfill.js',
'!build/**/*.init', '!build/**/*.init',
'!resources/linux/snap/snapcraft.yaml', '!resources/linux/snap/snapcraft.yaml',
@@ -194,7 +195,8 @@ const tslintBaseFilter = [
'!extensions/**/*.test.ts', '!extensions/**/*.test.ts',
'!extensions/html-language-features/server/lib/jquery.d.ts', '!extensions/html-language-features/server/lib/jquery.d.ts',
'!extensions/big-data-cluster/src/bigDataCluster/controller/apiGenerated.ts', // {{SQL CARBON EDIT}}, '!extensions/big-data-cluster/src/bigDataCluster/controller/apiGenerated.ts', // {{SQL CARBON EDIT}},
'!extensions/big-data-cluster/src/bigDataCluster/controller/tokenApiGenerated.ts' // {{SQL CARBON EDIT}}, '!extensions/big-data-cluster/src/bigDataCluster/controller/tokenApiGenerated.ts', // {{SQL CARBON EDIT}},
'!src/vs/workbench/services/themes/common/textMateScopeMatcher.ts' // {{SQL CARBON EDIT}} skip this because we have no plans on touching this and its not ours
]; ];
// {{SQL CARBON EDIT}} // {{SQL CARBON EDIT}}
@@ -424,7 +426,12 @@ function hygiene(some) {
let input; let input;
if (Array.isArray(some) || typeof some === 'string' || !some) { if (Array.isArray(some) || typeof some === 'string' || !some) {
input = vfs.src(some || all, { base: '.', follow: true, allowEmpty: true }); const options = { base: '.', follow: true, allowEmpty: true };
if (some) {
input = vfs.src(some, options).pipe(filter(all)); // split this up to not unnecessarily filter all a second time
} else {
input = vfs.src(all, options);
}
} else { } else {
input = some; input = some;
} }

View File

@@ -91,8 +91,7 @@ const vscodeResources = [
'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js', 'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js',
'out-build/vs/code/electron-browser/issue/issueReporter.js', 'out-build/vs/code/electron-browser/issue/issueReporter.js',
'out-build/vs/code/electron-browser/processExplorer/processExplorer.js', 'out-build/vs/code/electron-browser/processExplorer/processExplorer.js',
// {{SQL CARBON EDIT}} 'out-build/sql/workbench/electron-browser/splashscreen/*', // {{SQL CARBON EDIT}} STart
'out-build/sql/workbench/electron-browser/splashscreen/*',
'out-build/sql/**/*.{svg,png,cur,html}', 'out-build/sql/**/*.{svg,png,cur,html}',
'out-build/sql/base/browser/ui/table/media/*.{gif,png,svg}', 'out-build/sql/base/browser/ui/table/media/*.{gif,png,svg}',
'out-build/sql/base/browser/ui/checkbox/media/*.{gif,png,svg}', 'out-build/sql/base/browser/ui/checkbox/media/*.{gif,png,svg}',
@@ -110,7 +109,8 @@ const vscodeResources = [
'out-build/sql/media/objectTypes/*.svg', 'out-build/sql/media/objectTypes/*.svg',
'out-build/sql/media/icons/*.svg', 'out-build/sql/media/icons/*.svg',
'out-build/sql/workbench/parts/notebook/media/**/*.svg', 'out-build/sql/workbench/parts/notebook/media/**/*.svg',
'out-build/sql/setup.js', 'out-build/sql/setup.js', // {{SQL CARBON EDIT}} end
'out-build/vs/platform/auth/common/auth.css',
'!**/test/**' '!**/test/**'
]; ];

View File

@@ -23,6 +23,13 @@ const quality = process.env['VSCODE_QUALITY'];
const builtInExtensions = quality && quality === 'stable' ? require('../builtInExtensions.json') : require('../builtInExtensions-insiders.json'); const builtInExtensions = quality && quality === 'stable' ? require('../builtInExtensions.json') : require('../builtInExtensions-insiders.json');
// {{SQL CARBON EDIT}} - END // {{SQL CARBON EDIT}} - END
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json'); const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE'];
function log() {
if (ENABLE_LOGGING) {
fancyLog.apply(this, arguments);
}
}
function getExtensionPath(extension) { function getExtensionPath(extension) {
return path.join(root, '.build', 'builtInExtensions', extension.name); return path.join(root, '.build', 'builtInExtensions', extension.name);
@@ -47,7 +54,7 @@ function isUpToDate(extension) {
function syncMarketplaceExtension(extension) { function syncMarketplaceExtension(extension) {
if (isUpToDate(extension)) { if (isUpToDate(extension)) {
fancyLog(ansiColors.blue('[marketplace]'), `${extension.name}@${extension.version}`, ansiColors.green('✔︎')); log(ansiColors.blue('[marketplace]'), `${extension.name}@${extension.version}`, ansiColors.green('✔︎'));
return es.readArray([]); return es.readArray([]);
} }
@@ -56,13 +63,13 @@ function syncMarketplaceExtension(extension) {
return ext.fromMarketplace(extension.name, extension.version, extension.metadata) return ext.fromMarketplace(extension.name, extension.version, extension.metadata)
.pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`)) .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`))
.pipe(vfs.dest('.build/builtInExtensions')) .pipe(vfs.dest('.build/builtInExtensions'))
.on('end', () => fancyLog(ansiColors.blue('[marketplace]'), extension.name, ansiColors.green('✔︎'))); .on('end', () => log(ansiColors.blue('[marketplace]'), extension.name, ansiColors.green('✔︎')));
} }
function syncExtension(extension, controlState) { function syncExtension(extension, controlState) {
switch (controlState) { switch (controlState) {
case 'disabled': case 'disabled':
fancyLog(ansiColors.blue('[disabled]'), ansiColors.gray(extension.name)); log(ansiColors.blue('[disabled]'), ansiColors.gray(extension.name));
return es.readArray([]); return es.readArray([]);
case 'marketplace': case 'marketplace':
@@ -70,15 +77,15 @@ function syncExtension(extension, controlState) {
default: default:
if (!fs.existsSync(controlState)) { if (!fs.existsSync(controlState)) {
fancyLog(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but that path does not exist.`)); log(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but that path does not exist.`));
return es.readArray([]); return es.readArray([]);
} else if (!fs.existsSync(path.join(controlState, 'package.json'))) { } else if (!fs.existsSync(path.join(controlState, 'package.json'))) {
fancyLog(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but there is no 'package.json' file in that directory.`)); log(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but there is no 'package.json' file in that directory.`));
return es.readArray([]); return es.readArray([]);
} }
fancyLog(ansiColors.blue('[local]'), `${extension.name}: ${ansiColors.cyan(controlState)}`, ansiColors.green('✔︎')); log(ansiColors.blue('[local]'), `${extension.name}: ${ansiColors.cyan(controlState)}`, ansiColors.green('✔︎'));
return es.readArray([]); return es.readArray([]);
} }
} }
@@ -97,8 +104,8 @@ function writeControlFile(control) {
} }
function main() { function main() {
fancyLog('Syncronizing built-in extensions...'); log('Syncronizing built-in extensions...');
fancyLog(`You can manage built-in extensions with the ${ansiColors.cyan('--builtin')} flag`); log(`You can manage built-in extensions with the ${ansiColors.cyan('--builtin')} flag`);
const control = readControlFile(); const control = readControlFile();
const streams = []; const streams = [];

View File

@@ -44,7 +44,7 @@ function createCompile(src, build, emitError) {
const input = es.through(); const input = es.through();
const output = input const output = input
.pipe(utf8Filter) .pipe(utf8Filter)
.pipe(bom()) .pipe(bom()) // this is required to preserve BOM in test files that loose it otherwise
.pipe(utf8Filter.restore) .pipe(utf8Filter.restore)
.pipe(tsFilter) .pipe(tsFilter)
.pipe(util.loadSourcemaps()) .pipe(util.loadSourcemaps())

View File

@@ -54,7 +54,7 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
const input = es.through(); const input = es.through();
const output = input const output = input
.pipe(utf8Filter) .pipe(utf8Filter)
.pipe(bom()) .pipe(bom()) // this is required to preserve BOM in test files that loose it otherwise
.pipe(utf8Filter.restore) .pipe(utf8Filter.restore)
.pipe(tsFilter) .pipe(tsFilter)
.pipe(util.loadSourcemaps()) .pipe(util.loadSourcemaps())

View File

@@ -42,10 +42,18 @@
"name": "vs/workbench/contrib/callHierarchy", "name": "vs/workbench/contrib/callHierarchy",
"project": "vscode-workbench" "project": "vscode-workbench"
}, },
{
"name": "vs/workbench/contrib/codeActions",
"project": "vscode-workbench"
},
{ {
"name": "vs/workbench/contrib/comments", "name": "vs/workbench/contrib/comments",
"project": "vscode-workbench" "project": "vscode-workbench"
}, },
{
"name": "vs/workbench/contrib/testCustomEditors",
"project": "vscode-workbench"
},
{ {
"name": "vs/workbench/contrib/debug", "name": "vs/workbench/contrib/debug",
"project": "vscode-workbench" "project": "vscode-workbench"
@@ -135,7 +143,7 @@
"project": "vscode-workbench" "project": "vscode-workbench"
}, },
{ {
"name": "vs/workbench/contrib/stats", "name": "vs/workbench/contrib/tags",
"project": "vscode-workbench" "project": "vscode-workbench"
}, },
{ {
@@ -194,6 +202,10 @@
"name": "vs/workbench/services/actions", "name": "vs/workbench/services/actions",
"project": "vscode-workbench" "project": "vscode-workbench"
}, },
{
"name": "vs/workbench/services/authToken",
"project": "vscode-workbench"
},
{ {
"name": "vs/workbench/services/bulkEdit", "name": "vs/workbench/services/bulkEdit",
"project": "vscode-workbench" "project": "vscode-workbench"

View File

@@ -43,7 +43,9 @@ function extractEditor(options) {
compilerOptions.declaration = false; compilerOptions.declaration = false;
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic; compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
options.compilerOptions = compilerOptions; options.compilerOptions = compilerOptions;
console.log(`Running with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`); console.log(`Running tree shaker with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`);
// Take the extra included .d.ts files from `tsconfig.monaco.json`
options.typings = tsConfig.include.filter(includedFile => /\.d\.ts$/.test(includedFile));
let result = tss.shake(options); let result = tss.shake(options);
for (let fileName in result) { for (let fileName in result) {
if (result.hasOwnProperty(fileName)) { if (result.hasOwnProperty(fileName)) {

View File

@@ -50,7 +50,10 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
options.compilerOptions = compilerOptions; options.compilerOptions = compilerOptions;
console.log(`Running with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`); console.log(`Running tree shaker with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`);
// Take the extra included .d.ts files from `tsconfig.monaco.json`
options.typings = (<string[]>tsConfig.include).filter(includedFile => /\.d\.ts$/.test(includedFile));
let result = tss.shake(options); let result = tss.shake(options);
for (let fileName in result) { for (let fileName in result) {

View File

@@ -25,17 +25,17 @@ function toStringShakeLevel(shakeLevel) {
} }
} }
exports.toStringShakeLevel = toStringShakeLevel; exports.toStringShakeLevel = toStringShakeLevel;
function printDiagnostics(diagnostics) { function printDiagnostics(options, diagnostics) {
for (const diag of diagnostics) { for (const diag of diagnostics) {
let result = ''; let result = '';
if (diag.file) { if (diag.file) {
result += `${diag.file.fileName}: `; result += `${path.join(options.sourcesRoot, diag.file.fileName)}`;
} }
if (diag.file && diag.start) { if (diag.file && diag.start) {
let location = diag.file.getLineAndCharacterOfPosition(diag.start); let location = diag.file.getLineAndCharacterOfPosition(diag.start);
result += `- ${location.line + 1},${location.character} - `; result += `:${location.line + 1}:${location.character}`;
} }
result += JSON.stringify(diag.messageText); result += ` - ` + JSON.stringify(diag.messageText);
console.log(result); console.log(result);
} }
} }
@@ -44,17 +44,17 @@ function shake(options) {
const program = languageService.getProgram(); const program = languageService.getProgram();
const globalDiagnostics = program.getGlobalDiagnostics(); const globalDiagnostics = program.getGlobalDiagnostics();
if (globalDiagnostics.length > 0) { if (globalDiagnostics.length > 0) {
printDiagnostics(globalDiagnostics); printDiagnostics(options, globalDiagnostics);
throw new Error(`Compilation Errors encountered.`); throw new Error(`Compilation Errors encountered.`);
} }
const syntacticDiagnostics = program.getSyntacticDiagnostics(); const syntacticDiagnostics = program.getSyntacticDiagnostics();
if (syntacticDiagnostics.length > 0) { if (syntacticDiagnostics.length > 0) {
printDiagnostics(syntacticDiagnostics); printDiagnostics(options, syntacticDiagnostics);
throw new Error(`Compilation Errors encountered.`); throw new Error(`Compilation Errors encountered.`);
} }
const semanticDiagnostics = program.getSemanticDiagnostics(); const semanticDiagnostics = program.getSemanticDiagnostics();
if (semanticDiagnostics.length > 0) { if (semanticDiagnostics.length > 0) {
printDiagnostics(semanticDiagnostics); printDiagnostics(options, semanticDiagnostics);
throw new Error(`Compilation Errors encountered.`); throw new Error(`Compilation Errors encountered.`);
} }
markNodes(languageService, options); markNodes(languageService, options);
@@ -358,7 +358,7 @@ function markNodes(languageService, options) {
++step; ++step;
let node; let node;
if (step % 100 === 0) { if (step % 100 === 0) {
console.log(`${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`); console.log(`Treeshaking - ${Math.floor(100 * step / (step + black_queue.length + gray_queue.length))}% - ${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`);
} }
if (black_queue.length === 0) { if (black_queue.length === 0) {
for (let i = 0; i < gray_queue.length; i++) { for (let i = 0; i < gray_queue.length; i++) {

View File

@@ -71,17 +71,17 @@ export interface ITreeShakingResult {
[file: string]: string; [file: string]: string;
} }
function printDiagnostics(diagnostics: ReadonlyArray<ts.Diagnostic>): void { function printDiagnostics(options: ITreeShakingOptions, diagnostics: ReadonlyArray<ts.Diagnostic>): void {
for (const diag of diagnostics) { for (const diag of diagnostics) {
let result = ''; let result = '';
if (diag.file) { if (diag.file) {
result += `${diag.file.fileName}: `; result += `${path.join(options.sourcesRoot, diag.file.fileName)}`;
} }
if (diag.file && diag.start) { if (diag.file && diag.start) {
let location = diag.file.getLineAndCharacterOfPosition(diag.start); let location = diag.file.getLineAndCharacterOfPosition(diag.start);
result += `- ${location.line + 1},${location.character} - `; result += `:${location.line + 1}:${location.character}`;
} }
result += JSON.stringify(diag.messageText); result += ` - ` + JSON.stringify(diag.messageText);
console.log(result); console.log(result);
} }
} }
@@ -92,19 +92,19 @@ export function shake(options: ITreeShakingOptions): ITreeShakingResult {
const globalDiagnostics = program.getGlobalDiagnostics(); const globalDiagnostics = program.getGlobalDiagnostics();
if (globalDiagnostics.length > 0) { if (globalDiagnostics.length > 0) {
printDiagnostics(globalDiagnostics); printDiagnostics(options, globalDiagnostics);
throw new Error(`Compilation Errors encountered.`); throw new Error(`Compilation Errors encountered.`);
} }
const syntacticDiagnostics = program.getSyntacticDiagnostics(); const syntacticDiagnostics = program.getSyntacticDiagnostics();
if (syntacticDiagnostics.length > 0) { if (syntacticDiagnostics.length > 0) {
printDiagnostics(syntacticDiagnostics); printDiagnostics(options, syntacticDiagnostics);
throw new Error(`Compilation Errors encountered.`); throw new Error(`Compilation Errors encountered.`);
} }
const semanticDiagnostics = program.getSemanticDiagnostics(); const semanticDiagnostics = program.getSemanticDiagnostics();
if (semanticDiagnostics.length > 0) { if (semanticDiagnostics.length > 0) {
printDiagnostics(semanticDiagnostics); printDiagnostics(options, semanticDiagnostics);
throw new Error(`Compilation Errors encountered.`); throw new Error(`Compilation Errors encountered.`);
} }
@@ -471,7 +471,7 @@ function markNodes(languageService: ts.LanguageService, options: ITreeShakingOpt
let node: ts.Node; let node: ts.Node;
if (step % 100 === 0) { if (step % 100 === 0) {
console.log(`${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`); console.log(`Treeshaking - ${Math.floor(100 * step / (step + black_queue.length + gray_queue.length))}% - ${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`);
} }
if (black_queue.length === 0) { if (black_queue.length === 0) {

View File

@@ -185,6 +185,31 @@ function rimraf(dir) {
return result; return result;
} }
exports.rimraf = rimraf; exports.rimraf = rimraf;
function _rreaddir(dirPath, prepend, result) {
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
for (const entry of entries) {
if (entry.isDirectory()) {
_rreaddir(path.join(dirPath, entry.name), `${prepend}/${entry.name}`, result);
}
else {
result.push(`${prepend}/${entry.name}`);
}
}
}
function rreddir(dirPath) {
let result = [];
_rreaddir(dirPath, '', result);
return result;
}
exports.rreddir = rreddir;
function ensureDir(dirPath) {
if (fs.existsSync(dirPath)) {
return;
}
ensureDir(path.dirname(dirPath));
fs.mkdirSync(dirPath);
}
exports.ensureDir = ensureDir;
function getVersion(root) { function getVersion(root) {
let version = process.env['BUILD_SOURCEVERSION']; let version = process.env['BUILD_SOURCEVERSION'];
if (!version || !/^[0-9a-f]{40}$/i.test(version)) { if (!version || !/^[0-9a-f]{40}$/i.test(version)) {

View File

@@ -243,6 +243,31 @@ export function rimraf(dir: string): () => Promise<void> {
return result; return result;
} }
function _rreaddir(dirPath: string, prepend: string, result: string[]): void {
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
for (const entry of entries) {
if (entry.isDirectory()) {
_rreaddir(path.join(dirPath, entry.name), `${prepend}/${entry.name}`, result);
} else {
result.push(`${prepend}/${entry.name}`);
}
}
}
export function rreddir(dirPath: string): string[] {
let result: string[] = [];
_rreaddir(dirPath, '', result);
return result;
}
export function ensureDir(dirPath: string): void {
if (fs.existsSync(dirPath)) {
return;
}
ensureDir(path.dirname(dirPath));
fs.mkdirSync(dirPath);
}
export function getVersion(root: string): string | undefined { export function getVersion(root: string): string | undefined {
let version = process.env['BUILD_SOURCEVERSION']; let version = process.env['BUILD_SOURCEVERSION'];

View File

@@ -3,14 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const es = require('event-stream'); const watch = process.platform === 'win32' ? require('./watch-win32') : require('vscode-gulp-watch');
let watch = undefined;
if (!watch) {
watch = process.platform === 'win32' ? require('./watch-win32') : require('gulp-watch');
}
module.exports = function () { module.exports = function () {
return watch.apply(null, arguments); return watch.apply(null, arguments);

View File

@@ -5,7 +5,8 @@
"author": "Microsoft ", "author": "Microsoft ",
"private": true, "private": true,
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {},
"gulp-watch": "5.0.1" "dependencies": {
"vscode-gulp-watch": "^5.0.2"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -43,7 +43,7 @@ declare namespace monaco {
} }
declare namespace monaco.editor { declare namespace monaco.editor {
#include(vs/editor/browser/widget/diffNavigator): IDiffNavigator
#includeAll(vs/editor/standalone/browser/standaloneEditor;modes.=>languages.;editorCommon.=>): #includeAll(vs/editor/standalone/browser/standaloneEditor;modes.=>languages.;editorCommon.=>):
#include(vs/editor/standalone/common/standaloneThemeService): BuiltinTheme, IStandaloneThemeData, IColors #include(vs/editor/standalone/common/standaloneThemeService): BuiltinTheme, IStandaloneThemeData, IColors
#include(vs/editor/common/modes/supports/tokenization): ITokenThemeRule #include(vs/editor/common/modes/supports/tokenization): ITokenThemeRule

View File

@@ -2,38 +2,17 @@
// This file is adding references to various symbols which should not be removed via tree shaking // This file is adding references to various symbols which should not be removed via tree shaking
import { ServiceIdentifier } from './vs/platform/instantiation/common/instantiation'; import { ServiceIdentifier } from './vs/platform/instantiation/common/instantiation';
import { IContextViewService } from './vs/platform/contextview/browser/contextView'; import { create as create1 } from './vs/base/common/worker/simpleWorker';
import { IHighlight } from './vs/base/parts/quickopen/browser/quickOpenModel';
import { IWorkspaceContextService } from './vs/platform/workspace/common/workspace';
import { IEnvironmentService } from './vs/platform/environment/common/environment';
import { CountBadge } from './vs/base/browser/ui/countBadge/countBadge';
import { SimpleWorkerClient, create as create1 } from './vs/base/common/worker/simpleWorker';
import { create as create2 } from './vs/editor/common/services/editorSimpleWorker'; import { create as create2 } from './vs/editor/common/services/editorSimpleWorker';
import { QuickOpenWidget } from './vs/base/parts/quickopen/browser/quickOpenWidget';
import { WorkbenchAsyncDataTree } from './vs/platform/list/browser/listService';
import { SyncDescriptor0, SyncDescriptor1, SyncDescriptor2, SyncDescriptor3, SyncDescriptor4, SyncDescriptor5, SyncDescriptor6, SyncDescriptor7, SyncDescriptor8 } from './vs/platform/instantiation/common/descriptors'; import { SyncDescriptor0, SyncDescriptor1, SyncDescriptor2, SyncDescriptor3, SyncDescriptor4, SyncDescriptor5, SyncDescriptor6, SyncDescriptor7, SyncDescriptor8 } from './vs/platform/instantiation/common/descriptors';
import { DiffNavigator } from './vs/editor/browser/widget/diffNavigator';
import { DocumentRangeFormattingEditProvider } from './vs/editor/common/modes';
import * as editorAPI from './vs/editor/editor.api'; import * as editorAPI from './vs/editor/editor.api';
(function () { (function () {
var a: any; var a: any;
var b: any; var b: any;
a = (<IContextViewService>b).layout; // IContextViewProvider
a = (<IWorkspaceContextService>b).getWorkspaceFolder; // IWorkspaceFolderProvider
a = (<IWorkspaceContextService>b).getWorkspace; // IWorkspaceFolderProvider
a = (<CountBadge>b).style; // IThemable
a = (<QuickOpenWidget>b).style; // IThemable
a = (<WorkbenchAsyncDataTree<any,any>>b).style; // IThemable
a = (<IEnvironmentService>b).userHome; // IUserHomeProvider
a = (<DiffNavigator>b).previous; // IDiffNavigator
a = (<ServiceIdentifier<any>>b).type; a = (<ServiceIdentifier<any>>b).type;
a = (<IHighlight>b).start;
a = (<IHighlight>b).end;
a = (<SimpleWorkerClient<any, any>>b).getProxyObject; // IWorkerClient
a = create1; a = create1;
a = create2; a = create2;
a = (<DocumentRangeFormattingEditProvider>b).extensionId;
// injection madness // injection madness
a = (<SyncDescriptor0<any>>b).ctor; a = (<SyncDescriptor0<any>>b).ctor;

View File

@@ -73,48 +73,3 @@ yarnInstall(`build`); // node modules required for build
yarnInstall('test/automation'); // node modules required for smoketest yarnInstall('test/automation'); // node modules required for smoketest
yarnInstall('test/smoke'); // node modules required for smoketest yarnInstall('test/smoke'); // node modules required for smoketest
yarnInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron yarnInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron
// Remove the windows process tree typings as this causes duplicate identifier errors in tsc builds
const processTreeDts = path.join('node_modules', 'windows-process-tree', 'typings', 'windows-process-tree.d.ts');
if (fs.existsSync(processTreeDts)) {
console.log('Removing windows-process-tree.d.ts');
fs.unlinkSync(processTreeDts);
}
function getInstalledVersion(packageName, cwd) {
const opts = {};
if (cwd) {
opts.cwd = cwd;
}
const result = cp.spawnSync(yarn, ['list', '--pattern', packageName], opts);
const stdout = result.stdout.toString();
const match = stdout.match(new RegExp(packageName + '@(\\S+)'));
if (!match || !match[1]) {
throw new Error('Unexpected output from yarn list: ' + stdout);
}
return match[1];
}
function assertSameVersionsBetweenFolders(packageName, otherFolder) {
const baseVersion = getInstalledVersion(packageName);
const otherVersion = getInstalledVersion(packageName, otherFolder);
if (baseVersion !== otherVersion) {
throw new Error(`Mismatched versions installed for ${packageName}: root has ${baseVersion}, ./${otherFolder} has ${otherVersion}. These should be the same!`);
}
}
// Check that modules in both the base package.json and remote/ have the same version installed
const requireSameVersionsInRemote = [
'xterm',
'xterm-addon-search',
'xterm-addon-web-links',
'node-pty',
'vscode-ripgrep'
];
requireSameVersionsInRemote.forEach(packageName => {
assertSameVersionsBetweenFolders(packageName, 'remote');
});

View File

@@ -7,8 +7,8 @@ let err = false;
const majorNodeVersion = parseInt(/^(\d+)\./.exec(process.versions.node)[1]); const majorNodeVersion = parseInt(/^(\d+)\./.exec(process.versions.node)[1]);
if (majorNodeVersion < 8 || majorNodeVersion >= 11) { if (majorNodeVersion < 10 || majorNodeVersion >= 13) {
console.error('\033[1;31m*** Please use node >=8 and <11.\033[0;0m'); console.error('\033[1;31m*** Please use node >=10 and <=12.\033[0;0m');
err = true; err = true;
} }

View File

@@ -6,7 +6,7 @@
"@types/ansi-colors": "^3.2.0", "@types/ansi-colors": "^3.2.0",
"@types/azure": "0.9.19", "@types/azure": "0.9.19",
"@types/debounce": "^1.0.0", "@types/debounce": "^1.0.0",
"@types/documentdb": "1.10.2", "@types/documentdb": "^1.10.5",
"@types/fancy-log": "^1.3.0", "@types/fancy-log": "^1.3.0",
"@types/glob": "^7.1.1", "@types/glob": "^7.1.1",
"@types/gulp": "^4.0.5", "@types/gulp": "^4.0.5",
@@ -44,10 +44,10 @@
"rollup": "^1.20.3", "rollup": "^1.20.3",
"rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-node-resolve": "^5.2.0",
"service-downloader": "github:anthonydresser/service-downloader#0.1.7",
"terser": "4.3.8", "terser": "4.3.8",
"tslint": "^5.9.1", "tslint": "^5.9.1",
"service-downloader": "github:anthonydresser/service-downloader#0.1.7", "typescript": "3.7.2",
"typescript": "3.7.0-dev.20191017",
"vsce": "1.48.0", "vsce": "1.48.0",
"vscode-telemetry-extractor": "^1.5.4", "vscode-telemetry-extractor": "^1.5.4",
"xml2js": "^0.4.17" "xml2js": "^0.4.17"
@@ -57,5 +57,8 @@
"watch": "tsc -p tsconfig.build.json --watch", "watch": "tsc -p tsconfig.build.json --watch",
"postinstall": "npm run compile", "postinstall": "npm run compile",
"npmCheckJs": "tsc --noEmit" "npmCheckJs": "tsc --noEmit"
},
"dependencies": {
"@azure/cosmos": "^3.4.0"
} }
} }

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=%1 als Editor f
AddToPath=Zu PATH hinzufügen (nach dem Neustart verfügbar) AddToPath=Zu PATH hinzufügen (nach dem Neustart verfügbar)
RunAfter=%1 nach der Installation ausführen RunAfter=%1 nach der Installation ausführen
Other=Andere: Other=Andere:
SourceFile=%1-Quelldatei SourceFile=%1-Quelldatei
OpenWithCodeContextMenu=Mit %1 öffnen

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=Register %1 as an editor for supported file types
AddToPath=Add to PATH (requires shell restart) AddToPath=Add to PATH (requires shell restart)
RunAfter=Run %1 after installation RunAfter=Run %1 after installation
Other=Other: Other=Other:
SourceFile=%1 Source File SourceFile=%1 Source File
OpenWithCodeContextMenu=Open with %1

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=Registrar %1 como editor para tipos de archivo admitidos
AddToPath=Agregar a PATH (disponible después de reiniciar) AddToPath=Agregar a PATH (disponible después de reiniciar)
RunAfter=Ejecutar %1 después de la instalación RunAfter=Ejecutar %1 después de la instalación
Other=Otros: Other=Otros:
SourceFile=Archivo de origen %1 SourceFile=Archivo de origen %1
OpenWithCodeContextMenu=Abrir con %1

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=Inscrire %1 en tant qu'
AddToPath=Ajouter à PATH (disponible après le redémarrage) AddToPath=Ajouter à PATH (disponible après le redémarrage)
RunAfter=Exécuter %1 après l'installation RunAfter=Exécuter %1 après l'installation
Other=Autre : Other=Autre :
SourceFile=Fichier source %1 SourceFile=Fichier source %1
OpenWithCodeContextMenu=Ouvrir avec %1

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=%1 regisztr
AddToPath=Hozzáadás a PATH-hoz (újraindítás után lesz elérhető) AddToPath=Hozzáadás a PATH-hoz (újraindítás után lesz elérhető)
RunAfter=%1 indítása a telepítés után RunAfter=%1 indítása a telepítés után
Other=Egyéb: Other=Egyéb:
SourceFile=%1 forrásfájl SourceFile=%1 forrásfájl
OpenWithCodeContextMenu=Megnyitás a következővel: %1

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=Registra %1 come editor per i tipi di file supportati
AddToPath=Aggiungi a PATH (disponibile dopo il riavvio) AddToPath=Aggiungi a PATH (disponibile dopo il riavvio)
RunAfter=Esegui %1 dopo l'installazione RunAfter=Esegui %1 dopo l'installazione
Other=Altro: Other=Altro:
SourceFile=File di origine %1 SourceFile=File di origine %1
OpenWithCodeContextMenu=Apri con %1

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=
AddToPath=PATH への追加(再起動後に使用可能) AddToPath=PATH への追加(再起動後に使用可能)
RunAfter=インストール後に %1 を実行する RunAfter=インストール後に %1 を実行する
Other=その他: Other=その他:
SourceFile=%1 ソース ファイル SourceFile=%1 ソース ファイル
OpenWithCodeContextMenu=%1 で開く

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=%1
AddToPath=PATH에 추가(다시 시작한 후 사용 가능) AddToPath=PATH에 추가(다시 시작한 후 사용 가능)
RunAfter=설치 후 %1 실행 RunAfter=설치 후 %1 실행
Other=기타: Other=기타:
SourceFile=%1 원본 파일 SourceFile=%1 원본 파일
OpenWithCodeContextMenu=%1(으)로 열기

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=Registre %1 como um editor para tipos de arquivos suportados
AddToPath=Adicione em PATH (disponível após reiniciar) AddToPath=Adicione em PATH (disponível após reiniciar)
RunAfter=Executar %1 após a instalação RunAfter=Executar %1 após a instalação
Other=Outros: Other=Outros:
SourceFile=Arquivo Fonte %1 SourceFile=Arquivo Fonte %1
OpenWithCodeContextMenu=Abrir com %1

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=
AddToPath=Добавить в PATH (доступно после перезагрузки) AddToPath=Добавить в PATH (доступно после перезагрузки)
RunAfter=Запустить %1 после установки RunAfter=Запустить %1 после установки
Other=Другое: Other=Другое:
SourceFile=Исходный файл %1 SourceFile=Исходный файл %1
OpenWithCodeContextMenu=Открыть с помощью %1

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=%1 uygulamas
AddToPath=PATH'e ekle (yeniden başlattıktan sonra kullanılabilir) AddToPath=PATH'e ekle (yeniden başlattıktan sonra kullanılabilir)
RunAfter=Kurulumdan sonra %1 uygulamasını çalıştır. RunAfter=Kurulumdan sonra %1 uygulamasını çalıştır.
Other=Diğer: Other=Diğer:
SourceFile=%1 Kaynak Dosyası SourceFile=%1 Kaynak Dosyası
OpenWithCodeContextMenu=%1 İle Aç

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=
AddToPath=添加到 PATH (重启后生效) AddToPath=添加到 PATH (重启后生效)
RunAfter=安装后运行 %1 RunAfter=安装后运行 %1
Other=其他: Other=其他:
SourceFile=%1 源文件 SourceFile=%1 源文件
OpenWithCodeContextMenu=通过 %1 打开

View File

@@ -5,4 +5,5 @@ AssociateWithFiles=
AddToPath=加入 PATH 中 (重新啟動後生效) AddToPath=加入 PATH 中 (重新啟動後生效)
RunAfter=安裝後執行 %1 RunAfter=安裝後執行 %1
Other=其他: Other=其他:
SourceFile=%1 來源檔案 SourceFile=%1 來源檔案
OpenWithCodeContextMenu=以 %1 開啟

View File

@@ -2,6 +2,22 @@
# yarn lockfile v1 # yarn lockfile v1
"@azure/cosmos@^3.4.0":
version "3.4.0"
resolved "https://registry.yarnpkg.com/@azure/cosmos/-/cosmos-3.4.0.tgz#96f36a4522be23e1389d0516ea4d77e5fc153221"
integrity sha512-4ym+ezk7qBe4s7/tb6IJ5kmXE4xgEbAPbraT3382oeCRlYpGrblIZIDoWbthMCJfLyLBDX5T05Fhm18QeY1R/w==
dependencies:
"@types/debug" "^4.1.4"
debug "^4.1.1"
fast-json-stable-stringify "^2.0.0"
node-abort-controller "^1.0.4"
node-fetch "^2.6.0"
os-name "^3.1.0"
priorityqueuejs "^1.0.0"
semaphore "^1.0.5"
tslib "^1.9.3"
uuid "^3.3.2"
"@dsherret/to-absolute-glob@^2.0.2": "@dsherret/to-absolute-glob@^2.0.2":
version "2.0.2" version "2.0.2"
resolved "https://registry.yarnpkg.com/@dsherret/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1f6475dc8bd974cea07a2daf3864b317b1dd332c" resolved "https://registry.yarnpkg.com/@dsherret/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1f6475dc8bd974cea07a2daf3864b317b1dd332c"
@@ -61,10 +77,15 @@
resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.0.0.tgz#417560200331e1bb84d72da85391102c2fcd61b7" resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.0.0.tgz#417560200331e1bb84d72da85391102c2fcd61b7"
integrity sha1-QXVgIAMx4buE1y2oU5EQLC/NYbc= integrity sha1-QXVgIAMx4buE1y2oU5EQLC/NYbc=
"@types/documentdb@1.10.2": "@types/debug@^4.1.4":
version "1.10.2" version "4.1.5"
resolved "https://registry.yarnpkg.com/@types/documentdb/-/documentdb-1.10.2.tgz#6795025cdc51577af5ed531b6f03bd44404f5350" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd"
integrity sha512-A+AsxkjKB/mpnuNl2L/YP7azlpd/n/55rtBTTKYj203g5hSrDfv06AnN8v+pO1Qo6vCxm6JsKV/BaEBmgx4gaQ== integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==
"@types/documentdb@^1.10.5":
version "1.10.5"
resolved "https://registry.yarnpkg.com/@types/documentdb/-/documentdb-1.10.5.tgz#86c6ec9be9ce07ff9fcac5ca3c17570c385d40a4"
integrity sha512-FHQV9Nc1ffrLkQxO0zFlDCRPyHZtuKmAAuJIi278COhtkKBuBRuKOzoO3JlT0yfUrivPjAzNae+gh9fS++r0Ag==
dependencies: dependencies:
"@types/node" "*" "@types/node" "*"
@@ -950,6 +971,17 @@ core-util-is@1.0.2, core-util-is@~1.0.0:
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
cross-spawn@^6.0.0:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
dependencies:
nice-try "^1.0.4"
path-key "^2.0.1"
semver "^5.5.0"
shebang-command "^1.2.0"
which "^1.2.9"
cryptiles@2.x.x: cryptiles@2.x.x:
version "2.0.5" version "2.0.5"
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
@@ -1031,6 +1063,13 @@ debug@^3.1.0:
dependencies: dependencies:
ms "^2.1.1" ms "^2.1.1"
debug@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
dependencies:
ms "^2.1.1"
decode-uri-component@^0.2.0: decode-uri-component@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
@@ -1254,6 +1293,13 @@ end-of-stream@^1.0.0:
dependencies: dependencies:
once "^1.4.0" once "^1.4.0"
end-of-stream@^1.1.0:
version "1.4.4"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
dependencies:
once "^1.4.0"
entities@^1.1.1, entities@~1.1.1: entities@^1.1.1, entities@~1.1.1:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
@@ -1296,6 +1342,19 @@ eventemitter2@^5.0.1:
resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-5.0.1.tgz#6197a095d5fb6b57e8942f6fd7eaad63a09c9452" resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-5.0.1.tgz#6197a095d5fb6b57e8942f6fd7eaad63a09c9452"
integrity sha1-YZegldX7a1folC9v1+qtY6CclFI= integrity sha1-YZegldX7a1folC9v1+qtY6CclFI=
execa@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==
dependencies:
cross-spawn "^6.0.0"
get-stream "^4.0.0"
is-stream "^1.1.0"
npm-run-path "^2.0.0"
p-finally "^1.0.0"
signal-exit "^3.0.0"
strip-eof "^1.0.0"
expand-brackets@^2.1.4: expand-brackets@^2.1.4:
version "2.1.4" version "2.1.4"
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
@@ -1528,6 +1587,13 @@ get-stream@^2.2.0:
object-assign "^4.0.1" object-assign "^4.0.1"
pinkie-promise "^2.0.0" pinkie-promise "^2.0.0"
get-stream@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
dependencies:
pump "^3.0.0"
get-value@^2.0.3, get-value@^2.0.6: get-value@^2.0.3, get-value@^2.0.6:
version "2.0.6" version "2.0.6"
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
@@ -2152,6 +2218,11 @@ isarray@1.0.0, isarray@~1.0.0:
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
isobject@^2.0.0: isobject@^2.0.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
@@ -2388,6 +2459,11 @@ lodash@^4.15.0, lodash@^4.17.10:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
macos-release@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f"
integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==
magic-string@^0.25.2: magic-string@^0.25.2:
version "0.25.3" version "0.25.3"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9"
@@ -2569,9 +2645,9 @@ ms@2.0.0:
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
ms@^2.1.1: ms@^2.1.1:
version "2.1.1" version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
multimatch@^4.0.0: multimatch@^4.0.0:
version "4.0.0" version "4.0.0"
@@ -2627,6 +2703,21 @@ needle@^2.2.1:
iconv-lite "^0.4.4" iconv-lite "^0.4.4"
sax "^1.2.4" sax "^1.2.4"
nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
node-abort-controller@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-1.0.4.tgz#4095e41d58b2fae169d2f9892904d603e11c7a39"
integrity sha512-7cNtLKTAg0LrW3ViS2C7UfIzbL3rZd8L0++5MidbKqQVJ8yrH6+1VRSHl33P0ZjBTbOJd37d9EYekvHyKkB0QQ==
node-fetch@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
node-pre-gyp@^0.10.0: node-pre-gyp@^0.10.0:
version "0.10.3" version "0.10.3"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc"
@@ -2676,6 +2767,13 @@ npm-packlist@^1.1.6:
ignore-walk "^3.0.1" ignore-walk "^3.0.1"
npm-bundled "^1.0.1" npm-bundled "^1.0.1"
npm-run-path@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=
dependencies:
path-key "^2.0.0"
npmlog@^4.0.2: npmlog@^4.0.2:
version "4.1.2" version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
@@ -2741,7 +2839,7 @@ object.pick@^1.3.0:
dependencies: dependencies:
isobject "^3.0.1" isobject "^3.0.1"
once@^1.3.0, once@^1.4.0: once@^1.3.0, once@^1.3.1, once@^1.4.0:
version "1.4.0" version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
@@ -2761,6 +2859,14 @@ os-homedir@^1.0.0:
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
os-name@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801"
integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==
dependencies:
macos-release "^2.2.0"
windows-release "^3.1.0"
os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
@@ -2774,6 +2880,11 @@ osenv@^0.1.3, osenv@^0.1.4:
os-homedir "^1.0.0" os-homedir "^1.0.0"
os-tmpdir "^1.0.0" os-tmpdir "^1.0.0"
p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
p-map@^1.1.1: p-map@^1.1.1:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
@@ -2813,6 +2924,11 @@ path-is-inside@^1.0.1:
resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=
path-key@^2.0.0, path-key@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
path-parse@^1.0.5, path-parse@^1.0.6: path-parse@^1.0.5, path-parse@^1.0.6:
version "1.0.6" version "1.0.6"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
@@ -2878,7 +2994,7 @@ prettyjson@1.2.1:
colors "^1.1.2" colors "^1.1.2"
minimist "^1.2.0" minimist "^1.2.0"
priorityqueuejs@1.0.0: priorityqueuejs@1.0.0, priorityqueuejs@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/priorityqueuejs/-/priorityqueuejs-1.0.0.tgz#2ee4f23c2560913e08c07ce5ccdd6de3df2c5af8" resolved "https://registry.yarnpkg.com/priorityqueuejs/-/priorityqueuejs-1.0.0.tgz#2ee4f23c2560913e08c07ce5ccdd6de3df2c5af8"
integrity sha1-LuTyPCVgkT4IwHzlzN1t498sWvg= integrity sha1-LuTyPCVgkT4IwHzlzN1t498sWvg=
@@ -2893,6 +3009,14 @@ process-nextick-args@~2.0.0:
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==
pump@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
dependencies:
end-of-stream "^1.1.0"
once "^1.3.1"
punycode@^1.4.1: punycode@^1.4.1:
version "1.4.1" version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
@@ -3200,11 +3324,21 @@ semaphore@1.0.5:
resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.0.5.tgz#b492576e66af193db95d65e25ec53f5f19798d60" resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.0.5.tgz#b492576e66af193db95d65e25ec53f5f19798d60"
integrity sha1-tJJXbmavGT25XWXiXsU/Xxl5jWA= integrity sha1-tJJXbmavGT25XWXiXsU/Xxl5jWA=
semaphore@^1.0.5:
version "1.1.0"
resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa"
integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==
semver@^5.1.0, semver@^5.3.0: semver@^5.1.0, semver@^5.3.0:
version "5.6.0" version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
semver@^5.5.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
"service-downloader@github:anthonydresser/service-downloader#0.1.7": "service-downloader@github:anthonydresser/service-downloader#0.1.7":
version "0.1.7" version "0.1.7"
resolved "https://codeload.github.com/anthonydresser/service-downloader/tar.gz/c08de456c9f1af6258061fdc524275b21c6db667" resolved "https://codeload.github.com/anthonydresser/service-downloader/tar.gz/c08de456c9f1af6258061fdc524275b21c6db667"
@@ -3242,6 +3376,18 @@ set-value@^2.0.0:
is-plain-object "^2.0.3" is-plain-object "^2.0.3"
split-string "^3.0.1" split-string "^3.0.1"
shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
dependencies:
shebang-regex "^1.0.0"
shebang-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
signal-exit@^3.0.0: signal-exit@^3.0.0:
version "3.0.2" version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
@@ -3437,6 +3583,11 @@ strip-dirs@^2.0.0:
dependencies: dependencies:
is-natural-number "^4.0.1" is-natural-number "^4.0.1"
strip-eof@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
strip-json-comments@~2.0.1: strip-json-comments@~2.0.1:
version "2.0.1" version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
@@ -3600,6 +3751,11 @@ tslib@^1.8.0, tslib@^1.8.1:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
tslib@^1.9.3:
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
tslint@^5.9.1: tslint@^5.9.1:
version "5.11.0" version "5.11.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed" resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed"
@@ -3650,10 +3806,10 @@ typed-rest-client@^0.9.0:
tunnel "0.0.4" tunnel "0.0.4"
underscore "1.8.3" underscore "1.8.3"
typescript@3.7.0-dev.20191017: typescript@3.7.2:
version "3.7.0-dev.20191017" version "3.7.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.0-dev.20191017.tgz#e61440dd445edea6d7b9a699e7c5d5fbcd1906f2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb"
integrity sha512-Yi0lCPEN0cn9Gp8TEEkPpgKNR5SWAmx9Hmzzz+oEuivw6amURqRGynaLyFZkMA9iMsvYG5LLqhdlFO3uu5ZT/w== integrity sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==
typescript@^3.0.1: typescript@^3.0.1:
version "3.5.3" version "3.5.3"
@@ -3759,6 +3915,11 @@ uuid@^3.1.0:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14"
integrity sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA== integrity sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==
uuid@^3.3.2:
version "3.3.3"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866"
integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==
validator@~3.35.0: validator@~3.35.0:
version "3.35.0" version "3.35.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-3.35.0.tgz#3f07249402c1fc8fc093c32c6e43d72a79cca1dc" resolved "https://registry.yarnpkg.com/validator/-/validator-3.35.0.tgz#3f07249402c1fc8fc093c32c6e43d72a79cca1dc"
@@ -3845,6 +4006,13 @@ vso-node-api@6.1.2-preview:
typed-rest-client "^0.9.0" typed-rest-client "^0.9.0"
underscore "^1.8.3" underscore "^1.8.3"
which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
dependencies:
isexe "^2.0.0"
wide-align@^1.1.0: wide-align@^1.1.0:
version "1.1.3" version "1.1.3"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
@@ -3852,6 +4020,13 @@ wide-align@^1.1.0:
dependencies: dependencies:
string-width "^1.0.2 || 2" string-width "^1.0.2 || 2"
windows-release@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.2.0.tgz#8122dad5afc303d833422380680a79cdfa91785f"
integrity sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA==
dependencies:
execa "^1.0.0"
wordwrap@~0.0.2: wordwrap@~0.0.2:
version "0.0.3" version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"

View File

@@ -60,12 +60,12 @@
"git": { "git": {
"name": "electron", "name": "electron",
"repositoryUrl": "https://github.com/electron/electron", "repositoryUrl": "https://github.com/electron/electron",
"commitHash": "1e50380fab37f407c4d357e1e30ecbc3d5a703b8" "commitHash": "6f62f91822a80192cb711c604f1a8f1a176f328d"
} }
}, },
"isOnlyProductionDependency": true, "isOnlyProductionDependency": true,
"license": "MIT", "license": "MIT",
"version": "6.0.12" "version": "6.1.5"
}, },
{ {
"component": { "component": {
@@ -98,7 +98,7 @@
"git": { "git": {
"name": "vscode-codicons", "name": "vscode-codicons",
"repositoryUrl": "https://github.com/microsoft/vscode-codicons", "repositoryUrl": "https://github.com/microsoft/vscode-codicons",
"commitHash": "7f14c092f65f658cd520df3f13765efe828d0ba4" "commitHash": "65d11e0839d0ce09faa1a159dc0b3c0bd1aa50be"
} }
}, },
"license": "MIT and Creative Commons Attribution 4.0", "license": "MIT and Creative Commons Attribution 4.0",

View File

@@ -74,7 +74,7 @@
"vscode-nls": "^3.2.1" "vscode-nls": "^3.2.1"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "10", "@types/node": "^12.11.7",
"mocha-junit-reporter": "^1.17.0", "mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"should": "^13.2.3", "should": "^13.2.3",

View File

@@ -2,10 +2,10 @@
# yarn lockfile v1 # yarn lockfile v1
"@types/node@10": "@types/node@^12.11.7":
version "10.17.4" version "12.12.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.4.tgz#8993a4fe3c4022fda66bf4ea660d615fc5659c6f" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11"
integrity sha512-F2pgg+LcIr/elguz+x+fdBX5KeZXGUOp7TV8M0TVIrDezYLFRNt8oMTyps0VQ1kj5WGGoR18RdxnRDHXrIFHMQ== integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==
"ads-extension-telemetry@github:Charles-Gagnon/ads-extension-telemetry#0.1.0": "ads-extension-telemetry@github:Charles-Gagnon/ads-extension-telemetry#0.1.0":
version "0.1.0" version "0.1.0"

View File

@@ -82,7 +82,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/mocha": "^5.2.5", "@types/mocha": "^5.2.5",
"@types/node": "^10.14.8", "@types/node": "^12.11.7",
"mocha": "^5.2.0", "mocha": "^5.2.0",
"mocha-junit-reporter": "^1.17.0", "mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",

View File

@@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.6.tgz#b8622d50557dd155e9f2f634b7d68fd38de5e94b" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.6.tgz#b8622d50557dd155e9f2f634b7d68fd38de5e94b"
integrity sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw== integrity sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==
"@types/node@^10.14.8": "@types/node@^12.11.7":
version "10.14.17" version "12.12.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.17.tgz#b96d4dd3e427382482848948041d3754d40fd5ce" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11"
integrity sha512-p/sGgiPaathCfOtqu2fx5Mu1bcjuP8ALFg4xpGgNkcin7LwRyzUKniEHBKdcE1RPsenq5JVPIpMTJSygLboygQ== integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==
agent-base@4, agent-base@^4.3.0: agent-base@4, agent-base@^4.3.0:
version "4.3.0" version "4.3.0"

View File

@@ -186,7 +186,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/mocha": "^5.2.5", "@types/mocha": "^5.2.5",
"@types/node": "^10.12.12", "@types/node": "^12.11.7",
"@types/request": "^2.48.1", "@types/request": "^2.48.1",
"mocha": "^5.2.0", "mocha": "^5.2.0",
"mocha-junit-reporter": "^1.17.0", "mocha-junit-reporter": "^1.17.0",

View File

@@ -59,11 +59,16 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073"
integrity sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww== integrity sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww==
"@types/node@*", "@types/node@^10.12.12": "@types/node@*":
version "10.14.4" version "10.14.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.4.tgz#1c586b991457cbb58fef51bc4e0cfcfa347714b5" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.4.tgz#1c586b991457cbb58fef51bc4e0cfcfa347714b5"
integrity sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg== integrity sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg==
"@types/node@^12.11.7":
version "12.12.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11"
integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==
"@types/node@^8.0.47": "@types/node@^8.0.47":
version "8.10.45" version "8.10.45"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.45.tgz#4c49ba34106bc7dced77ff6bae8eb6543cde8351" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.45.tgz#4c49ba34106bc7dced77ff6bae8eb6543cde8351"

View File

@@ -633,7 +633,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/mocha": "^5.2.5", "@types/mocha": "^5.2.5",
"@types/node": "^10.14.8", "@types/node": "^12.11.7",
"mocha-junit-reporter": "^1.17.0", "mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"mocha": "^5.2.0", "mocha": "^5.2.0",

View File

@@ -7,10 +7,10 @@
resolved "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073" resolved "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073"
integrity sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww== integrity sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww==
"@types/node@^10.14.8": "@types/node@^12.11.7":
version "10.14.17" version "12.12.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.17.tgz#b96d4dd3e427382482848948041d3754d40fd5ce" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11"
integrity sha512-p/sGgiPaathCfOtqu2fx5Mu1bcjuP8ALFg4xpGgNkcin7LwRyzUKniEHBKdcE1RPsenq5JVPIpMTJSygLboygQ== integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==
ajv@^5.3.0: ajv@^5.3.0:
version "5.5.2" version "5.5.2"

View File

@@ -38,7 +38,8 @@
"tasks.json", "tasks.json",
"keybindings.json", "keybindings.json",
"extensions.json", "extensions.json",
"argv.json" "argv.json",
"profiles.json"
] ]
} }
], ],
@@ -114,6 +115,6 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^10.14.8" "@types/node": "^12.11.7"
} }
} }

View File

@@ -18,6 +18,20 @@
"type": "integer" "type": "integer"
} }
}, },
"remoteEnv": {
"type": "object",
"additionalProperties": {
"type": [
"string",
"null"
]
},
"description": "Remote environment variables."
},
"remoteUser": {
"type": "string",
"description": "The user VS Code Server will be started with. The default is the same user as the container."
},
"extensions": { "extensions": {
"type": "array", "type": "array",
"description": "An array of extensions that should be installed into the container.", "description": "An array of extensions that should be installed into the container.",

View File

@@ -22,6 +22,20 @@
"$ref": "vscode://schemas/settings/machine", "$ref": "vscode://schemas/settings/machine",
"description": "Machine specific settings that should be copied into the container." "description": "Machine specific settings that should be copied into the container."
}, },
"remoteEnv": {
"type": "object",
"additionalProperties": {
"type": [
"string",
"null"
]
},
"description": "Remote environment variables."
},
"remoteUser": {
"type": "string",
"description": "The user VS Code Server will be started with. The default is the same user as the container."
},
"postCreateCommand": { "postCreateCommand": {
"type": [ "type": [
"string", "string",
@@ -55,6 +69,21 @@
] ]
} }
}, },
"containerEnv": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Container environment variables."
},
"containerUser": {
"type": "string",
"description": "The user the container will be started with. The default is the user on the Docker image."
},
"updateRemoteUserUID": {
"type": "boolean",
"description": "Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default."
},
"runArgs": { "runArgs": {
"type": "array", "type": "array",
"description": "The arguments required when starting in the container.", "description": "The arguments required when starting in the container.",
@@ -68,7 +97,7 @@
"none", "none",
"stopContainer" "stopContainer"
], ],
"description": "Action to take when VS Code is shutting down. The default is to stop the container." "description": "Action to take when the VS Code window is closed. The default is to stop the container."
}, },
"overrideCommand": { "overrideCommand": {
"type": "boolean", "type": "boolean",
@@ -146,7 +175,7 @@
"none", "none",
"stopCompose" "stopCompose"
], ],
"description": "Action to take when VS Code is shutting down. The default is to stop the containers." "description": "Action to take when the VS Code window is closed. The default is to stop the containers."
} }
}, },
"required": [ "required": [

View File

@@ -4,23 +4,11 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { getLocation, parse, visit } from 'jsonc-parser'; import { getLocation, parse, visit } from 'jsonc-parser';
import * as path from 'path';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import { SettingsDocument } from './settingsDocumentHelper'; import { SettingsDocument } from './settingsDocumentHelper';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
const fadedDecoration = vscode.window.createTextEditorDecorationType({
light: {
color: '#757575'
},
dark: {
color: '#878787'
}
});
let pendingLaunchJsonDecoration: NodeJS.Timer;
export function activate(context: vscode.ExtensionContext): void { export function activate(context: vscode.ExtensionContext): void {
//settings.json suggestions //settings.json suggestions
context.subscriptions.push(registerSettingsCompletions()); context.subscriptions.push(registerSettingsCompletions());
@@ -33,18 +21,6 @@ export function activate(context: vscode.ExtensionContext): void {
// task.json variable suggestions // task.json variable suggestions
context.subscriptions.push(registerVariableCompletions('**/tasks.json')); context.subscriptions.push(registerVariableCompletions('**/tasks.json'));
// launch.json decorations
context.subscriptions.push(vscode.window.onDidChangeActiveTextEditor(editor => updateLaunchJsonDecorations(editor), null, context.subscriptions));
context.subscriptions.push(vscode.workspace.onDidChangeTextDocument(event => {
if (vscode.window.activeTextEditor && event.document === vscode.window.activeTextEditor.document) {
if (pendingLaunchJsonDecoration) {
clearTimeout(pendingLaunchJsonDecoration);
}
pendingLaunchJsonDecoration = setTimeout(() => updateLaunchJsonDecorations(vscode.window.activeTextEditor), 1000);
}
}, null, context.subscriptions));
updateLaunchJsonDecorations(vscode.window.activeTextEditor);
} }
function registerSettingsCompletions(): vscode.Disposable { function registerSettingsCompletions(): vscode.Disposable {
@@ -153,39 +129,6 @@ function provideInstalledExtensionProposals(extensionsContent: IExtensionsConten
return undefined; return undefined;
} }
function updateLaunchJsonDecorations(editor: vscode.TextEditor | undefined): void {
if (!editor || path.basename(editor.document.fileName) !== 'launch.json') {
return;
}
const ranges: vscode.Range[] = [];
let addPropertyAndValue = false;
let depthInArray = 0;
visit(editor.document.getText(), {
onObjectProperty: (property, offset, length) => {
// Decorate attributes which are unlikely to be edited by the user.
// Only decorate "configurations" if it is not inside an array (compounds have a configurations property which should not be decorated).
addPropertyAndValue = property === 'version' || property === 'type' || property === 'request' || property === 'compounds' || (property === 'configurations' && depthInArray === 0);
if (addPropertyAndValue) {
ranges.push(new vscode.Range(editor.document.positionAt(offset), editor.document.positionAt(offset + length)));
}
},
onLiteralValue: (_value, offset, length) => {
if (addPropertyAndValue) {
ranges.push(new vscode.Range(editor.document.positionAt(offset), editor.document.positionAt(offset + length)));
}
},
onArrayBegin: (_offset: number, _length: number) => {
depthInArray++;
},
onArrayEnd: (_offset: number, _length: number) => {
depthInArray--;
}
});
editor.setDecorations(fadedDecoration, ranges);
}
vscode.languages.registerDocumentSymbolProvider({ pattern: '**/launch.json', language: 'jsonc' }, { vscode.languages.registerDocumentSymbolProvider({ pattern: '**/launch.json', language: 'jsonc' }, {
provideDocumentSymbols(document: vscode.TextDocument, _token: vscode.CancellationToken): vscode.ProviderResult<vscode.SymbolInformation[]> { provideDocumentSymbols(document: vscode.TextDocument, _token: vscode.CancellationToken): vscode.ProviderResult<vscode.SymbolInformation[]> {
const result: vscode.SymbolInformation[] = []; const result: vscode.SymbolInformation[] = [];

View File

@@ -2,10 +2,10 @@
# yarn lockfile v1 # yarn lockfile v1
"@types/node@^10.14.8": "@types/node@^12.11.7":
version "10.14.8" version "12.11.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.7.tgz#57682a9771a3f7b09c2497f28129a0462966524a"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw== integrity sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==
jsonc-parser@^2.1.1: jsonc-parser@^2.1.1:
version "2.1.1" version "2.1.1"

View File

@@ -57,7 +57,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/mocha": "^5.2.5", "@types/mocha": "^5.2.5",
"@types/node": "10", "@types/node": "^12.11.7",
"mocha": "^5.2.0", "mocha": "^5.2.0",
"mocha-junit-reporter": "^1.17.0", "mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",

View File

@@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.6.tgz#b8622d50557dd155e9f2f634b7d68fd38de5e94b" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.6.tgz#b8622d50557dd155e9f2f634b7d68fd38de5e94b"
integrity sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw== integrity sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==
"@types/node@10": "@types/node@^12.11.7":
version "10.17.4" version "12.12.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.4.tgz#8993a4fe3c4022fda66bf4ea660d615fc5659c6f" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11"
integrity sha512-F2pgg+LcIr/elguz+x+fdBX5KeZXGUOp7TV8M0TVIrDezYLFRNt8oMTyps0VQ1kj5WGGoR18RdxnRDHXrIFHMQ== integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==
agent-base@4, agent-base@^4.3.0: agent-base@4, agent-base@^4.3.0:
version "4.3.0" version "4.3.0"

View File

@@ -54,6 +54,6 @@
}, },
"devDependencies": { "devDependencies": {
"@types/markdown-it": "0.0.2", "@types/markdown-it": "0.0.2",
"@types/node": "^10.14.8" "@types/node": "^12.11.7"
} }
} }

View File

@@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660" resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660"
integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA= integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA=
"@types/node@^10.14.8": "@types/node@^12.11.7":
version "10.14.8" version "12.11.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.7.tgz#57682a9771a3f7b09c2497f28129a0462966524a"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw== integrity sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==
"@types/node@^6.0.46": "@types/node@^6.0.46":
version "6.0.78" version "6.0.78"

View File

@@ -7,7 +7,9 @@
"engines": { "engines": {
"vscode": "^1.5.0" "vscode": "^1.5.0"
}, },
"extensionKind": "ui", "extensionKind": [
"ui"
],
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"enableProposedApi": true, "enableProposedApi": true,
"categories": [ "categories": [
@@ -23,6 +25,6 @@
"watch": "gulp watch-extension:git-ui" "watch": "gulp watch-extension:git-ui"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^10.14.8" "@types/node": "^12.11.7"
} }
} }

View File

@@ -41,12 +41,12 @@ export function exec(command: string, options: cp.ExecOptions & { stdin?: string
(error ? reject : resolve)({ error, stdout, stderr }); (error ? reject : resolve)({ error, stdout, stderr });
}); });
if (options.stdin) { if (options.stdin) {
child.stdin.write(options.stdin, (err: any) => { child.stdin!.write(options.stdin, (err: any) => {
if (err) { if (err) {
reject(err); reject(err);
return; return;
} }
child.stdin.end((err: any) => { child.stdin!.end((err: any) => {
if (err) { if (err) {
reject(err); reject(err);
} }

View File

@@ -2,7 +2,7 @@
# yarn lockfile v1 # yarn lockfile v1
"@types/node@^10.14.8": "@types/node@^12.11.7":
version "10.14.8" version "12.11.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.7.tgz#57682a9771a3f7b09c2497f28129a0462966524a"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw== integrity sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==

View File

@@ -109,6 +109,24 @@
"dark": "resources/icons/dark/stage.svg" "dark": "resources/icons/dark/stage.svg"
} }
}, },
{
"command": "git.stageAllTracked",
"title": "%command.stageAllTracked%",
"category": "Git",
"icon": {
"light": "resources/icons/light/stage.svg",
"dark": "resources/icons/dark/stage.svg"
}
},
{
"command": "git.stageAllUntracked",
"title": "%command.stageAllUntracked%",
"category": "Git",
"icon": {
"light": "resources/icons/light/stage.svg",
"dark": "resources/icons/dark/stage.svg"
}
},
{ {
"command": "git.stageSelectedRanges", "command": "git.stageSelectedRanges",
"title": "%command.stageSelectedRanges%", "title": "%command.stageSelectedRanges%",
@@ -178,6 +196,24 @@
"dark": "resources/icons/dark/clean.svg" "dark": "resources/icons/dark/clean.svg"
} }
}, },
{
"command": "git.cleanAllTracked",
"title": "%command.cleanAllTracked%",
"category": "Git",
"icon": {
"light": "resources/icons/light/clean.svg",
"dark": "resources/icons/dark/clean.svg"
}
},
{
"command": "git.cleanAllUntracked",
"title": "%command.cleanAllUntracked%",
"category": "Git",
"icon": {
"light": "resources/icons/light/clean.svg",
"dark": "resources/icons/dark/clean.svg"
}
},
{ {
"command": "git.commit", "command": "git.commit",
"title": "%command.commit%", "title": "%command.commit%",
@@ -267,6 +303,11 @@
"title": "%command.createTag%", "title": "%command.createTag%",
"category": "Git" "category": "Git"
}, },
{
"command": "git.deleteTag",
"title": "%command.deleteTag%",
"category": "Git"
},
{ {
"command": "git.fetch", "command": "git.fetch",
"title": "%command.fetch%", "title": "%command.fetch%",
@@ -396,6 +437,11 @@
"command": "git.stashApplyLatest", "command": "git.stashApplyLatest",
"title": "%command.stashApplyLatest%", "title": "%command.stashApplyLatest%",
"category": "Git" "category": "Git"
},
{
"command": "git.stashDrop",
"title": "%command.stashDrop%",
"category": "Git"
} }
], ],
"menus": { "menus": {
@@ -440,6 +486,14 @@
"command": "git.stageAll", "command": "git.stageAll",
"when": "config.git.enabled && gitOpenRepositoryCount != 0" "when": "config.git.enabled && gitOpenRepositoryCount != 0"
}, },
{
"command": "git.stageAllTracked",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.stageAllUntracked",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{ {
"command": "git.stageSelectedRanges", "command": "git.stageSelectedRanges",
"when": "config.git.enabled && gitOpenRepositoryCount != 0" "when": "config.git.enabled && gitOpenRepositoryCount != 0"
@@ -564,6 +618,10 @@
"command": "git.createTag", "command": "git.createTag",
"when": "config.git.enabled && gitOpenRepositoryCount != 0" "when": "config.git.enabled && gitOpenRepositoryCount != 0"
}, },
{
"command": "git.deleteTag",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{ {
"command": "git.fetch", "command": "git.fetch",
"when": "config.git.enabled && gitOpenRepositoryCount != 0" "when": "config.git.enabled && gitOpenRepositoryCount != 0"
@@ -651,6 +709,10 @@
{ {
"command": "git.stashApplyLatest", "command": "git.stashApplyLatest",
"when": "config.git.enabled && gitOpenRepositoryCount != 0" "when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.stashDrop",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
} }
], ],
"scm/title": [ "scm/title": [
@@ -804,6 +866,11 @@
"group": "6_stash", "group": "6_stash",
"when": "scmProvider == git" "when": "scmProvider == git"
}, },
{
"command": "git.stashDrop",
"group": "6_stash",
"when": "scmProvider == git"
},
{ {
"command": "git.showOutput", "command": "git.showOutput",
"group": "7_repository", "group": "7_repository",
@@ -840,22 +907,62 @@
}, },
{ {
"command": "git.cleanAll", "command": "git.cleanAll",
"when": "scmProvider == git && scmResourceGroup == workingTree", "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
"group": "1_modification" "group": "1_modification"
}, },
{ {
"command": "git.stageAll", "command": "git.stageAll",
"when": "scmProvider == git && scmResourceGroup == workingTree", "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
"group": "1_modification" "group": "1_modification"
}, },
{ {
"command": "git.cleanAll", "command": "git.cleanAll",
"when": "scmProvider == git && scmResourceGroup == workingTree", "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
"group": "inline" "group": "inline"
}, },
{ {
"command": "git.stageAll", "command": "git.stageAll",
"when": "scmProvider == git && scmResourceGroup == workingTree", "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
"group": "inline"
},
{
"command": "git.cleanAllTracked",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
"group": "1_modification"
},
{
"command": "git.stageAllTracked",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
"group": "1_modification"
},
{
"command": "git.cleanAllTracked",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
"group": "inline"
},
{
"command": "git.stageAllTracked",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
"group": "inline"
},
{
"command": "git.cleanAllUntracked",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "1_modification"
},
{
"command": "git.stageAllUntracked",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "1_modification"
},
{
"command": "git.cleanAllUntracked",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "inline"
},
{
"command": "git.stageAllUntracked",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "inline" "group": "inline"
} }
], ],
@@ -1031,13 +1138,63 @@
"command": "git.revealInExplorer", "command": "git.revealInExplorer",
"when": "scmProvider == git && scmResourceGroup == workingTree", "when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "2_view" "group": "2_view"
},
{
"command": "git.openChange",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "navigation"
},
{
"command": "git.openHEADFile",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "navigation"
},
{
"command": "git.openFile",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "navigation"
},
{
"command": "git.stage",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "1_modification"
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == untracked && !gitFreshRepository",
"group": "1_modification"
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == untracked && !gitFreshRepository",
"group": "inline"
},
{
"command": "git.stage",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "inline"
},
{
"command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == untracked && config.git.showInlineOpenFileAction && config.git.openDiffOnClick",
"group": "inline0"
},
{
"command": "git.openChange",
"when": "scmProvider == git && scmResourceGroup == untracked && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick",
"group": "inline0"
},
{
"command": "git.ignore",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "1_modification@3"
} }
], ],
"editor/title": [ "editor/title": [
{ {
"command": "git.openFile", "command": "git.openFile",
"group": "navigation", "group": "navigation",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
}, },
{ {
"command": "git.openChange", "command": "git.openChange",
@@ -1047,44 +1204,44 @@
{ {
"command": "git.stageSelectedRanges", "command": "git.stageSelectedRanges",
"group": "2_git@1", "group": "2_git@1",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
}, },
{ {
"command": "git.unstageSelectedRanges", "command": "git.unstageSelectedRanges",
"group": "2_git@2", "group": "2_git@2",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
}, },
{ {
"command": "git.revertSelectedRanges", "command": "git.revertSelectedRanges",
"group": "2_git@3", "group": "2_git@3",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
} }
], ],
"editor/context": [ "editor/context": [
{ {
"command": "git.stageSelectedRanges", "command": "git.stageSelectedRanges",
"group": "2_git@1", "group": "2_git@1",
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" "when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
}, },
{ {
"command": "git.unstageSelectedRanges", "command": "git.unstageSelectedRanges",
"group": "2_git@2", "group": "2_git@2",
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" "when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
}, },
{ {
"command": "git.revertSelectedRanges", "command": "git.revertSelectedRanges",
"group": "2_git@3", "group": "2_git@3",
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" "when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
} }
], ],
"scm/change/title": [ "scm/change/title": [
{ {
"command": "git.stageChange", "command": "git.stageChange",
"when": "originalResourceScheme == git" "when": "originalResourceScheme == gitfs"
}, },
{ {
"command": "git.revertChange", "command": "git.revertChange",
"when": "originalResourceScheme == git" "when": "originalResourceScheme == gitfs"
} }
] ]
}, },
@@ -1174,7 +1331,8 @@
"%config.countBadge.off%" "%config.countBadge.off%"
], ],
"description": "%config.countBadge%", "description": "%config.countBadge%",
"default": "all" "default": "all",
"scope": "resource"
}, },
"git.checkoutType": { "git.checkoutType": {
"type": "string", "type": "string",
@@ -1434,6 +1592,22 @@
], ],
"default": "committerdate", "default": "committerdate",
"description": "%config.branchSortOrder%" "description": "%config.branchSortOrder%"
},
"git.untrackedChanges": {
"type": "string",
"enum": [
"mixed",
"separate",
"hidden"
],
"enumDescriptions": [
"%config.untrackedChanges.mixed%",
"%config.untrackedChanges.separate%",
"%config.untrackedChanges.hidden%"
],
"default": "mixed",
"description": "%config.untrackedChanges%",
"scope": "resource"
} }
} }
}, },
@@ -1585,7 +1759,7 @@
"byline": "^5.0.0", "byline": "^5.0.0",
"file-type": "^7.2.0", "file-type": "^7.2.0",
"iconv-lite": "^0.4.24", "iconv-lite": "^0.4.24",
"jschardet": "^1.6.0", "jschardet": "2.1.1",
"vscode-extension-telemetry": "0.1.1", "vscode-extension-telemetry": "0.1.1",
"vscode-nls": "^4.0.0", "vscode-nls": "^4.0.0",
"vscode-uri": "^2.0.0", "vscode-uri": "^2.0.0",
@@ -1595,7 +1769,7 @@
"@types/byline": "4.2.31", "@types/byline": "4.2.31",
"@types/file-type": "^5.2.1", "@types/file-type": "^5.2.1",
"@types/mocha": "2.2.43", "@types/mocha": "2.2.43",
"@types/node": "^10.14.8", "@types/node": "^12.11.7",
"@types/which": "^1.0.28", "@types/which": "^1.0.28",
"mocha": "^3.2.0" "mocha": "^3.2.0"
} }

View File

@@ -11,6 +11,8 @@
"command.openHEADFile": "Open File (HEAD)", "command.openHEADFile": "Open File (HEAD)",
"command.stage": "Stage Changes", "command.stage": "Stage Changes",
"command.stageAll": "Stage All Changes", "command.stageAll": "Stage All Changes",
"command.stageAllTracked": "Stage All Tracked Changes",
"command.stageAllUntracked": "Stage All Untracked Changes",
"command.stageSelectedRanges": "Stage Selected Ranges", "command.stageSelectedRanges": "Stage Selected Ranges",
"command.revertSelectedRanges": "Revert Selected Ranges", "command.revertSelectedRanges": "Revert Selected Ranges",
"command.stageChange": "Stage Change", "command.stageChange": "Stage Change",
@@ -20,6 +22,8 @@
"command.unstageSelectedRanges": "Unstage Selected Ranges", "command.unstageSelectedRanges": "Unstage Selected Ranges",
"command.clean": "Discard Changes", "command.clean": "Discard Changes",
"command.cleanAll": "Discard All Changes", "command.cleanAll": "Discard All Changes",
"command.cleanAllTracked": "Discard All Tracked Changes",
"command.cleanAllUntracked": "Discard All Untracked Changes",
"command.commit": "Commit", "command.commit": "Commit",
"command.commitStaged": "Commit Staged", "command.commitStaged": "Commit Staged",
"command.commitEmpty": "Commit Empty", "command.commitEmpty": "Commit Empty",
@@ -37,6 +41,7 @@
"command.renameBranch": "Rename Branch...", "command.renameBranch": "Rename Branch...",
"command.merge": "Merge Branch...", "command.merge": "Merge Branch...",
"command.createTag": "Create Tag", "command.createTag": "Create Tag",
"command.deleteTag": "Delete Tag",
"command.fetch": "Fetch", "command.fetch": "Fetch",
"command.fetchPrune": "Fetch (Prune)", "command.fetchPrune": "Fetch (Prune)",
"command.fetchAll": "Fetch From All Remotes", "command.fetchAll": "Fetch From All Remotes",
@@ -56,13 +61,14 @@
"command.publish": "Publish Branch...", "command.publish": "Publish Branch...",
"command.showOutput": "Show Git Output", "command.showOutput": "Show Git Output",
"command.ignore": "Add to .gitignore", "command.ignore": "Add to .gitignore",
"command.revealInExplorer": "Reveal in Explorer", "command.revealInExplorer": "Reveal in Side Bar",
"command.stashIncludeUntracked": "Stash (Include Untracked)", "command.stashIncludeUntracked": "Stash (Include Untracked)",
"command.stash": "Stash", "command.stash": "Stash",
"command.stashPop": "Pop Stash...", "command.stashPop": "Pop Stash...",
"command.stashPopLatest": "Pop Latest Stash", "command.stashPopLatest": "Pop Latest Stash",
"command.stashApply": "Apply Stash...", "command.stashApply": "Apply Stash...",
"command.stashApplyLatest": "Apply Latest Stash", "command.stashApplyLatest": "Apply Latest Stash",
"command.stashDrop": "Drop Stash...",
"config.enabled": "Whether git is enabled.", "config.enabled": "Whether git is enabled.",
"config.path": "Path and filename of the git executable, e.g. `C:\\Program Files\\Git\\bin\\git.exe` (Windows).", "config.path": "Path and filename of the git executable, e.g. `C:\\Program Files\\Git\\bin\\git.exe` (Windows).",
"config.autoRepositoryDetection": "Configures when repositories should be automatically detected.", "config.autoRepositoryDetection": "Configures when repositories should be automatically detected.",
@@ -119,7 +125,7 @@
"config.scanRepositories": "List of paths to search for git repositories in.", "config.scanRepositories": "List of paths to search for git repositories in.",
"config.showProgress": "Controls whether git actions should show progress.", "config.showProgress": "Controls whether git actions should show progress.",
"config.rebaseWhenSync": "Force git to use rebase when running the sync command.", "config.rebaseWhenSync": "Force git to use rebase when running the sync command.",
"config.confirmEmptyCommits": "Always confirm the creation of empty commits.", "config.confirmEmptyCommits": "Always confirm the creation of empty commits for the 'Git: Commit Empty' command.",
"config.fetchOnPull": "Fetch all branches when pulling or just the current one.", "config.fetchOnPull": "Fetch all branches when pulling or just the current one.",
"config.pullTags": "Fetch all tags when pulling.", "config.pullTags": "Fetch all tags when pulling.",
"config.autoStash": "Stash any changes before pulling and restore them after successful pull.", "config.autoStash": "Stash any changes before pulling and restore them after successful pull.",
@@ -129,6 +135,10 @@
"config.openDiffOnClick": "Controls whether the diff editor should be opened when clicking a change. Otherwise the regular editor will be opened.", "config.openDiffOnClick": "Controls whether the diff editor should be opened when clicking a change. Otherwise the regular editor will be opened.",
"config.supportCancellation": "Controls whether a notification comes up when running the Sync action, which allows the user to cancel the operation.", "config.supportCancellation": "Controls whether a notification comes up when running the Sync action, which allows the user to cancel the operation.",
"config.branchSortOrder": "Controls the sort order for branches.", "config.branchSortOrder": "Controls the sort order for branches.",
"config.untrackedChanges": "Controls how untracked changes behave.",
"config.untrackedChanges.mixed": "All changes, tracked and untracked, appear together and behave equally.",
"config.untrackedChanges.separate": "Untracked changes appear separately in the Source Control view. They are also excluded from several actions.",
"config.untrackedChanges.hidden": "Untracked changes are hidden and excluded from several actions.",
"colors.added": "Color for added resources.", "colors.added": "Color for added resources.",
"colors.modified": "Color for modified resources.", "colors.modified": "Color for modified resources.",
"colors.deleted": "Color for deleted resources.", "colors.deleted": "Color for deleted resources.",

View File

@@ -8,6 +8,7 @@ import { Repository as BaseRepository, Resource } from '../repository';
import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions, APIState } from './git'; import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions, APIState } from './git';
import { Event, SourceControlInputBox, Uri, SourceControl } from 'vscode'; import { Event, SourceControlInputBox, Uri, SourceControl } from 'vscode';
import { mapEvent } from '../util'; import { mapEvent } from '../util';
import { toGitUri } from '../uri';
class ApiInputBox implements InputBox { class ApiInputBox implements InputBox {
set value(value: string) { this._inputBox.value = value; } set value(value: string) { this._inputBox.value = value; }
@@ -234,5 +235,9 @@ export class ApiImpl implements API {
return this._model.repositories.map(r => new ApiRepository(r)); return this._model.repositories.map(r => new ApiRepository(r));
} }
toGitUri(uri: Uri, ref: string): Uri {
return toGitUri(uri, ref);
}
constructor(private _model: Model) { } constructor(private _model: Model) { }
} }

View File

@@ -185,6 +185,8 @@ export interface API {
readonly repositories: Repository[]; readonly repositories: Repository[];
readonly onDidOpenRepository: Event<Repository>; readonly onDidOpenRepository: Event<Repository>;
readonly onDidCloseRepository: Event<Repository>; readonly onDidCloseRepository: Event<Repository>;
toGitUri(uri: Uri, ref: string): Uri;
} }
export interface GitExtension { export interface GitExtension {

View File

@@ -3,9 +3,9 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as http from 'http';
import * as fs from 'fs'; import * as fs from 'fs';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import { IPCClient } from './ipc/ipcClient';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
@@ -20,10 +20,6 @@ function main(argv: string[]): void {
return fatal('Wrong number of arguments'); return fatal('Wrong number of arguments');
} }
if (!process.env['VSCODE_GIT_ASKPASS_HANDLE']) {
return fatal('Missing handle');
}
if (!process.env['VSCODE_GIT_ASKPASS_PIPE']) { if (!process.env['VSCODE_GIT_ASKPASS_PIPE']) {
return fatal('Missing pipe'); return fatal('Missing pipe');
} }
@@ -33,40 +29,14 @@ function main(argv: string[]): void {
} }
const output = process.env['VSCODE_GIT_ASKPASS_PIPE'] as string; const output = process.env['VSCODE_GIT_ASKPASS_PIPE'] as string;
const socketPath = process.env['VSCODE_GIT_ASKPASS_HANDLE'] as string;
const request = argv[2]; const request = argv[2];
const host = argv[4].substring(1, argv[4].length - 2); const host = argv[4].substring(1, argv[4].length - 2);
const opts: http.RequestOptions = { const ipcClient = new IPCClient('askpass');
socketPath,
path: '/',
method: 'POST'
};
const req = http.request(opts, res => { ipcClient.call({ request, host }).then(res => {
if (res.statusCode !== 200) { fs.writeFileSync(output, res + '\n');
return fatal(`Bad status code: ${res.statusCode}`); setTimeout(() => process.exit(0), 0);
} }).catch(err => fatal(err));
const chunks: string[] = [];
res.setEncoding('utf8');
res.on('data', (d: string) => chunks.push(d));
res.on('end', () => {
const raw = chunks.join('');
try {
const result = JSON.parse(raw);
fs.writeFileSync(output, result + '\n');
} catch (err) {
return fatal(`Error parsing response`);
}
setTimeout(() => process.exit(0), 0);
});
});
req.on('error', () => fatal('Error in request'));
req.write(JSON.stringify({ request, host }));
req.end();
} }
main(process.argv); main(process.argv);

View File

@@ -3,15 +3,10 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { Disposable, window, InputBoxOptions } from 'vscode'; import { window, InputBoxOptions } from 'vscode';
import { denodeify } from './util'; import { IDisposable } from './util';
import * as path from 'path'; import * as path from 'path';
import * as http from 'http'; import { IIPCHandler, IIPCServer } from './ipc/ipcServer';
import * as os from 'os';
import * as fs from 'fs';
import * as crypto from 'crypto';
const randomBytes = denodeify<Buffer>(crypto.randomBytes);
export interface AskpassEnvironment { export interface AskpassEnvironment {
GIT_ASKPASS: string; GIT_ASKPASS: string;
@@ -21,68 +16,21 @@ export interface AskpassEnvironment {
VSCODE_GIT_ASKPASS_HANDLE?: string; VSCODE_GIT_ASKPASS_HANDLE?: string;
} }
function getIPCHandlePath(nonce: string): string { export class Askpass implements IIPCHandler {
if (process.platform === 'win32') {
return `\\\\.\\pipe\\vscode-git-askpass-${nonce}-sock`; private disposable: IDisposable;
static getDisabledEnv(): AskpassEnvironment {
return {
GIT_ASKPASS: path.join(__dirname, 'askpass-empty.sh')
};
} }
if (process.env['XDG_RUNTIME_DIR']) { constructor(ipc: IIPCServer) {
return path.join(process.env['XDG_RUNTIME_DIR'] as string, `vscode-git-askpass-${nonce}.sock`); this.disposable = ipc.registerHandler('askpass', this);
} }
return path.join(os.tmpdir(), `vscode-git-askpass-${nonce}.sock`); async handle({ request, host }: { request: string, host: string }): Promise<string> {
}
export class Askpass implements Disposable {
private server: http.Server;
private ipcHandlePathPromise: Promise<string>;
private ipcHandlePath: string | undefined;
private enabled = true;
constructor() {
this.server = http.createServer((req, res) => this.onRequest(req, res));
this.ipcHandlePathPromise = this.setup().catch(err => {
console.error(err);
return '';
});
}
private async setup(): Promise<string> {
const buffer = await randomBytes(20);
const nonce = buffer.toString('hex');
const ipcHandlePath = getIPCHandlePath(nonce);
this.ipcHandlePath = ipcHandlePath;
try {
this.server.listen(ipcHandlePath);
this.server.on('error', err => console.error(err));
} catch (err) {
console.error('Could not launch git askpass helper.');
this.enabled = false;
}
return ipcHandlePath;
}
private onRequest(req: http.IncomingMessage, res: http.ServerResponse): void {
const chunks: string[] = [];
req.setEncoding('utf8');
req.on('data', (d: string) => chunks.push(d));
req.on('end', () => {
const { request, host } = JSON.parse(chunks.join(''));
this.prompt(host, request).then(result => {
res.writeHead(200);
res.end(JSON.stringify(result));
}, () => {
res.writeHead(500);
res.end();
});
});
}
private async prompt(host: string, request: string): Promise<string> {
const options: InputBoxOptions = { const options: InputBoxOptions = {
password: /password/i.test(request), password: /password/i.test(request),
placeHolder: request, placeHolder: request,
@@ -93,27 +41,16 @@ export class Askpass implements Disposable {
return await window.showInputBox(options) || ''; return await window.showInputBox(options) || '';
} }
async getEnv(): Promise<AskpassEnvironment> { getEnv(): AskpassEnvironment {
if (!this.enabled) {
return {
GIT_ASKPASS: path.join(__dirname, 'askpass-empty.sh')
};
}
return { return {
ELECTRON_RUN_AS_NODE: '1', ELECTRON_RUN_AS_NODE: '1',
GIT_ASKPASS: path.join(__dirname, 'askpass.sh'), GIT_ASKPASS: path.join(__dirname, 'askpass.sh'),
VSCODE_GIT_ASKPASS_NODE: process.execPath, VSCODE_GIT_ASKPASS_NODE: process.execPath,
VSCODE_GIT_ASKPASS_MAIN: path.join(__dirname, 'askpass-main.js'), VSCODE_GIT_ASKPASS_MAIN: path.join(__dirname, 'askpass-main.js')
VSCODE_GIT_ASKPASS_HANDLE: await this.ipcHandlePathPromise
}; };
} }
dispose(): void { dispose(): void {
this.server.close(); this.disposable.dispose();
if (this.ipcHandlePath && process.platform !== 'win32') {
fs.unlinkSync(this.ipcHandlePath);
}
} }
} }

View File

@@ -3,19 +3,19 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { Uri, commands, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState, TextDocumentShowOptions, ViewColumn, ProgressLocation, TextEditor, MessageOptions, WorkspaceFolder } from 'vscode';
import { Git, CommitOptions, Stash, ForcePushMode } from './git';
import { Repository, Resource, ResourceGroupType } from './repository';
import { Model } from './model';
import { toGitUri, fromGitUri } from './uri';
import { grep, isDescendant, pathEquals } from './util';
import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange, getModifiedRange } from './staging';
import * as path from 'path';
import { lstat, Stats } from 'fs'; import { lstat, Stats } from 'fs';
import * as os from 'os'; import * as os from 'os';
import * as path from 'path';
import { commands, Disposable, LineChange, MessageOptions, OutputChannel, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder } from 'vscode';
import TelemetryReporter from 'vscode-extension-telemetry'; import TelemetryReporter from 'vscode-extension-telemetry';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import { Ref, RefType, Branch, GitErrorCodes, Status } from './api/git'; import { Branch, GitErrorCodes, Ref, RefType, Status } from './api/git';
import { CommitOptions, ForcePushMode, Git, Stash } from './git';
import { Model } from './model';
import { Repository, Resource, ResourceGroupType } from './repository';
import { applyLineChanges, getModifiedRange, intersectDiffWithRange, invertLineChange, toLineRanges } from './staging';
import { fromGitUri, toGitUri, isGitUri } from './uri';
import { grep, isDescendant, pathEquals } from './util';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
@@ -99,7 +99,7 @@ class CreateBranchItem implements QuickPickItem {
constructor(private cc: CommandCenter) { } constructor(private cc: CommandCenter) { }
get label(): string { return localize('create branch', '$(plus) Create new branch...'); } get label(): string { return '$(plus) ' + localize('create branch', 'Create new branch...'); }
get description(): string { return ''; } get description(): string { return ''; }
get alwaysShow(): boolean { return true; } get alwaysShow(): boolean { return true; }
@@ -113,7 +113,7 @@ class CreateBranchFromItem implements QuickPickItem {
constructor(private cc: CommandCenter) { } constructor(private cc: CommandCenter) { }
get label(): string { return localize('create branch from', '$(plus) Create new branch from...'); } get label(): string { return '$(plus) ' + localize('create branch from', 'Create new branch from...'); }
get description(): string { return ''; } get description(): string { return ''; }
get alwaysShow(): boolean { return true; } get alwaysShow(): boolean { return true; }
@@ -136,7 +136,7 @@ class AddRemoteItem implements QuickPickItem {
constructor(private cc: CommandCenter) { } constructor(private cc: CommandCenter) { }
get label(): string { return localize('add remote', '$(plus) Add a new remote...'); } get label(): string { return '$(plus) ' + localize('add remote', 'Add a new remote...'); }
get description(): string { return ''; } get description(): string { return ''; }
get alwaysShow(): boolean { return true; } get alwaysShow(): boolean { return true; }
@@ -170,14 +170,14 @@ function command(commandId: string, options: CommandOptions = {}): Function {
}; };
} }
const ImageMimetypes = [ // const ImageMimetypes = [
'image/png', // 'image/png',
'image/gif', // 'image/gif',
'image/jpeg', // 'image/jpeg',
'image/webp', // 'image/webp',
'image/tiff', // 'image/tiff',
'image/bmp' // 'image/bmp'
]; // ];
async function categorizeResourceByResolution(resources: Resource[]): Promise<{ merge: Resource[], resolved: Resource[], unresolved: Resource[], deletionConflicts: Resource[] }> { async function categorizeResourceByResolution(resources: Resource[]): Promise<{ merge: Resource[], resolved: Resource[], unresolved: Resource[], deletionConflicts: Resource[] }> {
const selection = resources.filter(s => s instanceof Resource) as Resource[]; const selection = resources.filter(s => s instanceof Resource) as Resource[];
@@ -213,6 +213,12 @@ function createCheckoutItems(repository: Repository): CheckoutItem[] {
return [...heads, ...tags, ...remoteHeads]; return [...heads, ...tags, ...remoteHeads];
} }
class TagItem implements QuickPickItem {
get label(): string { return this.ref.name ?? ''; }
get description(): string { return this.ref.commit?.substr(0, 8) ?? ''; }
constructor(readonly ref: Ref) { }
}
enum PushType { enum PushType {
Push, Push,
PushTo, PushTo,
@@ -289,10 +295,10 @@ export class CommandCenter {
} }
} else { } else {
if (resource.type !== Status.DELETED_BY_THEM) { if (resource.type !== Status.DELETED_BY_THEM) {
left = await this.getLeftResource(resource); left = this.getLeftResource(resource);
} }
right = await this.getRightResource(resource); right = this.getRightResource(resource);
} }
const title = this.getTitle(resource); const title = this.getTitle(resource);
@@ -324,79 +330,40 @@ export class CommandCenter {
} }
} }
private async getURI(uri: Uri, ref: string): Promise<Uri | undefined> { private getLeftResource(resource: Resource): Uri | undefined {
const repository = this.model.getRepository(uri);
if (!repository) {
return toGitUri(uri, ref);
}
try {
let gitRef = ref;
if (gitRef === '~') {
const uriString = uri.toString();
const [indexStatus] = repository.indexGroup.resourceStates.filter(r => r.resourceUri.toString() === uriString);
gitRef = indexStatus ? '' : 'HEAD';
}
const { size, object } = await repository.getObjectDetails(gitRef, uri.fsPath);
const { mimetype } = await repository.detectObjectType(object);
if (mimetype === 'text/plain') {
return toGitUri(uri, ref);
}
if (size > 1000000) { // 1 MB
return Uri.parse(`data:;label:${path.basename(uri.fsPath)};description:${gitRef},`);
}
if (ImageMimetypes.indexOf(mimetype) > -1) {
const contents = await repository.buffer(gitRef, uri.fsPath);
return Uri.parse(`data:${mimetype};label:${path.basename(uri.fsPath)};description:${gitRef};size:${size};base64,${contents.toString('base64')}`);
}
return Uri.parse(`data:;label:${path.basename(uri.fsPath)};description:${gitRef},`);
} catch (err) {
return toGitUri(uri, ref);
}
}
private async getLeftResource(resource: Resource): Promise<Uri | undefined> {
switch (resource.type) { switch (resource.type) {
case Status.INDEX_MODIFIED: case Status.INDEX_MODIFIED:
case Status.INDEX_RENAMED: case Status.INDEX_RENAMED:
case Status.INDEX_ADDED: case Status.INDEX_ADDED:
return this.getURI(resource.original, 'HEAD'); return toGitUri(resource.original, 'HEAD');
case Status.MODIFIED: case Status.MODIFIED:
case Status.UNTRACKED: case Status.UNTRACKED:
return this.getURI(resource.resourceUri, '~'); return toGitUri(resource.resourceUri, '~');
case Status.DELETED_BY_THEM: case Status.DELETED_BY_THEM:
return this.getURI(resource.resourceUri, ''); return toGitUri(resource.resourceUri, '');
} }
return undefined; return undefined;
} }
private async getRightResource(resource: Resource): Promise<Uri | undefined> { private getRightResource(resource: Resource): Uri | undefined {
switch (resource.type) { switch (resource.type) {
case Status.INDEX_MODIFIED: case Status.INDEX_MODIFIED:
case Status.INDEX_ADDED: case Status.INDEX_ADDED:
case Status.INDEX_COPIED: case Status.INDEX_COPIED:
case Status.INDEX_RENAMED: case Status.INDEX_RENAMED:
return this.getURI(resource.resourceUri, ''); return toGitUri(resource.resourceUri, '');
case Status.INDEX_DELETED: case Status.INDEX_DELETED:
case Status.DELETED: case Status.DELETED:
return this.getURI(resource.resourceUri, 'HEAD'); return toGitUri(resource.resourceUri, 'HEAD');
case Status.DELETED_BY_US: case Status.DELETED_BY_US:
return this.getURI(resource.resourceUri, '~3'); return toGitUri(resource.resourceUri, '~3');
case Status.DELETED_BY_THEM: case Status.DELETED_BY_THEM:
return this.getURI(resource.resourceUri, '~2'); return toGitUri(resource.resourceUri, '~2');
case Status.MODIFIED: case Status.MODIFIED:
case Status.UNTRACKED: case Status.UNTRACKED:
@@ -453,7 +420,7 @@ export class CommandCenter {
} }
@command('git.clone') @command('git.clone')
async clone(url?: string): Promise<void> { async clone(url?: string, parentPath?: string): Promise<void> {
if (!url) { if (!url) {
url = await window.showInputBox({ url = await window.showInputBox({
prompt: localize('repourl', "Repository URL"), prompt: localize('repourl', "Repository URL"),
@@ -473,31 +440,33 @@ export class CommandCenter {
url = url.trim().replace(/^git\s+clone\s+/, ''); url = url.trim().replace(/^git\s+clone\s+/, '');
const config = workspace.getConfiguration('git'); if (!parentPath) {
let defaultCloneDirectory = config.get<string>('defaultCloneDirectory') || os.homedir(); const config = workspace.getConfiguration('git');
defaultCloneDirectory = defaultCloneDirectory.replace(/^~/, os.homedir()); let defaultCloneDirectory = config.get<string>('defaultCloneDirectory') || os.homedir();
defaultCloneDirectory = defaultCloneDirectory.replace(/^~/, os.homedir());
const uris = await window.showOpenDialog({ const uris = await window.showOpenDialog({
canSelectFiles: false, canSelectFiles: false,
canSelectFolders: true, canSelectFolders: true,
canSelectMany: false, canSelectMany: false,
defaultUri: Uri.file(defaultCloneDirectory), defaultUri: Uri.file(defaultCloneDirectory),
openLabel: localize('selectFolder', "Select Repository Location") openLabel: localize('selectFolder', "Select Repository Location")
}); });
if (!uris || uris.length === 0) { if (!uris || uris.length === 0) {
/* __GDPR__ /* __GDPR__
"clone" : { "clone" : {
"outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
} }
*/ */
this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'no_directory' }); this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'no_directory' });
return; return;
}
const uri = uris[0];
parentPath = uri.fsPath;
} }
const uri = uris[0];
const parentPath = uri.fsPath;
try { try {
const opts = { const opts = {
location: ProgressLocation.Notification, location: ProgressLocation.Notification,
@@ -507,7 +476,7 @@ export class CommandCenter {
const repositoryPath = await window.withProgress( const repositoryPath = await window.withProgress(
opts, opts,
(progress, token) => this.git.clone(url!, parentPath, progress, token) (progress, token) => this.git.clone(url!, parentPath!, progress, token)
); );
let message = localize('proposeopen', "Would you like to open the cloned repository?"); let message = localize('proposeopen', "Would you like to open the cloned repository?");
@@ -686,7 +655,7 @@ export class CommandCenter {
let uris: Uri[] | undefined; let uris: Uri[] | undefined;
if (arg instanceof Uri) { if (arg instanceof Uri) {
if (arg.scheme === 'git') { if (isGitUri(arg)) {
uris = [Uri.file(fromGitUri(arg).path)]; uris = [Uri.file(fromGitUri(arg).path)];
} else if (arg.scheme === 'file') { } else if (arg.scheme === 'file') {
uris = [arg]; uris = [arg];
@@ -765,7 +734,7 @@ export class CommandCenter {
return; return;
} }
const HEAD = await this.getLeftResource(resource); const HEAD = this.getLeftResource(resource);
const basename = path.basename(resource.resourceUri.fsPath); const basename = path.basename(resource.resourceUri.fsPath);
const title = `${basename} (HEAD)`; const title = `${basename} (HEAD)`;
@@ -866,7 +835,8 @@ export class CommandCenter {
} }
const workingTree = selection.filter(s => s.resourceGroupType === ResourceGroupType.WorkingTree); const workingTree = selection.filter(s => s.resourceGroupType === ResourceGroupType.WorkingTree);
const scmResources = [...workingTree, ...resolved, ...unresolved]; const untracked = selection.filter(s => s.resourceGroupType === ResourceGroupType.Untracked);
const scmResources = [...workingTree, ...untracked, ...resolved, ...unresolved];
this.outputChannel.appendLine(`git.stage.scmResources ${scmResources.length}`); this.outputChannel.appendLine(`git.stage.scmResources ${scmResources.length}`);
if (!scmResources.length) { if (!scmResources.length) {
@@ -907,7 +877,9 @@ export class CommandCenter {
} }
} }
await repository.add([]); const config = workspace.getConfiguration('git', Uri.file(repository.root));
const untrackedChanges = config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges');
await repository.add([], untrackedChanges === 'mixed' ? undefined : { update: true });
} }
private async _stageDeletionConflict(repository: Repository, uri: Uri): Promise<void> { private async _stageDeletionConflict(repository: Repository, uri: Uri): Promise<void> {
@@ -945,6 +917,24 @@ export class CommandCenter {
} }
} }
@command('git.stageAllTracked', { repository: true })
async stageAllTracked(repository: Repository): Promise<void> {
const resources = repository.workingTreeGroup.resourceStates
.filter(r => r.type !== Status.UNTRACKED && r.type !== Status.IGNORED);
const uris = resources.map(r => r.resourceUri);
await repository.add(uris);
}
@command('git.stageAllUntracked', { repository: true })
async stageAllUntracked(repository: Repository): Promise<void> {
const resources = [...repository.workingTreeGroup.resourceStates, ...repository.untrackedGroup.resourceStates]
.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED);
const uris = resources.map(r => r.resourceUri);
await repository.add(uris);
}
@command('git.stageChange') @command('git.stageChange')
async stageChange(uri: Uri, changes: LineChange[], index: number): Promise<void> { async stageChange(uri: Uri, changes: LineChange[], index: number): Promise<void> {
const textEditor = window.visibleTextEditors.filter(e => e.document.uri.toString() === uri.toString())[0]; const textEditor = window.visibleTextEditors.filter(e => e.document.uri.toString() === uri.toString())[0];
@@ -1090,7 +1080,7 @@ export class CommandCenter {
const modifiedDocument = textEditor.document; const modifiedDocument = textEditor.document;
const modifiedUri = modifiedDocument.uri; const modifiedUri = modifiedDocument.uri;
if (modifiedUri.scheme !== 'git') { if (!isGitUri(modifiedUri)) {
return; return;
} }
@@ -1131,8 +1121,8 @@ export class CommandCenter {
resourceStates = [resource]; resourceStates = [resource];
} }
const scmResources = resourceStates const scmResources = resourceStates.filter(s => s instanceof Resource
.filter(s => s instanceof Resource && s.resourceGroupType === ResourceGroupType.WorkingTree) as Resource[]; && (s.resourceGroupType === ResourceGroupType.WorkingTree || s.resourceGroupType === ResourceGroupType.Untracked)) as Resource[];
if (!scmResources.length) { if (!scmResources.length) {
return; return;
@@ -1189,41 +1179,11 @@ export class CommandCenter {
const untrackedResources = resources.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED); const untrackedResources = resources.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED);
if (untrackedResources.length === 0) { if (untrackedResources.length === 0) {
const message = resources.length === 1 await this._cleanTrackedChanges(repository, resources);
? localize('confirm discard all single', "Are you sure you want to discard changes in {0}?", path.basename(resources[0].resourceUri.fsPath))
: localize('confirm discard all', "Are you sure you want to discard ALL changes in {0} files?\nThis is IRREVERSIBLE!\nYour current working set will be FOREVER LOST.", resources.length);
const yes = resources.length === 1
? localize('discardAll multiple', "Discard 1 File")
: localize('discardAll', "Discard All {0} Files", resources.length);
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
return;
} else if (resources.length === 1) { } else if (resources.length === 1) {
const message = localize('confirm delete', "Are you sure you want to DELETE {0}?\nThis is IRREVERSIBLE!\nThis file will be FOREVER LOST.", path.basename(resources[0].resourceUri.fsPath)); await this._cleanUntrackedChange(repository, resources[0]);
const yes = localize('delete file', "Delete file");
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
} else if (trackedResources.length === 0) { } else if (trackedResources.length === 0) {
const message = localize('confirm delete multiple', "Are you sure you want to DELETE {0} files?", resources.length); await this._cleanUntrackedChanges(repository, resources);
const yes = localize('delete files', "Delete Files");
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
} else { // resources.length > 1 && untrackedResources.length > 0 && trackedResources.length > 0 } else { // resources.length > 1 && untrackedResources.length > 0 && trackedResources.length > 0
const untrackedMessage = untrackedResources.length === 1 const untrackedMessage = untrackedResources.length === 1
? localize('there are untracked files single', "The following untracked file will be DELETED FROM DISK if discarded: {0}.", path.basename(untrackedResources[0].resourceUri.fsPath)) ? localize('there are untracked files single', "The following untracked file will be DELETED FROM DISK if discarded: {0}.", path.basename(untrackedResources[0].resourceUri.fsPath))
@@ -1248,6 +1208,74 @@ export class CommandCenter {
} }
} }
@command('git.cleanAllTracked', { repository: true })
async cleanAllTracked(repository: Repository): Promise<void> {
const resources = repository.workingTreeGroup.resourceStates
.filter(r => r.type !== Status.UNTRACKED && r.type !== Status.IGNORED);
if (resources.length === 0) {
return;
}
await this._cleanTrackedChanges(repository, resources);
}
@command('git.cleanAllUntracked', { repository: true })
async cleanAllUntracked(repository: Repository): Promise<void> {
const resources = [...repository.workingTreeGroup.resourceStates, ...repository.untrackedGroup.resourceStates]
.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED);
if (resources.length === 0) {
return;
}
if (resources.length === 1) {
await this._cleanUntrackedChange(repository, resources[0]);
} else {
await this._cleanUntrackedChanges(repository, resources);
}
}
private async _cleanTrackedChanges(repository: Repository, resources: Resource[]): Promise<void> {
const message = resources.length === 1
? localize('confirm discard all single', "Are you sure you want to discard changes in {0}?", path.basename(resources[0].resourceUri.fsPath))
: localize('confirm discard all', "Are you sure you want to discard ALL changes in {0} files?\nThis is IRREVERSIBLE!\nYour current working set will be FOREVER LOST.", resources.length);
const yes = resources.length === 1
? localize('discardAll multiple', "Discard 1 File")
: localize('discardAll', "Discard All {0} Files", resources.length);
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
}
private async _cleanUntrackedChange(repository: Repository, resource: Resource): Promise<void> {
const message = localize('confirm delete', "Are you sure you want to DELETE {0}?\nThis is IRREVERSIBLE!\nThis file will be FOREVER LOST.", path.basename(resource.resourceUri.fsPath));
const yes = localize('delete file', "Delete file");
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean([resource.resourceUri]);
}
private async _cleanUntrackedChanges(repository: Repository, resources: Resource[]): Promise<void> {
const message = localize('confirm delete multiple', "Are you sure you want to DELETE {0} files?", resources.length);
const yes = localize('delete files', "Delete Files");
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
}
private async smartCommit( private async smartCommit(
repository: Repository, repository: Repository,
getCommitMessage: () => Promise<string | undefined>, getCommitMessage: () => Promise<string | undefined>,
@@ -1271,7 +1299,7 @@ export class CommandCenter {
if (promptToSaveFilesBeforeCommit === 'staged' || repository.indexGroup.resourceStates.length > 0) { if (promptToSaveFilesBeforeCommit === 'staged' || repository.indexGroup.resourceStates.length > 0) {
documents = documents documents = documents
.filter(d => repository.indexGroup.resourceStates.some(s => s.resourceUri.path === d.uri.fsPath)); .filter(d => repository.indexGroup.resourceStates.some(s => pathEquals(s.resourceUri.fsPath, d.uri.fsPath)));
} }
if (documents.length > 0) { if (documents.length > 0) {
@@ -1356,6 +1384,10 @@ export class CommandCenter {
opts.all = 'tracked'; opts.all = 'tracked';
} }
if (opts.all && config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges') !== 'mixed') {
opts.all = 'tracked';
}
await repository.commit(message, opts); await repository.commit(message, opts);
const postCommitCommand = config.get<'none' | 'push' | 'sync'>('postCommitCommand'); const postCommitCommand = config.get<'none' | 'push' | 'sync'>('postCommitCommand');
@@ -1376,6 +1408,7 @@ export class CommandCenter {
const message = repository.inputBox.value; const message = repository.inputBox.value;
const getCommitMessage = async () => { const getCommitMessage = async () => {
let _message: string | undefined = message; let _message: string | undefined = message;
if (!_message) { if (!_message) {
let value: string | undefined = undefined; let value: string | undefined = undefined;
@@ -1400,7 +1433,7 @@ export class CommandCenter {
}); });
} }
return _message ? repository.cleanUpCommitEditMessage(_message) : _message; return _message;
}; };
const didCommit = await this.smartCommit(repository, getCommitMessage, opts); const didCommit = await this.smartCommit(repository, getCommitMessage, opts);
@@ -1485,7 +1518,7 @@ export class CommandCenter {
if (commit.parents.length > 1) { if (commit.parents.length > 1) {
const yes = localize('undo commit', "Undo merge commit"); const yes = localize('undo commit', "Undo merge commit");
const result = await window.showWarningMessage(localize('merge commit', "The last commit was a merge commit. Are you sure you want to undo it?"), yes); const result = await window.showWarningMessage(localize('merge commit', "The last commit was a merge commit. Are you sure you want to undo it?"), { modal: true }, yes);
if (result !== yes) { if (result !== yes) {
return; return;
@@ -1705,6 +1738,26 @@ export class CommandCenter {
await repository.tag(name, message); await repository.tag(name, message);
} }
@command('git.deleteTag', { repository: true })
async deleteTag(repository: Repository): Promise<void> {
const picks = repository.refs.filter(ref => ref.type === RefType.Tag)
.map(ref => new TagItem(ref));
if (picks.length === 0) {
window.showWarningMessage(localize('no tags', "This repository has no tags."));
return;
}
const placeHolder = localize('select a tag to delete', 'Select a tag to delete');
const choice = await window.showQuickPick(picks, { placeHolder });
if (!choice) {
return;
}
await repository.deleteTag(choice.label);
}
@command('git.fetch', { repository: true }) @command('git.fetch', { repository: true })
async fetch(repository: Repository): Promise<void> { async fetch(repository: Repository): Promise<void> {
if (repository.remotes.length === 0) { if (repository.remotes.length === 0) {
@@ -2073,9 +2126,14 @@ export class CommandCenter {
return; return;
} }
const branchName = repository.HEAD && repository.HEAD.name || '';
if (remotes.length === 1) {
return await repository.pushTo(remotes[0].name, branchName, true);
}
const addRemote = new AddRemoteItem(this); const addRemote = new AddRemoteItem(this);
const picks = [...repository.remotes.map(r => ({ label: r.name, description: r.pushUrl })), addRemote]; const picks = [...repository.remotes.map(r => ({ label: r.name, description: r.pushUrl })), addRemote];
const branchName = repository.HEAD && repository.HEAD.name || '';
const placeHolder = localize('pick remote', "Pick a remote to publish the branch '{0}' to:", branchName); const placeHolder = localize('pick remote', "Pick a remote to publish the branch '{0}' to:", branchName);
const choice = await window.showQuickPick(picks, { placeHolder }); const choice = await window.showQuickPick(picks, { placeHolder });
@@ -2133,7 +2191,8 @@ export class CommandCenter {
} }
private async _stash(repository: Repository, includeUntracked = false): Promise<void> { private async _stash(repository: Repository, includeUntracked = false): Promise<void> {
const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0; const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0
&& (!includeUntracked || repository.untrackedGroup.resourceStates.length === 0);
const noStagedChanges = repository.indexGroup.resourceStates.length === 0; const noStagedChanges = repository.indexGroup.resourceStates.length === 0;
if (noUnstagedChanges && noStagedChanges) { if (noUnstagedChanges && noStagedChanges) {
@@ -2215,6 +2274,18 @@ export class CommandCenter {
await repository.applyStash(); await repository.applyStash();
} }
@command('git.stashDrop', { repository: true })
async stashDrop(repository: Repository): Promise<void> {
const placeHolder = localize('pick stash to drop', "Pick a stash to drop");
const stash = await this.pickStash(repository, placeHolder);
if (!stash) {
return;
}
await repository.dropStash(stash.index);
}
private async pickStash(repository: Repository, placeHolder: string): Promise<Stash | undefined> { private async pickStash(repository: Repository, placeHolder: string): Promise<Stash | undefined> {
const stashes = await repository.getStashes(); const stashes = await repository.getStashes();
@@ -2352,7 +2423,7 @@ export class CommandCenter {
return undefined; return undefined;
} }
if (uri.scheme === 'git') { if (isGitUri(uri)) {
const { path } = fromGitUri(uri); const { path } = fromGitUri(uri);
uri = Uri.file(path); uri = Uri.file(path);
} }

View File

@@ -147,4 +147,4 @@ export class GitContentProvider {
dispose(): void { dispose(): void {
this.disposables.forEach(d => d.dispose()); this.disposables.forEach(d => d.dispose());
} }
} }

View File

@@ -113,6 +113,7 @@ class GitDecorationProvider implements DecorationProvider {
this.collectSubmoduleDecorationData(newDecorations); this.collectSubmoduleDecorationData(newDecorations);
this.collectDecorationData(this.repository.indexGroup, newDecorations); this.collectDecorationData(this.repository.indexGroup, newDecorations);
this.collectDecorationData(this.repository.untrackedGroup, newDecorations);
this.collectDecorationData(this.repository.workingTreeGroup, newDecorations); this.collectDecorationData(this.repository.workingTreeGroup, newDecorations);
this.collectDecorationData(this.repository.mergeGroup, newDecorations); this.collectDecorationData(this.repository.mergeGroup, newDecorations);

View File

@@ -5,8 +5,6 @@
import * as jschardet from 'jschardet'; import * as jschardet from 'jschardet';
jschardet.Constants.MINIMUM_THRESHOLD = 0.2;
function detectEncodingByBOM(buffer: Buffer): string | null { function detectEncodingByBOM(buffer: Buffer): string | null {
if (!buffer || buffer.length < 2) { if (!buffer || buffer.length < 2) {
return null; return null;

View File

@@ -0,0 +1,199 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { workspace, Uri, Disposable, Event, EventEmitter, window, FileSystemProvider, FileChangeEvent, FileStat, FileType, FileChangeType, FileSystemError } from 'vscode';
import { debounce, throttle } from './decorators';
import { fromGitUri, toGitUri } from './uri';
import { Model, ModelChangeEvent, OriginalResourceChangeEvent } from './model';
import { filterEvent, eventToPromise, isDescendant, pathEquals, EmptyDisposable } from './util';
interface CacheRow {
uri: Uri;
timestamp: number;
}
const THREE_MINUTES = 1000 * 60 * 3;
const FIVE_MINUTES = 1000 * 60 * 5;
export class GitFileSystemProvider implements FileSystemProvider {
private _onDidChangeFile = new EventEmitter<FileChangeEvent[]>();
readonly onDidChangeFile: Event<FileChangeEvent[]> = this._onDidChangeFile.event;
private changedRepositoryRoots = new Set<string>();
private cache = new Map<string, CacheRow>();
private mtime = new Date().getTime();
private disposables: Disposable[] = [];
constructor(private model: Model) {
this.disposables.push(
model.onDidChangeRepository(this.onDidChangeRepository, this),
model.onDidChangeOriginalResource(this.onDidChangeOriginalResource, this),
workspace.registerFileSystemProvider('gitfs', this, { isReadonly: true, isCaseSensitive: true }),
workspace.registerResourceLabelFormatter({
scheme: 'gitfs',
formatting: {
label: '${path} (git)',
separator: '/'
}
})
);
setInterval(() => this.cleanup(), FIVE_MINUTES);
}
private onDidChangeRepository({ repository }: ModelChangeEvent): void {
this.changedRepositoryRoots.add(repository.root);
this.eventuallyFireChangeEvents();
}
private onDidChangeOriginalResource({ uri }: OriginalResourceChangeEvent): void {
if (uri.scheme !== 'file') {
return;
}
const gitUri = toGitUri(uri, '', { replaceFileExtension: true });
this.mtime = new Date().getTime();
this._onDidChangeFile.fire([{ type: FileChangeType.Changed, uri: gitUri }]);
}
@debounce(1100)
private eventuallyFireChangeEvents(): void {
this.fireChangeEvents();
}
@throttle
private async fireChangeEvents(): Promise<void> {
if (!window.state.focused) {
const onDidFocusWindow = filterEvent(window.onDidChangeWindowState, e => e.focused);
await eventToPromise(onDidFocusWindow);
}
const events: FileChangeEvent[] = [];
for (const { uri } of this.cache.values()) {
const fsPath = uri.fsPath;
for (const root of this.changedRepositoryRoots) {
if (isDescendant(root, fsPath)) {
events.push({ type: FileChangeType.Changed, uri });
break;
}
}
}
if (events.length > 0) {
this.mtime = new Date().getTime();
this._onDidChangeFile.fire(events);
}
this.changedRepositoryRoots.clear();
}
private cleanup(): void {
const now = new Date().getTime();
const cache = new Map<string, CacheRow>();
for (const row of this.cache.values()) {
const { path } = fromGitUri(row.uri);
const isOpen = workspace.textDocuments
.filter(d => d.uri.scheme === 'file')
.some(d => pathEquals(d.uri.fsPath, path));
if (isOpen || now - row.timestamp < THREE_MINUTES) {
cache.set(row.uri.toString(), row);
} else {
// TODO: should fire delete events?
}
}
this.cache = cache;
}
watch(): Disposable {
return EmptyDisposable;
}
stat(uri: Uri): FileStat {
const { submoduleOf } = fromGitUri(uri);
const repository = submoduleOf ? this.model.getRepository(submoduleOf) : this.model.getRepository(uri);
if (!repository) {
throw FileSystemError.FileNotFound();
}
return { type: FileType.File, size: 0, mtime: this.mtime, ctime: 0 };
}
readDirectory(): Thenable<[string, FileType][]> {
throw new Error('Method not implemented.');
}
createDirectory(): void {
throw new Error('Method not implemented.');
}
async readFile(uri: Uri): Promise<Uint8Array> {
let { path, ref, submoduleOf } = fromGitUri(uri);
if (submoduleOf) {
const repository = this.model.getRepository(submoduleOf);
if (!repository) {
throw FileSystemError.FileNotFound();
}
const encoder = new TextEncoder();
if (ref === 'index') {
return encoder.encode(await repository.diffIndexWithHEAD(path));
} else {
return encoder.encode(await repository.diffWithHEAD(path));
}
}
const repository = this.model.getRepository(uri);
if (!repository) {
throw FileSystemError.FileNotFound();
}
const timestamp = new Date().getTime();
const cacheValue: CacheRow = { uri, timestamp };
this.cache.set(uri.toString(), cacheValue);
if (ref === '~') {
const fileUri = Uri.file(path);
const uriString = fileUri.toString();
const [indexStatus] = repository.indexGroup.resourceStates.filter(r => r.resourceUri.toString() === uriString);
ref = indexStatus ? '' : 'HEAD';
} else if (/^~\d$/.test(ref)) {
ref = `:${ref[1]}`;
}
try {
return await repository.buffer(ref, path);
} catch (err) {
return new Uint8Array(0);
}
}
writeFile(): void {
throw new Error('Method not implemented.');
}
delete(): void {
throw new Error('Method not implemented.');
}
rename(): void {
throw new Error('Method not implemented.');
}
dispose(): void {
this.disposables.forEach(d => d.dispose());
}
}

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as fs from 'fs'; import { promises as fs, exists } from 'fs';
import * as path from 'path'; import * as path from 'path';
import * as os from 'os'; import * as os from 'os';
import * as cp from 'child_process'; import * as cp from 'child_process';
@@ -11,7 +11,7 @@ import * as which from 'which';
import { EventEmitter } from 'events'; import { EventEmitter } from 'events';
import iconv = require('iconv-lite'); import iconv = require('iconv-lite');
import * as filetype from 'file-type'; import * as filetype from 'file-type';
import { assign, groupBy, denodeify, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter } from './util'; import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter } from './util';
import { CancellationToken, Progress } from 'vscode'; import { CancellationToken, Progress } from 'vscode';
import { URI } from 'vscode-uri'; import { URI } from 'vscode-uri';
import { detectEncoding } from './encoding'; import { detectEncoding } from './encoding';
@@ -22,8 +22,6 @@ import { StringDecoder } from 'string_decoder';
// https://github.com/microsoft/vscode/issues/65693 // https://github.com/microsoft/vscode/issues/65693
const MAX_CLI_LENGTH = 30000; const MAX_CLI_LENGTH = 30000;
const readfile = denodeify<string, string | null, string>(fs.readFile);
export interface IGit { export interface IGit {
path: string; path: string;
version: string; version: string;
@@ -196,13 +194,13 @@ async function exec(child: cp.ChildProcess, cancellationToken?: CancellationToke
}), }),
new Promise<Buffer>(c => { new Promise<Buffer>(c => {
const buffers: Buffer[] = []; const buffers: Buffer[] = [];
on(child.stdout, 'data', (b: Buffer) => buffers.push(b)); on(child.stdout!, 'data', (b: Buffer) => buffers.push(b));
once(child.stdout, 'close', () => c(Buffer.concat(buffers))); once(child.stdout!, 'close', () => c(Buffer.concat(buffers)));
}), }),
new Promise<string>(c => { new Promise<string>(c => {
const buffers: Buffer[] = []; const buffers: Buffer[] = [];
on(child.stderr, 'data', (b: Buffer) => buffers.push(b)); on(child.stderr!, 'data', (b: Buffer) => buffers.push(b));
once(child.stderr, 'close', () => c(Buffer.concat(buffers).toString('utf8'))); once(child.stderr!, 'close', () => c(Buffer.concat(buffers).toString('utf8')));
}) })
]) as Promise<[number, Buffer, string]>; ]) as Promise<[number, Buffer, string]>;
@@ -350,7 +348,7 @@ export class Git {
let folderPath = path.join(parentPath, folderName); let folderPath = path.join(parentPath, folderName);
let count = 1; let count = 1;
while (count < 20 && await new Promise(c => fs.exists(folderPath, c))) { while (count < 20 && await new Promise(c => exists(folderPath, c))) {
folderName = `${baseFolderName}-${count++}`; folderName = `${baseFolderName}-${count++}`;
folderPath = path.join(parentPath, folderName); folderPath = path.join(parentPath, folderName);
} }
@@ -360,7 +358,7 @@ export class Git {
const onSpawn = (child: cp.ChildProcess) => { const onSpawn = (child: cp.ChildProcess) => {
const decoder = new StringDecoder('utf8'); const decoder = new StringDecoder('utf8');
const lineStream = new byline.LineStream({ encoding: 'utf8' }); const lineStream = new byline.LineStream({ encoding: 'utf8' });
child.stderr.on('data', (buffer: Buffer) => lineStream.write(decoder.write(buffer))); child.stderr!.on('data', (buffer: Buffer) => lineStream.write(decoder.write(buffer)));
let totalProgress = 0; let totalProgress = 0;
let previousProgress = 0; let previousProgress = 0;
@@ -438,7 +436,7 @@ export class Git {
} }
if (options.input) { if (options.input) {
child.stdin.end(options.input, 'utf8'); child.stdin!.end(options.input, 'utf8');
} }
const bufferResult = await exec(child, options.cancellationToken); const bufferResult = await exec(child, options.cancellationToken);
@@ -763,9 +761,10 @@ export class Repository {
async log(options?: LogOptions): Promise<Commit[]> { async log(options?: LogOptions): Promise<Commit[]> {
const maxEntries = options && typeof options.maxEntries === 'number' && options.maxEntries > 0 ? options.maxEntries : 32; const maxEntries = options && typeof options.maxEntries === 'number' && options.maxEntries > 0 ? options.maxEntries : 32;
const args = ['log', '-' + maxEntries, `--pretty=format:${COMMIT_FORMAT}%x00%x00`]; const args = ['log', '-' + maxEntries, `--pretty=format:${COMMIT_FORMAT}%x00%x00`];
const gitResult = await this.run(args); const gitResult = await this.run(args);
if (gitResult.exitCode) { if (gitResult.exitCode) {
// An empty repo. // An empty repo
return []; return [];
} }
@@ -882,7 +881,7 @@ export class Repository {
async detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> { async detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> {
const child = await this.stream(['show', object]); const child = await this.stream(['show', object]);
const buffer = await readBytes(child.stdout, 4100); const buffer = await readBytes(child.stdout!, 4100);
try { try {
child.kill(); child.kill();
@@ -1151,7 +1150,7 @@ export class Repository {
async stage(path: string, data: string): Promise<void> { async stage(path: string, data: string): Promise<void> {
const child = this.stream(['hash-object', '--stdin', '-w', '--path', path], { stdio: [null, null, null] }); const child = this.stream(['hash-object', '--stdin', '-w', '--path', path], { stdio: [null, null, null] });
child.stdin.end(data, 'utf8'); child.stdin!.end(data, 'utf8');
const { exitCode, stdout } = await exec(child); const { exitCode, stdout } = await exec(child);
const hash = stdout.toString('utf8'); const hash = stdout.toString('utf8');
@@ -1163,11 +1162,12 @@ export class Repository {
}); });
} }
const treeish = await this.getCommit('HEAD').then(() => 'HEAD', () => '');
let mode: string; let mode: string;
let add: string = ''; let add: string = '';
try { try {
const details = await this.getObjectDetails('HEAD', path); const details = await this.getObjectDetails(treeish, path);
mode = details.mode; mode = details.mode;
} catch (err) { } catch (err) {
if (err.gitErrorCode !== GitErrorCodes.UnknownPath) { if (err.gitErrorCode !== GitErrorCodes.UnknownPath) {
@@ -1327,6 +1327,11 @@ export class Repository {
await this.run(args); await this.run(args);
} }
async deleteTag(name: string): Promise<void> {
let args = ['tag', '-d', name];
await this.run(args);
}
async clean(paths: string[]): Promise<void> { async clean(paths: string[]): Promise<void> {
const pathsByGroup = groupBy(paths, p => path.dirname(p)); const pathsByGroup = groupBy(paths, p => path.dirname(p));
const groups = Object.keys(pathsByGroup).map(k => pathsByGroup[k]); const groups = Object.keys(pathsByGroup).map(k => pathsByGroup[k]);
@@ -1592,6 +1597,24 @@ export class Repository {
} }
} }
async dropStash(index?: number): Promise<void> {
const args = ['stash', 'drop'];
if (typeof index === 'number') {
args.push(`stash@{${index}}`);
}
try {
await this.run(args);
} catch (err) {
if (/No stash found/.test(err.stderr || '')) {
err.gitErrorCode = GitErrorCodes.NoStashFound;
}
throw err;
}
}
getStatus(limit = 5000): Promise<{ status: IFileStatus[]; didHitLimit: boolean; }> { getStatus(limit = 5000): Promise<{ status: IFileStatus[]; didHitLimit: boolean; }> {
return new Promise<{ status: IFileStatus[]; didHitLimit: boolean; }>((c, e) => { return new Promise<{ status: IFileStatus[]; didHitLimit: boolean; }>((c, e) => {
const parser = new GitStatusParser(); const parser = new GitStatusParser();
@@ -1618,19 +1641,19 @@ export class Repository {
if (parser.status.length > limit) { if (parser.status.length > limit) {
child.removeListener('exit', onExit); child.removeListener('exit', onExit);
child.stdout.removeListener('data', onStdoutData); child.stdout!.removeListener('data', onStdoutData);
child.kill(); child.kill();
c({ status: parser.status.slice(0, limit), didHitLimit: true }); c({ status: parser.status.slice(0, limit), didHitLimit: true });
} }
}; };
child.stdout.setEncoding('utf8'); child.stdout!.setEncoding('utf8');
child.stdout.on('data', onStdoutData); child.stdout!.on('data', onStdoutData);
const stderrData: string[] = []; const stderrData: string[] = [];
child.stderr.setEncoding('utf8'); child.stderr!.setEncoding('utf8');
child.stderr.on('data', raw => stderrData.push(raw as string)); child.stderr!.on('data', raw => stderrData.push(raw as string));
child.on('error', cpErrorHandler(e)); child.on('error', cpErrorHandler(e));
child.on('exit', onExit); child.on('exit', onExit);
@@ -1789,18 +1812,17 @@ export class Repository {
} }
} }
cleanupCommitEditMessage(message: string): string { // TODO: Support core.commentChar
//TODO: Support core.commentChar stripCommitMessageComments(message: string): string {
return message.replace(/^\s*#.*$\n?/gm, '').trim(); return message.replace(/^\s*#.*$\n?/gm, '').trim();
} }
async getMergeMessage(): Promise<string | undefined> { async getMergeMessage(): Promise<string | undefined> {
const mergeMsgPath = path.join(this.repositoryRoot, '.git', 'MERGE_MSG'); const mergeMsgPath = path.join(this.repositoryRoot, '.git', 'MERGE_MSG');
try { try {
const raw = await readfile(mergeMsgPath, 'utf8'); const raw = await fs.readFile(mergeMsgPath, 'utf8');
return raw.trim(); return this.stripCommitMessageComments(raw);
} catch { } catch {
return undefined; return undefined;
} }
@@ -1823,9 +1845,8 @@ export class Repository {
templatePath = path.join(this.repositoryRoot, templatePath); templatePath = path.join(this.repositoryRoot, templatePath);
} }
const raw = await readfile(templatePath, 'utf8'); const raw = await fs.readFile(templatePath, 'utf8');
return raw.trim(); return this.stripCommitMessageComments(raw);
} catch (err) { } catch (err) {
return ''; return '';
} }
@@ -1848,7 +1869,7 @@ export class Repository {
const gitmodulesPath = path.join(this.root, '.gitmodules'); const gitmodulesPath = path.join(this.root, '.gitmodules');
try { try {
const gitmodulesRaw = await readfile(gitmodulesPath, 'utf8'); const gitmodulesRaw = await fs.readFile(gitmodulesPath, 'utf8');
return parseGitmodules(gitmodulesRaw); return parseGitmodules(gitmodulesRaw);
} catch (err) { } catch (err) {
if (/ENOENT/.test(err.message)) { if (/ENOENT/.test(err.message)) {

Some files were not shown because too many files have changed in this diff Show More