Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into alex/editor-options
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Sep 4, 2019
2 parents 802826e + 166ad25 commit e787da1
Show file tree
Hide file tree
Showing 633 changed files with 21,338 additions and 9,921 deletions.
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron"
target "4.2.9"
target "4.2.10"
runtime "electron"
2 changes: 1 addition & 1 deletion build/.cachesalt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2019-07-11T05:47:05.444Z
2019-08-30T20:24:23.714Z
9 changes: 6 additions & 3 deletions build/azure-pipelines/darwin/continuous-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -46,4 +49,4 @@ steps:
inputs:
testResultsFiles: '*-results.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
condition: succeededOrFailed()
condition: succeededOrFailed()
9 changes: 8 additions & 1 deletion build/azure-pipelines/darwin/product-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -102,7 +102,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-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'))
Expand Down
7 changes: 5 additions & 2 deletions build/azure-pipelines/linux/continuous-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
9 changes: 8 additions & 1 deletion build/azure-pipelines/linux/product-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build/azure-pipelines/linux/snap-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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"
7 changes: 4 additions & 3 deletions build/azure-pipelines/product-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
18 changes: 17 additions & 1 deletion build/azure-pipelines/publish-types/publish-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/sync-mooncake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/web/product-build-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
10 changes: 6 additions & 4 deletions build/azure-pipelines/win32/continuous-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
11 changes: 8 additions & 3 deletions build/azure-pipelines/win32/product-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'))

Expand Down
9 changes: 6 additions & 3 deletions build/gulpfile.hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,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))
Expand Down
4 changes: 2 additions & 2 deletions build/gulpfile.vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
7 changes: 5 additions & 2 deletions build/gulpfile.vscode.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ function packageTask(sourceFolderName, destinationFolderName) {

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' });
const pwaicons = es.merge(
gulp.src('resources/server/code-192.png', { base: 'resources/server' }),
gulp.src('resources/server/code-512.png', { base: 'resources/server' })
);

let all = es.merge(
packageJsonStream,
Expand All @@ -128,7 +131,7 @@ function packageTask(sourceFolderName, destinationFolderName) {
deps,
favicon,
manifest,
pwaicon
pwaicons
);

let result = all
Expand Down
2 changes: 1 addition & 1 deletion build/lib/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
12 changes: 6 additions & 6 deletions build/lib/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -248,7 +249,6 @@ XLF.parse = function (xlfString) {
});
});
};
exports.XLF = XLF;
class Limiter {
constructor(maxDegreeOfParalellism) {
this.maxDegreeOfParalellism = maxDegreeOfParalellism;
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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 });
});
Expand Down Expand Up @@ -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(`.build/extensions/${extension}`, extensionsPacks[extension]);
this.queue(translatedExtFile);
const externalExtensionId = externalExtensions[extension];
if (externalExtensionId) {
Expand Down
Loading

0 comments on commit e787da1

Please sign in to comment.