mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
Merge branch 'master' into runNpmFromContextMenu
This commit is contained in:
commit
846fefe1b7
8
.github/commands.yml
vendored
8
.github/commands.yml
vendored
|
@ -39,9 +39,17 @@
|
|||
action: 'close',
|
||||
comment: "This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details [here](https://aka.ms/vscode-out-of-scope). If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.\n\nIf you wonder what we are up to, please see our [roadmap](https://aka.ms/vscoderoadmap) and [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nThanks for your understanding and happy coding!"
|
||||
},
|
||||
{
|
||||
type: 'comment',
|
||||
name: 'causedByExtension',
|
||||
allowUsers: ['cleidigh', 'usernamehw', 'gjsjohnmurray', 'IllusionMH'],
|
||||
action: 'updateLabels',
|
||||
addLabel: '*caused-by-extension'
|
||||
},
|
||||
{
|
||||
type: 'label',
|
||||
name: '*caused-by-extension',
|
||||
allowTriggerByBot: true,
|
||||
action: 'close',
|
||||
comment: "This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the [marketplace](https://aka.ms/vscodemarketplace) for VS Code. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
|
||||
},
|
||||
|
|
6
.prettierrc.json
Normal file
6
.prettierrc.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"useTabs": true,
|
||||
"printWidth": 120,
|
||||
"semi": true,
|
||||
"singleQuote": true
|
||||
}
|
7
.vscode/launch.json
vendored
7
.vscode/launch.json
vendored
|
@ -216,7 +216,10 @@
|
|||
"cwd": "${workspaceFolder}",
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
],
|
||||
"env": {
|
||||
"MOCHA_COLORS": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
|
@ -279,4 +282,4 @@
|
|||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -61,4 +61,4 @@
|
|||
"msjsdiag.debugger-for-chrome": "workspace"
|
||||
},
|
||||
"files.insertFinalNewline": true
|
||||
}
|
||||
}
|
||||
|
|
6
.vscode/tasks.json
vendored
6
.vscode/tasks.json
vendored
|
@ -5,7 +5,10 @@
|
|||
"type": "npm",
|
||||
"script": "watch",
|
||||
"label": "Build VS Code",
|
||||
"group": "build",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
|
@ -82,6 +85,5 @@
|
|||
"task": "hygiene",
|
||||
"problemMatcher": []
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
|
|
2
.yarnrc
2
.yarnrc
|
@ -1,3 +1,3 @@
|
|||
disturl "https://atom.io/download/electron"
|
||||
target "4.2.9"
|
||||
target "4.2.10"
|
||||
runtime "electron"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
## The Repository
|
||||
|
||||
This repository ("`Code - OSS`") is where we (Microsoft) develop the [Visual Studio Code](https://code.visualstudio.com) product. Not only do we work on code and issues here, we also publish our roadmap, monthly iteration plans, and our endgame plans. The source code here is available to everyone under the standard [MIT license](https://github.com/microsoft/vscode/blob/master/LICENSE.txt).
|
||||
This repository ("`Code - OSS`") is where we (Microsoft) develop the [Visual Studio Code](https://code.visualstudio.com) product. Not only do we work on code and issues here, we also publish our [roadmap](https://github.com/microsoft/vscode/wiki/Roadmap), [monthly iteration plans](https://github.com/microsoft/vscode/wiki/Iteration-Plans), and our [endgame plans](https://github.com/microsoft/vscode/wiki/Running-the-Endgame). This source code is available to everyone under the standard [MIT license](https://github.com/microsoft/vscode/blob/master/LICENSE.txt).
|
||||
|
||||
## Visual Studio Code
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
2019-07-11T05:47:05.444Z
|
||||
2019-08-30T20:24:23.714Z
|
||||
|
|
9
build/azure-pipelines/common/publish-webview.sh
Executable file
9
build/azure-pipelines/common/publish-webview.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
REPO="$(pwd)"
|
||||
|
||||
# Publish webview contents
|
||||
PACKAGEJSON="$REPO/package.json"
|
||||
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
|
||||
|
||||
node build/azure-pipelines/common/publish-webview.js "$REPO/src/vs/workbench/contrib/webview/browser/pre/"
|
87
build/azure-pipelines/common/publish-webview.ts
Normal file
87
build/azure-pipelines/common/publish-webview.ts
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azure from 'azure-storage';
|
||||
import * as mime from 'mime';
|
||||
import * as minimist from 'minimist';
|
||||
import { basename, join } from 'path';
|
||||
|
||||
const fileNames = [
|
||||
'fake.html',
|
||||
'host.js',
|
||||
'index.html',
|
||||
'main.js',
|
||||
'service-worker.js'
|
||||
];
|
||||
|
||||
async function assertContainer(blobService: azure.BlobService, container: string): Promise<void> {
|
||||
await new Promise((c, e) => blobService.createContainerIfNotExists(container, { publicAccessLevel: 'blob' }, err => err ? e(err) : c()));
|
||||
}
|
||||
|
||||
async function doesBlobExist(blobService: azure.BlobService, container: string, blobName: string): Promise<boolean | undefined> {
|
||||
const existsResult = await new Promise<azure.BlobService.BlobResult>((c, e) => blobService.doesBlobExist(container, blobName, (err, r) => err ? e(err) : c(r)));
|
||||
return existsResult.exists;
|
||||
}
|
||||
|
||||
async function uploadBlob(blobService: azure.BlobService, container: 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(container, blobName, file, blobOptions, err => err ? e(err) : c()));
|
||||
}
|
||||
|
||||
async function publish(commit: string, files: readonly string[]): Promise<void> {
|
||||
|
||||
console.log('Publishing...');
|
||||
console.log('Commit:', commit);
|
||||
const storageAccount = process.env['AZURE_WEBVIEW_STORAGE_ACCOUNT']!;
|
||||
|
||||
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_WEBVIEW_STORAGE_ACCESS_KEY']!)
|
||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
||||
|
||||
await assertContainer(blobService, commit);
|
||||
|
||||
for (const file of files) {
|
||||
const blobName = basename(file);
|
||||
const blobExists = await doesBlobExist(blobService, commit, blobName);
|
||||
if (blobExists) {
|
||||
console.log(`Blob ${commit}, ${blobName} already exists, not publishing again.`);
|
||||
continue;
|
||||
}
|
||||
console.log('Uploading blob to Azure storage...');
|
||||
await uploadBlob(blobService, commit, blobName, file);
|
||||
}
|
||||
|
||||
console.log('Blobs successfully uploaded.');
|
||||
}
|
||||
|
||||
function main(): void {
|
||||
const commit = process.env['BUILD_SOURCEVERSION'];
|
||||
|
||||
if (!commit) {
|
||||
console.warn('Skipping publish due to missing BUILD_SOURCEVERSION');
|
||||
return;
|
||||
}
|
||||
|
||||
const opts = minimist(process.argv.slice(2));
|
||||
const [directory] = opts._;
|
||||
|
||||
const files = fileNames.map(fileName => join(directory, fileName));
|
||||
|
||||
publish(commit, files).catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
if (process.argv.length < 3) {
|
||||
console.error('Usage: node publish.js <directory>');
|
||||
process.exit(-1);
|
||||
}
|
||||
main();
|
|
@ -9,7 +9,7 @@ steps:
|
|||
vstsFeed: '$(ArtifactFeed)'
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
- script: |
|
||||
yarn --frozen-lockfile
|
||||
displayName: Install Dependencies
|
||||
|
@ -24,8 +24,11 @@ steps:
|
|||
yarn gulp electron-x64
|
||||
displayName: Download Electron
|
||||
- script: |
|
||||
yarn gulp hygiene
|
||||
yarn gulp hygiene --skip-tslint
|
||||
displayName: Run Hygiene Checks
|
||||
- script: |
|
||||
yarn gulp tslint
|
||||
displayName: Run TSLint Checks
|
||||
- script: |
|
||||
yarn monaco-compile-check
|
||||
displayName: Run Monaco Editor Checks
|
||||
|
@ -46,4 +49,4 @@ steps:
|
|||
inputs:
|
||||
testResultsFiles: '*-results.xml'
|
||||
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
|
||||
condition: succeededOrFailed()
|
||||
condition: succeededOrFailed()
|
||||
|
|
|
@ -25,7 +25,7 @@ steps:
|
|||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: 'Azure Key Vault: Get Secrets'
|
||||
|
@ -102,20 +102,28 @@ steps:
|
|||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
- script: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
# to run with these builds instead of running out of sources.
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin" \
|
||||
./scripts/test-integration.sh --build --tfs "Integration Tests"
|
||||
displayName: Run integration tests
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
cd test/smoke
|
||||
yarn compile
|
||||
cd -
|
||||
yarn smoketest --web --headless
|
||||
continueOnError: true
|
||||
displayName: Run web smoke tests
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
# Web Smoke Tests disabled due to https://github.com/microsoft/vscode/issues/80308
|
||||
# - script: |
|
||||
# set -e
|
||||
# cd test/smoke
|
||||
# yarn compile
|
||||
# cd -
|
||||
# yarn smoketest --web --headless
|
||||
# continueOnError: true
|
||||
# displayName: Run web smoke tests
|
||||
# condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
|
@ -31,13 +34,3 @@ steps:
|
|||
git push origin HEAD:electron-6.0.x
|
||||
|
||||
displayName: Sync & Merge Exploration
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
schedules:
|
||||
- cron: "10 5 * * Mon-Fri"
|
||||
displayName: Mon-Fri at 7:10
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
|
|
|
@ -17,7 +17,7 @@ steps:
|
|||
vstsFeed: '$(ArtifactFeed)'
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
- script: |
|
||||
yarn --frozen-lockfile
|
||||
displayName: Install Dependencies
|
||||
|
@ -32,8 +32,11 @@ steps:
|
|||
yarn gulp electron-x64
|
||||
displayName: Download Electron
|
||||
- script: |
|
||||
yarn gulp hygiene
|
||||
yarn gulp hygiene --skip-tslint
|
||||
displayName: Run Hygiene Checks
|
||||
- script: |
|
||||
yarn gulp tslint
|
||||
displayName: Run TSLint Checks
|
||||
- script: |
|
||||
yarn monaco-compile-check
|
||||
displayName: Run Monaco Editor Checks
|
||||
|
|
|
@ -25,7 +25,7 @@ steps:
|
|||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: 'Azure Key Vault: Get Secrets'
|
||||
|
|
|
@ -25,7 +25,7 @@ steps:
|
|||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: 'Azure Key Vault: Get Secrets'
|
||||
|
@ -105,7 +105,14 @@ steps:
|
|||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
- script: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
# to run with these builds instead of running out of sources.
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-x64
|
||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-x64" \
|
||||
DISPLAY=:10 ./scripts/test-integration.sh --build --tfs "Integration Tests"
|
||||
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-linux-x64"
|
||||
displayName: Run integration tests
|
||||
|
|
|
@ -5,7 +5,7 @@ steps:
|
|||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: 'Azure Key Vault: Get Secrets'
|
||||
|
@ -51,4 +51,4 @@ steps:
|
|||
# Publish snap package
|
||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||
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/publish.js "$VSCODE_QUALITY" "linux-snap-x64" package "$SNAP_FILENAME" "$VERSION" true "$SNAP_PATH"
|
||||
|
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
- template: linux/snap-build-linux.yml
|
||||
|
||||
- job: LinuxArmhf
|
||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'), ne(variables['VSCODE_QUALITY'], 'stable'))
|
||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'))
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
variables:
|
||||
|
@ -78,7 +78,7 @@ jobs:
|
|||
- template: linux/product-build-linux-multiarch.yml
|
||||
|
||||
- job: LinuxAlpine
|
||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'), ne(variables['VSCODE_QUALITY'], 'stable'))
|
||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'))
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
variables:
|
||||
|
|
|
@ -20,7 +20,7 @@ steps:
|
|||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
|
@ -87,9 +87,10 @@ steps:
|
|||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp hygiene
|
||||
yarn gulp hygiene --skip-tslint
|
||||
yarn gulp tslint
|
||||
yarn monaco-compile-check
|
||||
displayName: Run hygiene checks
|
||||
displayName: Run hygiene, tslint and monaco compile checks
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
- script: |
|
||||
|
@ -98,6 +99,13 @@ steps:
|
|||
displayName: Extract Telemetry
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
AZURE_WEBVIEW_STORAGE_ACCESS_KEY="$(vscode-webview-storage-key)" \
|
||||
./build/azure-pipelines/common/publish-webview.sh
|
||||
displayName: Publish Webview
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp compile-build
|
||||
|
|
|
@ -13,7 +13,23 @@ steps:
|
|||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
|
||||
- bash: |
|
||||
TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
CHANNEL="G1C14HJ2F"
|
||||
|
||||
if [ "$TAG_VERSION" == "1.999.0" ]; then
|
||||
MESSAGE="<!here>. Someone pushed 1.999.0 tag. Please delete it ASAP from remote and local."
|
||||
|
||||
curl -X POST -H "Authorization: Bearer $(SLACK_TOKEN)" \
|
||||
-H 'Content-type: application/json; charset=utf-8' \
|
||||
--data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$MESSAGE"'"}' \
|
||||
https://slack.com/api/chat.postMessage
|
||||
|
||||
exit 1
|
||||
fi
|
||||
displayName: Check 1.999.0 tag
|
||||
|
||||
- bash: |
|
||||
# Install build dependencies
|
||||
|
|
|
@ -5,7 +5,7 @@ steps:
|
|||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: 'Azure Key Vault: Get Secrets'
|
||||
|
|
|
@ -25,7 +25,7 @@ steps:
|
|||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: 'Azure Key Vault: Get Secrets'
|
||||
|
|
|
@ -4,7 +4,7 @@ steps:
|
|||
versionSpec: "10.15.1"
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '2.x'
|
||||
|
@ -26,10 +26,12 @@ steps:
|
|||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
||||
- powershell: |
|
||||
yarn gulp electron
|
||||
displayName: Download Electron
|
||||
- powershell: |
|
||||
yarn gulp hygiene
|
||||
- script: |
|
||||
yarn gulp hygiene --skip-tslint
|
||||
displayName: Run Hygiene Checks
|
||||
- script: |
|
||||
yarn gulp tslint
|
||||
displayName: Run TSLint Checks
|
||||
- powershell: |
|
||||
yarn monaco-compile-check
|
||||
displayName: Run Monaco Editor Checks
|
||||
|
|
|
@ -25,7 +25,7 @@ steps:
|
|||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.10.1"
|
||||
versionSpec: "1.x"
|
||||
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
|
@ -113,10 +113,15 @@ steps:
|
|||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
- powershell: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
# to run with these builds instead of running out of sources.
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
exec { yarn gulp "electron-$(VSCODE_ARCH)" }
|
||||
exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }
|
||||
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
|
||||
$AppNameShort = $AppProductJson.nameShort
|
||||
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\scripts\test-integration.bat --build --tfs "Integration Tests" }
|
||||
displayName: Run integration tests
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"name": "ms-vscode.node-debug",
|
||||
"version": "1.38.3",
|
||||
"version": "1.38.8",
|
||||
"repo": "https://github.com/Microsoft/vscode-node-debug",
|
||||
"metadata": {
|
||||
"id": "b6ded8fb-a0a0-4c1c-acbd-ab2a3bc995a6",
|
||||
|
@ -16,7 +16,7 @@
|
|||
},
|
||||
{
|
||||
"name": "ms-vscode.node-debug2",
|
||||
"version": "1.33.0",
|
||||
"version": "1.39.0",
|
||||
"repo": "https://github.com/Microsoft/vscode-node-debug2",
|
||||
"metadata": {
|
||||
"id": "36d19e17-7569-4841-a001-947eb18602b2",
|
||||
|
|
|
@ -41,12 +41,7 @@ var editorEntryPoints = [
|
|||
];
|
||||
|
||||
var editorResources = [
|
||||
'out-build/vs/{base,editor}/**/*.{svg,png}',
|
||||
'!out-build/vs/base/browser/ui/splitview/**/*',
|
||||
'!out-build/vs/base/browser/ui/toolbar/**/*',
|
||||
'!out-build/vs/base/browser/ui/octiconLabel/**/*',
|
||||
'!out-build/vs/workbench/**',
|
||||
'!**/test/**'
|
||||
'out-editor-build/vs/base/browser/ui/codiconLabel/**/*.ttf'
|
||||
];
|
||||
|
||||
var BUNDLED_FILE_HEADER = [
|
||||
|
|
|
@ -21,7 +21,6 @@ const nlsDev = require('vscode-nls-dev');
|
|||
const root = path.dirname(__dirname);
|
||||
const commit = util.getVersion(root);
|
||||
const plumber = require('gulp-plumber');
|
||||
const _ = require('underscore');
|
||||
const ext = require('./lib/extensions');
|
||||
|
||||
const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
|
||||
|
@ -37,16 +36,16 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
const absolutePath = path.join(extensionsPath, tsconfigFile);
|
||||
const relativeDirname = path.dirname(tsconfigFile);
|
||||
|
||||
const tsconfig = require(absolutePath);
|
||||
const tsOptions = _.assign({}, tsconfig.extends ? require(path.join(extensionsPath, relativeDirname, tsconfig.extends)).compilerOptions : {}, tsconfig.compilerOptions);
|
||||
tsOptions.verbose = false;
|
||||
tsOptions.sourceMap = true;
|
||||
const overrideOptions = {};
|
||||
overrideOptions.sourceMap = true;
|
||||
|
||||
const name = relativeDirname.replace(/\//g, '-');
|
||||
|
||||
const root = path.join('extensions', relativeDirname);
|
||||
const srcBase = path.join(root, 'src');
|
||||
const src = path.join(srcBase, '**');
|
||||
const srcOpts = { cwd: path.dirname(__dirname), base: srcBase };
|
||||
|
||||
const out = path.join(root, 'out');
|
||||
const baseUrl = getBaseUrl(out);
|
||||
|
||||
|
@ -63,12 +62,12 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
function createPipeline(build, emitError) {
|
||||
const reporter = createReporter();
|
||||
|
||||
tsOptions.inlineSources = !!build;
|
||||
tsOptions.base = path.dirname(absolutePath);
|
||||
overrideOptions.inlineSources = Boolean(build);
|
||||
overrideOptions.base = path.dirname(absolutePath);
|
||||
|
||||
const compilation = tsb.create(tsOptions, null, null, err => reporter(err.toString()));
|
||||
const compilation = tsb.create(absolutePath, overrideOptions, false, err => reporter(err.toString()));
|
||||
|
||||
return function () {
|
||||
const pipeline = function () {
|
||||
const input = es.through();
|
||||
const tsFilter = filter(['**/*.ts', '!**/lib/lib*.d.ts', '!**/node_modules/**'], { restore: true });
|
||||
const output = input
|
||||
|
@ -98,15 +97,19 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
|
||||
return es.duplex(input, output);
|
||||
};
|
||||
}
|
||||
|
||||
const srcOpts = { cwd: path.dirname(__dirname), base: srcBase };
|
||||
// add src-stream for project files
|
||||
pipeline.tsProjectSrc = () => {
|
||||
return compilation.src(srcOpts);
|
||||
};
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
const cleanTask = task.define(`clean-extension-${name}`, util.rimraf(out));
|
||||
|
||||
const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => {
|
||||
const pipeline = createPipeline(false, true);
|
||||
const input = gulp.src(src, srcOpts);
|
||||
const input = pipeline.tsProjectSrc();
|
||||
|
||||
return input
|
||||
.pipe(pipeline())
|
||||
|
@ -115,8 +118,8 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
|
||||
const watchTask = task.define(`watch-extension:${name}`, task.series(cleanTask, () => {
|
||||
const pipeline = createPipeline(false);
|
||||
const input = gulp.src(src, srcOpts);
|
||||
const watchInput = watcher(src, srcOpts);
|
||||
const input = pipeline.tsProjectSrc();
|
||||
const watchInput = watcher(src, { ...srcOpts, ...{ readDelay: 200 } });
|
||||
|
||||
return watchInput
|
||||
.pipe(util.incremental(pipeline, input))
|
||||
|
@ -125,7 +128,7 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
|
||||
const compileBuildTask = task.define(`compile-build-extension-${name}`, task.series(cleanTask, () => {
|
||||
const pipeline = createPipeline(true, true);
|
||||
const input = gulp.src(src, srcOpts);
|
||||
const input = pipeline.tsProjectSrc();
|
||||
|
||||
return input
|
||||
.pipe(pipeline())
|
||||
|
@ -160,4 +163,4 @@ const compileExtensionsBuildTask = task.define('compile-extensions-build', task.
|
|||
));
|
||||
|
||||
gulp.task(compileExtensionsBuildTask);
|
||||
exports.compileExtensionsBuildTask = compileExtensionsBuildTask;
|
||||
exports.compileExtensionsBuildTask = compileExtensionsBuildTask;
|
||||
|
|
|
@ -17,6 +17,7 @@ const vfs = require('vinyl-fs');
|
|||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const pall = require('p-all');
|
||||
const task = require('./lib/task');
|
||||
|
||||
/**
|
||||
* Hygiene works by creating cascading subsets of all our files and
|
||||
|
@ -57,6 +58,7 @@ const indentationFilter = [
|
|||
'!test/assert.js',
|
||||
|
||||
// except specific folders
|
||||
'!test/automation/out/**',
|
||||
'!test/smoke/out/**',
|
||||
'!extensions/vscode-api-tests/testWorkspace/**',
|
||||
'!extensions/vscode-api-tests/testWorkspace2/**',
|
||||
|
@ -70,6 +72,7 @@ const indentationFilter = [
|
|||
|
||||
// except multiple specific folders
|
||||
'!**/octicons/**',
|
||||
'!**/codicon/**',
|
||||
'!**/fixtures/**',
|
||||
'!**/lib/**',
|
||||
'!extensions/**/out/**',
|
||||
|
@ -152,6 +155,7 @@ const tslintCoreFilter = [
|
|||
'src/**/*.ts',
|
||||
'test/**/*.ts',
|
||||
'!extensions/**/*.ts',
|
||||
'!test/automation/**',
|
||||
'!test/smoke/**',
|
||||
...tslintBaseFilter
|
||||
];
|
||||
|
@ -160,6 +164,7 @@ const tslintExtensionsFilter = [
|
|||
'extensions/**/*.ts',
|
||||
'!src/**/*.ts',
|
||||
'!test/**/*.ts',
|
||||
'test/automation/**/*.ts',
|
||||
...tslintBaseFilter
|
||||
];
|
||||
|
||||
|
@ -202,6 +207,33 @@ gulp.task('tslint', () => {
|
|||
]).pipe(es.through());
|
||||
});
|
||||
|
||||
function checkPackageJSON(actualPath) {
|
||||
const actual = require(path.join(__dirname, '..', actualPath));
|
||||
const rootPackageJSON = require('../package.json');
|
||||
|
||||
for (let depName in actual.dependencies) {
|
||||
const depVersion = actual.dependencies[depName];
|
||||
const rootDepVersion = rootPackageJSON.dependencies[depName];
|
||||
if (!rootDepVersion) {
|
||||
// missing in root is allowed
|
||||
continue;
|
||||
}
|
||||
if (depVersion !== rootDepVersion) {
|
||||
this.emit('error', `The dependency ${depName} in '${actualPath}' (${depVersion}) is different than in the root package.json (${rootDepVersion})`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const checkPackageJSONTask = task.define('check-package-json', () => {
|
||||
return gulp.src('package.json')
|
||||
.pipe(es.through(function() {
|
||||
checkPackageJSON.call(this, 'remote/package.json');
|
||||
checkPackageJSON.call(this, 'remote/web/package.json');
|
||||
}));
|
||||
});
|
||||
gulp.task(checkPackageJSONTask);
|
||||
|
||||
|
||||
function hygiene(some) {
|
||||
let errorCount = 0;
|
||||
|
||||
|
@ -311,10 +343,13 @@ function hygiene(some) {
|
|||
.pipe(filter(copyrightFilter))
|
||||
.pipe(copyrights);
|
||||
|
||||
const typescript = result
|
||||
let typescript = result
|
||||
.pipe(filter(tslintHygieneFilter))
|
||||
.pipe(formatting)
|
||||
.pipe(tsl);
|
||||
.pipe(formatting);
|
||||
|
||||
if (!process.argv.some(arg => arg === '--skip-tslint')) {
|
||||
typescript = typescript.pipe(tsl);
|
||||
}
|
||||
|
||||
const javascript = result
|
||||
.pipe(filter(eslintFilter))
|
||||
|
@ -387,7 +422,7 @@ function createGitIndexVinyls(paths) {
|
|||
.then(r => r.filter(p => !!p));
|
||||
}
|
||||
|
||||
gulp.task('hygiene', () => hygiene());
|
||||
gulp.task('hygiene', task.series(checkPackageJSONTask, () => hygiene()));
|
||||
|
||||
// this allows us to run hygiene as a git pre-commit hook
|
||||
if (require.main === module) {
|
||||
|
|
|
@ -49,7 +49,6 @@ const nodeModules = ['electron', 'original-fs']
|
|||
const vscodeEntryPoints = _.flatten([
|
||||
buildfile.entrypoint('vs/workbench/workbench.desktop.main'),
|
||||
buildfile.base,
|
||||
buildfile.serviceWorker,
|
||||
buildfile.workbenchDesktop,
|
||||
buildfile.code
|
||||
]);
|
||||
|
@ -69,6 +68,7 @@ const vscodeResources = [
|
|||
'out-build/vs/base/node/languagePacks.js',
|
||||
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
|
||||
'out-build/vs/base/browser/ui/octiconLabel/octicons/**',
|
||||
'out-build/vs/base/browser/ui/codiconLabel/codicon/**',
|
||||
'out-build/vs/workbench/browser/media/*-theme.css',
|
||||
'out-build/vs/workbench/contrib/debug/**/*.json',
|
||||
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
|
||||
|
@ -76,7 +76,6 @@ const vscodeResources = [
|
|||
'out-build/vs/workbench/contrib/webview/electron-browser/pre/*.js',
|
||||
'out-build/vs/**/markdown.css',
|
||||
'out-build/vs/workbench/contrib/tasks/**/*.json',
|
||||
'out-build/vs/workbench/contrib/welcome/walkThrough/**/*.md',
|
||||
'out-build/vs/platform/files/**/*.exe',
|
||||
'out-build/vs/platform/files/**/*.md',
|
||||
'out-build/vs/code/electron-browser/workbench/**',
|
||||
|
@ -94,6 +93,7 @@ const optimizeVSCodeTask = task.define('optimize-vscode', task.series(
|
|||
resources: vscodeResources,
|
||||
loaderConfig: common.loaderConfig(nodeModules),
|
||||
out: 'out-vscode',
|
||||
inlineAmdImages: true,
|
||||
bundleInfo: undefined
|
||||
})
|
||||
));
|
||||
|
@ -480,7 +480,7 @@ gulp.task(task.define(
|
|||
optimizeVSCodeTask,
|
||||
function () {
|
||||
const pathToMetadata = './out-vscode/nls.metadata.json';
|
||||
const pathToExtensions = './extensions/*';
|
||||
const pathToExtensions = '.build/extensions/*';
|
||||
const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}';
|
||||
|
||||
return es.merge(
|
||||
|
@ -501,7 +501,7 @@ gulp.task(task.define(
|
|||
optimizeVSCodeTask,
|
||||
function () {
|
||||
const pathToMetadata = './out-vscode/nls.metadata.json';
|
||||
const pathToExtensions = './extensions/*';
|
||||
const pathToExtensions = '.build/extensions/*';
|
||||
const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}';
|
||||
|
||||
return es.merge(
|
||||
|
|
|
@ -42,6 +42,7 @@ function prepareDebPackage(arch) {
|
|||
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
||||
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@EXEC@@', `/usr/share/${product.applicationName}/${product.applicationName}`))
|
||||
.pipe(replace('@@ICON@@', product.linuxIconName))
|
||||
.pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
|
||||
|
||||
|
@ -134,6 +135,7 @@ function prepareRpmPackage(arch) {
|
|||
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
||||
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@EXEC@@', `/usr/share/${product.applicationName}/${product.applicationName}`))
|
||||
.pipe(replace('@@ICON@@', product.linuxIconName))
|
||||
.pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
|
||||
|
||||
|
@ -203,21 +205,25 @@ function prepareSnapPackage(arch) {
|
|||
const destination = getSnapBuildPath(arch);
|
||||
|
||||
return function () {
|
||||
// A desktop file that is placed in snap/gui will be placed into meta/gui verbatim.
|
||||
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
|
||||
.pipe(rename(`usr/share/applications/${product.applicationName}.desktop`));
|
||||
.pipe(rename(`snap/gui/${product.applicationName}.desktop`));
|
||||
|
||||
// A desktop file that is placed in snap/gui will be placed into meta/gui verbatim.
|
||||
const desktopUrlHandler = gulp.src('resources/linux/code-url-handler.desktop', { base: '.' })
|
||||
.pipe(rename(`usr/share/applications/${product.applicationName}-url-handler.desktop`));
|
||||
.pipe(rename(`snap/gui/${product.applicationName}-url-handler.desktop`));
|
||||
|
||||
const desktops = es.merge(desktop, desktopUrlHandler)
|
||||
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
||||
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@ICON@@', `/usr/share/pixmaps/${product.linuxIconName}.png`))
|
||||
.pipe(replace('@@EXEC@@', `${product.applicationName} --force-user-env`))
|
||||
.pipe(replace('@@ICON@@', `\${SNAP}/meta/gui/${product.linuxIconName}.png`))
|
||||
.pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
|
||||
|
||||
// An icon that is placed in snap/gui will be placed into meta/gui verbatim.
|
||||
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
||||
.pipe(rename(`usr/share/pixmaps/${product.linuxIconName}.png`));
|
||||
.pipe(rename(`snap/gui/${product.linuxIconName}.png`));
|
||||
|
||||
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
|
||||
.pipe(rename(function (p) { p.dirname = `usr/share/${product.applicationName}/${p.dirname}`; }));
|
||||
|
@ -238,7 +244,8 @@ function prepareSnapPackage(arch) {
|
|||
|
||||
function buildSnapPackage(arch) {
|
||||
const snapBuildPath = getSnapBuildPath(arch);
|
||||
return shell.task(`cd ${snapBuildPath} && snapcraft build`);
|
||||
// Default target for snapcraft runs: pull, build, stage and prime, and finally assembles the snap.
|
||||
return shell.task(`cd ${snapBuildPath} && snapcraft`);
|
||||
}
|
||||
|
||||
const BUILD_TARGETS = [
|
||||
|
|
|
@ -6,155 +6,11 @@
|
|||
'use strict';
|
||||
|
||||
const gulp = require('gulp');
|
||||
const path = require('path');
|
||||
const es = require('event-stream');
|
||||
const util = require('./lib/util');
|
||||
const task = require('./lib/task');
|
||||
const common = require('./lib/optimize');
|
||||
const product = require('../product.json');
|
||||
const rename = require('gulp-rename');
|
||||
const filter = require('gulp-filter');
|
||||
const json = require('gulp-json-editor');
|
||||
const _ = require('underscore');
|
||||
const deps = require('./dependencies');
|
||||
const vfs = require('vinyl-fs');
|
||||
const packageJson = require('../package.json');
|
||||
const { compileBuildTask } = require('./gulpfile.compile');
|
||||
|
||||
const REPO_ROOT = path.dirname(__dirname);
|
||||
const commit = util.getVersion(REPO_ROOT);
|
||||
const BUILD_ROOT = path.dirname(REPO_ROOT);
|
||||
const WEB_FOLDER = path.join(REPO_ROOT, 'remote', 'web');
|
||||
const noop = () => { return Promise.resolve(); };
|
||||
|
||||
const productionDependencies = deps.getProductionDependencies(WEB_FOLDER);
|
||||
|
||||
const nodeModules = Object.keys(product.dependencies || {})
|
||||
.concat(_.uniq(productionDependencies.map(d => d.name)));
|
||||
|
||||
const vscodeWebResources = [
|
||||
|
||||
// Workbench
|
||||
'out-build/vs/{base,platform,editor,workbench}/**/*.{svg,png,html}',
|
||||
'out-build/vs/base/browser/ui/octiconLabel/octicons/**',
|
||||
'out-build/vs/**/markdown.css',
|
||||
|
||||
// Webview
|
||||
'out-build/vs/workbench/contrib/webview/browser/pre/*.js',
|
||||
|
||||
// Extension Worker
|
||||
'out-build/vs/workbench/services/extensions/worker/extensionHostWorkerMain.js',
|
||||
|
||||
// Excludes
|
||||
'!out-build/vs/**/{node,electron-browser,electron-main}/**',
|
||||
'!out-build/vs/editor/standalone/**',
|
||||
'!out-build/vs/workbench/**/*-tb.png',
|
||||
'!**/test/**'
|
||||
];
|
||||
|
||||
const buildfile = require('../src/buildfile');
|
||||
|
||||
const vscodeWebEntryPoints = _.flatten([
|
||||
buildfile.entrypoint('vs/workbench/workbench.web.api'),
|
||||
buildfile.base,
|
||||
buildfile.serviceWorker,
|
||||
buildfile.workerExtensionHost,
|
||||
buildfile.keyboardMaps,
|
||||
buildfile.workbenchWeb
|
||||
]);
|
||||
|
||||
const optimizeVSCodeWebTask = task.define('optimize-vscode-web', task.series(
|
||||
util.rimraf('out-vscode-web'),
|
||||
common.optimizeTask({
|
||||
src: 'out-build',
|
||||
entryPoints: _.flatten(vscodeWebEntryPoints),
|
||||
otherSources: [],
|
||||
resources: vscodeWebResources,
|
||||
loaderConfig: common.loaderConfig(nodeModules),
|
||||
out: 'out-vscode-web',
|
||||
bundleInfo: undefined
|
||||
})
|
||||
));
|
||||
|
||||
const minifyVSCodeWebTask = task.define('minify-vscode-web', task.series(
|
||||
optimizeVSCodeWebTask,
|
||||
util.rimraf('out-vscode-web-min'),
|
||||
common.minifyTask('out-vscode-web', `https://ticino.blob.core.windows.net/sourcemaps/${commit}/core`)
|
||||
));
|
||||
gulp.task(minifyVSCodeWebTask);
|
||||
|
||||
function packageTask(sourceFolderName, destinationFolderName) {
|
||||
const destination = path.join(BUILD_ROOT, destinationFolderName);
|
||||
|
||||
return () => {
|
||||
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
|
||||
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
|
||||
.pipe(filter(['**', '!**/*.js.map']));
|
||||
|
||||
const sources = es.merge(src);
|
||||
|
||||
let version = packageJson.version;
|
||||
const quality = product.quality;
|
||||
|
||||
if (quality && quality !== 'stable') {
|
||||
version += '-' + quality;
|
||||
}
|
||||
|
||||
const name = product.nameShort;
|
||||
const packageJsonStream = gulp.src(['remote/web/package.json'], { base: 'remote/web' })
|
||||
.pipe(json({ name, version }));
|
||||
|
||||
const date = new Date().toISOString();
|
||||
|
||||
const productJsonStream = gulp.src(['product.json'], { base: '.' })
|
||||
.pipe(json({ commit, date }));
|
||||
|
||||
const license = gulp.src(['remote/LICENSE'], { base: 'remote' });
|
||||
|
||||
const dependenciesSrc = _.flatten(productionDependencies.map(d => path.relative(REPO_ROOT, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`, `!${d}/.bin/**`]));
|
||||
|
||||
const deps = gulp.src(dependenciesSrc, { base: 'remote/web', dot: true })
|
||||
.pipe(filter(['**', '!**/package-lock.json']))
|
||||
.pipe(util.cleanNodeModules(path.join(__dirname, '.nativeignore')));
|
||||
|
||||
const favicon = gulp.src('resources/server/favicon.ico', { base: 'resources/server' });
|
||||
const manifest = gulp.src('resources/server/manifest.json', { base: 'resources/server' });
|
||||
const pwaicon = gulp.src('resources/server/code.png', { base: 'resources/server' });
|
||||
|
||||
let all = es.merge(
|
||||
packageJsonStream,
|
||||
productJsonStream,
|
||||
license,
|
||||
sources,
|
||||
deps,
|
||||
favicon,
|
||||
manifest,
|
||||
pwaicon
|
||||
);
|
||||
|
||||
let result = all
|
||||
.pipe(util.skipDirectories())
|
||||
.pipe(util.fixWin32DirectoryPermissions());
|
||||
|
||||
return result.pipe(vfs.dest(destination));
|
||||
};
|
||||
}
|
||||
|
||||
const dashed = (str) => (str ? `-${str}` : ``);
|
||||
|
||||
['', 'min'].forEach(minified => {
|
||||
const sourceFolderName = `out-vscode-web${dashed(minified)}`;
|
||||
const destinationFolderName = `vscode-web`;
|
||||
|
||||
const vscodeWebTaskCI = task.define(`vscode-web${dashed(minified)}-ci`, task.series(
|
||||
minified ? minifyVSCodeWebTask : optimizeVSCodeWebTask,
|
||||
util.rimraf(path.join(BUILD_ROOT, destinationFolderName)),
|
||||
packageTask(sourceFolderName, destinationFolderName)
|
||||
));
|
||||
gulp.task(vscodeWebTaskCI);
|
||||
|
||||
const vscodeWebTask = task.define(`vscode-web${dashed(minified)}`, task.series(
|
||||
compileBuildTask,
|
||||
vscodeWebTaskCI
|
||||
));
|
||||
gulp.task(vscodeWebTask);
|
||||
});
|
||||
gulp.task('minify-vscode-web', noop);
|
||||
gulp.task('vscode-web', noop);
|
||||
gulp.task('vscode-web-min', noop);
|
||||
gulp.task('vscode-web-ci', noop);
|
||||
gulp.task('vscode-web-min-ci', noop);
|
||||
|
|
|
@ -11,7 +11,6 @@ const bom = require("gulp-bom");
|
|||
const sourcemaps = require("gulp-sourcemaps");
|
||||
const tsb = require("gulp-tsb");
|
||||
const path = require("path");
|
||||
const _ = require("underscore");
|
||||
const monacodts = require("../monaco/api");
|
||||
const nls = require("./nls");
|
||||
const reporter_1 = require("./reporter");
|
||||
|
@ -22,14 +21,7 @@ const watch = require('./watch');
|
|||
const reporter = reporter_1.createReporter();
|
||||
function getTypeScriptCompilerOptions(src) {
|
||||
const rootDir = path.join(__dirname, `../../${src}`);
|
||||
const tsconfig = require(`../../${src}/tsconfig.json`);
|
||||
let options;
|
||||
if (tsconfig.extends) {
|
||||
options = Object.assign({}, require(path.join(rootDir, tsconfig.extends)).compilerOptions, tsconfig.compilerOptions);
|
||||
}
|
||||
else {
|
||||
options = tsconfig.compilerOptions;
|
||||
}
|
||||
let options = {};
|
||||
options.verbose = false;
|
||||
options.sourceMap = true;
|
||||
if (process.env['VSCODE_NO_SOURCEMAP']) { // To be used by developers in a hurry
|
||||
|
@ -38,15 +30,14 @@ function getTypeScriptCompilerOptions(src) {
|
|||
options.rootDir = rootDir;
|
||||
options.baseUrl = rootDir;
|
||||
options.sourceRoot = util.toFileUri(rootDir);
|
||||
options.newLine = /\r\n/.test(fs.readFileSync(__filename, 'utf8')) ? 'CRLF' : 'LF';
|
||||
options.newLine = /\r\n/.test(fs.readFileSync(__filename, 'utf8')) ? 0 : 1;
|
||||
return options;
|
||||
}
|
||||
function createCompile(src, build, emitError) {
|
||||
const opts = _.clone(getTypeScriptCompilerOptions(src));
|
||||
opts.inlineSources = !!build;
|
||||
opts.noFilesystemLookup = true;
|
||||
const ts = tsb.create(opts, true, undefined, err => reporter(err.toString()));
|
||||
return function (token) {
|
||||
const projectPath = path.join(__dirname, '../../', src, 'tsconfig.json');
|
||||
const overrideOptions = Object.assign(Object.assign({}, getTypeScriptCompilerOptions(src)), { inlineSources: Boolean(build) });
|
||||
const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err));
|
||||
function pipeline(token) {
|
||||
const utf8Filter = util.filter(data => /(\/|\\)test(\/|\\).*utf8/.test(data.path));
|
||||
const tsFilter = util.filter(data => /\.ts$/.test(data.path));
|
||||
const noDeclarationsFilter = util.filter(data => !(/\.d\.ts$/.test(data.path)));
|
||||
|
@ -57,30 +48,28 @@ function createCompile(src, build, emitError) {
|
|||
.pipe(utf8Filter.restore)
|
||||
.pipe(tsFilter)
|
||||
.pipe(util.loadSourcemaps())
|
||||
.pipe(ts(token))
|
||||
.pipe(compilation(token))
|
||||
.pipe(noDeclarationsFilter)
|
||||
.pipe(build ? nls() : es.through())
|
||||
.pipe(noDeclarationsFilter.restore)
|
||||
.pipe(sourcemaps.write('.', {
|
||||
addComment: false,
|
||||
includeContent: !!build,
|
||||
sourceRoot: opts.sourceRoot
|
||||
sourceRoot: overrideOptions.sourceRoot
|
||||
}))
|
||||
.pipe(tsFilter.restore)
|
||||
.pipe(reporter.end(!!emitError));
|
||||
return es.duplex(input, output);
|
||||
}
|
||||
pipeline.tsProjectSrc = () => {
|
||||
return compilation.src({ base: src });
|
||||
};
|
||||
return pipeline;
|
||||
}
|
||||
const typesDts = [
|
||||
'node_modules/typescript/lib/*.d.ts',
|
||||
'node_modules/@types/**/*.d.ts',
|
||||
'!node_modules/@types/webpack/**/*',
|
||||
'!node_modules/@types/uglify-js/**/*',
|
||||
];
|
||||
function compileTask(src, out, build) {
|
||||
return function () {
|
||||
const compile = createCompile(src, build, true);
|
||||
const srcPipe = es.merge(gulp.src(`${src}/**`, { base: `${src}` }), gulp.src(typesDts));
|
||||
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
|
||||
let generator = new MonacoGenerator(false);
|
||||
if (src === 'src') {
|
||||
generator.execute();
|
||||
|
@ -95,8 +84,8 @@ exports.compileTask = compileTask;
|
|||
function watchTask(out, build) {
|
||||
return function () {
|
||||
const compile = createCompile('src', build);
|
||||
const src = es.merge(gulp.src('src/**', { base: 'src' }), gulp.src(typesDts));
|
||||
const watchSrc = watch('src/**', { base: 'src' });
|
||||
const src = gulp.src('src/**', { base: 'src' });
|
||||
const watchSrc = watch('src/**', { base: 'src', readDelay: 200 });
|
||||
let generator = new MonacoGenerator(true);
|
||||
generator.execute();
|
||||
return watchSrc
|
||||
|
|
|
@ -12,27 +12,21 @@ import * as bom from 'gulp-bom';
|
|||
import * as sourcemaps from 'gulp-sourcemaps';
|
||||
import * as tsb from 'gulp-tsb';
|
||||
import * as path from 'path';
|
||||
import * as _ from 'underscore';
|
||||
import * as monacodts from '../monaco/api';
|
||||
import * as nls from './nls';
|
||||
import { createReporter } from './reporter';
|
||||
import * as util from './util';
|
||||
import * as fancyLog from 'fancy-log';
|
||||
import * as ansiColors from 'ansi-colors';
|
||||
import ts = require('typescript');
|
||||
|
||||
const watch = require('./watch');
|
||||
|
||||
const reporter = createReporter();
|
||||
|
||||
function getTypeScriptCompilerOptions(src: string) {
|
||||
function getTypeScriptCompilerOptions(src: string): ts.CompilerOptions {
|
||||
const rootDir = path.join(__dirname, `../../${src}`);
|
||||
const tsconfig = require(`../../${src}/tsconfig.json`);
|
||||
let options: { [key: string]: any };
|
||||
if (tsconfig.extends) {
|
||||
options = Object.assign({}, require(path.join(rootDir, tsconfig.extends)).compilerOptions, tsconfig.compilerOptions);
|
||||
} else {
|
||||
options = tsconfig.compilerOptions;
|
||||
}
|
||||
let options: ts.CompilerOptions = {};
|
||||
options.verbose = false;
|
||||
options.sourceMap = true;
|
||||
if (process.env['VSCODE_NO_SOURCEMAP']) { // To be used by developers in a hurry
|
||||
|
@ -41,18 +35,17 @@ function getTypeScriptCompilerOptions(src: string) {
|
|||
options.rootDir = rootDir;
|
||||
options.baseUrl = rootDir;
|
||||
options.sourceRoot = util.toFileUri(rootDir);
|
||||
options.newLine = /\r\n/.test(fs.readFileSync(__filename, 'utf8')) ? 'CRLF' : 'LF';
|
||||
options.newLine = /\r\n/.test(fs.readFileSync(__filename, 'utf8')) ? 0 : 1;
|
||||
return options;
|
||||
}
|
||||
|
||||
function createCompile(src: string, build: boolean, emitError?: boolean): (token?: util.ICancellationToken) => NodeJS.ReadWriteStream {
|
||||
const opts = _.clone(getTypeScriptCompilerOptions(src));
|
||||
opts.inlineSources = !!build;
|
||||
opts.noFilesystemLookup = true;
|
||||
function createCompile(src: string, build: boolean, emitError?: boolean) {
|
||||
const projectPath = path.join(__dirname, '../../', src, 'tsconfig.json');
|
||||
const overrideOptions = { ...getTypeScriptCompilerOptions(src), inlineSources: Boolean(build) };
|
||||
|
||||
const ts = tsb.create(opts, true, undefined, err => reporter(err.toString()));
|
||||
const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err));
|
||||
|
||||
return function (token?: util.ICancellationToken) {
|
||||
function pipeline(token?: util.ICancellationToken) {
|
||||
|
||||
const utf8Filter = util.filter(data => /(\/|\\)test(\/|\\).*utf8/.test(data.path));
|
||||
const tsFilter = util.filter(data => /\.ts$/.test(data.path));
|
||||
|
@ -65,39 +58,31 @@ function createCompile(src: string, build: boolean, emitError?: boolean): (token
|
|||
.pipe(utf8Filter.restore)
|
||||
.pipe(tsFilter)
|
||||
.pipe(util.loadSourcemaps())
|
||||
.pipe(ts(token))
|
||||
.pipe(compilation(token))
|
||||
.pipe(noDeclarationsFilter)
|
||||
.pipe(build ? nls() : es.through())
|
||||
.pipe(noDeclarationsFilter.restore)
|
||||
.pipe(sourcemaps.write('.', {
|
||||
addComment: false,
|
||||
includeContent: !!build,
|
||||
sourceRoot: opts.sourceRoot
|
||||
sourceRoot: overrideOptions.sourceRoot
|
||||
}))
|
||||
.pipe(tsFilter.restore)
|
||||
.pipe(reporter.end(!!emitError));
|
||||
|
||||
return es.duplex(input, output);
|
||||
}
|
||||
pipeline.tsProjectSrc = () => {
|
||||
return compilation.src({ base: src });
|
||||
};
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
const typesDts = [
|
||||
'node_modules/typescript/lib/*.d.ts',
|
||||
'node_modules/@types/**/*.d.ts',
|
||||
'!node_modules/@types/webpack/**/*',
|
||||
'!node_modules/@types/uglify-js/**/*',
|
||||
];
|
||||
|
||||
export function compileTask(src: string, out: string, build: boolean): () => NodeJS.ReadWriteStream {
|
||||
|
||||
return function () {
|
||||
const compile = createCompile(src, build, true);
|
||||
|
||||
const srcPipe = es.merge(
|
||||
gulp.src(`${src}/**`, { base: `${src}` }),
|
||||
gulp.src(typesDts),
|
||||
);
|
||||
|
||||
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
|
||||
let generator = new MonacoGenerator(false);
|
||||
if (src === 'src') {
|
||||
generator.execute();
|
||||
|
@ -115,11 +100,8 @@ export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteSt
|
|||
return function () {
|
||||
const compile = createCompile('src', build);
|
||||
|
||||
const src = es.merge(
|
||||
gulp.src('src/**', { base: 'src' }),
|
||||
gulp.src(typesDts),
|
||||
);
|
||||
const watchSrc = watch('src/**', { base: 'src' });
|
||||
const src = gulp.src('src/**', { base: 'src' });
|
||||
const watchSrc = watch('src/**', { base: 'src', readDelay: 200 });
|
||||
|
||||
let generator = new MonacoGenerator(true);
|
||||
generator.execute();
|
||||
|
|
|
@ -101,7 +101,7 @@ function fromLocalWebpack(extensionPath) {
|
|||
result.emit('error', compilation.warnings.join('\n'));
|
||||
}
|
||||
};
|
||||
const webpackConfig = Object.assign({}, require(webpackConfigPath), { mode: 'production' });
|
||||
const webpackConfig = Object.assign(Object.assign({}, require(webpackConfigPath)), { mode: 'production' });
|
||||
const relativeOutputPath = path.relative(extensionPath, webpackConfig.output.path);
|
||||
return webpackGulp(webpackConfig, webpack, webpackDone)
|
||||
.pipe(es.through(function (data) {
|
||||
|
|
|
@ -176,6 +176,7 @@ class XLF {
|
|||
this.buffer.push(line.toString());
|
||||
}
|
||||
}
|
||||
exports.XLF = XLF;
|
||||
XLF.parsePseudo = function (xlfString) {
|
||||
return new Promise((resolve) => {
|
||||
let parser = new xml2js.Parser();
|
||||
|
@ -248,7 +249,6 @@ XLF.parse = function (xlfString) {
|
|||
});
|
||||
});
|
||||
};
|
||||
exports.XLF = XLF;
|
||||
class Limiter {
|
||||
constructor(maxDegreeOfParalellism) {
|
||||
this.maxDegreeOfParalellism = maxDegreeOfParalellism;
|
||||
|
@ -580,7 +580,7 @@ function createXlfFilesForExtensions() {
|
|||
}
|
||||
return _xlf;
|
||||
}
|
||||
gulp.src([`./extensions/${extensionName}/package.nls.json`, `./extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }).pipe(event_stream_1.through(function (file) {
|
||||
gulp.src([`.build/extensions/${extensionName}/package.nls.json`, `.build/extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }).pipe(event_stream_1.through(function (file) {
|
||||
if (file.isBuffer()) {
|
||||
const buffer = file.contents;
|
||||
const basename = path.basename(file.path);
|
||||
|
@ -603,7 +603,7 @@ function createXlfFilesForExtensions() {
|
|||
}
|
||||
else if (basename === 'nls.metadata.json') {
|
||||
const json = JSON.parse(buffer.toString('utf8'));
|
||||
const relPath = path.relative(`./extensions/${extensionName}`, path.dirname(file.path));
|
||||
const relPath = path.relative(`.build/extensions/${extensionName}`, path.dirname(file.path));
|
||||
for (let file in json) {
|
||||
const fileContent = json[file];
|
||||
getXlf().addFile(`extensions/${extensionName}/${relPath}/${file}`, fileContent.keys, fileContent.messages);
|
||||
|
@ -906,8 +906,8 @@ function pullCoreAndExtensionsXlfFiles(apiHostname, username, password, language
|
|||
_coreAndExtensionResources.push(...json.workbench);
|
||||
// extensions
|
||||
let extensionsToLocalize = Object.create(null);
|
||||
glob.sync('./extensions/**/*.nls.json').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true);
|
||||
glob.sync('./extensions/*/node_modules/vscode-nls').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true);
|
||||
glob.sync('.build/extensions/**/*.nls.json').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true);
|
||||
glob.sync('.build/extensions/*/node_modules/vscode-nls').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true);
|
||||
Object.keys(extensionsToLocalize).forEach(extension => {
|
||||
_coreAndExtensionResources.push({ name: extension, project: extensionsProject });
|
||||
});
|
||||
|
@ -1080,7 +1080,7 @@ function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pse
|
|||
resultingTranslationPaths.push({ id: 'vscode', resourceName: 'main.i18n.json' });
|
||||
this.queue(translatedMainFile);
|
||||
for (let extension in extensionsPacks) {
|
||||
const translatedExtFile = createI18nFile(`./extensions/${extension}`, extensionsPacks[extension]);
|
||||
const translatedExtFile = createI18nFile(`extensions/${extension}`, extensionsPacks[extension]);
|
||||
this.queue(translatedExtFile);
|
||||
const externalExtensionId = externalExtensions[extension];
|
||||
if (externalExtensionId) {
|
||||
|
|
|
@ -106,6 +106,10 @@
|
|||
"name": "vs/workbench/contrib/quickopen",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/userData",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/remote",
|
||||
"project": "vscode-workbench"
|
||||
|
@ -170,6 +174,10 @@
|
|||
"name": "vs/workbench/contrib/webview",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/customEditor",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/welcome",
|
||||
"project": "vscode-workbench"
|
||||
|
@ -178,6 +186,10 @@
|
|||
"name": "vs/workbench/contrib/outline",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/userDataSync",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/actions",
|
||||
"project": "vscode-workbench"
|
||||
|
@ -230,6 +242,10 @@
|
|||
"name": "vs/workbench/services/keybinding",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/lifecycle",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/mode",
|
||||
"project": "vscode-workbench"
|
||||
|
@ -255,7 +271,7 @@
|
|||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/workspace",
|
||||
"name": "vs/workbench/services/workspaces",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
|
@ -273,6 +289,10 @@
|
|||
{
|
||||
"name": "vs/workbench/services/notification",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/userData",
|
||||
"project": "vscode-workbench"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -701,7 +701,7 @@ export function createXlfFilesForExtensions(): ThroughStream {
|
|||
}
|
||||
return _xlf;
|
||||
}
|
||||
gulp.src([`./extensions/${extensionName}/package.nls.json`, `./extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }).pipe(through(function (file: File) {
|
||||
gulp.src([`.build/extensions/${extensionName}/package.nls.json`, `.build/extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }).pipe(through(function (file: File) {
|
||||
if (file.isBuffer()) {
|
||||
const buffer: Buffer = file.contents as Buffer;
|
||||
const basename = path.basename(file.path);
|
||||
|
@ -721,7 +721,7 @@ export function createXlfFilesForExtensions(): ThroughStream {
|
|||
getXlf().addFile(`extensions/${extensionName}/package`, keys, messages);
|
||||
} else if (basename === 'nls.metadata.json') {
|
||||
const json: BundledExtensionFormat = JSON.parse(buffer.toString('utf8'));
|
||||
const relPath = path.relative(`./extensions/${extensionName}`, path.dirname(file.path));
|
||||
const relPath = path.relative(`.build/extensions/${extensionName}`, path.dirname(file.path));
|
||||
for (let file in json) {
|
||||
const fileContent = json[file];
|
||||
getXlf().addFile(`extensions/${extensionName}/${relPath}/${file}`, fileContent.keys, fileContent.messages);
|
||||
|
@ -1045,8 +1045,8 @@ export function pullCoreAndExtensionsXlfFiles(apiHostname: string, username: str
|
|||
|
||||
// extensions
|
||||
let extensionsToLocalize = Object.create(null);
|
||||
glob.sync('./extensions/**/*.nls.json').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true);
|
||||
glob.sync('./extensions/*/node_modules/vscode-nls').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true);
|
||||
glob.sync('.build/extensions/**/*.nls.json').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true);
|
||||
glob.sync('.build/extensions/*/node_modules/vscode-nls').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true);
|
||||
|
||||
Object.keys(extensionsToLocalize).forEach(extension => {
|
||||
_coreAndExtensionResources.push({ name: extension, project: extensionsProject });
|
||||
|
@ -1245,7 +1245,7 @@ export function prepareI18nPackFiles(externalExtensions: Map<string>, resultingT
|
|||
|
||||
this.queue(translatedMainFile);
|
||||
for (let extension in extensionsPacks) {
|
||||
const translatedExtFile = createI18nFile(`./extensions/${extension}`, extensionsPacks[extension]);
|
||||
const translatedExtFile = createI18nFile(`extensions/${extension}`, extensionsPacks[extension]);
|
||||
this.queue(translatedExtFile);
|
||||
|
||||
const externalExtensionId = externalExtensions[extension];
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const es = require("event-stream");
|
||||
const fs = require("fs");
|
||||
const gulp = require("gulp");
|
||||
const concat = require("gulp-concat");
|
||||
const minifyCSS = require("gulp-cssnano");
|
||||
|
@ -17,7 +18,7 @@ const fancyLog = require("fancy-log");
|
|||
const ansiColors = require("ansi-colors");
|
||||
const path = require("path");
|
||||
const pump = require("pump");
|
||||
const uglifyes = require("uglify-es");
|
||||
const terser = require("terser");
|
||||
const VinylFile = require("vinyl");
|
||||
const bundle = require("./bundle");
|
||||
const i18n_1 = require("./i18n");
|
||||
|
@ -132,6 +133,14 @@ function optimizeTask(opts) {
|
|||
if (err || !result) {
|
||||
return bundlesStream.emit('error', JSON.stringify(err));
|
||||
}
|
||||
if (opts.inlineAmdImages) {
|
||||
try {
|
||||
result = inlineAmdImages(src, result);
|
||||
}
|
||||
catch (err) {
|
||||
return bundlesStream.emit('error', JSON.stringify(err));
|
||||
}
|
||||
}
|
||||
toBundleStream(src, bundledFileHeader, result.files).pipe(bundlesStream);
|
||||
// Remove css inlined resources
|
||||
const filteredResources = resources.slice();
|
||||
|
@ -167,6 +176,39 @@ function optimizeTask(opts) {
|
|||
};
|
||||
}
|
||||
exports.optimizeTask = optimizeTask;
|
||||
function inlineAmdImages(src, result) {
|
||||
for (const outputFile of result.files) {
|
||||
for (const sourceFile of outputFile.sources) {
|
||||
if (sourceFile.path && /\.js$/.test(sourceFile.path)) {
|
||||
sourceFile.contents = sourceFile.contents.replace(/\([^.]+\.registerAndGetAmdImageURL\(([^)]+)\)\)/g, (_, m0) => {
|
||||
let imagePath = m0;
|
||||
// remove `` or ''
|
||||
if ((imagePath.charAt(0) === '`' && imagePath.charAt(imagePath.length - 1) === '`')
|
||||
|| (imagePath.charAt(0) === '\'' && imagePath.charAt(imagePath.length - 1) === '\'')) {
|
||||
imagePath = imagePath.substr(1, imagePath.length - 2);
|
||||
}
|
||||
if (!/\.(png|svg)$/.test(imagePath)) {
|
||||
console.log(`original: ${_}`);
|
||||
return _;
|
||||
}
|
||||
const repoLocation = path.join(src, imagePath);
|
||||
const absoluteLocation = path.join(REPO_ROOT_PATH, repoLocation);
|
||||
if (!fs.existsSync(absoluteLocation)) {
|
||||
const message = `Invalid amd image url in file ${sourceFile.path}: ${imagePath}`;
|
||||
console.log(message);
|
||||
throw new Error(message);
|
||||
}
|
||||
const fileContents = fs.readFileSync(absoluteLocation);
|
||||
const mime = /\.svg$/.test(imagePath) ? 'image/svg+xml' : 'image/png';
|
||||
// Mark the file as inlined so we don't ship it by itself
|
||||
result.cssInlinedResources.push(repoLocation);
|
||||
return `("data:${mime};base64,${fileContents.toString('base64')}")`;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Wrap around uglify and allow the preserveComments function
|
||||
* to have a file "context" to include our copyright only once per file.
|
||||
|
@ -197,7 +239,7 @@ function uglifyWithCopyrights() {
|
|||
return false;
|
||||
};
|
||||
};
|
||||
const minify = composer(uglifyes);
|
||||
const minify = composer(terser);
|
||||
const input = es.through();
|
||||
const output = input
|
||||
.pipe(flatmap((stream, f) => {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
'use strict';
|
||||
|
||||
import * as es from 'event-stream';
|
||||
import * as fs from 'fs';
|
||||
import * as gulp from 'gulp';
|
||||
import * as concat from 'gulp-concat';
|
||||
import * as minifyCSS from 'gulp-cssnano';
|
||||
|
@ -19,7 +20,7 @@ import * as ansiColors from 'ansi-colors';
|
|||
import * as path from 'path';
|
||||
import * as pump from 'pump';
|
||||
import * as sm from 'source-map';
|
||||
import * as uglifyes from 'uglify-es';
|
||||
import * as terser from 'terser';
|
||||
import * as VinylFile from 'vinyl';
|
||||
import * as bundle from './bundle';
|
||||
import { Language, processNlsFiles } from './i18n';
|
||||
|
@ -159,6 +160,10 @@ export interface IOptimizeTaskOpts {
|
|||
* (emit bundleInfo.json file)
|
||||
*/
|
||||
bundleInfo: boolean;
|
||||
/**
|
||||
* replace calls to `registerAndGetAmdImageURL` with data uris
|
||||
*/
|
||||
inlineAmdImages: boolean;
|
||||
/**
|
||||
* (out folder name)
|
||||
*/
|
||||
|
@ -192,6 +197,14 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr
|
|||
bundle.bundle(entryPoints, loaderConfig, function (err, result) {
|
||||
if (err || !result) { return bundlesStream.emit('error', JSON.stringify(err)); }
|
||||
|
||||
if (opts.inlineAmdImages) {
|
||||
try {
|
||||
result = inlineAmdImages(src, result);
|
||||
} catch (err) {
|
||||
return bundlesStream.emit('error', JSON.stringify(err));
|
||||
}
|
||||
}
|
||||
|
||||
toBundleStream(src, bundledFileHeader, result.files).pipe(bundlesStream);
|
||||
|
||||
// Remove css inlined resources
|
||||
|
@ -236,6 +249,42 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr
|
|||
};
|
||||
}
|
||||
|
||||
function inlineAmdImages(src: string, result: bundle.IBundleResult): bundle.IBundleResult {
|
||||
for (const outputFile of result.files) {
|
||||
for (const sourceFile of outputFile.sources) {
|
||||
if (sourceFile.path && /\.js$/.test(sourceFile.path)) {
|
||||
sourceFile.contents = sourceFile.contents.replace(/\([^.]+\.registerAndGetAmdImageURL\(([^)]+)\)\)/g, (_, m0) => {
|
||||
let imagePath = m0;
|
||||
// remove `` or ''
|
||||
if ((imagePath.charAt(0) === '`' && imagePath.charAt(imagePath.length - 1) === '`')
|
||||
|| (imagePath.charAt(0) === '\'' && imagePath.charAt(imagePath.length - 1) === '\'')) {
|
||||
imagePath = imagePath.substr(1, imagePath.length - 2);
|
||||
}
|
||||
if (!/\.(png|svg)$/.test(imagePath)) {
|
||||
console.log(`original: ${_}`);
|
||||
return _;
|
||||
}
|
||||
const repoLocation = path.join(src, imagePath);
|
||||
const absoluteLocation = path.join(REPO_ROOT_PATH, repoLocation);
|
||||
if (!fs.existsSync(absoluteLocation)) {
|
||||
const message = `Invalid amd image url in file ${sourceFile.path}: ${imagePath}`;
|
||||
console.log(message);
|
||||
throw new Error(message);
|
||||
}
|
||||
const fileContents = fs.readFileSync(absoluteLocation);
|
||||
const mime = /\.svg$/.test(imagePath) ? 'image/svg+xml' : 'image/png';
|
||||
|
||||
// Mark the file as inlined so we don't ship it by itself
|
||||
result.cssInlinedResources.push(repoLocation);
|
||||
|
||||
return `("data:${mime};base64,${fileContents.toString('base64')}")`;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
declare class FileWithCopyright extends VinylFile {
|
||||
public __hasOurCopyright: boolean;
|
||||
}
|
||||
|
@ -273,7 +322,7 @@ function uglifyWithCopyrights(): NodeJS.ReadWriteStream {
|
|||
};
|
||||
};
|
||||
|
||||
const minify = (composer as any)(uglifyes);
|
||||
const minify = (composer as any)(terser);
|
||||
const input = es.through();
|
||||
const output = input
|
||||
.pipe(flatmap((stream, f) => {
|
||||
|
|
|
@ -130,7 +130,7 @@ function createESMSourcesAndResources2(options) {
|
|||
write(getDestAbsoluteFilePath(file), JSON.stringify(tsConfig, null, '\t'));
|
||||
continue;
|
||||
}
|
||||
if (/\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file)) {
|
||||
if (/\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file) || /\.ttf$/.test(file)) {
|
||||
// Transport the files directly
|
||||
write(getDestAbsoluteFilePath(file), fs.readFileSync(path.join(SRC_FOLDER, file)));
|
||||
continue;
|
||||
|
@ -250,35 +250,37 @@ function transportCSS(module, enqueue, write) {
|
|||
const filename = path.join(SRC_DIR, module);
|
||||
const fileContents = fs.readFileSync(filename).toString();
|
||||
const inlineResources = 'base64'; // see https://github.com/Microsoft/monaco-editor/issues/148
|
||||
const inlineResourcesLimit = 300000; //3000; // see https://github.com/Microsoft/monaco-editor/issues/336
|
||||
const newContents = _rewriteOrInlineUrls(fileContents, inlineResources === 'base64', inlineResourcesLimit);
|
||||
const newContents = _rewriteOrInlineUrls(fileContents, inlineResources === 'base64');
|
||||
write(module, newContents);
|
||||
return true;
|
||||
function _rewriteOrInlineUrls(contents, forceBase64, inlineByteLimit) {
|
||||
function _rewriteOrInlineUrls(contents, forceBase64) {
|
||||
return _replaceURL(contents, (url) => {
|
||||
let imagePath = path.join(path.dirname(module), url);
|
||||
let fileContents = fs.readFileSync(path.join(SRC_DIR, imagePath));
|
||||
if (fileContents.length < inlineByteLimit) {
|
||||
const MIME = /\.svg$/.test(url) ? 'image/svg+xml' : 'image/png';
|
||||
let DATA = ';base64,' + fileContents.toString('base64');
|
||||
if (!forceBase64 && /\.svg$/.test(url)) {
|
||||
// .svg => url encode as explained at https://codepen.io/tigt/post/optimizing-svgs-in-data-uris
|
||||
let newText = fileContents.toString()
|
||||
.replace(/"/g, '\'')
|
||||
.replace(/</g, '%3C')
|
||||
.replace(/>/g, '%3E')
|
||||
.replace(/&/g, '%26')
|
||||
.replace(/#/g, '%23')
|
||||
.replace(/\s+/g, ' ');
|
||||
let encodedData = ',' + newText;
|
||||
if (encodedData.length < DATA.length) {
|
||||
DATA = encodedData;
|
||||
}
|
||||
}
|
||||
return '"data:' + MIME + DATA + '"';
|
||||
const fontMatch = url.match(/^(.*).ttf\?(.*)$/);
|
||||
if (fontMatch) {
|
||||
const relativeFontPath = `${fontMatch[1]}.ttf`; // trim the query parameter
|
||||
const fontPath = path.join(path.dirname(module), relativeFontPath);
|
||||
enqueue(fontPath);
|
||||
return relativeFontPath;
|
||||
}
|
||||
enqueue(imagePath);
|
||||
return url;
|
||||
const imagePath = path.join(path.dirname(module), url);
|
||||
const fileContents = fs.readFileSync(path.join(SRC_DIR, imagePath));
|
||||
const MIME = /\.svg$/.test(url) ? 'image/svg+xml' : 'image/png';
|
||||
let DATA = ';base64,' + fileContents.toString('base64');
|
||||
if (!forceBase64 && /\.svg$/.test(url)) {
|
||||
// .svg => url encode as explained at https://codepen.io/tigt/post/optimizing-svgs-in-data-uris
|
||||
let newText = fileContents.toString()
|
||||
.replace(/"/g, '\'')
|
||||
.replace(/</g, '%3C')
|
||||
.replace(/>/g, '%3E')
|
||||
.replace(/&/g, '%26')
|
||||
.replace(/#/g, '%23')
|
||||
.replace(/\s+/g, ' ');
|
||||
let encodedData = ',' + newText;
|
||||
if (encodedData.length < DATA.length) {
|
||||
DATA = encodedData;
|
||||
}
|
||||
}
|
||||
return '"data:' + MIME + DATA + '"';
|
||||
});
|
||||
}
|
||||
function _replaceURL(contents, replacer) {
|
||||
|
|
|
@ -154,7 +154,7 @@ export function createESMSourcesAndResources2(options: IOptions2): void {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (/\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file)) {
|
||||
if (/\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file) || /\.ttf$/.test(file)) {
|
||||
// Transport the files directly
|
||||
write(getDestAbsoluteFilePath(file), fs.readFileSync(path.join(SRC_FOLDER, file)));
|
||||
continue;
|
||||
|
@ -290,40 +290,41 @@ function transportCSS(module: string, enqueue: (module: string) => void, write:
|
|||
const filename = path.join(SRC_DIR, module);
|
||||
const fileContents = fs.readFileSync(filename).toString();
|
||||
const inlineResources = 'base64'; // see https://github.com/Microsoft/monaco-editor/issues/148
|
||||
const inlineResourcesLimit = 300000;//3000; // see https://github.com/Microsoft/monaco-editor/issues/336
|
||||
|
||||
const newContents = _rewriteOrInlineUrls(fileContents, inlineResources === 'base64', inlineResourcesLimit);
|
||||
const newContents = _rewriteOrInlineUrls(fileContents, inlineResources === 'base64');
|
||||
write(module, newContents);
|
||||
return true;
|
||||
|
||||
function _rewriteOrInlineUrls(contents: string, forceBase64: boolean, inlineByteLimit: number): string {
|
||||
function _rewriteOrInlineUrls(contents: string, forceBase64: boolean): string {
|
||||
return _replaceURL(contents, (url) => {
|
||||
let imagePath = path.join(path.dirname(module), url);
|
||||
let fileContents = fs.readFileSync(path.join(SRC_DIR, imagePath));
|
||||
|
||||
if (fileContents.length < inlineByteLimit) {
|
||||
const MIME = /\.svg$/.test(url) ? 'image/svg+xml' : 'image/png';
|
||||
let DATA = ';base64,' + fileContents.toString('base64');
|
||||
|
||||
if (!forceBase64 && /\.svg$/.test(url)) {
|
||||
// .svg => url encode as explained at https://codepen.io/tigt/post/optimizing-svgs-in-data-uris
|
||||
let newText = fileContents.toString()
|
||||
.replace(/"/g, '\'')
|
||||
.replace(/</g, '%3C')
|
||||
.replace(/>/g, '%3E')
|
||||
.replace(/&/g, '%26')
|
||||
.replace(/#/g, '%23')
|
||||
.replace(/\s+/g, ' ');
|
||||
let encodedData = ',' + newText;
|
||||
if (encodedData.length < DATA.length) {
|
||||
DATA = encodedData;
|
||||
}
|
||||
}
|
||||
return '"data:' + MIME + DATA + '"';
|
||||
const fontMatch = url.match(/^(.*).ttf\?(.*)$/);
|
||||
if (fontMatch) {
|
||||
const relativeFontPath = `${fontMatch[1]}.ttf`; // trim the query parameter
|
||||
const fontPath = path.join(path.dirname(module), relativeFontPath);
|
||||
enqueue(fontPath);
|
||||
return relativeFontPath;
|
||||
}
|
||||
|
||||
enqueue(imagePath);
|
||||
return url;
|
||||
const imagePath = path.join(path.dirname(module), url);
|
||||
const fileContents = fs.readFileSync(path.join(SRC_DIR, imagePath));
|
||||
const MIME = /\.svg$/.test(url) ? 'image/svg+xml' : 'image/png';
|
||||
let DATA = ';base64,' + fileContents.toString('base64');
|
||||
|
||||
if (!forceBase64 && /\.svg$/.test(url)) {
|
||||
// .svg => url encode as explained at https://codepen.io/tigt/post/optimizing-svgs-in-data-uris
|
||||
let newText = fileContents.toString()
|
||||
.replace(/"/g, '\'')
|
||||
.replace(/</g, '%3C')
|
||||
.replace(/>/g, '%3E')
|
||||
.replace(/&/g, '%26')
|
||||
.replace(/#/g, '%23')
|
||||
.replace(/\s+/g, ' ');
|
||||
let encodedData = ',' + newText;
|
||||
if (encodedData.length < DATA.length) {
|
||||
DATA = encodedData;
|
||||
}
|
||||
}
|
||||
return '"data:' + MIME + DATA + '"';
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@ const Lint = require("tslint");
|
|||
*/
|
||||
class Rule extends Lint.Rules.AbstractRule {
|
||||
apply(sourceFile) {
|
||||
if (/\.d.ts$/.test(sourceFile.fileName)) {
|
||||
return [];
|
||||
}
|
||||
return this.applyWithWalker(new NoUnexternalizedStringsRuleWalker(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,9 @@ import * as Lint from 'tslint';
|
|||
*/
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
if (/\.d.ts$/.test(sourceFile.fileName)) {
|
||||
return [];
|
||||
}
|
||||
return this.applyWithWalker(new NoUnexternalizedStringsRuleWalker(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
||||
|
|
12
build/lib/typings/gulp-tsb.d.ts
vendored
12
build/lib/typings/gulp-tsb.d.ts
vendored
|
@ -7,10 +7,12 @@ declare module "gulp-tsb" {
|
|||
}
|
||||
|
||||
export interface IncrementalCompiler {
|
||||
(token?:ICancellationToken): NodeJS.ReadWriteStream;
|
||||
// program?: ts.Program;
|
||||
(token?: ICancellationToken): NodeJS.ReadWriteStream;
|
||||
src(opts?: {
|
||||
cwd?: string;
|
||||
base?: string;
|
||||
}): NodeJS.ReadStream;
|
||||
}
|
||||
export function create(projectPath: string, existingOptions: any, verbose?: boolean, onError?: (message: any) => void): IncrementalCompiler;
|
||||
|
||||
export function create(configOrName: { [option: string]: string | number | boolean; } | string, verbose?: boolean, json?: boolean, onError?: (message: any) => void): IncrementalCompiler;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ function loadSourcemaps() {
|
|||
return;
|
||||
}
|
||||
if (!f.contents) {
|
||||
cb(new Error('empty file'));
|
||||
cb(undefined, f);
|
||||
return;
|
||||
}
|
||||
const contents = f.contents.toString('utf8');
|
||||
|
|
|
@ -165,7 +165,7 @@ export function loadSourcemaps(): NodeJS.ReadWriteStream {
|
|||
}
|
||||
|
||||
if (!f.contents) {
|
||||
cb(new Error('empty file'));
|
||||
cb(undefined, f);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,17 +5,6 @@
|
|||
|
||||
const es = require('event-stream');
|
||||
|
||||
/** Ugly hack for gulp-tsb */
|
||||
function handleDeletions() {
|
||||
return es.mapSync(f => {
|
||||
if (/\.ts$/.test(f.relative) && !f.contents) {
|
||||
f.contents = Buffer.from('');
|
||||
f.stat = { mtime: new Date() };
|
||||
}
|
||||
|
||||
return f;
|
||||
});
|
||||
}
|
||||
|
||||
let watch = undefined;
|
||||
|
||||
|
@ -24,6 +13,5 @@ if (!watch) {
|
|||
}
|
||||
|
||||
module.exports = function () {
|
||||
return watch.apply(null, arguments)
|
||||
.pipe(handleDeletions());
|
||||
return watch.apply(null, arguments);
|
||||
};
|
||||
|
|
|
@ -148,8 +148,9 @@ function getMassagedTopLevelDeclarationText(sourceFile, declaration, importName,
|
|||
}
|
||||
});
|
||||
}
|
||||
result = result.replace(/export default/g, 'export');
|
||||
result = result.replace(/export declare/g, 'export');
|
||||
result = result.replace(/export default /g, 'export ');
|
||||
result = result.replace(/export declare /g, 'export ');
|
||||
result = result.replace(/declare /g, '');
|
||||
if (declaration.kind === ts.SyntaxKind.EnumDeclaration) {
|
||||
result = result.replace(/const enum/, 'enum');
|
||||
enums.push(result);
|
||||
|
|
|
@ -178,8 +178,9 @@ function getMassagedTopLevelDeclarationText(sourceFile: ts.SourceFile, declarati
|
|||
}
|
||||
});
|
||||
}
|
||||
result = result.replace(/export default/g, 'export');
|
||||
result = result.replace(/export declare/g, 'export');
|
||||
result = result.replace(/export default /g, 'export ');
|
||||
result = result.replace(/export declare /g, 'export ');
|
||||
result = result.replace(/declare /g, '');
|
||||
|
||||
if (declaration.kind === ts.SyntaxKind.EnumDeclaration) {
|
||||
result = result.replace(/const enum/, 'enum');
|
||||
|
|
|
@ -48,7 +48,7 @@ declare namespace monaco.editor {
|
|||
#include(vs/editor/standalone/common/standaloneThemeService): BuiltinTheme, IStandaloneThemeData, IColors
|
||||
#include(vs/editor/common/modes/supports/tokenization): ITokenThemeRule
|
||||
#include(vs/editor/common/services/webWorker): MonacoWebWorker, IWebWorkerOptions
|
||||
#include(vs/editor/standalone/browser/standaloneCodeEditor): IActionDescriptor, IEditorConstructionOptions, IDiffEditorConstructionOptions, IStandaloneCodeEditor, IStandaloneDiffEditor
|
||||
#include(vs/editor/standalone/browser/standaloneCodeEditor): IActionDescriptor, IStandaloneEditorConstructionOptions, IDiffEditorConstructionOptions, IStandaloneCodeEditor, IStandaloneDiffEditor
|
||||
export interface ICommandHandler {
|
||||
(...args: any[]): void;
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ export interface ICommandHandler {
|
|||
#includeAll(vs/editor/common/editorCommon;editorOptions.=>): IScrollEvent
|
||||
#includeAll(vs/editor/common/model/textModelEvents):
|
||||
#includeAll(vs/editor/common/controller/cursorEvents):
|
||||
#include(vs/platform/accessibility/common/accessibility): AccessibilitySupport
|
||||
#includeAll(vs/editor/common/config/editorOptions):
|
||||
#includeAll(vs/editor/browser/editorBrowser;editorCommon.=>;editorOptions.=>):
|
||||
#include(vs/editor/common/config/fontInfo): FontInfo, BareFontInfo
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "monaco-editor-core",
|
||||
"private": true,
|
||||
"version": "0.16.0",
|
||||
"version": "0.18.0",
|
||||
"description": "A browser based code editor",
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -70,6 +70,7 @@ runtime "${runtime}"`;
|
|||
}
|
||||
|
||||
yarnInstall(`build`); // node modules required for build
|
||||
yarnInstall('test/automation'); // 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
|
||||
|
||||
|
|
|
@ -31,4 +31,4 @@ if (!/yarn\.js$|yarnpkg$/.test(process.env['npm_execpath'])) {
|
|||
if (err) {
|
||||
console.error('');
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
"@types/pump": "^1.0.1",
|
||||
"@types/request": "^2.47.0",
|
||||
"@types/rimraf": "^2.0.2",
|
||||
"@types/terser": "^3.12.0",
|
||||
"@types/through": "^0.0.29",
|
||||
"@types/through2": "^2.0.34",
|
||||
"@types/uglify-es": "^3.0.0",
|
||||
"@types/underscore": "^1.8.9",
|
||||
"@types/xml2js": "0.0.33",
|
||||
"applicationinsights": "1.0.8",
|
||||
|
@ -35,12 +35,14 @@
|
|||
"github-releases": "^0.4.1",
|
||||
"gulp-bom": "^1.0.0",
|
||||
"gulp-sourcemaps": "^1.11.0",
|
||||
"gulp-uglify": "^3.0.0",
|
||||
"iconv-lite": "0.4.23",
|
||||
"mime": "^1.3.4",
|
||||
"minimist": "^1.2.0",
|
||||
"request": "^2.85.0",
|
||||
"terser": "4.3.1",
|
||||
"tslint": "^5.9.1",
|
||||
"typescript": "3.5.2",
|
||||
"typescript": "3.6.2",
|
||||
"vsce": "1.48.0",
|
||||
"vscode-telemetry-extractor": "^1.5.4",
|
||||
"xml2js": "^0.4.17"
|
||||
|
|
163
build/yarn.lock
163
build/yarn.lock
|
@ -225,6 +225,13 @@
|
|||
"@types/glob" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/terser@^3.12.0":
|
||||
version "3.12.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/terser/-/terser-3.12.0.tgz#25e020fe9a7a6ae92ce46261f00ced67de6c12ac"
|
||||
integrity sha512-J0Wy8A7ULEqVJftkWhrXZbH0iBk4tYuTj0gBiiveKaY9deNi6cCsxl0ApJ27ojqwYv51bvEw85lOb8Wt4ng9zA==
|
||||
dependencies:
|
||||
terser "*"
|
||||
|
||||
"@types/through2@^2.0.34":
|
||||
version "2.0.34"
|
||||
resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.34.tgz#9c2a259a238dace2a05a2f8e94b786961bc27ac4"
|
||||
|
@ -244,20 +251,6 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.2.tgz#e0d481d8bb282ad8a8c9e100ceb72c995fb5e709"
|
||||
integrity sha512-vOVmaruQG5EatOU/jM6yU2uCp3Lz6mK1P5Ztu4iJjfM4SVHU9XYktPUQtKlIXuahqXHdEyUarMrBEwg5Cwu+bA==
|
||||
|
||||
"@types/uglify-es@^3.0.0":
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/uglify-es/-/uglify-es-3.0.0.tgz#2c5e70b43c0e86643ac1c223f61df15fa0b87bc2"
|
||||
integrity sha512-Oc/c7pGIQL0MVhC6g+VftWiDQethKsT4c3fQKYm6nOprkvkx9s1MLrnJprDTKlZL3ZJulMpCF9Qn7s6u3uCNxQ==
|
||||
dependencies:
|
||||
"@types/uglify-js" "*"
|
||||
|
||||
"@types/uglify-js@*":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.3.tgz#801a5ca1dc642861f47c46d14b700ed2d610840b"
|
||||
integrity sha512-MAT0BW2ruO0LhQKjvlipLGCF/Yx0y/cj+tT67tK3QIQDrM2+9R78HgJ54VlrE8AbfjYJJBCQCEPM5ZblPVTuww==
|
||||
dependencies:
|
||||
source-map "^0.6.1"
|
||||
|
||||
"@types/uglify-js@^2":
|
||||
version "2.6.31"
|
||||
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-2.6.31.tgz#c694755eeb6a1bb9f8f321f3ec37cc22ca4c4f6b"
|
||||
|
@ -388,6 +381,11 @@ array-differ@^3.0.0:
|
|||
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b"
|
||||
integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==
|
||||
|
||||
array-each@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f"
|
||||
integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8=
|
||||
|
||||
array-union@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
|
||||
|
@ -418,6 +416,11 @@ assert-plus@^0.2.0:
|
|||
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234"
|
||||
integrity sha1-104bh+ev/A24qttwIfP+SBAasjQ=
|
||||
|
||||
assign-symbols@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
|
||||
integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
|
||||
|
||||
asynckit@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
||||
|
@ -547,6 +550,11 @@ buffer-crc32@~0.2.3:
|
|||
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
|
||||
integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=
|
||||
|
||||
buffer-from@^1.0.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
|
||||
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
|
||||
|
||||
builtin-modules@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
|
||||
|
@ -660,6 +668,11 @@ commander@^2.12.1, commander@^2.8.1:
|
|||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
|
||||
integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==
|
||||
|
||||
commander@^2.20.0, commander@~2.20.0:
|
||||
version "2.20.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
|
||||
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
|
@ -878,6 +891,14 @@ esutils@^2.0.2:
|
|||
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
|
||||
integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=
|
||||
|
||||
extend-shallow@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
|
||||
integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=
|
||||
dependencies:
|
||||
assign-symbols "^1.0.0"
|
||||
is-extendable "^1.0.1"
|
||||
|
||||
extend@~1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/extend/-/extend-1.2.1.tgz#a0f5fd6cfc83a5fe49ef698d60ec8a624dd4576c"
|
||||
|
@ -1093,6 +1114,22 @@ gulp-sourcemaps@^1.11.0:
|
|||
through2 "2.X"
|
||||
vinyl "1.X"
|
||||
|
||||
gulp-uglify@^3.0.0:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-3.0.2.tgz#5f5b2e8337f879ca9dec971feb1b82a5a87850b0"
|
||||
integrity sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==
|
||||
dependencies:
|
||||
array-each "^1.0.1"
|
||||
extend-shallow "^3.0.2"
|
||||
gulplog "^1.0.0"
|
||||
has-gulplog "^0.1.0"
|
||||
isobject "^3.0.1"
|
||||
make-error-cause "^1.1.1"
|
||||
safe-buffer "^5.1.2"
|
||||
through2 "^2.0.0"
|
||||
uglify-js "^3.0.5"
|
||||
vinyl-sourcemaps-apply "^0.2.0"
|
||||
|
||||
gulp-util@^3.0.0:
|
||||
version "3.0.8"
|
||||
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
|
||||
|
@ -1275,6 +1312,13 @@ is-absolute@^1.0.0:
|
|||
is-relative "^1.0.0"
|
||||
is-windows "^1.0.1"
|
||||
|
||||
is-extendable@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
|
||||
integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
|
||||
dependencies:
|
||||
is-plain-object "^2.0.4"
|
||||
|
||||
is-extglob@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
|
||||
|
@ -1297,6 +1341,13 @@ is-number@^7.0.0:
|
|||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
||||
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
||||
|
||||
is-plain-object@^2.0.4:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
|
||||
integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
|
||||
dependencies:
|
||||
isobject "^3.0.1"
|
||||
|
||||
is-relative@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d"
|
||||
|
@ -1336,6 +1387,11 @@ isarray@~1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
|
||||
|
||||
isobject@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
|
||||
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
|
||||
|
||||
isstream@~0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
|
||||
|
@ -1536,6 +1592,18 @@ lodash@^4.15.0, lodash@^4.17.10:
|
|||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
|
||||
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
|
||||
|
||||
make-error-cause@^1.1.1:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d"
|
||||
integrity sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=
|
||||
dependencies:
|
||||
make-error "^1.2.0"
|
||||
|
||||
make-error@^1.2.0:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8"
|
||||
integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==
|
||||
|
||||
markdown-it@^8.3.1:
|
||||
version "8.4.2"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.2.tgz#386f98998dc15a37722aa7722084f4020bdd9b54"
|
||||
|
@ -1945,6 +2013,11 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.1:
|
|||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||
integrity sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==
|
||||
|
||||
safe-buffer@^5.1.2:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
|
||||
integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
|
||||
|
||||
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||
|
@ -2005,12 +2078,25 @@ source-map-resolve@^0.5.2:
|
|||
source-map-url "^0.4.0"
|
||||
urix "^0.1.0"
|
||||
|
||||
source-map-support@~0.5.12:
|
||||
version "0.5.13"
|
||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
|
||||
integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==
|
||||
dependencies:
|
||||
buffer-from "^1.0.0"
|
||||
source-map "^0.6.0"
|
||||
|
||||
source-map-url@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
|
||||
integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
|
||||
|
||||
source-map@^0.6.1, source-map@~0.6.0:
|
||||
source-map@^0.5.1:
|
||||
version "0.5.7"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
||||
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
|
||||
|
||||
source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
@ -2083,6 +2169,24 @@ supports-color@^5.3.0:
|
|||
dependencies:
|
||||
has-flag "^3.0.0"
|
||||
|
||||
terser@*:
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/terser/-/terser-4.2.1.tgz#1052cfe17576c66e7bc70fcc7119f22b155bdac1"
|
||||
integrity sha512-cGbc5utAcX4a9+2GGVX4DsenG6v0x3glnDi5hx8816X1McEAwPlPgRtXPJzSBsbpILxZ8MQMT0KvArLuE0HP5A==
|
||||
dependencies:
|
||||
commander "^2.20.0"
|
||||
source-map "~0.6.1"
|
||||
source-map-support "~0.5.12"
|
||||
|
||||
terser@4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.1.tgz#09820bcb3398299c4b48d9a86aefc65127d0ed65"
|
||||
integrity sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg==
|
||||
dependencies:
|
||||
commander "^2.20.0"
|
||||
source-map "~0.6.1"
|
||||
source-map-support "~0.5.12"
|
||||
|
||||
through2@2.X, through2@^2.0.0, through2@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
|
||||
|
@ -2193,10 +2297,10 @@ typed-rest-client@^0.9.0:
|
|||
tunnel "0.0.4"
|
||||
underscore "1.8.3"
|
||||
|
||||
typescript@3.5.2:
|
||||
version "3.5.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
|
||||
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
|
||||
typescript@3.6.2:
|
||||
version "3.6.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54"
|
||||
integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==
|
||||
|
||||
typescript@^3.0.1:
|
||||
version "3.5.3"
|
||||
|
@ -2213,6 +2317,14 @@ uc.micro@^1.0.1, uc.micro@^1.0.5:
|
|||
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376"
|
||||
integrity sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg==
|
||||
|
||||
uglify-js@^3.0.5:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5"
|
||||
integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==
|
||||
dependencies:
|
||||
commander "~2.20.0"
|
||||
source-map "~0.6.1"
|
||||
|
||||
unc-path-regex@^0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
|
||||
|
@ -2272,6 +2384,13 @@ verror@1.10.0:
|
|||
core-util-is "1.0.2"
|
||||
extsprintf "^1.2.0"
|
||||
|
||||
vinyl-sourcemaps-apply@^0.2.0:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705"
|
||||
integrity sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=
|
||||
dependencies:
|
||||
source-map "^0.5.1"
|
||||
|
||||
vinyl@1.X:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
|
||||
|
@ -2314,9 +2433,9 @@ vsce@1.48.0:
|
|||
yazl "^2.2.2"
|
||||
|
||||
vscode-ripgrep@^1.5.6:
|
||||
version "1.5.6"
|
||||
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.6.tgz#93bf5c99ca5f8248950a305e224f6ca153c30af4"
|
||||
integrity sha512-WRIM9XpUj6dsfdAmuI3ANbmT1ysPUVsYy/2uCLDHJa9kbiB4T7uGvFnnc0Rgx2qQnyRAwL7PeWaFgUljPPxf2g==
|
||||
version "1.5.7"
|
||||
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.7.tgz#acb6b548af488a4bca5d0f1bb5faf761343289ce"
|
||||
integrity sha512-/Vsz/+k8kTvui0q3O74pif9FK0nKopgFTiGNVvxicZANxtSA8J8gUE9GQ/4dpi7D/2yI/YVORszwVskFbz46hQ==
|
||||
|
||||
vscode-telemetry-extractor@^1.5.4:
|
||||
version "1.5.4"
|
||||
|
|
|
@ -46,58 +46,6 @@
|
|||
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
|
||||
]
|
||||
},
|
||||
{
|
||||
// Reason: The npm module does not contain a repository field.
|
||||
// waiting for https://github.com/xtermjs/xterm.js/issues/2395
|
||||
"name": "xterm-addon-search",
|
||||
"fullLicenseText": [
|
||||
"Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)",
|
||||
"",
|
||||
"Permission is hereby granted, free of charge, to any person obtaining a copy",
|
||||
"of this software and associated documentation files (the \"Software\"), to deal",
|
||||
"in the Software without restriction, including without limitation the rights",
|
||||
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
|
||||
"copies of the Software, and to permit persons to whom the Software is",
|
||||
"furnished to do so, subject to the following conditions:",
|
||||
"",
|
||||
"The above copyright notice and this permission notice shall be included in",
|
||||
"all copies or substantial portions of the Software.",
|
||||
"",
|
||||
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
|
||||
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
|
||||
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
|
||||
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
|
||||
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
|
||||
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN",
|
||||
"THE SOFTWARE."
|
||||
]
|
||||
},
|
||||
{
|
||||
// Reason: The npm module does not contain a repository field.
|
||||
// waiting for https://github.com/xtermjs/xterm.js/issues/2395
|
||||
"name": "xterm-addon-web-links",
|
||||
"fullLicenseText": [
|
||||
"Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)",
|
||||
"",
|
||||
"Permission is hereby granted, free of charge, to any person obtaining a copy",
|
||||
"of this software and associated documentation files (the \"Software\"), to deal",
|
||||
"in the Software without restriction, including without limitation the rights",
|
||||
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
|
||||
"copies of the Software, and to permit persons to whom the Software is",
|
||||
"furnished to do so, subject to the following conditions:",
|
||||
"",
|
||||
"The above copyright notice and this permission notice shall be included in",
|
||||
"all copies or substantial portions of the Software.",
|
||||
"",
|
||||
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
|
||||
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
|
||||
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
|
||||
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
|
||||
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
|
||||
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN",
|
||||
"THE SOFTWARE."
|
||||
]
|
||||
},
|
||||
{
|
||||
// Reason: The license at https://git.coolaj86.com/coolaj86/atob.js/src/branch/master/LICENSE
|
||||
// cannot be found by the OSS tool automatically.
|
||||
|
|
|
@ -60,12 +60,12 @@
|
|||
"git": {
|
||||
"name": "electron",
|
||||
"repositoryUrl": "https://github.com/electron/electron",
|
||||
"commitHash": "3d4d6454007f14fa9a5f0e1fa49206fb91b676cc"
|
||||
"commitHash": "4e4c7527c63fcf27dffaeb58bde996b8d859c0ed"
|
||||
}
|
||||
},
|
||||
"isOnlyProductionDependency": true,
|
||||
"license": "MIT",
|
||||
"version": "4.2.9"
|
||||
"version": "4.2.10"
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
"url": "vscode://schemas/keybindings"
|
||||
},
|
||||
{
|
||||
"fileMatch": "vscode://defaultsettings/settings.json",
|
||||
"fileMatch": "vscode://defaultsettings/*/*.json",
|
||||
"url": "vscode://schemas/settings/default"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -54,6 +54,7 @@ export class SettingsDocument {
|
|||
completions.push(this.newSimpleCompletionItem('${folderName}', range, localize('folderName', "name of the workspace folder the file is contained in (e.g. myFolder)")));
|
||||
completions.push(this.newSimpleCompletionItem('${folderPath}', range, localize('folderPath', "file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder)")));
|
||||
completions.push(this.newSimpleCompletionItem('${appName}', range, localize('appName', "e.g. VS Code")));
|
||||
completions.push(this.newSimpleCompletionItem('${remoteName}', range, localize('remoteName', "e.g. SSH")));
|
||||
completions.push(this.newSimpleCompletionItem('${dirty}', range, localize('dirty', "a dirty indicator if the active editor is dirty")));
|
||||
completions.push(this.newSimpleCompletionItem('${separator}', range, localize('separator', "a conditional separator (' - ') that only shows when surrounded by variables with values")));
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ var updateGrammar = require('../../../build/npm/update-grammar');
|
|||
|
||||
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/c.tmLanguage.json', './syntaxes/c.tmLanguage.json', undefined, 'master', 'source/languages/cpp/');
|
||||
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/cpp.tmLanguage.json', './syntaxes/cpp.tmLanguage.json', undefined, 'master', 'source/languages/cpp/');
|
||||
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/cpp.embedded.macro.tmLanguage.json', './syntaxes/cpp.embedded.macro.tmLanguage.json', undefined, 'master', 'source/languages/cpp/');
|
||||
|
||||
// `source.c.platform` which is still included by other grammars
|
||||
updateGrammar.update('textmate/c.tmbundle', 'Syntaxes/Platform.tmLanguage', './syntaxes/platform.tmLanguage.json');
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
"git": {
|
||||
"name": "jeff-hykin/cpp-textmate-grammar",
|
||||
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
|
||||
"commitHash": "e33a317ccd0babba4b07ffc042ab9796e6412ddc"
|
||||
"commitHash": "dd94b6a93799f2bce7e29b2515d96553e34574b0"
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"version": "1.8.15",
|
||||
"version": "1.14.6",
|
||||
"description": "The files syntaxes/c.json and syntaxes/c++.json were derived from https://github.com/atom/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
|
||||
},
|
||||
{
|
||||
|
|
|
@ -5,44 +5,82 @@
|
|||
"version": "1.0.0",
|
||||
"publisher": "vscode",
|
||||
"license": "MIT",
|
||||
"engines": { "vscode": "*" },
|
||||
"engines": {
|
||||
"vscode": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"update-grammar": "node ./build/update-grammars.js"
|
||||
},
|
||||
"contributes": {
|
||||
"languages": [{
|
||||
"id": "c",
|
||||
"extensions": [ ".c"],
|
||||
"aliases": [ "C", "c" ],
|
||||
"configuration": "./language-configuration.json"
|
||||
},
|
||||
{
|
||||
"id": "cpp",
|
||||
"extensions": [ ".cpp", ".cc", ".cxx", ".hpp", ".hh", ".hxx", ".h", ".i", ".ino", ".inl", ".ipp", ".hpp.in", ".h.in" ],
|
||||
"aliases": [ "C++", "Cpp", "cpp"],
|
||||
"configuration": "./language-configuration.json"
|
||||
}],
|
||||
"grammars": [{
|
||||
"language": "c",
|
||||
"scopeName": "source.c",
|
||||
"path": "./syntaxes/c.tmLanguage.json"
|
||||
},
|
||||
{
|
||||
"language": "cpp",
|
||||
"scopeName": "source.cpp",
|
||||
"path": "./syntaxes/cpp.tmLanguage.json"
|
||||
},
|
||||
{
|
||||
"scopeName": "source.c.platform",
|
||||
"path": "./syntaxes/platform.tmLanguage.json"
|
||||
}],
|
||||
"snippets": [{
|
||||
"language": "c",
|
||||
"path": "./snippets/c.json"
|
||||
},
|
||||
{
|
||||
"language": "cpp",
|
||||
"path": "./snippets/cpp.json"
|
||||
}]
|
||||
"languages": [
|
||||
{
|
||||
"id": "c",
|
||||
"extensions": [
|
||||
".c",
|
||||
".i"
|
||||
],
|
||||
"aliases": [
|
||||
"C",
|
||||
"c"
|
||||
],
|
||||
"configuration": "./language-configuration.json"
|
||||
},
|
||||
{
|
||||
"id": "cpp",
|
||||
"extensions": [
|
||||
".cpp",
|
||||
".cc",
|
||||
".cxx",
|
||||
".c++",
|
||||
".hpp",
|
||||
".hh",
|
||||
".hxx",
|
||||
".h",
|
||||
".ii",
|
||||
".ino",
|
||||
".inl",
|
||||
".ipp",
|
||||
".hpp.in",
|
||||
".h.in"
|
||||
],
|
||||
"aliases": [
|
||||
"C++",
|
||||
"Cpp",
|
||||
"cpp"
|
||||
],
|
||||
"configuration": "./language-configuration.json"
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
{
|
||||
"language": "c",
|
||||
"scopeName": "source.c",
|
||||
"path": "./syntaxes/c.tmLanguage.json"
|
||||
},
|
||||
{
|
||||
"language": "cpp",
|
||||
"scopeName": "source.cpp.embedded.macro",
|
||||
"path": "./syntaxes/cpp.embedded.macro.tmLanguage.json"
|
||||
},
|
||||
{
|
||||
"language": "cpp",
|
||||
"scopeName": "source.cpp",
|
||||
"path": "./syntaxes/cpp.tmLanguage.json"
|
||||
},
|
||||
{
|
||||
"scopeName": "source.c.platform",
|
||||
"path": "./syntaxes/platform.tmLanguage.json"
|
||||
}
|
||||
],
|
||||
"snippets": [
|
||||
{
|
||||
"language": "c",
|
||||
"path": "./snippets/c.json"
|
||||
},
|
||||
{
|
||||
"language": "cpp",
|
||||
"path": "./snippets/cpp.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
15982
extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json
Normal file
15982
extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
13
extensions/cpp/test/colorize-fixtures/test-78769.cpp
Normal file
13
extensions/cpp/test/colorize-fixtures/test-78769.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, decorators) \
|
||||
namespace { \
|
||||
struct der : public base \
|
||||
{ \
|
||||
void f(); \
|
||||
}; \
|
||||
static void func() { \
|
||||
der v; \
|
||||
v.f(); \
|
||||
} \
|
||||
DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, func, decorators) \
|
||||
} \
|
||||
inline DOCTEST_NOINLINE void der::f()
|
10
extensions/cpp/test/colorize-fixtures/test-80644.cpp
Normal file
10
extensions/cpp/test/colorize-fixtures/test-80644.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
struct Foo {
|
||||
Foo();
|
||||
int a;
|
||||
int b;
|
||||
int c;
|
||||
};
|
||||
Foo::Foo()
|
||||
: a(1),
|
||||
// b(2),
|
||||
c(3) {}
|
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
|
||||
"t": "source.cpp keyword.control.directive.conditional.ifndef.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
{
|
||||
"c": "ifndef",
|
||||
"t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
|
||||
"t": "source.cpp keyword.control.directive.conditional.ifndef.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
|
@ -23,7 +23,7 @@
|
|||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.preprocessor.cpp",
|
||||
"t": "source.cpp meta.preprocessor.conditional.cpp",
|
||||
"r": {
|
||||
"dark_plus": "meta.preprocessor: #569CD6",
|
||||
"light_plus": "meta.preprocessor: #0000FF",
|
||||
|
@ -34,7 +34,7 @@
|
|||
},
|
||||
{
|
||||
"c": "_UCRT",
|
||||
"t": "source.cpp meta.preprocessor.cpp entity.name.function.preprocessor.cpp",
|
||||
"t": "source.cpp meta.preprocessor.conditional.cpp entity.name.function.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
|
@ -100,7 +100,7 @@
|
|||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
|
@ -111,7 +111,7 @@
|
|||
},
|
||||
{
|
||||
"c": "endif",
|
||||
"t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
|
||||
"t": "source.cpp keyword.control.directive.conditional.ifndef.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
{
|
||||
"c": "ifndef",
|
||||
"t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
|
||||
"t": "source.cpp keyword.control.directive.conditional.ifndef.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
|
@ -23,7 +23,7 @@
|
|||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.preprocessor.cpp",
|
||||
"t": "source.cpp meta.preprocessor.conditional.cpp",
|
||||
"r": {
|
||||
"dark_plus": "meta.preprocessor: #569CD6",
|
||||
"light_plus": "meta.preprocessor: #0000FF",
|
||||
|
@ -34,7 +34,7 @@
|
|||
},
|
||||
{
|
||||
"c": "_UCRT",
|
||||
"t": "source.cpp meta.preprocessor.cpp entity.name.function.preprocessor.cpp",
|
||||
"t": "source.cpp meta.preprocessor.conditional.cpp entity.name.function.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
|
@ -89,7 +89,7 @@
|
|||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
|
@ -100,7 +100,7 @@
|
|||
},
|
||||
{
|
||||
"c": "endif",
|
||||
"t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
|
|
1190
extensions/cpp/test/colorize-results/test-78769_cpp.json
Normal file
1190
extensions/cpp/test/colorize-results/test-78769_cpp.json
Normal file
File diff suppressed because it is too large
Load diff
530
extensions/cpp/test/colorize-results/test-80644_cpp.json
Normal file
530
extensions/cpp/test/colorize-results/test-80644_cpp.json
Normal file
|
@ -0,0 +1,530 @@
|
|||
[
|
||||
{
|
||||
"c": "struct",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.head.struct.cpp storage.type.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.block.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "Foo",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.head.struct.cpp entity.name.type.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
"light_plus": "entity.name.type: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "entity.name.type: #4EC9B0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.head.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "{",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.head.struct.cpp punctuation.section.block.begin.bracket.curly.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp meta.function.definition.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "Foo",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp entity.name.function.constructor.cpp entity.name.function.definition.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "(",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.section.parameters.begin.bracket.round.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.section.parameters.end.bracket.round.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ";",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp punctuation.terminator.statement.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "int",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp storage.type.primitive.cpp storage.type.built-in.primitive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " a",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ";",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp punctuation.terminator.statement.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "int",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp storage.type.primitive.cpp storage.type.built-in.primitive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " b",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ";",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp punctuation.terminator.statement.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "int",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp storage.type.primitive.cpp storage.type.built-in.primitive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " c",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ";",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp punctuation.terminator.statement.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "}",
|
||||
"t": "source.cpp meta.block.struct.cpp meta.body.struct.cpp punctuation.section.block.end.bracket.curly.struct.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ";",
|
||||
"t": "source.cpp meta.block.struct.cpp punctuation.terminator.statement.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "Foo",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp entity.name.type.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
"light_plus": "entity.name.type: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "entity.name.type: #4EC9B0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "::",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "Foo",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp entity.name.function.definition.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "(",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.section.parameters.begin.bracket.round.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.section.parameters.end.bracket.round.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ":",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.separator.initializers.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "a",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp entity.name.function.call.initializer.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "(",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "1",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp meta.parameter.initialization.cpp constant.numeric.decimal.cpp",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
"dark_vs": "constant.numeric: #B5CEA8",
|
||||
"light_vs": "constant.numeric: #09885A",
|
||||
"hc_black": "constant.numeric: #B5CEA8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ",",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.separator.delimiter.comma.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp comment.line.double-slash.cpp",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "//",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp comment.line.double-slash.cpp punctuation.definition.comment.cpp",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " b(2),",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp comment.line.double-slash.cpp",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "c",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp entity.name.function.call.initializer.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "(",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "3",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp meta.parameter.initialization.cpp constant.numeric.decimal.cpp",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
"dark_vs": "constant.numeric: #B5CEA8",
|
||||
"light_vs": "constant.numeric: #09885A",
|
||||
"hc_black": "constant.numeric: #B5CEA8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "{",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.head.function.definition.special.constructor.cpp punctuation.section.block.begin.bracket.curly.function.definition.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "}",
|
||||
"t": "source.cpp meta.function.definition.special.constructor.cpp meta.body.function.definition.special.constructor.cpp punctuation.section.block.end.bracket.curly.function.definition.special.constructor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -9,9 +9,10 @@ import * as fs from 'fs';
|
|||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { languages, window, commands, ExtensionContext, Range, Position, CompletionItem, CompletionItemKind, TextEdit, SnippetString, workspace } from 'vscode';
|
||||
import { languages, window, commands, ExtensionContext, Range, Position, CompletionItem, CompletionItemKind, TextEdit, SnippetString, workspace, CompletionItemTag } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, Disposable } from 'vscode-languageclient';
|
||||
import { getCustomDataPathsInAllWorkspaces, getCustomDataPathsFromAllExtensions } from './customData';
|
||||
import { isArray } from 'util';
|
||||
|
||||
// this method is called when vs code is activated
|
||||
export function activate(context: ExtensionContext) {
|
||||
|
@ -44,6 +45,32 @@ export function activate(context: ExtensionContext) {
|
|||
},
|
||||
initializationOptions: {
|
||||
dataPaths
|
||||
},
|
||||
middleware: {
|
||||
async provideCompletionItem(document, position, context, token, next) {
|
||||
const result = await next(document, position, context, token);
|
||||
if (result) {
|
||||
if (isArray(result)) {
|
||||
return result.map(r => {
|
||||
return {
|
||||
...r,
|
||||
tags: (r as any).deprecated ? [CompletionItemTag.Deprecated] : undefined
|
||||
};
|
||||
});
|
||||
} else {
|
||||
return {
|
||||
isIncomplete: result.isIncomplete,
|
||||
items: result.items.map(r => {
|
||||
return {
|
||||
...r,
|
||||
tags: (r as any).deprecated ? [CompletionItemTag.Deprecated] : undefined
|
||||
};
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"properties": {
|
||||
"css.customData": {
|
||||
"type": "array",
|
||||
"description": "%css.customData.desc%",
|
||||
"markdownDescription": "%css.customData.desc%",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
|
@ -59,6 +59,12 @@
|
|||
"default": true,
|
||||
"description": "%css.completion.triggerPropertyValueCompletion.desc%"
|
||||
},
|
||||
"css.completion.completePropertyWithSemicolon": {
|
||||
"type": "boolean",
|
||||
"scope": "resource",
|
||||
"default": true,
|
||||
"description": "%css.completion.completePropertyWithSemicolon.desc%"
|
||||
},
|
||||
"css.validate": {
|
||||
"type": "boolean",
|
||||
"scope": "resource",
|
||||
|
@ -745,6 +751,10 @@
|
|||
{
|
||||
"fileMatch": "*.css-data.json",
|
||||
"url": "https://raw.githubusercontent.com/Microsoft/vscode-css-languageservice/master/docs/customData.schema.json"
|
||||
},
|
||||
{
|
||||
"fileMatch": "package.json",
|
||||
"url": "./schemas/package.schema.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
"displayName": "CSS Language Features",
|
||||
"description": "Provides rich language support for CSS, LESS and SCSS files.",
|
||||
"css.title": "CSS",
|
||||
"css.customData.desc": "A list of JSON file paths that define custom CSS data that loads custom properties, at directives, pseudo classes / elements.",
|
||||
"css.customData.desc": "A list of relative file paths pointing to JSON files following the [custom data format](https://github.com/Microsoft/vscode-css-languageservice/blob/master/docs/customData.md).\n\nVS Code loads custom data on startup to enhance its CSS support for the custom CSS properties, at directives, pseudo classes and pseudo elements you specify in the JSON files.\n\nThe file paths are relative to workspace and only workspace folder settings are considered.",
|
||||
"css.completion.triggerPropertyValueCompletion.desc": "By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior.",
|
||||
"css.completion.completePropertyWithSemicolon.desc": "Insert semicolon at end when completing CSS properties",
|
||||
"css.lint.argumentsInColorFunction.desc": "Invalid number of parameters.",
|
||||
"css.lint.boxModel.desc": "Do not use `width` or `height` when using `padding` or `border`.",
|
||||
"css.lint.compatibleVendorPrefixes.desc": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties.",
|
||||
|
|
20
extensions/css-language-features/schemas/package.schema.json
Normal file
20
extensions/css-language-features/schemas/package.schema.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "CSS contributions to package.json",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"contributes": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"css.customData": {
|
||||
"type": "array",
|
||||
"markdownDescription": "A list of relative file paths pointing to JSON files following the [custom data format](https://github.com/Microsoft/vscode-css-languageservice/blob/master/docs/customData.md).\n\nVS Code loads custom data on startup to enhance its CSS support for the custom CSS properties, at directives, pseudo classes and pseudo elements you specify in the JSON files.\n\nThe file paths are relative to workspace and only workspace folder settings are considered.",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "Relative path to a CSS custom data file"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@
|
|||
},
|
||||
"main": "./out/cssServerMain",
|
||||
"dependencies": {
|
||||
"vscode-css-languageservice": "^4.0.3-next.4",
|
||||
"vscode-css-languageservice": "^4.0.3-next.8",
|
||||
"vscode-languageserver": "^5.3.0-next.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -128,7 +128,7 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
|
|||
const capabilities: ServerCapabilities = {
|
||||
// Tell the client that the server works in FULL text document sync mode
|
||||
textDocumentSync: documents.syncKind,
|
||||
completionProvider: snippetSupport ? { resolveProvider: false, triggerCharacters: ['/'] } : undefined,
|
||||
completionProvider: snippetSupport ? { resolveProvider: false, triggerCharacters: ['/', '-'] } : undefined,
|
||||
hoverProvider: true,
|
||||
documentSymbolProvider: true,
|
||||
referencesProvider: true,
|
||||
|
|
|
@ -781,10 +781,10 @@ supports-color@^5.3.0:
|
|||
dependencies:
|
||||
has-flag "^3.0.0"
|
||||
|
||||
vscode-css-languageservice@^4.0.3-next.4:
|
||||
version "4.0.3-next.4"
|
||||
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.4.tgz#3f0ccf116567650597b5cbfd8ce09846a64dec13"
|
||||
integrity sha512-9eaKw6ez+l407/uzIho51ElMqGSJcOV+M5B/HmAtdBPSc/chkAfx3r7zXOqrAlLKsBzZNVpnsA3C3YDjyZbrdg==
|
||||
vscode-css-languageservice@^4.0.3-next.8:
|
||||
version "4.0.3-next.8"
|
||||
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.8.tgz#0b81693b6ea9d10f78775a1dcad2c0f464fbde16"
|
||||
integrity sha512-agBPPu86bPKIK5v6CFnWeBXN4jvnCzc67GZa/pvrIWeRdG7nvTu5Y2wYdwdesdpWzno9/5tfFEPp0KJbKQ4l+A==
|
||||
dependencies:
|
||||
vscode-languageserver-types "^3.15.0-next.2"
|
||||
vscode-nls "^4.1.1"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"activationEvents": [
|
||||
"onDebugResolve"
|
||||
],
|
||||
"enableProposedApi": true,
|
||||
"main": "./out/extension",
|
||||
"scripts": {
|
||||
"compile": "gulp compile-extension:debug-server-ready",
|
||||
|
|
|
@ -10,7 +10,8 @@ import * as nls from 'vscode-nls';
|
|||
const localize = nls.loadMessageBundle();
|
||||
|
||||
const PATTERN = 'listening on.* (https?://\\S+|[0-9]+)'; // matches "listening on port 3000" or "Now listening on: https://localhost:5001"
|
||||
const URI_FORMAT = 'http://localhost:%s';
|
||||
const URI_PORT_FORMAT = 'http://localhost:%s';
|
||||
const URI_FORMAT = '%s';
|
||||
const WEB_ROOT = '${workspaceFolder}';
|
||||
|
||||
interface ServerReadyAction {
|
||||
|
@ -21,7 +22,9 @@ interface ServerReadyAction {
|
|||
}
|
||||
|
||||
class ServerReadyDetector extends vscode.Disposable {
|
||||
static detectors = new Map<vscode.DebugSession, ServerReadyDetector>();
|
||||
|
||||
private static detectors = new Map<vscode.DebugSession, ServerReadyDetector>();
|
||||
private static terminalDataListener: vscode.Disposable | undefined;
|
||||
|
||||
private hasFired = false;
|
||||
private shellPid?: number;
|
||||
|
@ -55,6 +58,29 @@ class ServerReadyDetector extends vscode.Disposable {
|
|||
}
|
||||
}
|
||||
|
||||
static async startListeningTerminalData() {
|
||||
if (!this.terminalDataListener) {
|
||||
this.terminalDataListener = vscode.window.onDidWriteTerminalData(async e => {
|
||||
|
||||
// first find the detector with a matching pid
|
||||
const pid = await e.terminal.processId;
|
||||
for (let [, detector] of this.detectors) {
|
||||
if (detector.shellPid === pid) {
|
||||
detector.detectPattern(e.data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// if none found, try all detectors until one matches
|
||||
for (let [, detector] of this.detectors) {
|
||||
if (detector.detectPattern(e.data)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private constructor(private session: vscode.DebugSession) {
|
||||
super(() => this.internalDispose());
|
||||
|
||||
|
@ -66,53 +92,37 @@ class ServerReadyDetector extends vscode.Disposable {
|
|||
this.disposables = [];
|
||||
}
|
||||
|
||||
async trackTerminals() {
|
||||
|
||||
let terminals: vscode.Terminal[] = [];
|
||||
|
||||
// either find the terminal where the debug is started with "runInTerminal" or use all terminals
|
||||
for (let terminal of vscode.window.terminals) {
|
||||
if (!this.shellPid || await terminal.processId === this.shellPid) {
|
||||
terminals.push(terminal);
|
||||
}
|
||||
}
|
||||
this.shellPid = undefined;
|
||||
|
||||
terminals.forEach(terminal => {
|
||||
this.disposables.push(terminal.onDidWriteData(s => {
|
||||
this.detectPattern(s);
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
detectPattern(s: string): void {
|
||||
|
||||
detectPattern(s: string): boolean {
|
||||
if (!this.hasFired) {
|
||||
const matches = this.regexp.exec(s);
|
||||
if (matches && matches.length >= 1) {
|
||||
this.openExternalWithString(this.session, matches.length > 1 ? matches[1] : '');
|
||||
this.hasFired = true;
|
||||
this.internalDispose();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private openExternalWithString(session: vscode.DebugSession, captureString: string) {
|
||||
|
||||
const args: ServerReadyAction = session.configuration.serverReadyAction;
|
||||
const format = args.uriFormat || URI_FORMAT;
|
||||
|
||||
let uri;
|
||||
if (captureString === '') {
|
||||
// nothing captured by reg exp -> use the uriFormat as the target url without substitution
|
||||
// nothing captured by reg exp -> use the uriFormat as the target uri without substitution
|
||||
// verify that format does not contain '%s'
|
||||
const format = args.uriFormat || '';
|
||||
if (format.indexOf('%s') >= 0) {
|
||||
const errMsg = localize('server.ready.nocapture.error', "Format uri ('{0}') uses a substitution placeholder but pattern did not capture anything.", format);
|
||||
vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined);
|
||||
return;
|
||||
}
|
||||
captureString = format;
|
||||
} else if (/^[0-9]+$/.test(captureString)) {
|
||||
// looks like a port number -> use the uriFormat and substitute a single "%s" with the port
|
||||
uri = format;
|
||||
} else {
|
||||
// if no uriFormat is specified guess the appropriate format based on the captureString
|
||||
const format = args.uriFormat || (/^[0-9]+$/.test(captureString) ? URI_PORT_FORMAT : URI_FORMAT);
|
||||
// verify that format only contains a single '%s'
|
||||
const s = format.split('%s');
|
||||
if (s.length !== 2) {
|
||||
|
@ -120,23 +130,22 @@ class ServerReadyDetector extends vscode.Disposable {
|
|||
vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined);
|
||||
return;
|
||||
}
|
||||
captureString = util.format(format, captureString);
|
||||
} else {
|
||||
// use the string as is
|
||||
uri = util.format(format, captureString);
|
||||
}
|
||||
|
||||
this.openExternalWithUri(session, captureString);
|
||||
this.openExternalWithUri(session, uri);
|
||||
}
|
||||
|
||||
private openExternalWithUri(session: vscode.DebugSession, uri: string) {
|
||||
|
||||
const args: ServerReadyAction = session.configuration.serverReadyAction;
|
||||
switch (args.action || 'openExternally') {
|
||||
|
||||
case 'openExternally':
|
||||
vscode.env.openExternal(vscode.Uri.parse(uri));
|
||||
break;
|
||||
case 'debugWithChrome':
|
||||
|
||||
case 'debugWithChrome':
|
||||
if (vscode.env.remoteName === 'wsl' || !!vscode.extensions.getExtension('msjsdiag.debugger-for-chrome')) {
|
||||
vscode.debug.startDebugging(session.workspaceFolder, {
|
||||
type: 'chrome',
|
||||
|
@ -150,6 +159,7 @@ class ServerReadyDetector extends vscode.Disposable {
|
|||
vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// not supported
|
||||
break;
|
||||
|
@ -163,7 +173,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
if (session && session.configuration.serverReadyAction) {
|
||||
const detector = ServerReadyDetector.start(session);
|
||||
if (detector) {
|
||||
detector.trackTerminals();
|
||||
ServerReadyDetector.startListeningTerminalData();
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -450,7 +450,7 @@
|
|||
"@emmetio/html-matcher": "^0.3.3",
|
||||
"@emmetio/math-expression": "^0.1.1",
|
||||
"image-size": "^0.5.2",
|
||||
"vscode-emmet-helper": "^1.2.15",
|
||||
"vscode-emmet-helper": "^1.2.16",
|
||||
"vscode-html-languageservice": "^3.0.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,6 +231,21 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
|
|||
return fallbackTab();
|
||||
}
|
||||
|
||||
if (vscode.window.activeTextEditor.selections.length === 1 &&
|
||||
vscode.window.activeTextEditor.selection.isEmpty
|
||||
) {
|
||||
const anchor = vscode.window.activeTextEditor.selection.anchor;
|
||||
if (anchor.character === 0) {
|
||||
return fallbackTab();
|
||||
}
|
||||
|
||||
const prevPositionAnchor = anchor.translate(0, -1);
|
||||
const prevText = vscode.window.activeTextEditor.document.getText(new vscode.Range(prevPositionAnchor, anchor));
|
||||
if (prevText === ' ' || prevText === '\t') {
|
||||
return fallbackTab();
|
||||
}
|
||||
}
|
||||
|
||||
args = args || {};
|
||||
if (!args['language']) {
|
||||
args['language'] = vscode.window.activeTextEditor.document.languageId;
|
||||
|
|
|
@ -113,21 +113,23 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
|||
const scanner = this.htmlLS.createScanner(document.getText(), node.start);
|
||||
let tokenType = scanner.scan();
|
||||
let prevAttr = undefined;
|
||||
let styleAttrValueRange: [number, number] | undefined = undefined;
|
||||
while (tokenType !== TokenType.EOS && (scanner.getTokenEnd() <= positionOffset)) {
|
||||
tokenType = scanner.scan();
|
||||
if (tokenType === TokenType.AttributeName) {
|
||||
prevAttr = scanner.getTokenText();
|
||||
}
|
||||
else if (tokenType === TokenType.AttributeValue && prevAttr === 'style') {
|
||||
styleAttrValueRange = [scanner.getTokenOffset(), scanner.getTokenEnd()];
|
||||
}
|
||||
}
|
||||
if (prevAttr === 'style') {
|
||||
if (prevAttr === 'style' && styleAttrValueRange && positionOffset > styleAttrValueRange[0] && positionOffset < styleAttrValueRange[1]) {
|
||||
syntax = 'css';
|
||||
validateLocation = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const extractAbbreviationResults = helper.extractAbbreviation(document, position, !isStyleSheet(syntax));
|
||||
|
|
80
extensions/emmet/src/test/completion.test.ts
Normal file
80
extensions/emmet/src/test/completion.test.ts
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import 'mocha';
|
||||
import { CancellationTokenSource, CompletionTriggerKind, Selection } from 'vscode';
|
||||
import { DefaultCompletionItemProvider } from '../defaultCompletionProvider';
|
||||
import { closeAllEditors, withRandomFileEditor } from './testUtils';
|
||||
|
||||
const completionProvider = new DefaultCompletionItemProvider();
|
||||
|
||||
suite('Tests for completion in CSS embedded in HTML', () => {
|
||||
teardown(() => {
|
||||
// close all editors
|
||||
return closeAllEditors;
|
||||
});
|
||||
|
||||
test('style attribute & attribute value in html', async () => {
|
||||
await testHtmlCompletionProvider('<div style="|"', [{ label: 'padding: ;' }]);
|
||||
await testHtmlCompletionProvider(`<div style='|'`, [{ label: 'padding: ;' }]);
|
||||
await testHtmlCompletionProvider(`<div style='p|'`, [{ label: 'padding: ;' }]);
|
||||
await testHtmlCompletionProvider(`<div style='color: #0|'`, [{ label: '#000000' }]);
|
||||
});
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/79766
|
||||
test('#79766, correct region determination', async () => {
|
||||
await testHtmlCompletionProvider(`<div style="color: #000">di|</div>`, [
|
||||
{ label: 'div', documentation: `<div>|</div>` }
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
interface TestCompletionItem {
|
||||
label: string;
|
||||
|
||||
documentation?: string;
|
||||
}
|
||||
|
||||
function testHtmlCompletionProvider(contents: string, expectedItems: TestCompletionItem[]): Thenable<any> {
|
||||
const cursorPos = contents.indexOf('|');
|
||||
const htmlContents = contents.slice(0, cursorPos) + contents.slice(cursorPos + 1);
|
||||
|
||||
return withRandomFileEditor(htmlContents, 'html', async (editor, _doc) => {
|
||||
const selection = new Selection(editor.document.positionAt(cursorPos), editor.document.positionAt(cursorPos));
|
||||
editor.selection = selection;
|
||||
const cancelSrc = new CancellationTokenSource();
|
||||
const completionPromise = completionProvider.provideCompletionItems(
|
||||
editor.document,
|
||||
editor.selection.active,
|
||||
cancelSrc.token,
|
||||
{ triggerKind: CompletionTriggerKind.Invoke }
|
||||
);
|
||||
if (!completionPromise) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
const completionList = await completionPromise;
|
||||
if (!completionList || !completionList.items || !completionList.items.length) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
expectedItems.forEach(eItem => {
|
||||
const matches = completionList.items.filter(i => i.label === eItem.label);
|
||||
const match = matches && matches.length > 0 ? matches[0] : undefined;
|
||||
assert.ok(match, `Didn't find completion item with label ${eItem.label}`);
|
||||
|
||||
if (match) {
|
||||
assert.equal(match.detail, 'Emmet Abbreviation', `Match needs to come from Emmet`);
|
||||
|
||||
if (eItem.documentation) {
|
||||
assert.equal(match.documentation, eItem.documentation, `Emmet completion Documentation doesn't match`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return Promise.resolve();
|
||||
});
|
||||
}
|
|
@ -2469,10 +2469,10 @@ vinyl@~2.0.1:
|
|||
remove-trailing-separator "^1.0.1"
|
||||
replace-ext "^1.0.0"
|
||||
|
||||
vscode-emmet-helper@^1.2.15:
|
||||
version "1.2.15"
|
||||
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.2.15.tgz#62dbfbf49bb9ebe329cb7bffdda5aaac725eea7a"
|
||||
integrity sha512-JplvmMMWSvm/6/dZezix2ADPM49u6YahPYjs/QToohUpomW/2Eb27ecCrkCyOGBPfKLKGiOPHCssss8TSDA9ag==
|
||||
vscode-emmet-helper@^1.2.16:
|
||||
version "1.2.16"
|
||||
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.2.16.tgz#cfefb8b54c68178b4696d4abae806bb3a2b043e8"
|
||||
integrity sha512-BuQK6fTV2w65Yd0/CJGj1EOvcJ9NHWfrMJ9nA8pjnu9jzAAnXLhnbviuGT9medMiPU0mp0tJqc/8Z0qlXcqdGw==
|
||||
dependencies:
|
||||
"@emmetio/extract-abbreviation" "0.1.6"
|
||||
jsonc-parser "^1.0.0"
|
||||
|
|
|
@ -469,11 +469,11 @@
|
|||
},
|
||||
{
|
||||
"command": "git.clean",
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && !gitFreshRepository"
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
|
||||
},
|
||||
{
|
||||
"command": "git.cleanAll",
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && !gitFreshRepository"
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
|
||||
},
|
||||
{
|
||||
"command": "git.commit",
|
||||
|
@ -763,7 +763,7 @@
|
|||
{
|
||||
"command": "git.cleanAll",
|
||||
"group": "5_stage",
|
||||
"when": "scmProvider == git && !gitFreshRepository"
|
||||
"when": "scmProvider == git"
|
||||
},
|
||||
{
|
||||
"command": "git.stashIncludeUntracked",
|
||||
|
@ -831,7 +831,7 @@
|
|||
},
|
||||
{
|
||||
"command": "git.cleanAll",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
|
@ -841,7 +841,7 @@
|
|||
},
|
||||
{
|
||||
"command": "git.cleanAll",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
|
@ -850,6 +850,53 @@
|
|||
"group": "inline"
|
||||
}
|
||||
],
|
||||
"scm/resourceFolder/context": [
|
||||
{
|
||||
"command": "git.stage",
|
||||
"when": "scmProvider == git && scmResourceGroup == merge",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
"command": "git.stage",
|
||||
"when": "scmProvider == git && scmResourceGroup == merge",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "git.unstage",
|
||||
"when": "scmProvider == git && scmResourceGroup == index",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
"command": "git.unstage",
|
||||
"when": "scmProvider == git && scmResourceGroup == index",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "git.stage",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
"command": "git.clean",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
"command": "git.clean",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "git.stage",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "git.ignore",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "1_modification@3"
|
||||
}
|
||||
],
|
||||
"scm/resourceState/context": [
|
||||
{
|
||||
"command": "git.stage",
|
||||
|
@ -933,12 +980,12 @@
|
|||
},
|
||||
{
|
||||
"command": "git.clean",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
"command": "git.clean",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
"command.syncRebase": "Sync (Rebase)",
|
||||
"command.publish": "Publish Branch",
|
||||
"command.showOutput": "Show Git Output",
|
||||
"command.ignore": "Add File to .gitignore",
|
||||
"command.ignore": "Add to .gitignore",
|
||||
"command.stashIncludeUntracked": "Stash (Include Untracked)",
|
||||
"command.stash": "Stash",
|
||||
"command.stashPop": "Pop Stash...",
|
||||
|
@ -73,7 +73,7 @@
|
|||
"config.autofetch": "When enabled, commits will automatically be fetched from the default remote of the current Git repository.",
|
||||
"config.autofetchPeriod": "Duration in seconds between each automatic git fetch, when `git.autofetch` is enabled.",
|
||||
"config.confirmSync": "Confirm before synchronizing git repositories.",
|
||||
"config.countBadge": "Controls the git badge counter.",
|
||||
"config.countBadge": "Controls the Git count badge.",
|
||||
"config.countBadge.all": "Count all changes.",
|
||||
"config.countBadge.tracked": "Count only tracked changes.",
|
||||
"config.countBadge.off": "Turn off counter.",
|
||||
|
|
|
@ -1260,7 +1260,7 @@ export class CommandCenter {
|
|||
|
||||
if (documents.length > 0) {
|
||||
const message = documents.length === 1
|
||||
? localize('unsaved files single', "The following file is unsaved and will not be included in the commit if you proceed: {0}.\n\nWould you like to save it before committing?", path.basename(documents[0].uri.fsPath))
|
||||
? localize('unsaved files single', "The following file has unsaved changes which won't be included in the commit if you proceed: {0}.\n\nWould you like to save it before committing?", path.basename(documents[0].uri.fsPath))
|
||||
: localize('unsaved files', "There are {0} unsaved files.\n\nWould you like to save them before committing?", documents.length);
|
||||
const saveAndCommit = localize('save and commit', "Save All & Commit");
|
||||
const commit = localize('commit', "Commit Anyway");
|
||||
|
@ -1268,7 +1268,7 @@ export class CommandCenter {
|
|||
|
||||
if (pick === saveAndCommit) {
|
||||
await Promise.all(documents.map(d => d.save()));
|
||||
await repository.add(documents.map(d => d.uri));
|
||||
await repository.add([]);
|
||||
} else if (pick !== commit) {
|
||||
return false; // do not commit on cancel
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { window, workspace, Uri, Disposable, Event, EventEmitter, DecorationData, DecorationProvider, ThemeColor } from 'vscode';
|
||||
import { window, workspace, Uri, Disposable, Event, EventEmitter, Decoration, DecorationProvider, ThemeColor } from 'vscode';
|
||||
import * as path from 'path';
|
||||
import { Repository, GitResourceGroup } from './repository';
|
||||
import { Model } from './model';
|
||||
|
@ -29,7 +29,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
|
|||
this.disposables.push(window.registerDecorationProvider(this));
|
||||
}
|
||||
|
||||
provideDecoration(uri: Uri): Promise<DecorationData | undefined> {
|
||||
provideDecoration(uri: Uri): Promise<Decoration | undefined> {
|
||||
const repository = this.model.getRepository(uri);
|
||||
|
||||
if (!repository) {
|
||||
|
@ -48,7 +48,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
|
|||
this.checkIgnoreSoon();
|
||||
}).then(ignored => {
|
||||
if (ignored) {
|
||||
return <DecorationData>{
|
||||
return <Decoration>{
|
||||
priority: 3,
|
||||
color: new ThemeColor('gitDecoration.ignoredResourceForeground')
|
||||
};
|
||||
|
@ -89,7 +89,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
|
|||
|
||||
class GitDecorationProvider implements DecorationProvider {
|
||||
|
||||
private static SubmoduleDecorationData: DecorationData = {
|
||||
private static SubmoduleDecorationData: Decoration = {
|
||||
title: 'Submodule',
|
||||
letter: 'S',
|
||||
color: new ThemeColor('gitDecoration.submoduleResourceForeground')
|
||||
|
@ -99,7 +99,7 @@ class GitDecorationProvider implements DecorationProvider {
|
|||
readonly onDidChangeDecorations: Event<Uri[]> = this._onDidChangeDecorations.event;
|
||||
|
||||
private disposables: Disposable[] = [];
|
||||
private decorations = new Map<string, DecorationData>();
|
||||
private decorations = new Map<string, Decoration>();
|
||||
|
||||
constructor(private repository: Repository) {
|
||||
this.disposables.push(
|
||||
|
@ -109,7 +109,7 @@ class GitDecorationProvider implements DecorationProvider {
|
|||
}
|
||||
|
||||
private onDidRunGitStatus(): void {
|
||||
let newDecorations = new Map<string, DecorationData>();
|
||||
let newDecorations = new Map<string, Decoration>();
|
||||
|
||||
this.collectSubmoduleDecorationData(newDecorations);
|
||||
this.collectDecorationData(this.repository.indexGroup, newDecorations);
|
||||
|
@ -121,25 +121,28 @@ class GitDecorationProvider implements DecorationProvider {
|
|||
this._onDidChangeDecorations.fire([...uris.values()].map(value => Uri.parse(value, true)));
|
||||
}
|
||||
|
||||
private collectDecorationData(group: GitResourceGroup, bucket: Map<string, DecorationData>): void {
|
||||
group.resourceStates.forEach(r => {
|
||||
if (r.resourceDecoration
|
||||
&& r.type !== Status.DELETED
|
||||
&& r.type !== Status.INDEX_DELETED
|
||||
) {
|
||||
private collectDecorationData(group: GitResourceGroup, bucket: Map<string, Decoration>): void {
|
||||
for (const r of group.resourceStates) {
|
||||
const decoration = r.resourceDecoration;
|
||||
|
||||
if (decoration) {
|
||||
// not deleted and has a decoration
|
||||
bucket.set(r.original.toString(), r.resourceDecoration);
|
||||
bucket.set(r.original.toString(), decoration);
|
||||
|
||||
if (r.type === Status.INDEX_RENAMED) {
|
||||
bucket.set(r.resourceUri.toString(), decoration);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private collectSubmoduleDecorationData(bucket: Map<string, DecorationData>): void {
|
||||
private collectSubmoduleDecorationData(bucket: Map<string, Decoration>): void {
|
||||
for (const submodule of this.repository.submodules) {
|
||||
bucket.set(Uri.file(path.join(this.repository.root, submodule.path)).toString(), GitDecorationProvider.SubmoduleDecorationData);
|
||||
}
|
||||
}
|
||||
|
||||
provideDecoration(uri: Uri): DecorationData | undefined {
|
||||
provideDecoration(uri: Uri): Decoration | undefined {
|
||||
return this.decorations.get(uri.toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -1628,7 +1628,7 @@ export class Repository {
|
|||
const args = ['for-each-ref', '--format', '%(refname) %(objectname)'];
|
||||
|
||||
if (opts && opts.sort && opts.sort !== 'alphabetically') {
|
||||
args.push('--sort', opts.sort);
|
||||
args.push('--sort', `-${opts.sort}`);
|
||||
}
|
||||
|
||||
const result = await this.run(args);
|
||||
|
@ -1766,7 +1766,7 @@ export class Repository {
|
|||
}
|
||||
|
||||
const raw = await readfile(templatePath, 'utf8');
|
||||
return raw.replace(/\n?#.*/g, '');
|
||||
return raw.replace(/^\s*#.*$\n?/gm, '');
|
||||
|
||||
} catch (err) {
|
||||
return '';
|
||||
|
|
|
@ -190,7 +190,7 @@ export class Model {
|
|||
openRepositoriesToDispose.forEach(r => r.dispose());
|
||||
}
|
||||
|
||||
private async onDidChangeVisibleTextEditors(editors: TextEditor[]): Promise<void> {
|
||||
private async onDidChangeVisibleTextEditors(editors: readonly TextEditor[]): Promise<void> {
|
||||
const config = workspace.getConfiguration('git');
|
||||
const autoRepositoryDetection = config.get<boolean | 'subFolders' | 'openEditors'>('autoRepositoryDetection');
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { commands, Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, SourceControlInputBoxValidation, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento, SourceControlInputBoxValidationType, OutputChannel, LogLevel, env, ProgressOptions, CancellationToken } from 'vscode';
|
||||
import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, SourceControlInputBoxValidation, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, Decoration, Memento, SourceControlInputBoxValidationType, OutputChannel, LogLevel, env, ProgressOptions, CancellationToken } from 'vscode';
|
||||
import { Repository as BaseRepository, Commit, Stash, GitError, Submodule, CommitOptions, ForcePushMode } from './git';
|
||||
import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent, combinedDisposable } from './util';
|
||||
import { memoize, throttle, debounce } from './decorators';
|
||||
|
@ -157,10 +157,7 @@ export class Resource implements SourceControlResourceState {
|
|||
const tooltip = this.tooltip;
|
||||
const strikeThrough = this.strikeThrough;
|
||||
const faded = this.faded;
|
||||
const letter = this.letter;
|
||||
const color = this.color;
|
||||
|
||||
return { strikeThrough, faded, tooltip, light, dark, letter, color, source: 'git.resource' /*todo@joh*/ };
|
||||
return { strikeThrough, faded, tooltip, light, dark };
|
||||
}
|
||||
|
||||
get letter(): string {
|
||||
|
@ -247,12 +244,12 @@ export class Resource implements SourceControlResourceState {
|
|||
}
|
||||
}
|
||||
|
||||
get resourceDecoration(): DecorationData {
|
||||
get resourceDecoration(): Decoration {
|
||||
const title = this.tooltip;
|
||||
const letter = this.letter;
|
||||
const color = this.color;
|
||||
const priority = this.priority;
|
||||
return { bubble: true, source: 'git.resource', title, letter, color, priority };
|
||||
return { bubble: true, title, letter, color, priority };
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@ -636,7 +633,6 @@ export class Repository implements Disposable {
|
|||
|
||||
private isRepositoryHuge = false;
|
||||
private didWarnAboutLimit = false;
|
||||
private isFreshRepository: boolean | undefined = undefined;
|
||||
|
||||
private disposables: Disposable[] = [];
|
||||
|
||||
|
@ -1510,15 +1506,6 @@ export class Repository implements Disposable {
|
|||
// set count badge
|
||||
this.setCountBadge();
|
||||
|
||||
// Disable `Discard All Changes` for "fresh" repositories
|
||||
// https://github.com/Microsoft/vscode/issues/43066
|
||||
const isFreshRepository = !this._HEAD || !this._HEAD.commit;
|
||||
|
||||
if (this.isFreshRepository !== isFreshRepository) {
|
||||
commands.executeCommand('setContext', 'gitFreshRepository', isFreshRepository);
|
||||
this.isFreshRepository = isFreshRepository;
|
||||
}
|
||||
|
||||
this._onDidChangeStatus.fire();
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ class SyncStatusBar {
|
|||
|
||||
const onEnablementChange = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.enableStatusBarSync'));
|
||||
onEnablementChange(this.updateEnablement, this, this.disposables);
|
||||
this.updateEnablement();
|
||||
|
||||
this._onDidChange.fire();
|
||||
}
|
||||
|
|
|
@ -127,8 +127,8 @@ class FolderDetector {
|
|||
let options: vscode.ShellExecutionOptions = { cwd: this.workspaceFolder.uri.fsPath };
|
||||
let source = 'grunt';
|
||||
let task = gruntTask.indexOf(' ') === -1
|
||||
? new vscode.Task(kind, this.workspaceFolder, gruntTask, source, new vscode.ShellExecution(`${await this._gruntCommand} ${name}`, options))
|
||||
: new vscode.Task(kind, this.workspaceFolder, gruntTask, source, new vscode.ShellExecution(`${await this._gruntCommand} "${name}"`, options));
|
||||
? new vscode.Task(kind, this.workspaceFolder, gruntTask, source, new vscode.ShellExecution(`${await this._gruntCommand} ${gruntTask.name}`, options))
|
||||
: new vscode.Task(kind, this.workspaceFolder, gruntTask, source, new vscode.ShellExecution(`${await this._gruntCommand} "${gruntTask.name}"`, options));
|
||||
return task;
|
||||
}
|
||||
return undefined;
|
||||
|
@ -362,4 +362,4 @@ export function activate(_context: vscode.ExtensionContext): void {
|
|||
|
||||
export function deactivate(): void {
|
||||
detector.dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,8 +62,10 @@ function getOutputChannel(): vscode.OutputChannel {
|
|||
|
||||
function showError() {
|
||||
vscode.window.showWarningMessage(localize('gulpTaskDetectError', 'Problem finding gulp tasks. See the output for more information.'),
|
||||
localize('gulpShowOutput', 'Go to output')).then(() => {
|
||||
_channel.show(true);
|
||||
localize('gulpShowOutput', 'Go to output')).then((choice) => {
|
||||
if (choice !== undefined) {
|
||||
_channel.show(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -156,8 +158,13 @@ class FolderDetector {
|
|||
try {
|
||||
let { stdout, stderr } = await exec(commandLine, { cwd: rootPath });
|
||||
if (stderr && stderr.length > 0) {
|
||||
getOutputChannel().appendLine(stderr);
|
||||
showError();
|
||||
// Filter out "No license field"
|
||||
const errors = stderr.split('\n');
|
||||
errors.pop(); // The last line is empty.
|
||||
if (!errors.every(value => value.indexOf('No license field') >= 0)) {
|
||||
getOutputChannel().appendLine(stderr);
|
||||
showError();
|
||||
}
|
||||
}
|
||||
let result: vscode.Task[] = [];
|
||||
if (stdout) {
|
||||
|
|
|
@ -8,8 +8,8 @@ import * as fs from 'fs';
|
|||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { languages, ExtensionContext, IndentAction, Position, TextDocument, Range, CompletionItem, CompletionItemKind, SnippetString, workspace } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, RequestType, TextDocumentPositionParams } from 'vscode-languageclient';
|
||||
import { languages, ExtensionContext, IndentAction, Position, TextDocument, Range, CompletionItem, CompletionItemKind, SnippetString, workspace, Disposable, FormattingOptions, CancellationToken, ProviderResult, TextEdit } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, RequestType, TextDocumentPositionParams, DocumentRangeFormattingParams, DocumentRangeFormattingRequest } from 'vscode-languageclient';
|
||||
import { EMPTY_ELEMENTS } from './htmlEmptyTagsShared';
|
||||
import { activateTagClosing } from './tagClosing';
|
||||
import TelemetryReporter from 'vscode-extension-telemetry';
|
||||
|
@ -50,6 +50,8 @@ export function activate(context: ExtensionContext) {
|
|||
let documentSelector = ['html', 'handlebars'];
|
||||
let embeddedLanguages = { css: true, javascript: true };
|
||||
|
||||
let rangeFormatting: Disposable | undefined = undefined;
|
||||
|
||||
let dataPaths = [
|
||||
...getCustomDataPathsInAllWorkspaces(workspace.workspaceFolders),
|
||||
...getCustomDataPathsFromAllExtensions()
|
||||
|
@ -63,8 +65,9 @@ export function activate(context: ExtensionContext) {
|
|||
},
|
||||
initializationOptions: {
|
||||
embeddedLanguages,
|
||||
dataPaths
|
||||
}
|
||||
dataPaths,
|
||||
provideFormatter: false, // tell the server to not provide formatting capability and ignore the `html.format.enable` setting.
|
||||
},
|
||||
};
|
||||
|
||||
// Create the language client and start the client.
|
||||
|
@ -87,8 +90,38 @@ export function activate(context: ExtensionContext) {
|
|||
}
|
||||
});
|
||||
toDispose.push(disposable);
|
||||
|
||||
// manually register / deregister format provider based on the `html.format.enable` setting avoiding issues with late registration. See #71652.
|
||||
updateFormatterRegistration();
|
||||
toDispose.push({ dispose: () => rangeFormatting && rangeFormatting.dispose() });
|
||||
toDispose.push(workspace.onDidChangeConfiguration(e => e.affectsConfiguration('html.format.enable') && updateFormatterRegistration()));
|
||||
});
|
||||
|
||||
function updateFormatterRegistration() {
|
||||
const formatEnabled = workspace.getConfiguration().get('html.format.enable');
|
||||
if (!formatEnabled && rangeFormatting) {
|
||||
rangeFormatting.dispose();
|
||||
rangeFormatting = undefined;
|
||||
} else if (formatEnabled && !rangeFormatting) {
|
||||
rangeFormatting = languages.registerDocumentRangeFormattingEditProvider(documentSelector, {
|
||||
provideDocumentRangeFormattingEdits(document: TextDocument, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]> {
|
||||
let params: DocumentRangeFormattingParams = {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),
|
||||
range: client.code2ProtocolConverter.asRange(range),
|
||||
options: client.code2ProtocolConverter.asFormattingOptions(options)
|
||||
};
|
||||
return client.sendRequest(DocumentRangeFormattingRequest.type, params, token).then(
|
||||
client.protocol2CodeConverter.asTextEdits,
|
||||
(error) => {
|
||||
client.logFailedRequest(DocumentRangeFormattingRequest.type, error);
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
languages.setLanguageConfiguration('html', {
|
||||
indentationRules: {
|
||||
increaseIndentPattern: /<(?!\?|(?:area|base|br|col|frame|hr|html|img|input|link|meta|param)\b|[^>]*\/>)([-_\.A-Za-z0-9]+)(?=\s|>)\b[^>]*>(?!.*<\/\1>)|<!--(?!.*-->)|\{[^}"']*$/,
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"properties": {
|
||||
"html.customData": {
|
||||
"type": "array",
|
||||
"description": "%html.customData.desc%",
|
||||
"markdownDescription": "%html.customData.desc%",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
|
@ -188,6 +188,10 @@
|
|||
{
|
||||
"fileMatch": "*.html-data.json",
|
||||
"url": "https://raw.githubusercontent.com/Microsoft/vscode-html-languageservice/master/docs/customData.schema.json"
|
||||
},
|
||||
{
|
||||
"fileMatch": "package.json",
|
||||
"url": "./schemas/package.schema.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue