Merge remote-tracking branch 'origin/master' into alex/asar
This commit is contained in:
commit
9ef087d510
109
.github/classifier.yml
vendored
109
.github/classifier.yml
vendored
|
@ -3,10 +3,16 @@
|
|||
alwaysRequireAssignee: false,
|
||||
labelsRequiringAssignee: [ feature-request ],
|
||||
autoAssignees: {
|
||||
api: [],
|
||||
api: {
|
||||
assignees: [ jrieken ],
|
||||
assignLabel: false
|
||||
},
|
||||
color-picker: [],
|
||||
css-less-sass: [],
|
||||
debug: [ isidorn ],
|
||||
debug: {
|
||||
assignees: [ isidorn ],
|
||||
assignLabel: false
|
||||
},
|
||||
diff-editor: [],
|
||||
editor: [],
|
||||
editor-1000-limit: [],
|
||||
|
@ -28,8 +34,22 @@
|
|||
emmet: [ ramya-rao-a ],
|
||||
error-list: [],
|
||||
extensions: [],
|
||||
file-encoding: [ bpasero ],
|
||||
file-explorer: [ isidorn ],
|
||||
file-encoding: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
file-io: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
file-watcher: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
file-explorer: {
|
||||
assignees: [ isidorn ],
|
||||
assignLabel: false
|
||||
},
|
||||
format: [],
|
||||
git: [ joaomoreno ],
|
||||
hot-exit: [ Tyriar ],
|
||||
|
@ -44,26 +64,83 @@
|
|||
languages basic: [],
|
||||
markdown: [ mjbvz ],
|
||||
merge-conflict: [ chrmarti ],
|
||||
multi-root: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
perf-profile: [],
|
||||
php: [ roblourens ],
|
||||
proxy: [],
|
||||
remote: {
|
||||
assignees: [ jrieken ],
|
||||
assignLabel: false
|
||||
},
|
||||
scm: [],
|
||||
search: [ roblourens ],
|
||||
snippets: [ jrieken ],
|
||||
snippets: {
|
||||
assignees: [ jrieken ],
|
||||
assignLabel: false
|
||||
},
|
||||
tasks: [ dbaeumer ],
|
||||
telemetry: [],
|
||||
themes: [],
|
||||
typescript: [ mjbvz ],
|
||||
workbench: [ bpasero ],
|
||||
workbench-dnd: [ bpasero ],
|
||||
workbench-editors: [ bpasero ],
|
||||
workbench-feedback: [ bpasero ],
|
||||
workbench-layout: [ bpasero ],
|
||||
workbench-menu: [ bpasero ],
|
||||
workbench-notifications: [ bpasero ],
|
||||
workbench-state: [ bpasero ],
|
||||
workbench-status: [ bpasero ],
|
||||
workbench-tabs: [ bpasero ],
|
||||
workbench-welcome: [ chrmarti ],
|
||||
workbench: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-dnd: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-editors: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-electron: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-feedback: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-history: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-layout: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-menu: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-notifications: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-state: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-status: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-tabs: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-title: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-touchbar: {
|
||||
assignees: [ bpasero ],
|
||||
assignLabel: false
|
||||
},
|
||||
workbench-welcome: [ chrmarti ]
|
||||
}
|
||||
}
|
||||
|
|
2
.github/insiders.yml
vendored
2
.github/insiders.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
insidersLabel: 'insiders',
|
||||
perform: true
|
||||
perform: false
|
||||
}
|
|
@ -52,13 +52,18 @@ install:
|
|||
- yarn
|
||||
|
||||
script:
|
||||
- node_modules/.bin/gulp hygiene
|
||||
- node_modules/.bin/gulp electron --silent
|
||||
- node_modules/.bin/tsc -p ./src/tsconfig.monaco.json --noEmit
|
||||
- node_modules/.bin/gulp compile --silent --max_old_space_size=4096
|
||||
- node_modules/.bin/gulp optimize-vscode --silent --max_old_space_size=4096
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --coverage --reporter dot; else ./scripts/test.sh --reporter dot; fi
|
||||
- ./scripts/test-integration.sh
|
||||
|
||||
after_success:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then node_modules/.bin/coveralls < .build/coverage/lcov.info; fi
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: label=hygiene
|
||||
script: node_modules/.bin/gulp hygiene
|
||||
after_success: skip
|
||||
|
|
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
|
@ -129,6 +129,9 @@
|
|||
"runtimeArgs": [
|
||||
"--inspect=5875"
|
||||
],
|
||||
"skipFiles": [
|
||||
"**/winjs*.js"
|
||||
],
|
||||
"webRoot": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
|
|
12
build/builtInExtensions.json
Normal file
12
build/builtInExtensions.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
[
|
||||
{
|
||||
"name": "ms-vscode.node-debug",
|
||||
"version": "1.20.4",
|
||||
"repo": "https://github.com/Microsoft/vscode-node-debug"
|
||||
},
|
||||
{
|
||||
"name": "ms-vscode.node-debug2",
|
||||
"version": "1.20.2",
|
||||
"repo": "https://github.com/Microsoft/vscode-node-debug2"
|
||||
}
|
||||
]
|
|
@ -20,6 +20,7 @@ const sourcemaps = require('gulp-sourcemaps');
|
|||
const nlsDev = require('vscode-nls-dev');
|
||||
const root = path.dirname(__dirname);
|
||||
const commit = util.getVersion(root);
|
||||
const i18n = require('./lib/i18n');
|
||||
|
||||
const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
|
||||
|
||||
|
@ -29,7 +30,8 @@ const compilations = glob.sync('**/tsconfig.json', {
|
|||
});
|
||||
|
||||
const getBaseUrl = out => `https://ticino.blob.core.windows.net/sourcemaps/${commit}/${out}`;
|
||||
const languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita'];
|
||||
|
||||
const languages = i18n.defaultLanguages.concat(process.env.VSCODE_QUALITY !== 'stable' ? i18n.extraLanguages: []);
|
||||
|
||||
const tasks = compilations.map(function (tsconfigFile) {
|
||||
const absolutePath = path.join(extensionsPath, tsconfigFile);
|
||||
|
@ -55,9 +57,19 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
const srcBase = path.join(root, 'src');
|
||||
const src = path.join(srcBase, '**');
|
||||
const out = path.join(root, 'out');
|
||||
const i18n = path.join(__dirname, '..', 'i18n');
|
||||
const i18nPath = path.join(__dirname, '..', 'i18n');
|
||||
const baseUrl = getBaseUrl(out);
|
||||
|
||||
let headerId, headerOut;
|
||||
let index = relativeDirname.indexOf('/');
|
||||
if (index < 0) {
|
||||
headerId = relativeDirname;
|
||||
headerOut = 'out';
|
||||
} else {
|
||||
headerId = relativeDirname.substr(0, index);
|
||||
headerOut = relativeDirname.substr(index + 1) + '/out';
|
||||
}
|
||||
|
||||
function createPipeline(build, emitError) {
|
||||
const reporter = createReporter();
|
||||
|
||||
|
@ -82,7 +94,9 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
sourceRoot: '../src'
|
||||
}))
|
||||
.pipe(tsFilter.restore)
|
||||
.pipe(build ? nlsDev.createAdditionalLanguageFiles(languages, i18n, out) : es.through())
|
||||
.pipe(build ? nlsDev.createAdditionalLanguageFiles(languages, i18nPath, out) : es.through())
|
||||
.pipe(build ? nlsDev.bundleMetaDataFiles(headerId, headerOut) : es.through())
|
||||
.pipe(build ? nlsDev.bundleLanguageFiles() : es.through())
|
||||
.pipe(reporter.end(emitError));
|
||||
|
||||
return es.duplex(input, output);
|
||||
|
|
|
@ -44,14 +44,13 @@ const nodeModules = ['electron', 'original-fs']
|
|||
|
||||
// Build
|
||||
|
||||
const builtInExtensions = [
|
||||
{ name: 'ms-vscode.node-debug', version: '1.20.2' },
|
||||
{ name: 'ms-vscode.node-debug2', version: '1.20.0' }
|
||||
];
|
||||
const builtInExtensions = require('./builtInExtensions');
|
||||
|
||||
const excludedExtensions = [
|
||||
'vscode-api-tests',
|
||||
'vscode-colorize-tests'
|
||||
'vscode-colorize-tests',
|
||||
'ms-vscode.node-debug',
|
||||
'ms-vscode.node-debug2',
|
||||
];
|
||||
|
||||
const vscodeEntryPoints = _.flatten([
|
||||
|
@ -83,6 +82,7 @@ const vscodeResources = [
|
|||
'out-build/vs/workbench/services/files/**/*.exe',
|
||||
'out-build/vs/workbench/services/files/**/*.md',
|
||||
'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js',
|
||||
'out-build/vs/code/electron-browser/issue/issueReporter.js',
|
||||
'!**/test/**'
|
||||
];
|
||||
|
||||
|
@ -92,10 +92,7 @@ const BUNDLED_FILE_HEADER = [
|
|||
' *--------------------------------------------------------*/'
|
||||
].join('\n');
|
||||
|
||||
var languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita'];
|
||||
if (process.env.VSCODE_QUALITY !== 'stable') {
|
||||
languages = languages.concat(['ptb', 'hun', 'trk']); // Add languages requested by the community to non-stable builds
|
||||
}
|
||||
const languages = i18n.defaultLanguages.concat(process.env.VSCODE_QUALITY !== 'stable' ? i18n.extraLanguages: []);
|
||||
|
||||
gulp.task('clean-optimized-vscode', util.rimraf('out-vscode'));
|
||||
gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compile-extensions-build'], common.optimizeTask({
|
||||
|
@ -105,7 +102,7 @@ gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compil
|
|||
loaderConfig: common.loaderConfig(nodeModules),
|
||||
header: BUNDLED_FILE_HEADER,
|
||||
out: 'out-vscode',
|
||||
languages: languages
|
||||
languages: languages,
|
||||
}));
|
||||
|
||||
|
||||
|
@ -382,25 +379,21 @@ gulp.task('vscode-linux-x64-min', ['minify-vscode', 'clean-vscode-linux-x64'], p
|
|||
gulp.task('vscode-linux-arm-min', ['minify-vscode', 'clean-vscode-linux-arm'], packageTask('linux', 'arm', { minified: true }));
|
||||
|
||||
// Transifex Localizations
|
||||
const vscodeLanguages = [
|
||||
'zh-hans',
|
||||
'zh-hant',
|
||||
'ja',
|
||||
'ko',
|
||||
'de',
|
||||
'fr',
|
||||
'es',
|
||||
'ru',
|
||||
'it',
|
||||
'pt-br',
|
||||
'hu',
|
||||
'tr'
|
||||
];
|
||||
const setupDefaultLanguages = [
|
||||
'zh-hans',
|
||||
'zh-hant',
|
||||
'ko'
|
||||
];
|
||||
|
||||
const innoSetupConfig = {
|
||||
'zh-cn': { codePage: 'CP936', defaultInfo: { name: 'Simplified Chinese', id: '$0804', } },
|
||||
'zh-tw': { codePage: 'CP950', defaultInfo: { name: 'Traditional Chinese', id: '$0404' } },
|
||||
'ko': { codePage: 'CP949', defaultInfo: { name: 'Korean', id: '$0412' } },
|
||||
'ja': { codePage: 'CP932' },
|
||||
'de': { codePage: 'CP1252' },
|
||||
'fr': { codePage: 'CP1252' },
|
||||
'es': { codePage: 'CP1252' },
|
||||
'ru': { codePage: 'CP1251' },
|
||||
'it': { codePage: 'CP1252' },
|
||||
'pt-br': { codePage: 'CP1252' },
|
||||
'hu': { codePage: 'CP1250' },
|
||||
'tr': { codePage: 'CP1254' }
|
||||
};
|
||||
|
||||
const apiHostname = process.env.TRANSIFEX_API_URL;
|
||||
const apiName = process.env.TRANSIFEX_API_NAME;
|
||||
|
@ -408,27 +401,46 @@ const apiToken = process.env.TRANSIFEX_API_TOKEN;
|
|||
|
||||
gulp.task('vscode-translations-push', ['optimize-vscode'], function () {
|
||||
const pathToMetadata = './out-vscode/nls.metadata.json';
|
||||
const pathToExtensions = './extensions/**/*.nls.json';
|
||||
const pathToExtensions = './extensions/*';
|
||||
const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}';
|
||||
|
||||
return es.merge(
|
||||
gulp.src(pathToMetadata).pipe(i18n.prepareXlfFiles()),
|
||||
gulp.src(pathToSetup).pipe(i18n.prepareXlfFiles()),
|
||||
gulp.src(pathToExtensions).pipe(i18n.prepareXlfFiles('vscode-extensions'))
|
||||
gulp.src(pathToMetadata).pipe(i18n.createXlfFilesForCoreBundle()),
|
||||
gulp.src(pathToSetup).pipe(i18n.createXlfFilesForIsl()),
|
||||
gulp.src(pathToExtensions).pipe(i18n.createXlfFilesForExtensions())
|
||||
).pipe(i18n.pushXlfFiles(apiHostname, apiName, apiToken));
|
||||
});
|
||||
|
||||
gulp.task('vscode-translations-pull', function () {
|
||||
gulp.task('vscode-translations-push-test', function () {
|
||||
const pathToMetadata = './out-vscode/nls.metadata.json';
|
||||
const pathToExtensions = './extensions/*';
|
||||
const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}';
|
||||
|
||||
return es.merge(
|
||||
i18n.pullXlfFiles('vscode-editor', apiHostname, apiName, apiToken, vscodeLanguages),
|
||||
i18n.pullXlfFiles('vscode-workbench', apiHostname, apiName, apiToken, vscodeLanguages),
|
||||
i18n.pullXlfFiles('vscode-extensions', apiHostname, apiName, apiToken, vscodeLanguages),
|
||||
i18n.pullXlfFiles('vscode-setup', apiHostname, apiName, apiToken, setupDefaultLanguages)
|
||||
).pipe(vfs.dest('../vscode-localization'));
|
||||
gulp.src(pathToMetadata).pipe(i18n.createXlfFilesForCoreBundle()),
|
||||
gulp.src(pathToSetup).pipe(i18n.createXlfFilesForIsl()),
|
||||
gulp.src(pathToExtensions).pipe(i18n.createXlfFilesForExtensions())
|
||||
).pipe(vfs.dest('../vscode-transifex-input'));
|
||||
});
|
||||
|
||||
gulp.task('vscode-translations-pull', function () {
|
||||
[...i18n.defaultLanguages, ...i18n.extraLanguages].forEach(language => {
|
||||
i18n.pullBuildXlfFiles(apiHostname, apiName, apiToken, language).pipe(vfs.dest(`../vscode-localization/${language.id}/build`));
|
||||
|
||||
let includeDefault = !!innoSetupConfig[language.id].defaultInfo;
|
||||
i18n.pullSetupXlfFiles(apiHostname, apiName, apiToken, language, includeDefault).pipe(vfs.dest(`../vscode-localization/${language.id}/setup`));
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('vscode-translations-import', function () {
|
||||
return gulp.src('../vscode-localization/**/*.xlf').pipe(i18n.prepareJsonFiles()).pipe(vfs.dest('./i18n'));
|
||||
[...i18n.defaultLanguages, ...i18n.extraLanguages].forEach(language => {
|
||||
gulp.src(`../vscode-localization/${language.id}/build/*/*.xlf`)
|
||||
.pipe(i18n.prepareI18nFiles(language))
|
||||
.pipe(vfs.dest(`./i18n/${language.folderName}`));
|
||||
gulp.src(`../vscode-localization/${language.id}/setup/*/*.xlf`)
|
||||
.pipe(i18n.prepareIslFiles(language, innoSetupConfig[language.id]))
|
||||
.pipe(vfs.dest(`./build/win32/i18n`));
|
||||
});
|
||||
});
|
||||
|
||||
// Sourcemaps
|
||||
|
@ -583,3 +595,17 @@ gulp.task('generate-vscode-configuration', () => {
|
|||
console.error(e.toString());
|
||||
});
|
||||
});
|
||||
|
||||
//#region Built-In Extensions
|
||||
gulp.task('clean-builtin-extensions', util.rimraf('.build/builtInExtensions'));
|
||||
gulp.task('download-builtin-extensions', ['clean-builtin-extensions'], function () {
|
||||
const marketplaceExtensions = es.merge(...builtInExtensions.map(extension => {
|
||||
return ext.fromMarketplace(extension.name, extension.version)
|
||||
.pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`));
|
||||
}));
|
||||
|
||||
return marketplaceExtensions
|
||||
.pipe(util.setExecutableBit(['**/*.sh']))
|
||||
.pipe(vfs.dest('.build/builtInExtensions'));
|
||||
});
|
||||
//#endregion
|
||||
|
|
|
@ -110,8 +110,7 @@ function buildDebPackage(arch) {
|
|||
return shell.task([
|
||||
'chmod 755 ' + product.applicationName + '-' + debArch + '/DEBIAN/postinst ' + product.applicationName + '-' + debArch + '/DEBIAN/prerm ' + product.applicationName + '-' + debArch + '/DEBIAN/postrm',
|
||||
'mkdir -p deb',
|
||||
'fakeroot dpkg-deb -b ' + product.applicationName + '-' + debArch + ' deb',
|
||||
'dpkg-scanpackages deb /dev/null > Packages'
|
||||
'fakeroot dpkg-deb -b ' + product.applicationName + '-' + debArch + ' deb'
|
||||
], { cwd: '.build/linux/deb/' + debArch });
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ const _7z = require('7zip')['7z'];
|
|||
const util = require('./lib/util');
|
||||
const pkg = require('../package.json');
|
||||
const product = require('../product.json');
|
||||
const vfs = require('vinyl-fs');
|
||||
|
||||
const repoPath = path.dirname(__dirname);
|
||||
const buildPath = arch => path.join(path.dirname(repoPath), `VSCode-win32-${arch}`);
|
||||
|
@ -77,7 +78,7 @@ gulp.task('vscode-win32-x64-setup', ['clean-vscode-win32-x64-setup'], buildWin32
|
|||
|
||||
function archiveWin32Setup(arch) {
|
||||
return cb => {
|
||||
const args = ['a', '-tzip', zipPath(arch), '.', '-r'];
|
||||
const args = ['a', '-tzip', zipPath(arch), '.', '-r', '-x!inno_updater.exe'];
|
||||
|
||||
cp.spawn(_7z, args, { stdio: 'inherit', cwd: buildPath(arch) })
|
||||
.on('error', cb)
|
||||
|
@ -90,3 +91,13 @@ gulp.task('vscode-win32-ia32-archive', ['clean-vscode-win32-ia32-archive'], arch
|
|||
|
||||
gulp.task('clean-vscode-win32-x64-archive', util.rimraf(zipDir('x64')));
|
||||
gulp.task('vscode-win32-x64-archive', ['clean-vscode-win32-x64-archive'], archiveWin32Setup('x64'));
|
||||
|
||||
function copyInnoUpdater(arch) {
|
||||
return () => {
|
||||
return gulp.src('build/win32/inno_updater.exe', { base: 'build/win32' })
|
||||
.pipe(vfs.dest(buildPath(arch)));
|
||||
};
|
||||
}
|
||||
|
||||
gulp.task('vscode-win32-ia32-copy-inno-updater', copyInnoUpdater('ia32'));
|
||||
gulp.task('vscode-win32-x64-copy-inno-updater', copyInnoUpdater('x64'));
|
32
build/lib/builtInExtensions.js
Normal file
32
build/lib/builtInExtensions.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
|
||||
function isUpToDate(extension) {
|
||||
const packagePath = path.join(root, '.build', 'builtInExtensions', extension.name, 'package.json');
|
||||
if (!fs.existsSync(packagePath)) {
|
||||
return false;
|
||||
}
|
||||
const packageContents = fs.readFileSync(packagePath);
|
||||
try {
|
||||
const diskVersion = JSON.parse(packageContents).version;
|
||||
return (diskVersion === extension.version);
|
||||
} catch(err) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const builtInExtensions = require('../builtInExtensions');
|
||||
builtInExtensions.forEach((extension) => {
|
||||
if (!isUpToDate(extension)) {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
process.exit(0);
|
|
@ -12,8 +12,10 @@ var Is = require("is");
|
|||
var xml2js = require("xml2js");
|
||||
var glob = require("glob");
|
||||
var https = require("https");
|
||||
var gulp = require("gulp");
|
||||
var util = require('gulp-util');
|
||||
var iconv = require('iconv-lite');
|
||||
var NUMBER_OF_CONCURRENT_DOWNLOADS = 1;
|
||||
function log(message) {
|
||||
var rest = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
|
@ -21,6 +23,24 @@ function log(message) {
|
|||
}
|
||||
util.log.apply(util, [util.colors.green('[i18n]'), message].concat(rest));
|
||||
}
|
||||
exports.defaultLanguages = [
|
||||
{ id: 'zh-tw', folderName: 'cht', transifexId: 'zh-hant' },
|
||||
{ id: 'zh-cn', folderName: 'chs', transifexId: 'zh-hans' },
|
||||
{ id: 'ja', folderName: 'jpn' },
|
||||
{ id: 'ko', folderName: 'kor' },
|
||||
{ id: 'de', folderName: 'deu' },
|
||||
{ id: 'fr', folderName: 'fra' },
|
||||
{ id: 'es', folderName: 'esn' },
|
||||
{ id: 'ru', folderName: 'rus' },
|
||||
{ id: 'it', folderName: 'ita' }
|
||||
];
|
||||
// languages requested by the community to non-stable builds
|
||||
exports.extraLanguages = [
|
||||
{ id: 'pt-br', folderName: 'ptb' },
|
||||
{ id: 'hu', folderName: 'hun' },
|
||||
{ id: 'tr', folderName: 'trk' }
|
||||
];
|
||||
exports.pseudoLanguage = { id: 'pseudo', folderName: 'pseudo', transifexId: 'pseudo' };
|
||||
var LocalizeInfo;
|
||||
(function (LocalizeInfo) {
|
||||
function is(value) {
|
||||
|
@ -116,27 +136,31 @@ var XLF = /** @class */ (function () {
|
|||
return this.buffer.join('\r\n');
|
||||
};
|
||||
XLF.prototype.addFile = function (original, keys, messages) {
|
||||
if (keys.length !== messages.length) {
|
||||
throw new Error("Unmatching keys(" + keys.length + ") and messages(" + messages.length + ").");
|
||||
}
|
||||
this.files[original] = [];
|
||||
var existingKeys = [];
|
||||
for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
|
||||
var key = keys_1[_i];
|
||||
// Ignore duplicate keys because Transifex does not populate those with translated values.
|
||||
if (existingKeys.indexOf(key) !== -1) {
|
||||
var existingKeys = new Set();
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
var realKey = void 0;
|
||||
var comment = void 0;
|
||||
if (Is.string(key)) {
|
||||
realKey = key;
|
||||
comment = undefined;
|
||||
}
|
||||
else if (LocalizeInfo.is(key)) {
|
||||
realKey = key.key;
|
||||
if (key.comment && key.comment.length > 0) {
|
||||
comment = key.comment.map(function (comment) { return encodeEntities(comment); }).join('\r\n');
|
||||
}
|
||||
}
|
||||
if (!realKey || existingKeys.has(realKey)) {
|
||||
continue;
|
||||
}
|
||||
existingKeys.push(key);
|
||||
var message = encodeEntities(messages[keys.indexOf(key)]);
|
||||
var comment = undefined;
|
||||
// Check if the message contains description (if so, it becomes an object type in JSON)
|
||||
if (Is.string(key)) {
|
||||
this.files[original].push({ id: key, message: message, comment: comment });
|
||||
}
|
||||
else {
|
||||
if (key['comment'] && key['comment'].length > 0) {
|
||||
comment = key['comment'].map(function (comment) { return encodeEntities(comment); }).join('\r\n');
|
||||
}
|
||||
this.files[original].push({ id: key['key'], message: message, comment: comment });
|
||||
}
|
||||
existingKeys.add(realKey);
|
||||
var message = encodeEntities(messages[i]);
|
||||
this.files[original].push({ id: realKey, message: message, comment: comment });
|
||||
}
|
||||
};
|
||||
XLF.prototype.addStringItem = function (item) {
|
||||
|
@ -168,20 +192,20 @@ var XLF = /** @class */ (function () {
|
|||
var files = [];
|
||||
parser.parseString(xlfString, function (err, result) {
|
||||
if (err) {
|
||||
reject("Failed to parse XLIFF string. " + err);
|
||||
reject(new Error("XLF parsing error: Failed to parse XLIFF string. " + err));
|
||||
}
|
||||
var fileNodes = result['xliff']['file'];
|
||||
if (!fileNodes) {
|
||||
reject('XLIFF file does not contain "xliff" or "file" node(s) required for parsing.');
|
||||
reject(new Error("XLF parsing error: XLIFF file does not contain \"xliff\" or \"file\" node(s) required for parsing."));
|
||||
}
|
||||
fileNodes.forEach(function (file) {
|
||||
var originalFilePath = file.$.original;
|
||||
if (!originalFilePath) {
|
||||
reject('XLIFF file node does not contain original attribute to determine the original location of the resource file.');
|
||||
reject(new Error("XLF parsing error: XLIFF file node does not contain original attribute to determine the original location of the resource file."));
|
||||
}
|
||||
var language = file.$['target-language'].toLowerCase();
|
||||
var language = file.$['target-language'];
|
||||
if (!language) {
|
||||
reject('XLIFF file node does not contain target-language attribute to determine translated language.');
|
||||
reject(new Error("XLF parsing error: XLIFF file node does not contain target-language attribute to determine translated language."));
|
||||
}
|
||||
var messages = {};
|
||||
var transUnits = file.body[0]['trans-unit'];
|
||||
|
@ -195,10 +219,10 @@ var XLF = /** @class */ (function () {
|
|||
messages[key] = decodeEntities(val);
|
||||
}
|
||||
else {
|
||||
reject('XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.');
|
||||
reject(new Error("XLF parsing error: XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present."));
|
||||
}
|
||||
});
|
||||
files.push({ messages: messages, originalFilePath: originalFilePath, language: language });
|
||||
files.push({ messages: messages, originalFilePath: originalFilePath, language: language.toLowerCase() });
|
||||
});
|
||||
resolve(files);
|
||||
});
|
||||
|
@ -207,67 +231,39 @@ var XLF = /** @class */ (function () {
|
|||
return XLF;
|
||||
}());
|
||||
exports.XLF = XLF;
|
||||
var iso639_3_to_2 = {
|
||||
'chs': 'zh-cn',
|
||||
'cht': 'zh-tw',
|
||||
'csy': 'cs-cz',
|
||||
'deu': 'de',
|
||||
'enu': 'en',
|
||||
'esn': 'es',
|
||||
'fra': 'fr',
|
||||
'hun': 'hu',
|
||||
'ita': 'it',
|
||||
'jpn': 'ja',
|
||||
'kor': 'ko',
|
||||
'nld': 'nl',
|
||||
'plk': 'pl',
|
||||
'ptb': 'pt-br',
|
||||
'ptg': 'pt',
|
||||
'rus': 'ru',
|
||||
'sve': 'sv-se',
|
||||
'trk': 'tr'
|
||||
};
|
||||
/**
|
||||
* Used to map Transifex to VS Code language code representation.
|
||||
*/
|
||||
var iso639_2_to_3 = {
|
||||
'zh-hans': 'chs',
|
||||
'zh-hant': 'cht',
|
||||
'cs-cz': 'csy',
|
||||
'de': 'deu',
|
||||
'en': 'enu',
|
||||
'es': 'esn',
|
||||
'fr': 'fra',
|
||||
'hu': 'hun',
|
||||
'it': 'ita',
|
||||
'ja': 'jpn',
|
||||
'ko': 'kor',
|
||||
'nl': 'nld',
|
||||
'pl': 'plk',
|
||||
'pt-br': 'ptb',
|
||||
'pt': 'ptg',
|
||||
'ru': 'rus',
|
||||
'sv-se': 'sve',
|
||||
'tr': 'trk'
|
||||
};
|
||||
function sortLanguages(directoryNames) {
|
||||
return directoryNames.map(function (dirName) {
|
||||
var lower = dirName.toLowerCase();
|
||||
return {
|
||||
name: lower,
|
||||
iso639_2: iso639_3_to_2[lower]
|
||||
};
|
||||
}).sort(function (a, b) {
|
||||
if (!a.iso639_2 && !b.iso639_2) {
|
||||
return 0;
|
||||
var Limiter = /** @class */ (function () {
|
||||
function Limiter(maxDegreeOfParalellism) {
|
||||
this.maxDegreeOfParalellism = maxDegreeOfParalellism;
|
||||
this.outstandingPromises = [];
|
||||
this.runningPromises = 0;
|
||||
}
|
||||
Limiter.prototype.queue = function (factory) {
|
||||
var _this = this;
|
||||
return new Promise(function (c, e) {
|
||||
_this.outstandingPromises.push({ factory: factory, c: c, e: e });
|
||||
_this.consume();
|
||||
});
|
||||
};
|
||||
Limiter.prototype.consume = function () {
|
||||
var _this = this;
|
||||
while (this.outstandingPromises.length && this.runningPromises < this.maxDegreeOfParalellism) {
|
||||
var iLimitedTask = this.outstandingPromises.shift();
|
||||
this.runningPromises++;
|
||||
var promise = iLimitedTask.factory();
|
||||
promise.then(iLimitedTask.c).catch(iLimitedTask.e);
|
||||
promise.then(function () { return _this.consumed(); }).catch(function () { return _this.consumed(); });
|
||||
}
|
||||
if (!a.iso639_2) {
|
||||
return -1;
|
||||
}
|
||||
if (!b.iso639_2) {
|
||||
return 1;
|
||||
}
|
||||
return a.iso639_2 < b.iso639_2 ? -1 : (a.iso639_2 > b.iso639_2 ? 1 : 0);
|
||||
};
|
||||
Limiter.prototype.consumed = function () {
|
||||
this.runningPromises--;
|
||||
this.consume();
|
||||
};
|
||||
return Limiter;
|
||||
}());
|
||||
exports.Limiter = Limiter;
|
||||
function sortLanguages(languages) {
|
||||
return languages.sort(function (a, b) {
|
||||
return a.id < b.id ? -1 : (a.id > b.id ? 1 : 0);
|
||||
});
|
||||
}
|
||||
function stripComments(content) {
|
||||
|
@ -355,7 +351,7 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
|
|||
defaultMessages[module] = messageMap;
|
||||
keys.map(function (key, i) {
|
||||
total++;
|
||||
if (Is.string(key)) {
|
||||
if (typeof key === 'string') {
|
||||
messageMap[key] = messages[i];
|
||||
}
|
||||
else {
|
||||
|
@ -364,23 +360,15 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
|
|||
});
|
||||
});
|
||||
var languageDirectory = path.join(__dirname, '..', '..', 'i18n');
|
||||
var languageDirs;
|
||||
if (languages) {
|
||||
languageDirs = sortLanguages(languages);
|
||||
}
|
||||
else {
|
||||
languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); }));
|
||||
}
|
||||
languageDirs.forEach(function (language) {
|
||||
if (!language.iso639_2) {
|
||||
return;
|
||||
}
|
||||
var sortedLanguages = sortLanguages(languages);
|
||||
sortedLanguages.forEach(function (language) {
|
||||
if (process.env['VSCODE_BUILD_VERBOSE']) {
|
||||
log("Generating nls bundles for: " + language.iso639_2);
|
||||
log("Generating nls bundles for: " + language.id);
|
||||
}
|
||||
statistics[language.iso639_2] = 0;
|
||||
statistics[language.id] = 0;
|
||||
var localizedModules = Object.create(null);
|
||||
var cwd = path.join(languageDirectory, language.name, 'src');
|
||||
var languageFolderName = language.folderName || language.id;
|
||||
var cwd = path.join(languageDirectory, languageFolderName, 'src');
|
||||
modules.forEach(function (module) {
|
||||
var order = keysSection[module];
|
||||
var i18nFile = path.join(cwd, module) + '.i18n.json';
|
||||
|
@ -394,12 +382,12 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
|
|||
log("No localized messages found for module " + module + ". Using default messages.");
|
||||
}
|
||||
messages = defaultMessages[module];
|
||||
statistics[language.iso639_2] = statistics[language.iso639_2] + Object.keys(messages).length;
|
||||
statistics[language.id] = statistics[language.id] + Object.keys(messages).length;
|
||||
}
|
||||
var localizedMessages = [];
|
||||
order.forEach(function (keyInfo) {
|
||||
var key = null;
|
||||
if (Is.string(keyInfo)) {
|
||||
if (typeof keyInfo === 'string') {
|
||||
key = keyInfo;
|
||||
}
|
||||
else {
|
||||
|
@ -411,7 +399,7 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
|
|||
log("No localized message found for key " + key + " in module " + module + ". Using default message.");
|
||||
}
|
||||
message = defaultMessages[module][key];
|
||||
statistics[language.iso639_2] = statistics[language.iso639_2] + 1;
|
||||
statistics[language.id] = statistics[language.id] + 1;
|
||||
}
|
||||
localizedMessages.push(message);
|
||||
});
|
||||
|
@ -421,7 +409,7 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
|
|||
var modules = bundleSection[bundle];
|
||||
var contents = [
|
||||
fileHeader,
|
||||
"define(\"" + bundle + ".nls." + language.iso639_2 + "\", {"
|
||||
"define(\"" + bundle + ".nls." + language.id + "\", {"
|
||||
];
|
||||
modules.forEach(function (module, index) {
|
||||
contents.push("\t\"" + module + "\": [");
|
||||
|
@ -436,24 +424,17 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
|
|||
contents.push(index < modules.length - 1 ? '\t],' : '\t]');
|
||||
});
|
||||
contents.push('});');
|
||||
emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') }));
|
||||
emitter.queue(new File({ path: bundle + '.nls.' + language.id + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') }));
|
||||
});
|
||||
});
|
||||
Object.keys(statistics).forEach(function (key) {
|
||||
var value = statistics[key];
|
||||
log(key + " has " + value + " untranslated strings.");
|
||||
});
|
||||
languageDirs.forEach(function (dir) {
|
||||
var language = dir.name;
|
||||
var iso639_2 = iso639_3_to_2[language];
|
||||
if (!iso639_2) {
|
||||
log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead.");
|
||||
}
|
||||
else {
|
||||
var stats = statistics[iso639_2];
|
||||
if (Is.undef(stats)) {
|
||||
log("\tNo translations found for language " + language + ". Using default language instead.");
|
||||
}
|
||||
sortedLanguages.forEach(function (language) {
|
||||
var stats = statistics[language.id];
|
||||
if (Is.undef(stats)) {
|
||||
log("\tNo translations found for language " + language.id + ". Using default language instead.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -467,39 +448,16 @@ function processNlsFiles(opts) {
|
|||
}
|
||||
else {
|
||||
this.emit('error', "Failed to read component file: " + file.relative);
|
||||
return;
|
||||
}
|
||||
if (BundledFormat.is(json)) {
|
||||
processCoreBundleFormat(opts.fileHeader, opts.languages, json, this);
|
||||
}
|
||||
}
|
||||
this.emit('data', file);
|
||||
this.queue(file);
|
||||
});
|
||||
}
|
||||
exports.processNlsFiles = processNlsFiles;
|
||||
function prepareXlfFiles(projectName, extensionName) {
|
||||
return event_stream_1.through(function (file) {
|
||||
if (!file.isBuffer()) {
|
||||
throw new Error("Failed to read component file: " + file.relative);
|
||||
}
|
||||
var extension = path.extname(file.path);
|
||||
if (extension === '.json') {
|
||||
var json = JSON.parse(file.contents.toString('utf8'));
|
||||
if (BundledFormat.is(json)) {
|
||||
importBundleJson(file, json, this);
|
||||
}
|
||||
else if (PackageJsonFormat.is(json) || ModuleJsonFormat.is(json)) {
|
||||
importModuleOrPackageJson(file, json, projectName, this, extensionName);
|
||||
}
|
||||
else {
|
||||
throw new Error("JSON format cannot be deduced for " + file.relative + ".");
|
||||
}
|
||||
}
|
||||
else if (extension === '.isl') {
|
||||
importIsl(file, this);
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.prepareXlfFiles = prepareXlfFiles;
|
||||
var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup';
|
||||
function getResource(sourceFile) {
|
||||
var resource;
|
||||
|
@ -532,113 +490,186 @@ function getResource(sourceFile) {
|
|||
throw new Error("Could not identify the XLF bundle for " + sourceFile);
|
||||
}
|
||||
exports.getResource = getResource;
|
||||
function importBundleJson(file, json, stream) {
|
||||
var bundleXlfs = Object.create(null);
|
||||
for (var source in json.keys) {
|
||||
var projectResource = getResource(source);
|
||||
var resource = projectResource.name;
|
||||
var project = projectResource.project;
|
||||
var keys = json.keys[source];
|
||||
var messages = json.messages[source];
|
||||
if (keys.length !== messages.length) {
|
||||
throw new Error("There is a mismatch between keys and messages in " + file.relative);
|
||||
}
|
||||
var xlf = bundleXlfs[resource] ? bundleXlfs[resource] : bundleXlfs[resource] = new XLF(project);
|
||||
xlf.addFile('src/' + source, keys, messages);
|
||||
}
|
||||
for (var resource in bundleXlfs) {
|
||||
var newFilePath = bundleXlfs[resource].project + "/" + resource.replace(/\//g, '_') + ".xlf";
|
||||
var xlfFile = new File({ path: newFilePath, contents: new Buffer(bundleXlfs[resource].toString(), 'utf-8') });
|
||||
stream.emit('data', xlfFile);
|
||||
}
|
||||
}
|
||||
// Keeps existing XLF instances and a state of how many files were already processed for faster file emission
|
||||
var extensions = Object.create(null);
|
||||
function importModuleOrPackageJson(file, json, projectName, stream, extensionName) {
|
||||
if (ModuleJsonFormat.is(json) && json['keys'].length !== json['messages'].length) {
|
||||
throw new Error("There is a mismatch between keys and messages in " + file.relative);
|
||||
}
|
||||
// Prepare the source path for <original/> attribute in XLF & extract messages from JSON
|
||||
var formattedSourcePath = file.relative.replace(/\\/g, '/');
|
||||
var messages = Object.keys(json).map(function (key) { return json[key].toString(); });
|
||||
// Stores the amount of localization files to be transformed to XLF before the emission
|
||||
var localizationFilesCount, originalFilePath;
|
||||
// If preparing XLF for external extension, then use different glob pattern and source path
|
||||
if (extensionName) {
|
||||
localizationFilesCount = glob.sync('**/*.nls.json').length;
|
||||
originalFilePath = "" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length);
|
||||
}
|
||||
else {
|
||||
// Used for vscode/extensions folder
|
||||
extensionName = formattedSourcePath.split('/')[0];
|
||||
localizationFilesCount = glob.sync("./extensions/" + extensionName + "/**/*.nls.json").length;
|
||||
originalFilePath = "extensions/" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length);
|
||||
}
|
||||
var extension = extensions[extensionName] ?
|
||||
extensions[extensionName] : extensions[extensionName] = { xlf: new XLF(projectName), processed: 0 };
|
||||
// .nls.json can come with empty array of keys and messages, check for it
|
||||
if (ModuleJsonFormat.is(json) && json.keys.length !== 0) {
|
||||
extension.xlf.addFile(originalFilePath, json.keys, json.messages);
|
||||
}
|
||||
else if (PackageJsonFormat.is(json) && Object.keys(json).length !== 0) {
|
||||
extension.xlf.addFile(originalFilePath, Object.keys(json), messages);
|
||||
}
|
||||
// Check if XLF is populated with file nodes to emit it
|
||||
if (++extensions[extensionName].processed === localizationFilesCount) {
|
||||
var newFilePath = path.join(projectName, extensionName + '.xlf');
|
||||
var xlfFile = new File({ path: newFilePath, contents: new Buffer(extension.xlf.toString(), 'utf-8') });
|
||||
stream.emit('data', xlfFile);
|
||||
}
|
||||
}
|
||||
function importIsl(file, stream) {
|
||||
var projectName, resourceFile;
|
||||
if (path.basename(file.path) === 'Default.isl') {
|
||||
projectName = setupProject;
|
||||
resourceFile = 'setup_default.xlf';
|
||||
}
|
||||
else {
|
||||
projectName = workbenchProject;
|
||||
resourceFile = 'setup_messages.xlf';
|
||||
}
|
||||
var xlf = new XLF(projectName), keys = [], messages = [];
|
||||
var model = new TextModel(file.contents.toString());
|
||||
var inMessageSection = false;
|
||||
model.lines.forEach(function (line) {
|
||||
if (line.length === 0) {
|
||||
return;
|
||||
}
|
||||
var firstChar = line.charAt(0);
|
||||
switch (firstChar) {
|
||||
case ';':
|
||||
// Comment line;
|
||||
function createXlfFilesForCoreBundle() {
|
||||
return event_stream_1.through(function (file) {
|
||||
var basename = path.basename(file.path);
|
||||
if (basename === 'nls.metadata.json') {
|
||||
if (file.isBuffer()) {
|
||||
var xlfs = Object.create(null);
|
||||
var json = JSON.parse(file.contents.toString('utf8'));
|
||||
for (var coreModule in json.keys) {
|
||||
var projectResource = getResource(coreModule);
|
||||
var resource = projectResource.name;
|
||||
var project = projectResource.project;
|
||||
var keys = json.keys[coreModule];
|
||||
var messages = json.messages[coreModule];
|
||||
if (keys.length !== messages.length) {
|
||||
this.emit('error', "There is a mismatch between keys and messages in " + file.relative + " for module " + coreModule);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
var xlf = xlfs[resource];
|
||||
if (!xlf) {
|
||||
xlf = new XLF(project);
|
||||
xlfs[resource] = xlf;
|
||||
}
|
||||
xlf.addFile("src/" + coreModule, keys, messages);
|
||||
}
|
||||
}
|
||||
for (var resource in xlfs) {
|
||||
var xlf = xlfs[resource];
|
||||
var filePath = xlf.project + "/" + resource.replace(/\//g, '_') + ".xlf";
|
||||
var xlfFile = new File({
|
||||
path: filePath,
|
||||
contents: new Buffer(xlf.toString(), 'utf8')
|
||||
});
|
||||
this.queue(xlfFile);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.emit('error', new Error("File " + file.relative + " is not using a buffer content"));
|
||||
return;
|
||||
case '[':
|
||||
inMessageSection = '[Messages]' === line || '[CustomMessages]' === line;
|
||||
return;
|
||||
}
|
||||
if (!inMessageSection) {
|
||||
return;
|
||||
}
|
||||
var sections = line.split('=');
|
||||
if (sections.length !== 2) {
|
||||
throw new Error("Badly formatted message found: " + line);
|
||||
}
|
||||
else {
|
||||
var key = sections[0];
|
||||
var value = sections[1];
|
||||
if (key.length > 0 && value.length > 0) {
|
||||
keys.push(key);
|
||||
messages.push(value);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.emit('error', new Error("File " + file.relative + " is not a core meta data file."));
|
||||
return;
|
||||
}
|
||||
});
|
||||
var originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/');
|
||||
xlf.addFile(originalPath, keys, messages);
|
||||
// Emit only upon all ISL files combined into single XLF instance
|
||||
var newFilePath = path.join(projectName, resourceFile);
|
||||
var xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') });
|
||||
stream.emit('data', xlfFile);
|
||||
}
|
||||
exports.createXlfFilesForCoreBundle = createXlfFilesForCoreBundle;
|
||||
function createXlfFilesForExtensions() {
|
||||
var counter = 0;
|
||||
var folderStreamEnded = false;
|
||||
var folderStreamEndEmitted = false;
|
||||
return event_stream_1.through(function (extensionFolder) {
|
||||
var folderStream = this;
|
||||
var stat = fs.statSync(extensionFolder.path);
|
||||
if (!stat.isDirectory()) {
|
||||
return;
|
||||
}
|
||||
var extensionName = path.basename(extensionFolder.path);
|
||||
if (extensionName === 'node_modules') {
|
||||
return;
|
||||
}
|
||||
counter++;
|
||||
var _xlf;
|
||||
function getXlf() {
|
||||
if (!_xlf) {
|
||||
_xlf = new XLF(extensionsProject);
|
||||
}
|
||||
return _xlf;
|
||||
}
|
||||
gulp.src(["./extensions/" + extensionName + "/package.nls.json", "./extensions/" + extensionName + "/**/nls.metadata.json"]).pipe(event_stream_1.through(function (file) {
|
||||
if (file.isBuffer()) {
|
||||
var buffer = file.contents;
|
||||
var basename = path.basename(file.path);
|
||||
if (basename === 'package.nls.json') {
|
||||
var json_1 = JSON.parse(buffer.toString('utf8'));
|
||||
var keys = Object.keys(json_1);
|
||||
var messages = keys.map(function (key) {
|
||||
var value = json_1[key];
|
||||
if (Is.string(value)) {
|
||||
return value;
|
||||
}
|
||||
else if (value) {
|
||||
return value.message;
|
||||
}
|
||||
else {
|
||||
return "Unknown message for key: " + key;
|
||||
}
|
||||
});
|
||||
getXlf().addFile("extensions/" + extensionName + "/package", keys, messages);
|
||||
}
|
||||
else if (basename === 'nls.metadata.json') {
|
||||
var json = JSON.parse(buffer.toString('utf8'));
|
||||
var relPath = path.relative("./extensions/" + extensionName, path.dirname(file.path));
|
||||
for (var file_1 in json) {
|
||||
var fileContent = json[file_1];
|
||||
getXlf().addFile("extensions/" + extensionName + "/" + relPath + "/" + file_1, fileContent.keys, fileContent.messages);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.emit('error', new Error(file.path + " is not a valid extension nls file"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}, function () {
|
||||
if (_xlf) {
|
||||
var xlfFile = new File({
|
||||
path: path.join(extensionsProject, extensionName + '.xlf'),
|
||||
contents: new Buffer(_xlf.toString(), 'utf8')
|
||||
});
|
||||
folderStream.queue(xlfFile);
|
||||
}
|
||||
this.queue(null);
|
||||
counter--;
|
||||
if (counter === 0 && folderStreamEnded && !folderStreamEndEmitted) {
|
||||
folderStreamEndEmitted = true;
|
||||
folderStream.queue(null);
|
||||
}
|
||||
}));
|
||||
}, function () {
|
||||
folderStreamEnded = true;
|
||||
if (counter === 0) {
|
||||
folderStreamEndEmitted = true;
|
||||
this.queue(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.createXlfFilesForExtensions = createXlfFilesForExtensions;
|
||||
function createXlfFilesForIsl() {
|
||||
return event_stream_1.through(function (file) {
|
||||
var projectName, resourceFile;
|
||||
if (path.basename(file.path) === 'Default.isl') {
|
||||
projectName = setupProject;
|
||||
resourceFile = 'setup_default.xlf';
|
||||
}
|
||||
else {
|
||||
projectName = workbenchProject;
|
||||
resourceFile = 'setup_messages.xlf';
|
||||
}
|
||||
var xlf = new XLF(projectName), keys = [], messages = [];
|
||||
var model = new TextModel(file.contents.toString());
|
||||
var inMessageSection = false;
|
||||
model.lines.forEach(function (line) {
|
||||
if (line.length === 0) {
|
||||
return;
|
||||
}
|
||||
var firstChar = line.charAt(0);
|
||||
switch (firstChar) {
|
||||
case ';':
|
||||
// Comment line;
|
||||
return;
|
||||
case '[':
|
||||
inMessageSection = '[Messages]' === line || '[CustomMessages]' === line;
|
||||
return;
|
||||
}
|
||||
if (!inMessageSection) {
|
||||
return;
|
||||
}
|
||||
var sections = line.split('=');
|
||||
if (sections.length !== 2) {
|
||||
throw new Error("Badly formatted message found: " + line);
|
||||
}
|
||||
else {
|
||||
var key = sections[0];
|
||||
var value = sections[1];
|
||||
if (key.length > 0 && value.length > 0) {
|
||||
keys.push(key);
|
||||
messages.push(value);
|
||||
}
|
||||
}
|
||||
});
|
||||
var originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/');
|
||||
xlf.addFile(originalPath, keys, messages);
|
||||
// Emit only upon all ISL files combined into single XLF instance
|
||||
var newFilePath = path.join(projectName, resourceFile);
|
||||
var xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') });
|
||||
this.queue(xlfFile);
|
||||
});
|
||||
}
|
||||
exports.createXlfFilesForIsl = createXlfFilesForIsl;
|
||||
function pushXlfFiles(apiHostname, username, password) {
|
||||
var tryGetPromises = [];
|
||||
var updateCreatePromises = [];
|
||||
|
@ -664,7 +695,7 @@ function pushXlfFiles(apiHostname, username, password) {
|
|||
// End the pipe only after all the communication with Transifex API happened
|
||||
Promise.all(tryGetPromises).then(function () {
|
||||
Promise.all(updateCreatePromises).then(function () {
|
||||
_this.emit('end');
|
||||
_this.queue(null);
|
||||
}).catch(function (reason) { throw new Error(reason); });
|
||||
}).catch(function (reason) { throw new Error(reason); });
|
||||
});
|
||||
|
@ -769,40 +800,37 @@ function updateResource(project, slug, xlfFile, apiHostname, credentials) {
|
|||
request.end();
|
||||
});
|
||||
}
|
||||
function obtainProjectResources(projectName) {
|
||||
var resources = [];
|
||||
if (projectName === editorProject) {
|
||||
var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8');
|
||||
resources = JSON.parse(json).editor;
|
||||
}
|
||||
else if (projectName === workbenchProject) {
|
||||
var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8');
|
||||
resources = JSON.parse(json).workbench;
|
||||
}
|
||||
else if (projectName === extensionsProject) {
|
||||
var extensionsToLocalize = glob.sync('./extensions/**/*.nls.json').map(function (extension) { return extension.split('/')[2]; });
|
||||
var resourcesToPull_1 = [];
|
||||
extensionsToLocalize.forEach(function (extension) {
|
||||
if (resourcesToPull_1.indexOf(extension) === -1) {
|
||||
resourcesToPull_1.push(extension);
|
||||
resources.push({ name: extension, project: projectName });
|
||||
}
|
||||
// cache resources
|
||||
var _buildResources;
|
||||
function pullBuildXlfFiles(apiHostname, username, password, language) {
|
||||
if (!_buildResources) {
|
||||
_buildResources = [];
|
||||
// editor and workbench
|
||||
var json = JSON.parse(fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'));
|
||||
_buildResources.push.apply(_buildResources, json.editor);
|
||||
_buildResources.push.apply(_buildResources, json.workbench);
|
||||
// extensions
|
||||
var extensionsToLocalize_1 = Object.create(null);
|
||||
glob.sync('./extensions/**/*.nls.json').forEach(function (extension) { return extensionsToLocalize_1[extension.split('/')[2]] = true; });
|
||||
glob.sync('./extensions/*/node_modules/vscode-nls').forEach(function (extension) { return extensionsToLocalize_1[extension.split('/')[2]] = true; });
|
||||
Object.keys(extensionsToLocalize_1).forEach(function (extension) {
|
||||
_buildResources.push({ name: extension, project: 'vscode-extensions' });
|
||||
});
|
||||
}
|
||||
else if (projectName === setupProject) {
|
||||
resources.push({ name: 'setup_default', project: setupProject });
|
||||
}
|
||||
return resources;
|
||||
return pullXlfFiles(apiHostname, username, password, language, _buildResources);
|
||||
}
|
||||
function pullXlfFiles(projectName, apiHostname, username, password, languages, resources) {
|
||||
if (!resources) {
|
||||
resources = obtainProjectResources(projectName);
|
||||
}
|
||||
if (!resources) {
|
||||
throw new Error('Transifex projects and resources must be defined to be able to pull translations from Transifex.');
|
||||
exports.pullBuildXlfFiles = pullBuildXlfFiles;
|
||||
function pullSetupXlfFiles(apiHostname, username, password, language, includeDefault) {
|
||||
var setupResources = [{ name: 'setup_messages', project: 'vscode-workbench' }];
|
||||
if (includeDefault) {
|
||||
setupResources.push({ name: 'setup_default', project: 'vscode-setup' });
|
||||
}
|
||||
return pullXlfFiles(apiHostname, username, password, language, setupResources);
|
||||
}
|
||||
exports.pullSetupXlfFiles = pullSetupXlfFiles;
|
||||
function pullXlfFiles(apiHostname, username, password, language, resources) {
|
||||
var credentials = username + ":" + password;
|
||||
var expectedTranslationsCount = languages.length * resources.length;
|
||||
var expectedTranslationsCount = resources.length;
|
||||
var translationsRetrieved = 0, called = false;
|
||||
return event_stream_1.readable(function (count, callback) {
|
||||
// Mark end of stream when all resources were retrieved
|
||||
|
@ -812,29 +840,29 @@ function pullXlfFiles(projectName, apiHostname, username, password, languages, r
|
|||
if (!called) {
|
||||
called = true;
|
||||
var stream_1 = this;
|
||||
// Retrieve XLF files from main projects
|
||||
languages.map(function (language) {
|
||||
resources.map(function (resource) {
|
||||
retrieveResource(language, resource, apiHostname, credentials).then(function (file) {
|
||||
resources.map(function (resource) {
|
||||
retrieveResource(language, resource, apiHostname, credentials).then(function (file) {
|
||||
if (file) {
|
||||
stream_1.emit('data', file);
|
||||
translationsRetrieved++;
|
||||
}).catch(function (error) { throw new Error(error); });
|
||||
});
|
||||
}
|
||||
translationsRetrieved++;
|
||||
}).catch(function (error) { throw new Error(error); });
|
||||
});
|
||||
}
|
||||
callback();
|
||||
});
|
||||
}
|
||||
exports.pullXlfFiles = pullXlfFiles;
|
||||
var limiter = new Limiter(NUMBER_OF_CONCURRENT_DOWNLOADS);
|
||||
function retrieveResource(language, resource, apiHostname, credentials) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
return limiter.queue(function () { return new Promise(function (resolve, reject) {
|
||||
var slug = resource.name.replace(/\//g, '_');
|
||||
var project = resource.project;
|
||||
var iso639 = language.toLowerCase();
|
||||
var transifexLanguageId = language.transifexId || language.id;
|
||||
var options = {
|
||||
hostname: apiHostname,
|
||||
path: "/api/2/project/" + project + "/resource/" + slug + "/translation/" + iso639 + "?file&mode=onlyreviewed",
|
||||
path: "/api/2/project/" + project + "/resource/" + slug + "/translation/" + transifexLanguageId + "?file&mode=onlyreviewed",
|
||||
auth: credentials,
|
||||
port: 443,
|
||||
method: 'GET'
|
||||
};
|
||||
var request = https.request(options, function (res) {
|
||||
|
@ -842,18 +870,24 @@ function retrieveResource(language, resource, apiHostname, credentials) {
|
|||
res.on('data', function (chunk) { return xlfBuffer.push(chunk); });
|
||||
res.on('end', function () {
|
||||
if (res.statusCode === 200) {
|
||||
resolve(new File({ contents: Buffer.concat(xlfBuffer), path: project + "/" + iso639_2_to_3[language] + "/" + slug + ".xlf" }));
|
||||
resolve(new File({ contents: Buffer.concat(xlfBuffer), path: project + "/" + slug + ".xlf" }));
|
||||
}
|
||||
else if (res.statusCode === 404) {
|
||||
console.log(slug + " in " + project + " returned no data.");
|
||||
resolve(null);
|
||||
}
|
||||
else {
|
||||
reject(slug + " in " + project + " returned no data. Response code: " + res.statusCode + ".");
|
||||
}
|
||||
reject(slug + " in " + project + " returned no data. Response code: " + res.statusCode + ".");
|
||||
});
|
||||
});
|
||||
request.on('error', function (err) {
|
||||
reject("Failed to query resource " + slug + " with the following error: " + err);
|
||||
reject("Failed to query resource " + slug + " with the following error: " + err + ". " + options.path);
|
||||
});
|
||||
request.end();
|
||||
});
|
||||
}); });
|
||||
}
|
||||
function prepareJsonFiles() {
|
||||
function prepareI18nFiles() {
|
||||
var parsePromises = [];
|
||||
return event_stream_1.through(function (xlf) {
|
||||
var stream = this;
|
||||
|
@ -861,69 +895,117 @@ function prepareJsonFiles() {
|
|||
parsePromises.push(parsePromise);
|
||||
parsePromise.then(function (resolvedFiles) {
|
||||
resolvedFiles.forEach(function (file) {
|
||||
var messages = file.messages, translatedFile;
|
||||
// ISL file path always starts with 'build/'
|
||||
if (/^build\//.test(file.originalFilePath)) {
|
||||
var defaultLanguages = { 'zh-hans': true, 'zh-hant': true, 'ko': true };
|
||||
if (path.basename(file.originalFilePath) === 'Default' && !defaultLanguages[file.language]) {
|
||||
return;
|
||||
}
|
||||
translatedFile = createIslFile('..', file.originalFilePath, messages, iso639_2_to_3[file.language]);
|
||||
}
|
||||
else {
|
||||
translatedFile = createI18nFile(iso639_2_to_3[file.language], file.originalFilePath, messages);
|
||||
}
|
||||
stream.emit('data', translatedFile);
|
||||
var translatedFile = createI18nFile(file.originalFilePath, file.messages);
|
||||
stream.queue(translatedFile);
|
||||
});
|
||||
}, function (rejectReason) {
|
||||
throw new Error("XLF parsing error: " + rejectReason);
|
||||
});
|
||||
}, function () {
|
||||
var _this = this;
|
||||
Promise.all(parsePromises)
|
||||
.then(function () { _this.emit('end'); })
|
||||
.then(function () { _this.queue(null); })
|
||||
.catch(function (reason) { throw new Error(reason); });
|
||||
});
|
||||
}
|
||||
exports.prepareJsonFiles = prepareJsonFiles;
|
||||
function createI18nFile(base, originalFilePath, messages) {
|
||||
var content = [
|
||||
'/*---------------------------------------------------------------------------------------------',
|
||||
' * Copyright (c) Microsoft Corporation. All rights reserved.',
|
||||
' * Licensed under the MIT License. See License.txt in the project root for license information.',
|
||||
' *--------------------------------------------------------------------------------------------*/',
|
||||
'// Do not edit this file. It is machine generated.'
|
||||
].join('\n') + '\n' + JSON.stringify(messages, null, '\t').replace(/\r\n/g, '\n');
|
||||
exports.prepareI18nFiles = prepareI18nFiles;
|
||||
function createI18nFile(originalFilePath, messages) {
|
||||
var result = Object.create(null);
|
||||
result[''] = [
|
||||
'--------------------------------------------------------------------------------------------',
|
||||
'Copyright (c) Microsoft Corporation. All rights reserved.',
|
||||
'Licensed under the MIT License. See License.txt in the project root for license information.',
|
||||
'--------------------------------------------------------------------------------------------',
|
||||
'Do not edit this file. It is machine generated.'
|
||||
];
|
||||
for (var _i = 0, _a = Object.keys(messages); _i < _a.length; _i++) {
|
||||
var key = _a[_i];
|
||||
result[key] = messages[key];
|
||||
}
|
||||
var content = JSON.stringify(result, null, '\t').replace(/\r\n/g, '\n');
|
||||
return new File({
|
||||
path: path.join(base, originalFilePath + '.i18n.json'),
|
||||
path: path.join(originalFilePath + '.i18n.json'),
|
||||
contents: new Buffer(content, 'utf8')
|
||||
});
|
||||
}
|
||||
var languageNames = {
|
||||
'chs': 'Simplified Chinese',
|
||||
'cht': 'Traditional Chinese',
|
||||
'kor': 'Korean'
|
||||
};
|
||||
var languageIds = {
|
||||
'chs': '$0804',
|
||||
'cht': '$0404',
|
||||
'kor': '$0412'
|
||||
};
|
||||
var encodings = {
|
||||
'chs': 'CP936',
|
||||
'cht': 'CP950',
|
||||
'jpn': 'CP932',
|
||||
'kor': 'CP949',
|
||||
'deu': 'CP1252',
|
||||
'fra': 'CP1252',
|
||||
'esn': 'CP1252',
|
||||
'rus': 'CP1251',
|
||||
'ita': 'CP1252',
|
||||
'ptb': 'CP1252',
|
||||
'hun': 'CP1250',
|
||||
'trk': 'CP1254'
|
||||
};
|
||||
function createIslFile(base, originalFilePath, messages, language) {
|
||||
var i18nPackVersion = "1.0.0";
|
||||
function pullI18nPackFiles(apiHostname, username, password, language) {
|
||||
return pullBuildXlfFiles(apiHostname, username, password, language).pipe(prepareI18nPackFiles());
|
||||
}
|
||||
exports.pullI18nPackFiles = pullI18nPackFiles;
|
||||
function prepareI18nPackFiles() {
|
||||
var parsePromises = [];
|
||||
var mainPack = { version: i18nPackVersion, contents: {} };
|
||||
var extensionsPacks = {};
|
||||
return event_stream_1.through(function (xlf) {
|
||||
var stream = this;
|
||||
var parsePromise = XLF.parse(xlf.contents.toString());
|
||||
parsePromises.push(parsePromise);
|
||||
parsePromise.then(function (resolvedFiles) {
|
||||
resolvedFiles.forEach(function (file) {
|
||||
var path = file.originalFilePath;
|
||||
var firstSlash = path.indexOf('/');
|
||||
var firstSegment = path.substr(0, firstSlash);
|
||||
if (firstSegment === 'src') {
|
||||
mainPack.contents[path.substr(firstSlash + 1)] = file.messages;
|
||||
}
|
||||
else if (firstSegment === 'extensions') {
|
||||
var secondSlash = path.indexOf('/', firstSlash + 1);
|
||||
var secondSegment = path.substring(firstSlash + 1, secondSlash);
|
||||
if (secondSegment) {
|
||||
var extPack = extensionsPacks[secondSegment];
|
||||
if (!extPack) {
|
||||
extPack = extensionsPacks[secondSegment] = { version: i18nPackVersion, contents: {} };
|
||||
}
|
||||
extPack.contents[path.substr(secondSlash + 1)] = file.messages;
|
||||
}
|
||||
else {
|
||||
console.log('Unknown second segment ' + path);
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.log('Unknown first segment ' + path);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, function () {
|
||||
var _this = this;
|
||||
Promise.all(parsePromises)
|
||||
.then(function () {
|
||||
var translatedMainFile = createI18nFile('./main', mainPack);
|
||||
_this.queue(translatedMainFile);
|
||||
for (var extension in extensionsPacks) {
|
||||
var translatedExtFile = createI18nFile("./extensions/" + extension, extensionsPacks[extension]);
|
||||
_this.queue(translatedExtFile);
|
||||
}
|
||||
_this.queue(null);
|
||||
})
|
||||
.catch(function (reason) { throw new Error(reason); });
|
||||
});
|
||||
}
|
||||
exports.prepareI18nPackFiles = prepareI18nPackFiles;
|
||||
function prepareIslFiles(language, innoSetupConfig) {
|
||||
var parsePromises = [];
|
||||
return event_stream_1.through(function (xlf) {
|
||||
var stream = this;
|
||||
var parsePromise = XLF.parse(xlf.contents.toString());
|
||||
parsePromises.push(parsePromise);
|
||||
parsePromise.then(function (resolvedFiles) {
|
||||
resolvedFiles.forEach(function (file) {
|
||||
if (path.basename(file.originalFilePath) === 'Default' && !innoSetupConfig.defaultInfo) {
|
||||
return;
|
||||
}
|
||||
var translatedFile = createIslFile(file.originalFilePath, file.messages, language, innoSetupConfig);
|
||||
stream.queue(translatedFile);
|
||||
});
|
||||
});
|
||||
}, function () {
|
||||
var _this = this;
|
||||
Promise.all(parsePromises)
|
||||
.then(function () { _this.queue(null); })
|
||||
.catch(function (reason) { throw new Error(reason); });
|
||||
});
|
||||
}
|
||||
exports.prepareIslFiles = prepareIslFiles;
|
||||
function createIslFile(originalFilePath, messages, language, innoSetup) {
|
||||
var content = [];
|
||||
var originalContent;
|
||||
if (path.basename(originalFilePath) === 'Default') {
|
||||
|
@ -937,7 +1019,7 @@ function createIslFile(base, originalFilePath, messages, language) {
|
|||
var firstChar = line.charAt(0);
|
||||
if (firstChar === '[' || firstChar === ';') {
|
||||
if (line === '; *** Inno Setup version 5.5.3+ English messages ***') {
|
||||
content.push("; *** Inno Setup version 5.5.3+ " + languageNames[language] + " messages ***");
|
||||
content.push("; *** Inno Setup version 5.5.3+ " + innoSetup.defaultInfo.name + " messages ***");
|
||||
}
|
||||
else {
|
||||
content.push(line);
|
||||
|
@ -949,13 +1031,13 @@ function createIslFile(base, originalFilePath, messages, language) {
|
|||
var translated = line;
|
||||
if (key) {
|
||||
if (key === 'LanguageName') {
|
||||
translated = key + "=" + languageNames[language];
|
||||
translated = key + "=" + innoSetup.defaultInfo.name;
|
||||
}
|
||||
else if (key === 'LanguageID') {
|
||||
translated = key + "=" + languageIds[language];
|
||||
translated = key + "=" + innoSetup.defaultInfo.id;
|
||||
}
|
||||
else if (key === 'LanguageCodePage') {
|
||||
translated = key + "=" + encodings[language].substr(2);
|
||||
translated = key + "=" + innoSetup.codePage.substr(2);
|
||||
}
|
||||
else {
|
||||
var translatedMessage = messages[key];
|
||||
|
@ -968,12 +1050,11 @@ function createIslFile(base, originalFilePath, messages, language) {
|
|||
}
|
||||
}
|
||||
});
|
||||
var tag = iso639_3_to_2[language];
|
||||
var basename = path.basename(originalFilePath);
|
||||
var filePath = path.join(base, path.dirname(originalFilePath), basename) + "." + tag + ".isl";
|
||||
var filePath = basename + "." + language.id + ".isl";
|
||||
return new File({
|
||||
path: filePath,
|
||||
contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), encodings[language])
|
||||
contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), innoSetup.codePage)
|
||||
});
|
||||
}
|
||||
function encodeEntities(value) {
|
||||
|
|
|
@ -197,10 +197,6 @@
|
|||
{
|
||||
"name": "vs/workbench/services/decorations",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "setup_messages",
|
||||
"project": "vscode-workbench"
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -172,7 +172,6 @@ function optimizeTask(opts) {
|
|||
};
|
||||
}
|
||||
exports.optimizeTask = optimizeTask;
|
||||
;
|
||||
/**
|
||||
* Wrap around uglify and allow the preserveComments function
|
||||
* to have a file "context" to include our copyright only once per file.
|
||||
|
@ -235,4 +234,3 @@ function minifyTask(src, sourceMapBaseUrl) {
|
|||
};
|
||||
}
|
||||
exports.minifyTask = minifyTask;
|
||||
;
|
||||
|
|
|
@ -163,7 +163,7 @@ export interface IOptimizeTaskOpts {
|
|||
/**
|
||||
* (languages to process)
|
||||
*/
|
||||
languages: string[];
|
||||
languages: i18n.Language[];
|
||||
}
|
||||
export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStream {
|
||||
const entryPoints = opts.entryPoints;
|
||||
|
@ -239,7 +239,7 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr
|
|||
}))
|
||||
.pipe(gulp.dest(out));
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
declare class FileWithCopyright extends VinylFile {
|
||||
public __hasOurCopyright: boolean;
|
||||
|
@ -324,4 +324,4 @@ export function minifyTask(src: string, sourceMapBaseUrl: string): (cb: any) =>
|
|||
cb(err);
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
9
build/lib/typings/event-stream.d.ts
vendored
9
build/lib/typings/event-stream.d.ts
vendored
|
@ -1,7 +1,14 @@
|
|||
declare module "event-stream" {
|
||||
import { Stream } from 'stream';
|
||||
import { ThroughStream } from 'through';
|
||||
import { ThroughStream as _ThroughStream} from 'through';
|
||||
import { MapStream } from 'map-stream';
|
||||
import * as File from 'vinyl';
|
||||
|
||||
export interface ThroughStream extends _ThroughStream {
|
||||
queue(data: File | null);
|
||||
push(data: File | null);
|
||||
paused: boolean;
|
||||
}
|
||||
|
||||
function merge(streams: Stream[]): ThroughStream;
|
||||
function merge(...streams: Stream[]): ThroughStream;
|
||||
|
|
62
build/npm/update-localization-extension.js
Normal file
62
build/npm/update-localization-extension.js
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
let i18n = require("../lib/i18n");
|
||||
|
||||
let fs = require("fs");
|
||||
let path = require("path");
|
||||
let vfs = require("vinyl-fs");
|
||||
let rimraf = require('rimraf');
|
||||
|
||||
function update(idOrPath) {
|
||||
if (!idOrPath) {
|
||||
throw new Error('Argument must be the location of the localization extension.');
|
||||
return;
|
||||
}
|
||||
let locExtFolder = idOrPath;
|
||||
if (/^\w{2}(-\w+)?$/.test(idOrPath)) {
|
||||
locExtFolder = '../vscode-localization-' + idOrPath;
|
||||
}
|
||||
let locExtStat = fs.statSync(locExtFolder);
|
||||
if (!locExtStat || !locExtStat.isDirectory) {
|
||||
throw new Error('No directory found at ' + idOrPath);
|
||||
}
|
||||
let packageJSON = JSON.parse(fs.readFileSync(path.join(locExtFolder, 'package.json')).toString());
|
||||
let contributes = packageJSON['contributes'];
|
||||
if (!contributes) {
|
||||
throw new Error('The extension must define a "localizations" contribution in the "package.json"');
|
||||
}
|
||||
let localizations = contributes['localizations'];
|
||||
if (!localizations) {
|
||||
throw new Error('The extension must define a "localizations" contribution of type array in the "package.json"');
|
||||
}
|
||||
|
||||
localizations.forEach(function (localization) {
|
||||
if (!localization.languageId || !localization.languageName || !localization.translations) {
|
||||
throw new Error('Each localization contribution must define "languageId", "languageName" and "translations" properties.');
|
||||
}
|
||||
let server = localization.server || 'www.transifex.com';
|
||||
let userName = localization.userName || 'api';
|
||||
let apiToken = process.env.TRANSIFEX_API_TOKEN;
|
||||
let languageId = localization.transifexId || localization.languageId;
|
||||
let translationDataFolder = path.join(locExtFolder, localization.translations);
|
||||
|
||||
if (fs.existsSync(translationDataFolder) && fs.existsSync(path.join(translationDataFolder, 'main.i18n.json'))) {
|
||||
console.log('Clearing \'' + translationDataFolder + '\'...');
|
||||
rimraf.sync(translationDataFolder);
|
||||
}
|
||||
|
||||
console.log('Downloading translations for \'' + languageId + '\' to \'' + translationDataFolder + '\'...');
|
||||
i18n.pullI18nPackFiles(server, userName, apiToken, { id: languageId })
|
||||
.pipe(vfs.dest(translationDataFolder));
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
if (path.basename(process.argv[1]) === 'update-localization-extension.js') {
|
||||
update(process.argv[2]);
|
||||
}
|
|
@ -69,6 +69,7 @@ interface Asset {
|
|||
hash: string;
|
||||
sha256hash: string;
|
||||
size: number;
|
||||
supportsFastUpdate?: boolean;
|
||||
}
|
||||
|
||||
function createOrUpdate(commit: string, quality: string, platform: string, type: string, release: NewDocument, asset: Asset, isUpdate: boolean): Promise<void> {
|
||||
|
@ -234,6 +235,13 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||
size
|
||||
};
|
||||
|
||||
// Remove this if we ever need to rollback fast updates for windows
|
||||
if (/win32/.test(platform)) {
|
||||
asset.supportsFastUpdate = true;
|
||||
}
|
||||
|
||||
console.log('Asset:', JSON.stringify(asset, null, ' '));
|
||||
|
||||
const release = {
|
||||
id: commit,
|
||||
timestamp: (new Date()).getTime(),
|
||||
|
|
|
@ -45,6 +45,10 @@ step "Build minified" {
|
|||
exec { & npm run gulp -- "vscode-win32-$global:arch-min" }
|
||||
}
|
||||
|
||||
step "Copy Inno updater" {
|
||||
exec { & npm run gulp -- "vscode-win32-$global:arch-copy-inno-updater" }
|
||||
}
|
||||
|
||||
# step "Create loader snapshot" {
|
||||
# exec { & node build\lib\snapshotLoader.js --arch=$global:arch }
|
||||
# }
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
"always"
|
||||
],
|
||||
"triple-equals": true
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
|
@ -18,7 +18,7 @@ OutputDir={#OutputDir}
|
|||
OutputBaseFilename=VSCodeSetup
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
AppMutex={#AppMutex}
|
||||
AppMutex={code:GetAppMutex}
|
||||
SetupMutex={#AppMutex}setup
|
||||
WizardImageFile={#RepoDir}\resources\win32\inno-big.bmp
|
||||
WizardSmallImageFile={#RepoDir}\resources\win32\inno-small.bmp
|
||||
|
@ -47,11 +47,15 @@ Name: "simplifiedChinese"; MessagesFile: "{#RepoDir}\build\win32\i18n\Default.zh
|
|||
Name: "traditionalChinese"; MessagesFile: "{#RepoDir}\build\win32\i18n\Default.zh-tw.isl,{#RepoDir}\build\win32\i18n\messages.zh-tw.isl" {#LocalizedLanguageFile("cht")}
|
||||
|
||||
[InstallDelete]
|
||||
Type: filesandordirs; Name: {app}\resources\app\out
|
||||
Type: filesandordirs; Name: {app}\resources\app\plugins
|
||||
Type: filesandordirs; Name: {app}\resources\app\extensions
|
||||
Type: filesandordirs; Name: {app}\resources\app\node_modules
|
||||
Type: files; Name: {app}\resources\app\Credits_45.0.2454.85.html
|
||||
Type: filesandordirs; Name: "{app}\resources\app\out"; Check: IsNotUpdate
|
||||
Type: filesandordirs; Name: "{app}\resources\app\plugins"; Check: IsNotUpdate
|
||||
Type: filesandordirs; Name: "{app}\resources\app\extensions"; Check: IsNotUpdate
|
||||
Type: filesandordirs; Name: "{app}\resources\app\node_modules"; Check: IsNotUpdate
|
||||
Type: files; Name: "{app}\resources\app\Credits_45.0.2454.85.html"; Check: IsNotUpdate
|
||||
|
||||
[UninstallDelete]
|
||||
Type: filesandordirs; Name: "{app}\_"
|
||||
Type: filesandordirs; Name: "{app}\old"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
@ -63,7 +67,8 @@ Name: "addtopath"; Description: "{cm:AddToPath}"; GroupDescription: "{cm:Other}"
|
|||
Name: "runcode"; Description: "{cm:RunAfter,{#NameShort}}"; GroupDescription: "{cm:Other}"; Check: WizardSilent
|
||||
|
||||
[Files]
|
||||
Source: "*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "*"; Excludes: "inno_updater.exe"; DestDir: "{code:GetDestDir}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "inno_updater.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; AppUserModelID: "{#AppUserId}"
|
||||
|
@ -71,7 +76,7 @@ Name: "{commondesktop}\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; Tasks
|
|||
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; Tasks: quicklaunchicon; AppUserModelID: "{#AppUserId}"
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#ExeBasename}.exe"; Description: "{cm:LaunchProgram,{#NameLong}}"; Tasks: runcode; Flags: nowait postinstall; Check: WizardSilent
|
||||
Filename: "{app}\{#ExeBasename}.exe"; Description: "{cm:LaunchProgram,{#NameLong}}"; Tasks: runcode; Flags: nowait postinstall; Check: ShouldRunAfterUpdate
|
||||
Filename: "{app}\{#ExeBasename}.exe"; Description: "{cm:LaunchProgram,{#NameLong}}"; Flags: nowait postinstall; Check: WizardNotSilent
|
||||
|
||||
[Registry]
|
||||
|
@ -955,6 +960,75 @@ begin
|
|||
Result := not WizardSilent();
|
||||
end;
|
||||
|
||||
// Updates
|
||||
function IsBackgroundUpdate(): Boolean;
|
||||
begin
|
||||
Result := ExpandConstant('{param:update|false}') <> 'false';
|
||||
end;
|
||||
|
||||
function IsNotUpdate(): Boolean;
|
||||
begin
|
||||
Result := not IsBackgroundUpdate();
|
||||
end;
|
||||
|
||||
// VS Code will create a flag file before the update starts (/update=C:\foo\bar)
|
||||
// - if the file exists at this point, the user quit Code before the update finished, so don't start Code after update
|
||||
// - otherwise, the user has accepted to apply the update and Code should start
|
||||
function LockFileExists(): Boolean;
|
||||
begin
|
||||
Result := FileExists(ExpandConstant('{param:update}'))
|
||||
end;
|
||||
|
||||
function ShouldRunAfterUpdate(): Boolean;
|
||||
begin
|
||||
if IsBackgroundUpdate() then
|
||||
Result := not LockFileExists()
|
||||
else
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function GetAppMutex(Value: string): string;
|
||||
begin
|
||||
if IsBackgroundUpdate() then
|
||||
Result := ''
|
||||
else
|
||||
Result := '{#AppMutex}';
|
||||
end;
|
||||
|
||||
function GetDestDir(Value: string): string;
|
||||
begin
|
||||
if IsBackgroundUpdate() then
|
||||
Result := ExpandConstant('{app}\_')
|
||||
else
|
||||
Result := ExpandConstant('{app}');
|
||||
end;
|
||||
|
||||
function BoolToStr(Value: Boolean): String;
|
||||
begin
|
||||
if Value then
|
||||
Result := 'true'
|
||||
else
|
||||
Result := 'false';
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
var
|
||||
UpdateResultCode: Integer;
|
||||
begin
|
||||
if IsBackgroundUpdate() and (CurStep = ssPostInstall) then
|
||||
begin
|
||||
CreateMutex('{#AppMutex}-ready');
|
||||
|
||||
while (CheckForMutexes('{#AppMutex}')) do
|
||||
begin
|
||||
Log('Application is still running, waiting');
|
||||
Sleep(1000);
|
||||
end;
|
||||
|
||||
Exec(ExpandConstant('{app}\inno_updater.exe'), ExpandConstant('_ "{app}\unins000.dat" ' + BoolToStr(LockFileExists())), '', SW_SHOW, ewWaitUntilTerminated, UpdateResultCode);
|
||||
end;
|
||||
end;
|
||||
|
||||
// http://stackoverflow.com/a/23838239/261019
|
||||
procedure Explode(var Dest: TArrayOfString; Text: String; Separator: String);
|
||||
var
|
||||
|
|
BIN
build/win32/inno_updater.exe
Normal file
BIN
build/win32/inno_updater.exe
Normal file
Binary file not shown.
|
@ -20,7 +20,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"jsonc-parser": "^1.0.0",
|
||||
"vscode-nls": "^2.0.1"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"contributes": {
|
||||
"jsonValidation": [
|
||||
|
|
|
@ -2,16 +2,14 @@
|
|||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
import * as vscode from 'vscode';
|
||||
import { getLocation, visit, parse } from 'jsonc-parser';
|
||||
import * as path from 'path';
|
||||
import { SettingsDocument } from './settingsDocumentHelper';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
const decoration = vscode.window.createTextEditorDecorationType({
|
||||
color: '#9e9e9e'
|
||||
|
@ -30,6 +28,9 @@ export function activate(context: vscode.ExtensionContext): void {
|
|||
//extensions suggestions
|
||||
context.subscriptions.push(...registerExtensionsCompletions());
|
||||
|
||||
//locale suggestions
|
||||
context.subscriptions.push(registerLocaleCompletionsInLanguageDocument());
|
||||
|
||||
// launch.json decorations
|
||||
context.subscriptions.push(vscode.window.onDidChangeActiveTextEditor(editor => updateLaunchJsonDecorations(editor), null, context.subscriptions));
|
||||
context.subscriptions.push(vscode.workspace.onDidChangeTextDocument(event => {
|
||||
|
@ -67,6 +68,44 @@ function registerSettingsCompletions(): vscode.Disposable {
|
|||
});
|
||||
}
|
||||
|
||||
function registerLocaleCompletionsInLanguageDocument(): vscode.Disposable {
|
||||
return vscode.languages.registerCompletionItemProvider({ pattern: '**/locale.json' }, {
|
||||
provideCompletionItems(document, position, token) {
|
||||
const location = getLocation(document.getText(), document.offsetAt(position));
|
||||
const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
|
||||
if (location.path[0] === 'locale') {
|
||||
const extensionsContent = <IExtensionsContent>parse(document.getText());
|
||||
return provideContributedLocalesProposals(range);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function provideContributedLocalesProposals(range: vscode.Range): vscode.ProviderResult<vscode.CompletionItem[] | vscode.CompletionList> {
|
||||
const contributedLocales: string[] = [];
|
||||
for (const extension of vscode.extensions.all) {
|
||||
if (extension.packageJSON && extension.packageJSON['contributes'] && extension.packageJSON['contributes']['localizations'] && extension.packageJSON['contributes']['localizations'].length) {
|
||||
const localizations: { languageId: string }[] = extension.packageJSON['contributes']['localizations'];
|
||||
for (const localization of localizations) {
|
||||
if (contributedLocales.indexOf(localization.languageId) === -1) {
|
||||
contributedLocales.push(localization.languageId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return contributedLocales.map(locale => {
|
||||
const text = `"${locale}"`;
|
||||
const item = new vscode.CompletionItem(text);
|
||||
item.kind = vscode.CompletionItemKind.Value;
|
||||
item.insertText = text;
|
||||
item.range = range;
|
||||
item.filterText = text;
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
interface IExtensionsContent {
|
||||
recommendations: string[];
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ jsonc-parser@^1.0.0:
|
|||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-1.0.0.tgz#ddcc864ae708e60a7a6dd36daea00172fa8d9272"
|
||||
|
||||
vscode-nls@^2.0.1:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
|
|
@ -3,18 +3,17 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as path from 'path';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { languages, window, commands, ExtensionContext, TextDocument, ColorInformation, ColorPresentation, Color, Range, Position, CompletionItem, CompletionItemKind, TextEdit, SnippetString } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } from 'vscode-languageclient';
|
||||
|
||||
import { ConfigurationFeature } from 'vscode-languageclient/lib/configuration.proposed';
|
||||
import { DocumentColorRequest, DocumentColorParams, ColorPresentationRequest, ColorPresentationParams } from 'vscode-languageserver-protocol/lib/protocol.colorProvider.proposed';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
let localize = nls.loadMessageBundle();
|
||||
|
||||
// this method is called when vs code is activated
|
||||
export function activate(context: ExtensionContext) {
|
||||
|
||||
|
@ -104,7 +103,7 @@ export function activate(context: ExtensionContext) {
|
|||
indentationRules: indentationRules
|
||||
});
|
||||
|
||||
const regionCompletionRegExpr = /^(\s*)(\/(\*\s*(#\w*)?)?)?/;
|
||||
const regionCompletionRegExpr = /^(\s*)(\/(\*\s*(#\w*)?)?)?$/;
|
||||
languages.registerCompletionItemProvider(documentSelector, {
|
||||
provideCompletionItems(doc, pos) {
|
||||
let lineUntilPos = doc.getText(new Range(new Position(pos.line, 0), pos));
|
||||
|
|
|
@ -714,7 +714,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"vscode-languageclient": "^3.5.0",
|
||||
"vscode-nls": "^2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.43"
|
||||
|
|
|
@ -27,6 +27,6 @@ vscode-languageserver-types@^3.5.0:
|
|||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374"
|
||||
|
||||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
|
|
@ -310,16 +310,16 @@
|
|||
"compile": "gulp compile-extension:emmet"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.43",
|
||||
"@types/node": "8.0.33",
|
||||
"vscode": "1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emmetio/html-matcher": "^0.3.3",
|
||||
"@emmetio/css-parser": "ramya-rao-a/css-parser#vscode",
|
||||
"@emmetio/math-expression": "^0.1.1",
|
||||
"vscode-emmet-helper": "^1.1.20",
|
||||
"vscode-emmet-helper": "^1.1.21",
|
||||
"vscode-languageserver-types": "^3.5.0",
|
||||
"image-size": "^0.5.2",
|
||||
"vscode-nls": "2.0.2"
|
||||
"vscode-nls": "3.1.2"
|
||||
}
|
||||
}
|
|
@ -8,6 +8,7 @@ import { Node, HtmlNode, Rule, Property } from 'EmmetNode';
|
|||
import { getEmmetHelper, getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, validate, getEmmetConfiguration, isStyleSheet, getEmmetMode } from './util';
|
||||
|
||||
const trimRegex = /[\u00a0]*[\d|#|\-|\*|\u2022]+\.?/;
|
||||
const hexColorRegex = /^#\d+$/;
|
||||
|
||||
interface ExpandAbbreviationInput {
|
||||
syntax: string;
|
||||
|
@ -23,6 +24,7 @@ export function wrapWithAbbreviation(args: any) {
|
|||
}
|
||||
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
let rootNode = parseDocument(editor.document, false);
|
||||
|
||||
const syntax = getSyntaxFromArgs({ language: editor.document.languageId });
|
||||
if (!syntax) {
|
||||
|
@ -46,7 +48,13 @@ export function wrapWithAbbreviation(args: any) {
|
|||
editor.selections.forEach(selection => {
|
||||
let rangeToReplace: vscode.Range = selection.isReversed ? new vscode.Range(selection.active, selection.anchor) : selection;
|
||||
if (rangeToReplace.isEmpty) {
|
||||
rangeToReplace = new vscode.Range(rangeToReplace.start.line, 0, rangeToReplace.start.line, editor.document.lineAt(rangeToReplace.start.line).text.length);
|
||||
let { active } = selection;
|
||||
let currentNode = getNode(rootNode, active, true);
|
||||
if (currentNode && (currentNode.start.line === active.line || currentNode.end.line === active.line)) {
|
||||
rangeToReplace = new vscode.Range(currentNode.start, currentNode.end);
|
||||
} else {
|
||||
rangeToReplace = new vscode.Range(rangeToReplace.start.line, 0, rangeToReplace.start.line, editor.document.lineAt(rangeToReplace.start.line).text.length);
|
||||
}
|
||||
}
|
||||
|
||||
const firstLineOfSelection = editor.document.lineAt(rangeToReplace.start).text.substr(rangeToReplace.start.character);
|
||||
|
@ -232,17 +240,18 @@ export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocumen
|
|||
// Fix for https://github.com/Microsoft/vscode/issues/34162
|
||||
// Other than sass, stylus, we can make use of the terminator tokens to validate position
|
||||
if (syntax !== 'sass' && syntax !== 'stylus' && currentNode.type === 'property') {
|
||||
const abbreviation = document.getText(new vscode.Range(abbreviationRange.start.line, abbreviationRange.start.character, abbreviationRange.end.line, abbreviationRange.end.character));
|
||||
const propertyNode = <Property>currentNode;
|
||||
if (propertyNode.terminatorToken
|
||||
&& propertyNode.separator
|
||||
&& position.isAfterOrEqual(propertyNode.separatorToken.end)
|
||||
&& position.isBeforeOrEqual(propertyNode.terminatorToken.start)) {
|
||||
return false;
|
||||
return hexColorRegex.test(abbreviation);
|
||||
}
|
||||
if (!propertyNode.terminatorToken
|
||||
&& propertyNode.separator
|
||||
&& position.isAfterOrEqual(propertyNode.separatorToken.end)) {
|
||||
return false;
|
||||
return hexColorRegex.test(abbreviation);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
|
|||
.foo {
|
||||
margin: a
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
return withRandomFileEditor(testContent, 'css', (editor, doc) => {
|
||||
|
@ -87,6 +87,36 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
|
|||
});
|
||||
});
|
||||
|
||||
test('Allow hex color when typing property values when there is a property in the next line (CSS)', () => {
|
||||
const testContent = `
|
||||
.foo {
|
||||
margin: #12
|
||||
margin: 10px;
|
||||
}
|
||||
`;
|
||||
|
||||
return withRandomFileEditor(testContent, 'css', (editor, doc) => {
|
||||
editor.selection = new Selection(2, 12, 2, 12);
|
||||
return expandEmmetAbbreviation(null).then(() => {
|
||||
assert.equal(editor.document.getText(), testContent.replace('#12', '#121212'));
|
||||
const cancelSrc = new CancellationTokenSource();
|
||||
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 12), cancelSrc.token);
|
||||
if (!completionPromise) {
|
||||
assert.fail('Completion promise wasnt returned');
|
||||
return Promise.resolve();
|
||||
}
|
||||
completionPromise.then(result => {
|
||||
if (!result || !result.items || !result.items.length) {
|
||||
assert.fail('Completion promise came back empty');
|
||||
return Promise.resolve();
|
||||
}
|
||||
assert.equal(result.items[0].label, '#121212');
|
||||
});
|
||||
return Promise.resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('Skip when typing property values when there is a property in the previous line (CSS)', () => {
|
||||
const testContent = `
|
||||
.foo {
|
||||
|
@ -109,11 +139,41 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
|
|||
});
|
||||
});
|
||||
|
||||
test('Allow hex color when typing property values when there is a property in the previous line (CSS)', () => {
|
||||
const testContent = `
|
||||
.foo {
|
||||
margin: 10px;
|
||||
margin: #12
|
||||
}
|
||||
`;
|
||||
|
||||
return withRandomFileEditor(testContent, 'css', (editor, doc) => {
|
||||
editor.selection = new Selection(3, 12, 3, 12);
|
||||
return expandEmmetAbbreviation(null).then(() => {
|
||||
assert.equal(editor.document.getText(), testContent.replace('#12', '#121212'));
|
||||
const cancelSrc = new CancellationTokenSource();
|
||||
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(3, 12), cancelSrc.token);
|
||||
if (!completionPromise) {
|
||||
assert.fail('Completion promise wasnt returned');
|
||||
return Promise.resolve();
|
||||
}
|
||||
completionPromise.then(result => {
|
||||
if (!result || !result.items || !result.items.length) {
|
||||
assert.fail('Completion promise came back empty');
|
||||
return Promise.resolve();
|
||||
}
|
||||
assert.equal(result.items[0].label, '#121212');
|
||||
});
|
||||
return Promise.resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('Skip when typing property values when it is the only property in the rule (CSS)', () => {
|
||||
const testContent = `
|
||||
.foo {
|
||||
margin: a
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
return withRandomFileEditor(testContent, 'css', (editor, doc) => {
|
||||
|
@ -130,6 +190,35 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
|
|||
});
|
||||
});
|
||||
|
||||
test('Allow hex colors when typing property values when it is the only property in the rule (CSS)', () => {
|
||||
const testContent = `
|
||||
.foo {
|
||||
margin: #12
|
||||
}
|
||||
`;
|
||||
|
||||
return withRandomFileEditor(testContent, 'css', (editor, doc) => {
|
||||
editor.selection = new Selection(2, 12, 2, 12);
|
||||
return expandEmmetAbbreviation(null).then(() => {
|
||||
assert.equal(editor.document.getText(), testContent.replace('#12', '#121212'));
|
||||
const cancelSrc = new CancellationTokenSource();
|
||||
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 12), cancelSrc.token);
|
||||
if (!completionPromise) {
|
||||
assert.fail('Completion promise wasnt returned');
|
||||
return Promise.resolve();
|
||||
}
|
||||
completionPromise.then(result => {
|
||||
if (!result || !result.items || !result.items.length) {
|
||||
assert.fail('Completion promise came back empty');
|
||||
return Promise.resolve();
|
||||
}
|
||||
assert.equal(result.items[0].label, '#121212');
|
||||
});
|
||||
return Promise.resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('Expand abbreviation in completion list (CSS)', () => {
|
||||
const abbreviation = 'm10';
|
||||
const expandedText = 'margin: 10px;';
|
||||
|
|
|
@ -131,7 +131,63 @@ suite('Tests for Wrap with Abbreviations', () => {
|
|||
editor.selections = [new Selection(2, 0, 2, 0)];
|
||||
const promise = wrapWithAbbreviation({ abbreviation: 'li.hello|c' });
|
||||
if (!promise) {
|
||||
assert.equal(1, 2, 'Wrap returned udnefined instead of promise.');
|
||||
assert.equal(1, 2, 'Wrap returned undefined instead of promise.');
|
||||
return Promise.resolve();
|
||||
}
|
||||
return promise.then(() => {
|
||||
assert.equal(editor.document.getText(), expectedContents);
|
||||
return Promise.resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('Wrap with abbreviation entire node when cursor is on opening tag', () => {
|
||||
const contents = `
|
||||
<div class="nav main">
|
||||
hello
|
||||
</div>
|
||||
`;
|
||||
const expectedContents = `
|
||||
<div>
|
||||
<div class="nav main">
|
||||
hello
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
return withRandomFileEditor(contents, 'html', (editor, doc) => {
|
||||
editor.selections = [new Selection(1, 1, 1, 1)];
|
||||
const promise = wrapWithAbbreviation({ abbreviation: 'div' });
|
||||
if (!promise) {
|
||||
assert.equal(1, 2, 'Wrap returned undefined instead of promise.');
|
||||
return Promise.resolve();
|
||||
}
|
||||
return promise.then(() => {
|
||||
assert.equal(editor.document.getText(), expectedContents);
|
||||
return Promise.resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('Wrap with abbreviation entire node when cursor is on closing tag', () => {
|
||||
const contents = `
|
||||
<div class="nav main">
|
||||
hello
|
||||
</div>
|
||||
`;
|
||||
const expectedContents = `
|
||||
<div>
|
||||
<div class="nav main">
|
||||
hello
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
return withRandomFileEditor(contents, 'html', (editor, doc) => {
|
||||
editor.selections = [new Selection(3, 1, 3, 1)];
|
||||
const promise = wrapWithAbbreviation({ abbreviation: 'div' });
|
||||
if (!promise) {
|
||||
assert.equal(1, 2, 'Wrap returned undefined instead of promise.');
|
||||
return Promise.resolve();
|
||||
}
|
||||
return promise.then(() => {
|
||||
|
@ -160,7 +216,7 @@ suite('Tests for Wrap with Abbreviations', () => {
|
|||
editor.selections = [new Selection(2, 2, 3, 33)];
|
||||
const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello$*' });
|
||||
if (!promise) {
|
||||
assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned udnefined.');
|
||||
assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned undefined.');
|
||||
return Promise.resolve();
|
||||
}
|
||||
return promise.then(() => {
|
||||
|
@ -191,7 +247,7 @@ suite('Tests for Wrap with Abbreviations', () => {
|
|||
editor.selections = [new Selection(2, 2, 3, 33)];
|
||||
const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello*|c' });
|
||||
if (!promise) {
|
||||
assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned udnefined.');
|
||||
assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned undefined.');
|
||||
return Promise.resolve();
|
||||
}
|
||||
return promise.then(() => {
|
||||
|
@ -220,7 +276,7 @@ suite('Tests for Wrap with Abbreviations', () => {
|
|||
editor.selections = [new Selection(2, 3, 3, 16)];
|
||||
const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello$*|t' });
|
||||
if (!promise) {
|
||||
assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned udnefined.');
|
||||
assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned undefined.');
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
|
@ -238,7 +294,7 @@ function testWrapWithAbbreviation(selections: Selection[], abbreviation: string,
|
|||
editor.selections = selections;
|
||||
const promise = wrapWithAbbreviation({ abbreviation });
|
||||
if (!promise) {
|
||||
assert.equal(1, 2, 'Wrap with Abbreviation returned udnefined.');
|
||||
assert.equal(1, 2, 'Wrap with Abbreviation returned undefined.');
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,11 @@ export function resolveUpdateExtensionsPath() {
|
|||
}
|
||||
if (_currentExtensionsPath !== extensionsPath) {
|
||||
_currentExtensionsPath = extensionsPath;
|
||||
if (_currentExtensionsPath && !path.isAbsolute(_currentExtensionsPath)) {
|
||||
vscode.window.showErrorMessage('The path provided in emmet.extensionsPath setting should be absolute path');
|
||||
_emmetHelper.updateExtensionsPath();
|
||||
return;
|
||||
}
|
||||
_emmetHelper.updateExtensionsPath(_currentExtensionsPath).then(null, (err: string) => vscode.window.showErrorMessage(err));
|
||||
}
|
||||
}
|
||||
|
@ -331,7 +336,9 @@ export function getEmmetConfiguration(syntax: string) {
|
|||
showExpandedAbbreviation: emmetConfig['showExpandedAbbreviation'],
|
||||
showAbbreviationSuggestions: emmetConfig['showAbbreviationSuggestions'],
|
||||
syntaxProfiles,
|
||||
variables: emmetConfig['variables']
|
||||
variables: emmetConfig['variables'],
|
||||
excludeLanguages: emmetConfig['excludeLanguages'],
|
||||
showSuggestionsAsSnippets: emmetConfig['showSuggestionsAsSnippets']
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@emmetio/stream-reader/-/stream-reader-2.2.0.tgz#46cffea119a0a003312a21c2d9b5628cb5fcd442"
|
||||
|
||||
"@types/node@7.0.43":
|
||||
version "7.0.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
|
||||
"@types/node@8.0.33":
|
||||
version "8.0.33"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.33.tgz#1126e94374014e54478092830704f6ea89df04cd"
|
||||
|
||||
ajv@^5.1.0:
|
||||
version "5.3.0"
|
||||
|
@ -1027,6 +1027,10 @@ json-stringify-safe@~5.0.1:
|
|||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||
|
||||
jsonc-parser@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-1.0.0.tgz#ddcc864ae708e60a7a6dd36daea00172fa8d9272"
|
||||
|
||||
jsonify@~0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
|
||||
|
@ -2048,11 +2052,12 @@ vinyl@~2.0.1:
|
|||
remove-trailing-separator "^1.0.1"
|
||||
replace-ext "^1.0.0"
|
||||
|
||||
vscode-emmet-helper@^1.1.20:
|
||||
version "1.1.20"
|
||||
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.20.tgz#7523dc7f635f74e4becc44d4e519a9db5055a023"
|
||||
vscode-emmet-helper@^1.1.21:
|
||||
version "1.1.21"
|
||||
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.21.tgz#4c77c2c5f5acc316d9a47cc564a51a732609ef7b"
|
||||
dependencies:
|
||||
"@emmetio/extract-abbreviation" "^0.1.1"
|
||||
jsonc-parser "^1.0.0"
|
||||
vscode-languageserver-types "^3.0.3"
|
||||
|
||||
vscode-languageserver-types@^3.0.3:
|
||||
|
@ -2063,9 +2068,9 @@ vscode-languageserver-types@^3.5.0:
|
|||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374"
|
||||
|
||||
vscode-nls@2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.0.tgz#a8a264c0d4bd3e1ed4746a9883235fec5b62968a"
|
||||
|
||||
vscode@1.0.1:
|
||||
version "1.0.1"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"jsonc-parser": "^1.0.0",
|
||||
"markdown-it": "^8.3.1",
|
||||
"parse5": "^3.0.2",
|
||||
"vscode-nls": "^2.0.1"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"contributes": {
|
||||
"jsonValidation": [
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
import { parseTree, findNodeAtLocation, Node as JsonNode } from 'jsonc-parser';
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { parseTree, findNodeAtLocation, Node as JsonNode } from 'jsonc-parser';
|
||||
import * as MarkdownItType from 'markdown-it';
|
||||
|
||||
import { languages, workspace, Disposable, TextDocument, Uri, Diagnostic, Range, DiagnosticSeverity, Position } from 'vscode';
|
||||
|
@ -15,8 +17,6 @@ import { languages, workspace, Disposable, TextDocument, Uri, Diagnostic, Range,
|
|||
const product = require('../../../product.json');
|
||||
const allowedBadgeProviders: string[] = (product.extensionAllowedBadgeProviders || []).map(s => s.toLowerCase());
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
const httpsRequired = localize('httpsRequired', "Images must use the HTTPS protocol.");
|
||||
const svgsNotValid = localize('svgsNotValid', "SVGs are not a valid image source.");
|
||||
const embeddedSvgsNotValid = localize('embeddedSvgsNotValid', "Embedded SVGs are not a valid image source.");
|
||||
|
|
|
@ -31,8 +31,8 @@ linkify-it@^2.0.0:
|
|||
uc.micro "^1.0.1"
|
||||
|
||||
markdown-it@^8.3.1:
|
||||
version "8.3.1"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.3.1.tgz#2f4b622948ccdc193d66f3ca2d43125ac4ac7323"
|
||||
version "8.4.0"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.0.tgz#e2400881bf171f7018ed1bd9da441dac8af6306d"
|
||||
dependencies:
|
||||
argparse "^1.0.7"
|
||||
entities "~1.1.1"
|
||||
|
@ -58,6 +58,6 @@ uc.micro@^1.0.1, uc.micro@^1.0.3:
|
|||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192"
|
||||
|
||||
vscode-nls@^2.0.1:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
|
|
@ -1001,7 +1001,7 @@
|
|||
"file-type": "^7.2.0",
|
||||
"iconv-lite": "0.4.19",
|
||||
"vscode-extension-telemetry": "0.0.8",
|
||||
"vscode-nls": "2.0.2",
|
||||
"vscode-nls": "^3.1.2",
|
||||
"which": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1012,4 +1012,4 @@
|
|||
"@types/which": "^1.0.28",
|
||||
"mocha": "^3.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
"config.enableLongCommitWarning": "Whether long commit messages should be warned about",
|
||||
"config.confirmSync": "Confirm before synchronizing git repositories",
|
||||
"config.countBadge": "Controls the git badge counter. `all` counts all changes. `tracked` counts only the tracked changes. `off` turns it off.",
|
||||
"config.checkoutType": "Controls what type of branches are listed when running `Checkout to...`. `all` shows all refs, `local` shows only the local branchs, `tags` shows only tags and `remote` shows only remote branches.",
|
||||
"config.checkoutType": "Controls what type of branches are listed when running `Checkout to...`. `all` shows all refs, `local` shows only the local branches, `tags` shows only tags and `remote` shows only remote branches.",
|
||||
"config.ignoreLegacyWarning": "Ignores the legacy Git warning",
|
||||
"config.ignoreMissingGitWarning": "Ignores the warning when Git is missing",
|
||||
"config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository",
|
||||
|
@ -70,4 +70,4 @@
|
|||
"colors.ignored": "Color for ignored resources.",
|
||||
"colors.conflict": "Color for resources with conflicts.",
|
||||
"colors.submodule": "Color for submodule resources."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1448,7 +1448,7 @@ export class CommandCenter {
|
|||
if (shouldPrompt) {
|
||||
const message = localize('sync is unpredictable', "This action will push and pull commits to and from '{0}'.", HEAD.upstream);
|
||||
const yes = localize('ok', "OK");
|
||||
const neverAgain = localize('never again', "OK, Never Show Again");
|
||||
const neverAgain = localize('never again', "OK, Don't Show Again");
|
||||
const pick = await window.showWarningMessage(message, { modal: true }, yes, neverAgain);
|
||||
|
||||
if (pick === neverAgain) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
|
||||
const localize = nls.loadMessageBundle();
|
||||
import { ExtensionContext, workspace, window, Disposable, commands, Uri, OutputChannel } from 'vscode';
|
||||
import { findGit, Git, IGit } from './git';
|
||||
import { Model } from './model';
|
||||
|
@ -77,7 +77,7 @@ async function _activate(context: ExtensionContext, disposables: Disposable[]):
|
|||
outputChannel.show();
|
||||
|
||||
const download = localize('downloadgit', "Download Git");
|
||||
const neverShowAgain = localize('neverShowAgain', "Don't show again");
|
||||
const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
||||
const choice = await window.showWarningMessage(
|
||||
localize('notfound', "Git not found. Install it or configure it using the 'git.path' setting."),
|
||||
download,
|
||||
|
@ -116,7 +116,7 @@ async function checkGitVersion(info: IGit): Promise<void> {
|
|||
}
|
||||
|
||||
const update = localize('updateGit', "Update Git");
|
||||
const neverShowAgain = localize('neverShowAgain', "Don't show again");
|
||||
const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
||||
|
||||
const choice = await window.showWarningMessage(
|
||||
localize('git20', "You seem to have git {0} installed. Code works best with git >= 2", info.version),
|
||||
|
|
|
@ -916,7 +916,7 @@ export class Repository implements Disposable {
|
|||
|
||||
if (didHitLimit && !shouldIgnore && !this.didWarnAboutLimit) {
|
||||
const ok = { title: localize('ok', "OK"), isCloseAffordance: true };
|
||||
const neverAgain = { title: localize('neveragain', "Never Show Again") };
|
||||
const neverAgain = { title: localize('neveragain', "Don't Show Again") };
|
||||
|
||||
window.showWarningMessage(localize('huge', "The git repository at '{0}' has too many active changes, only a subset of Git features will be enabled.", this.repository.root), ok, neverAgain).then(result => {
|
||||
if (result === neverAgain) {
|
||||
|
|
|
@ -242,9 +242,9 @@ vscode-extension-telemetry@0.0.8:
|
|||
applicationinsights "0.18.0"
|
||||
winreg "1.2.3"
|
||||
|
||||
vscode-nls@2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
||||
which@^1.3.0:
|
||||
version "1.3.0"
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
func main() {
|
||||
dnsName := "test-vm-from-go"
|
||||
storageAccount := "mystorageaccount"
|
||||
c := make(chan int)
|
||||
|
||||
client, err := management.ClientFromPublishSettingsFile("path/to/downloaded.publishsettings", "")
|
||||
if err != nil {
|
||||
|
|
|
@ -428,6 +428,127 @@
|
|||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "c",
|
||||
"t": "source.go variable.other.assignment.go",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.go",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ":=",
|
||||
"t": "source.go keyword.operator.assignment.go",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
"dark_vs": "keyword.operator: #D4D4D4",
|
||||
"light_vs": "keyword.operator: #000000",
|
||||
"hc_black": "keyword.operator: #D4D4D4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.go",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "make",
|
||||
"t": "source.go support.function.builtin.go",
|
||||
"r": {
|
||||
"dark_plus": "support.function: #DCDCAA",
|
||||
"light_plus": "support.function: #795E26",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "support.function: #DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "(",
|
||||
"t": "source.go punctuation.definition.begin.bracket.round.go",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "chan",
|
||||
"t": "source.go keyword.channel.go",
|
||||
"r": {
|
||||
"dark_plus": "keyword: #569CD6",
|
||||
"light_plus": "keyword: #0000FF",
|
||||
"dark_vs": "keyword: #569CD6",
|
||||
"light_vs": "keyword: #0000FF",
|
||||
"hc_black": "keyword: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.go",
|
||||
"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.go storage.type.numeric.go",
|
||||
"r": {
|
||||
"dark_plus": "storage.type.numeric.go: #4EC9B0",
|
||||
"light_plus": "storage.type.numeric.go: #267F99",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ")",
|
||||
"t": "source.go punctuation.definition.end.bracket.round.go",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.go",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "client",
|
||||
"t": "source.go variable.other.assignment.go",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"watch": "gulp watch-extension:grunt"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-nls": "^2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.43"
|
||||
|
|
|
@ -9,8 +9,7 @@ import * as fs from 'fs';
|
|||
import * as cp from 'child_process';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
type AutoDetect = 'on' | 'off';
|
||||
|
||||
|
@ -68,7 +67,7 @@ interface GruntTaskDefinition extends vscode.TaskDefinition {
|
|||
|
||||
class FolderDetector {
|
||||
|
||||
private fileWatcher: vscode.FileSystemWatcher;
|
||||
private fileWatcher: vscode.FileSystemWatcher | undefined;
|
||||
private promise: Thenable<vscode.Task[]> | undefined;
|
||||
|
||||
constructor(private _workspaceFolder: vscode.WorkspaceFolder) {
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
version "7.0.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
|
||||
|
||||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"watch": "gulp watch-extension:gulp"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-nls": "^2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.43"
|
||||
|
|
|
@ -8,9 +8,9 @@ import * as path from 'path';
|
|||
import * as fs from 'fs';
|
||||
import * as cp from 'child_process';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
type AutoDetect = 'on' | 'off';
|
||||
|
||||
|
@ -68,7 +68,7 @@ interface GulpTaskDefinition extends vscode.TaskDefinition {
|
|||
|
||||
class FolderDetector {
|
||||
|
||||
private fileWatcher: vscode.FileSystemWatcher;
|
||||
private fileWatcher: vscode.FileSystemWatcher | undefined;
|
||||
private promise: Thenable<vscode.Task[]> | undefined;
|
||||
|
||||
constructor(private _workspaceFolder: vscode.WorkspaceFolder) {
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
version "7.0.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
|
||||
|
||||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
'use strict';
|
||||
|
||||
import * as path from 'path';
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { languages, ExtensionContext, IndentAction, Position, TextDocument, Color, ColorInformation, ColorPresentation, Range, CompletionItem, CompletionItemKind, SnippetString } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, RequestType, TextDocumentPositionParams } from 'vscode-languageclient';
|
||||
|
@ -14,9 +16,6 @@ import TelemetryReporter from 'vscode-extension-telemetry';
|
|||
|
||||
import { DocumentColorRequest, DocumentColorParams, ColorPresentationRequest, ColorPresentationParams } from 'vscode-languageserver-protocol/lib/protocol.colorProvider.proposed';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
let localize = nls.loadMessageBundle();
|
||||
|
||||
namespace TagCloseRequest {
|
||||
export const type: RequestType<TextDocumentPositionParams, string, any, any> = new RequestType('html/tag');
|
||||
}
|
||||
|
@ -164,7 +163,7 @@ export function activate(context: ExtensionContext) {
|
|||
],
|
||||
});
|
||||
|
||||
const regionCompletionRegExpr = /^(\s*)(<(!(-(-\s*(#\w*)?)?)?)?)?/;
|
||||
const regionCompletionRegExpr = /^(\s*)(<(!(-(-\s*(#\w*)?)?)?)?)?$/;
|
||||
languages.registerCompletionItemProvider(documentSelector, {
|
||||
provideCompletionItems(doc, pos) {
|
||||
let lineUntilPos = doc.getText(new Range(new Position(pos.line, 0), pos));
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
"dependencies": {
|
||||
"vscode-extension-telemetry": "0.0.8",
|
||||
"vscode-languageclient": "^3.5.0",
|
||||
"vscode-nls": "2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.43"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"vscode-css-languageservice": "^3.0.3",
|
||||
"vscode-html-languageservice": "^2.0.14",
|
||||
"vscode-languageserver": "^3.5.0",
|
||||
"vscode-nls": "^2.0.2",
|
||||
"vscode-nls": "^3.1.2",
|
||||
"vscode-uri": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -18,10 +18,6 @@ import { getDocumentContext } from './utils/documentContext';
|
|||
import uri from 'vscode-uri';
|
||||
import { formatError, runSafe } from './utils/errors';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
nls.config(process.env['VSCODE_NLS_CONFIG']);
|
||||
|
||||
namespace TagCloseRequest {
|
||||
export const type: RequestType<TextDocumentPositionParams, string | null, any, any> = new RequestType('html/tag');
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ export function getJavascriptMode(documentRegions: LanguageModelCache<HTMLDocume
|
|||
doComplete(document: TextDocument, position: Position): CompletionList {
|
||||
updateCurrentTextDocument(document);
|
||||
let offset = currentTextDocument.offsetAt(position);
|
||||
let completions = jsLanguageService.getCompletionsAtPosition(FILE_NAME, offset, { includeExternalModuleExports: false });
|
||||
let completions = jsLanguageService.getCompletionsAtPosition(FILE_NAME, offset, { includeExternalModuleExports: false, includeInsertTextCompletions: false });
|
||||
if (!completions) {
|
||||
return { isIncomplete: false, items: [] };
|
||||
}
|
||||
|
|
|
@ -51,6 +51,10 @@ vscode-nls@^2.0.1, vscode-nls@^2.0.2:
|
|||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
||||
vscode-uri@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-1.0.1.tgz#11a86befeac3c4aa3ec08623651a3c81a6d0bbc8"
|
||||
|
|
|
@ -38,9 +38,9 @@ vscode-languageserver-types@^3.5.0:
|
|||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374"
|
||||
|
||||
vscode-nls@2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
||||
winreg@1.2.3:
|
||||
version "1.2.3"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"watch": "gulp watch-extension:jake"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-nls": "^2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.43"
|
||||
|
|
|
@ -9,8 +9,7 @@ import * as fs from 'fs';
|
|||
import * as cp from 'child_process';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
type AutoDetect = 'on' | 'off';
|
||||
|
||||
|
@ -68,7 +67,7 @@ interface JakeTaskDefinition extends vscode.TaskDefinition {
|
|||
|
||||
class FolderDetector {
|
||||
|
||||
private fileWatcher: vscode.FileSystemWatcher;
|
||||
private fileWatcher: vscode.FileSystemWatcher | undefined;
|
||||
private promise: Thenable<vscode.Task[]> | undefined;
|
||||
|
||||
constructor(private _workspaceFolder: vscode.WorkspaceFolder) {
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
version "7.0.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
|
||||
|
||||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"dependencies": {
|
||||
"jsonc-parser": "^1.0.0",
|
||||
"request-light": "^0.2.2",
|
||||
"vscode-nls": "^2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "gulp compile-extension:javascript",
|
||||
|
|
|
@ -212,7 +212,7 @@ export class PackageJSONContribution implements IJSONContribution {
|
|||
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']) || location.matches(['optionalDependencies', '*']) || location.matches(['peerDependencies', '*']))) {
|
||||
const currentKey = location.path[location.path.length - 1];
|
||||
if (typeof currentKey === 'string') {
|
||||
const queryUrl = 'http://registry.npmjs.org/' + encodeURIComponent(currentKey).replace('%40', '@');
|
||||
const queryUrl = 'https://registry.npmjs.org/' + encodeURIComponent(currentKey).replace('%40', '@');
|
||||
return this.xhr({
|
||||
url: queryUrl,
|
||||
agent: USER_AGENT
|
||||
|
@ -272,7 +272,7 @@ export class PackageJSONContribution implements IJSONContribution {
|
|||
|
||||
private getInfo(pack: string): Thenable<string[]> {
|
||||
|
||||
const queryUrl = 'http://registry.npmjs.org/' + encodeURIComponent(pack).replace('%40', '@');
|
||||
const queryUrl = 'https://registry.npmjs.org/' + encodeURIComponent(pack).replace('%40', '@');
|
||||
return this.xhr({
|
||||
url: queryUrl,
|
||||
agent: USER_AGENT
|
||||
|
|
|
@ -8,13 +8,9 @@
|
|||
import { addJSONProviders } from './features/jsonContributions';
|
||||
import * as httpRequest from 'request-light';
|
||||
|
||||
import { ExtensionContext, env, workspace } from 'vscode';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import { ExtensionContext, workspace } from 'vscode';
|
||||
|
||||
export function activate(context: ExtensionContext): any {
|
||||
nls.config({ locale: env.language });
|
||||
|
||||
configureHttpRequest();
|
||||
workspace.onDidChangeConfiguration(() => configureHttpRequest());
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8b44958a27860957872cc6f628d843a71686af63",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/51323af933792ffbb9a088fd500536122be38b59",
|
||||
"name": "JavaScript (with React support)",
|
||||
"scopeName": "source.js",
|
||||
"fileTypes": [
|
||||
|
@ -292,7 +292,7 @@
|
|||
"patterns": [
|
||||
{
|
||||
"name": "meta.var-single-variable.expr.js",
|
||||
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))",
|
||||
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "meta.definition.variable.js entity.name.function.js"
|
||||
|
@ -354,7 +354,7 @@
|
|||
"patterns": [
|
||||
{
|
||||
"name": "meta.object-binding-pattern-variable.js",
|
||||
"begin": "(?<!=|:|of|in)\\s*(?=\\{)",
|
||||
"begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
|
||||
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -370,7 +370,7 @@
|
|||
},
|
||||
{
|
||||
"name": "meta.array-binding-pattern-variable.js",
|
||||
"begin": "(?<!=|:|of|in)\\s*(?=\\[)",
|
||||
"begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
|
||||
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -526,7 +526,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))",
|
||||
"match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.js"
|
||||
|
@ -753,7 +753,7 @@
|
|||
},
|
||||
{
|
||||
"name": "meta.definition.property.js entity.name.function.js",
|
||||
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))"
|
||||
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))"
|
||||
},
|
||||
{
|
||||
"name": "meta.definition.property.js variable.object.property.js",
|
||||
|
@ -1884,7 +1884,7 @@
|
|||
},
|
||||
"after-operator-block-as-object-literal": {
|
||||
"name": "meta.objectliteral.js",
|
||||
"begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
|
||||
"begin": "(?<=[=(,\\[?+!]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.block.js"
|
||||
|
@ -2057,13 +2057,13 @@
|
|||
]
|
||||
},
|
||||
"function-call": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>)*(?!=)\\>)*(?!=)>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>)*(?!=)\\>)*(?!=)>\\s*)?\\()",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.function-call.js",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
|
||||
"end": "(?=\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()",
|
||||
"end": "(?=\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>)*(?!=)\\>)*(?!=)>\\s*)?\\()",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#literal"
|
||||
|
@ -3295,7 +3295,7 @@
|
|||
"patterns": [
|
||||
{
|
||||
"name": "string.regexp.js",
|
||||
"begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimuy]*(?!\\s*[a-zA-Z0-9_$]))",
|
||||
"begin": "(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimuy]*(?!\\s*[a-zA-Z0-9_$]))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.js"
|
||||
|
@ -4041,7 +4041,7 @@
|
|||
]
|
||||
},
|
||||
"jsx-tag-without-attributes-in-expression": {
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?=(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))?\\s*(>))",
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^)\\s*\n (?=(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))?\\s*(>))",
|
||||
"end": "(?!\\s*(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))?\\s*(>))",
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -4089,7 +4089,7 @@
|
|||
]
|
||||
},
|
||||
"jsx-tag-in-expression": {
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
|
||||
"end": "(/>)|(?:(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8b44958a27860957872cc6f628d843a71686af63",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/51323af933792ffbb9a088fd500536122be38b59",
|
||||
"name": "JavaScript (with React support)",
|
||||
"scopeName": "source.js.jsx",
|
||||
"fileTypes": [
|
||||
|
@ -292,7 +292,7 @@
|
|||
"patterns": [
|
||||
{
|
||||
"name": "meta.var-single-variable.expr.js.jsx",
|
||||
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))",
|
||||
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "meta.definition.variable.js.jsx entity.name.function.js.jsx"
|
||||
|
@ -354,7 +354,7 @@
|
|||
"patterns": [
|
||||
{
|
||||
"name": "meta.object-binding-pattern-variable.js.jsx",
|
||||
"begin": "(?<!=|:|of|in)\\s*(?=\\{)",
|
||||
"begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
|
||||
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -370,7 +370,7 @@
|
|||
},
|
||||
{
|
||||
"name": "meta.array-binding-pattern-variable.js.jsx",
|
||||
"begin": "(?<!=|:|of|in)\\s*(?=\\[)",
|
||||
"begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
|
||||
"end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -526,7 +526,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))",
|
||||
"match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.js.jsx"
|
||||
|
@ -753,7 +753,7 @@
|
|||
},
|
||||
{
|
||||
"name": "meta.definition.property.js.jsx entity.name.function.js.jsx",
|
||||
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)))"
|
||||
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))"
|
||||
},
|
||||
{
|
||||
"name": "meta.definition.property.js.jsx variable.object.property.js.jsx",
|
||||
|
@ -1884,7 +1884,7 @@
|
|||
},
|
||||
"after-operator-block-as-object-literal": {
|
||||
"name": "meta.objectliteral.js.jsx",
|
||||
"begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
|
||||
"begin": "(?<=[=(,\\[?+!]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.block.js.jsx"
|
||||
|
@ -2057,13 +2057,13 @@
|
|||
]
|
||||
},
|
||||
"function-call": {
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>)*(?!=)\\>)*(?!=)>\\s*)?\\()",
|
||||
"end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>)*(?!=)\\>)*(?!=)>\\s*)?\\()",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.function-call.js.jsx",
|
||||
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
|
||||
"end": "(?=\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\)))*\\>)*>\\s*)?\\()",
|
||||
"end": "(?=\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>)*(?!=)\\>)*(?!=)>\\s*)?\\()",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#literal"
|
||||
|
@ -3295,7 +3295,7 @@
|
|||
"patterns": [
|
||||
{
|
||||
"name": "string.regexp.js.jsx",
|
||||
"begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimuy]*(?!\\s*[a-zA-Z0-9_$]))",
|
||||
"begin": "(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimuy]*(?!\\s*[a-zA-Z0-9_$]))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.js.jsx"
|
||||
|
@ -4041,7 +4041,7 @@
|
|||
]
|
||||
},
|
||||
"jsx-tag-without-attributes-in-expression": {
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?=(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))?\\s*(>))",
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^)\\s*\n (?=(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))?\\s*(>))",
|
||||
"end": "(?!\\s*(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))?\\s*(>))",
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -4089,7 +4089,7 @@
|
|||
]
|
||||
},
|
||||
"jsx-tag-in-expression": {
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
|
||||
"begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
|
||||
"end": "(/>)|(?:(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
|
|
|
@ -71,3 +71,7 @@ request-light@^0.2.2:
|
|||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
'use strict';
|
||||
|
||||
import * as path from 'path';
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { workspace, languages, ExtensionContext, extensions, Uri, TextDocument, ColorInformation, Color, ColorPresentation, LanguageConfiguration } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, RequestType, ServerOptions, TransportKind, NotificationType, DidChangeConfigurationNotification } from 'vscode-languageclient';
|
||||
|
@ -12,10 +14,7 @@ import TelemetryReporter from 'vscode-extension-telemetry';
|
|||
import { ConfigurationFeature } from 'vscode-languageclient/lib/configuration.proposed';
|
||||
import { DocumentColorRequest, DocumentColorParams, ColorPresentationParams, ColorPresentationRequest } from 'vscode-languageserver-protocol/lib/protocol.colorProvider.proposed';
|
||||
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import { hash } from './utils/hash';
|
||||
let localize = nls.loadMessageBundle();
|
||||
|
||||
namespace VSCodeContentRequest {
|
||||
export const type: RequestType<string, string, any, any> = new RequestType('vscode/content');
|
||||
|
|
|
@ -164,7 +164,7 @@
|
|||
"dependencies": {
|
||||
"vscode-extension-telemetry": "0.0.8",
|
||||
"vscode-languageclient": "^3.5.0",
|
||||
"vscode-nls": "2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.43"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"request-light": "^0.2.2",
|
||||
"vscode-json-languageservice": "^3.0.4",
|
||||
"vscode-languageserver": "^3.5.0",
|
||||
"vscode-nls": "^2.0.2",
|
||||
"vscode-nls": "^3.1.2",
|
||||
"vscode-uri": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -21,9 +21,6 @@ import { formatError, runSafe } from './utils/errors';
|
|||
import { JSONDocument, JSONSchema, LanguageSettings, getLanguageService, DocumentLanguageSettings } from 'vscode-json-languageservice';
|
||||
import { getLanguageModelCache } from './languageModelCache';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
nls.config(process.env['VSCODE_NLS_CONFIG']);
|
||||
|
||||
interface ISchemaAssociations {
|
||||
[pattern: string]: string[];
|
||||
}
|
||||
|
|
|
@ -99,6 +99,10 @@ vscode-nls@^2.0.2:
|
|||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
||||
vscode-uri@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-1.0.1.tgz#11a86befeac3c4aa3ec08623651a3c81a6d0bbc8"
|
||||
|
|
|
@ -38,9 +38,9 @@ vscode-languageserver-types@^3.5.0:
|
|||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374"
|
||||
|
||||
vscode-nls@2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
||||
winreg@1.2.3:
|
||||
version "1.2.3"
|
||||
|
|
|
@ -314,7 +314,7 @@
|
|||
"markdown-it": "^8.4.0",
|
||||
"markdown-it-named-headers": "0.0.4",
|
||||
"vscode-extension-telemetry": "^0.0.8",
|
||||
"vscode-nls": "^2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/highlight.js": "9.1.10",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
|
|
|
@ -3318,7 +3318,7 @@
|
|||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)
|
||||
(\*|_)(?=\S) # Open
|
||||
\b(\*|_)(?=\S) # Open
|
||||
(?=
|
||||
(
|
||||
<[^>]*+> # HTML tags
|
||||
|
@ -3368,7 +3368,7 @@
|
|||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?<=\S)(\1)((?!\1)|(?=\1\1))</string>
|
||||
<string>(?<=\S)(\1)((?!\1)|(?=\1\1))\b</string>
|
||||
<key>name</key>
|
||||
<string>markup.italic.markdown</string>
|
||||
<key>patterns</key>
|
||||
|
|
|
@ -808,7 +808,7 @@
|
|||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)
|
||||
(\*|_)(?=\S) # Open
|
||||
\b(\*|_)(?=\S) # Open
|
||||
(?=
|
||||
(
|
||||
<[^>]*+> # HTML tags
|
||||
|
@ -858,7 +858,7 @@
|
|||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?<=\S)(\1)((?!\1)|(?=\1\1))</string>
|
||||
<string>(?<=\S)(\1)((?!\1)|(?=\1\1))\b</string>
|
||||
<key>name</key>
|
||||
<string>markup.italic.markdown</string>
|
||||
<key>patterns</key>
|
||||
|
|
|
@ -1584,51 +1584,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": "in",
|
||||
"t": "text.html.markdown meta.paragraph.markdown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "_",
|
||||
"t": "text.html.markdown meta.paragraph.markdown markup.italic.markdown punctuation.definition.italic.markdown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "words",
|
||||
"t": "text.html.markdown meta.paragraph.markdown markup.italic.markdown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "_",
|
||||
"t": "text.html.markdown meta.paragraph.markdown markup.italic.markdown punctuation.definition.italic.markdown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "are ignored.",
|
||||
"c": "in_words_are ignored.",
|
||||
"t": "text.html.markdown meta.paragraph.markdown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
|
|
|
@ -162,9 +162,9 @@ vscode-extension-telemetry@^0.0.8:
|
|||
applicationinsights "0.18.0"
|
||||
winreg "1.2.3"
|
||||
|
||||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
||||
winreg@1.2.3:
|
||||
version "1.2.3"
|
||||
|
|
|
@ -24,51 +24,61 @@
|
|||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.accept.all-current%",
|
||||
"original": "Accept All Current",
|
||||
"command": "merge-conflict.accept.all-current"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.accept.all-incoming%",
|
||||
"original": "Accept All Incoming",
|
||||
"command": "merge-conflict.accept.all-incoming"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.accept.all-both%",
|
||||
"original": "Accept All Both",
|
||||
"command": "merge-conflict.accept.all-both"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.accept.current%",
|
||||
"original": "Accept Current",
|
||||
"command": "merge-conflict.accept.current"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.accept.incoming%",
|
||||
"original": "Accept Incoming",
|
||||
"command": "merge-conflict.accept.incoming"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.accept.selection%",
|
||||
"original": "Accept Selection",
|
||||
"command": "merge-conflict.accept.selection"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.accept.both%",
|
||||
"original": "Accept Both",
|
||||
"command": "merge-conflict.accept.both"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.next%",
|
||||
"original": "Next Conflict",
|
||||
"command": "merge-conflict.next"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.previous%",
|
||||
"original": "Previous Conflict",
|
||||
"command": "merge-conflict.previous"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.compare%",
|
||||
"original":"Compare Current Conflict",
|
||||
"command": "merge-conflict.compare"
|
||||
}
|
||||
],
|
||||
|
@ -90,7 +100,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"vscode-extension-telemetry": "0.0.8",
|
||||
"vscode-nls": "^2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "8.0.33"
|
||||
|
|
|
@ -9,6 +9,15 @@ export default class MergeConflictContentProvider implements vscode.TextDocument
|
|||
|
||||
static scheme = 'merge-conflict.conflict-diff';
|
||||
|
||||
constructor(private context: vscode.ExtensionContext) {
|
||||
}
|
||||
|
||||
begin() {
|
||||
this.context.subscriptions.push(
|
||||
vscode.workspace.registerTextDocumentContentProvider(MergeConflictContentProvider.scheme, this)
|
||||
);
|
||||
}
|
||||
|
||||
dispose() {
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
nls.config(process.env.VSCODE_NLS_CONFIG)();
|
||||
import * as vscode from 'vscode';
|
||||
import MergeConflictServices from './services';
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ export default class ServiceWrapper implements vscode.Disposable {
|
|||
documentTracker,
|
||||
new CommandHandler(documentTracker),
|
||||
new CodeLensProvider(documentTracker),
|
||||
new ContentProvider(),
|
||||
new ContentProvider(this.context),
|
||||
new Decorator(this.context, documentTracker),
|
||||
);
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@ vscode-extension-telemetry@0.0.8:
|
|||
applicationinsights "0.18.0"
|
||||
winreg "1.2.3"
|
||||
|
||||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
||||
winreg@1.2.3:
|
||||
version "1.2.3"
|
||||
|
|
7087
extensions/ms-vscode.node-debug/package-lock.json
generated
7087
extensions/ms-vscode.node-debug/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"name": "node-debug-placeholder",
|
||||
"version": "1.6.0",
|
||||
"publisher": "vscode",
|
||||
"engines": {
|
||||
"vscode": "1.6.x"
|
||||
}
|
||||
}
|
5106
extensions/ms-vscode.node-debug2/package-lock.json
generated
5106
extensions/ms-vscode.node-debug2/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"name": "node-debug2-placeholder",
|
||||
"version": "0.0.3",
|
||||
"publisher": "vscode",
|
||||
"engines": {
|
||||
"vscode": "1.6.x"
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
"watch": "gulp watch-extension:npm"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-nls": "^2.0.2"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.43"
|
||||
|
|
|
@ -9,7 +9,7 @@ import * as path from 'path';
|
|||
import * as fs from 'fs';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
let localize = nls.loadMessageBundle();
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
type AutoDetect = 'on' | 'off';
|
||||
let taskProvider: vscode.Disposable | undefined;
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
version "7.0.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
|
||||
|
||||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
"version": "0.0.1",
|
||||
"description": "Dependencies shared by all extensions",
|
||||
"dependencies": {
|
||||
"typescript": "2.7.0-insiders.20180108"
|
||||
"typescript": "2.7.0-insiders.20180119"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node ./postinstall"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
],
|
||||
"main": "./out/phpMain",
|
||||
"dependencies": {
|
||||
"vscode-nls": "^1.0.4"
|
||||
"vscode-nls": "^3.1.2"
|
||||
},
|
||||
"contributes": {
|
||||
"languages": [
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
'use strict';
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
nls.config({ locale: vscode.env.language });
|
||||
|
||||
import PHPCompletionItemProvider from './features/completionItemProvider';
|
||||
import PHPHoverProvider from './features/hoverProvider';
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
version "7.0.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
|
||||
|
||||
vscode-nls@^1.0.4:
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-1.0.7.tgz#298c01fce87802c644c0a15ef526a33c62c0d58e"
|
||||
vscode-nls@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"
|
||||
|
|
|
@ -1,133 +1,175 @@
|
|||
{
|
||||
"print(\"...\")": {
|
||||
"prefix": "pr",
|
||||
"body": "print(\"$1\")$0"
|
||||
"print": {
|
||||
"prefix": "print",
|
||||
"body": "print(\"$1\")\n$0",
|
||||
"description": "print(\"...\")"
|
||||
},
|
||||
"print(\"\\(...)\")": {
|
||||
"prefix": "po",
|
||||
"body": "print(\"\\($1)\")$0"
|
||||
"print value": {
|
||||
"prefix": "printv",
|
||||
"body": "print(\"\\($1)\")\n$0",
|
||||
"description": "print(\"\\(...)\")"
|
||||
},
|
||||
"repeat...while loop": {
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while ${1:condition} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "while statement"
|
||||
},
|
||||
"repeat-while": {
|
||||
"prefix": "repeat",
|
||||
"body": [
|
||||
"repeat {",
|
||||
"\t$0",
|
||||
"} while ${1:true}"
|
||||
"} while ${1:condition}"
|
||||
],
|
||||
"description": "repeat...while loop"
|
||||
"description": "repeat-while statement"
|
||||
},
|
||||
"While loop": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while ${1:true} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "While loop"
|
||||
},
|
||||
"For-In statement": {
|
||||
"prefix": "forin",
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1:item} in ${2:collection} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "For-In statement"
|
||||
"description": "for-in statement"
|
||||
},
|
||||
"Reverse for loop": {
|
||||
"prefix": "forr",
|
||||
"body": [
|
||||
"for var ${1:i} = ${2:length} - 1; ${1:i} >= 0; ${1:i}-- {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Reverse for loop"
|
||||
},
|
||||
"for loop": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for var ${1:i} = 0; ${1:i} < ${2:length}; ${1:i}++ {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "for loop"
|
||||
},
|
||||
"if statement": {
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:true} {",
|
||||
"if ${1:condition} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "if statement"
|
||||
},
|
||||
"else-if statement": {
|
||||
"else if": {
|
||||
"prefix": "elif",
|
||||
"body": [
|
||||
"else if ${1:true} {",
|
||||
"else if ${1:condition} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "if statement"
|
||||
"description": "else clause with a nested if statement"
|
||||
},
|
||||
"Else statement": {
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": [
|
||||
"else {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Else statement"
|
||||
"description": "else clause"
|
||||
},
|
||||
"Guard statement": {
|
||||
"if let": {
|
||||
"prefix": "iflet",
|
||||
"body": [
|
||||
"if let ${1:value} = ${2:optional} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "if statement with optional binding"
|
||||
},
|
||||
"guard": {
|
||||
"prefix": "guard",
|
||||
"body": [
|
||||
"guard let ${1:a} = ${2:optional} else {",
|
||||
"guard ${1:condition} else {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Guard statement"
|
||||
"description": "guard statement"
|
||||
},
|
||||
"Optional Binding statement": {
|
||||
"prefix": "ifnil",
|
||||
"guard let": {
|
||||
"prefix": "guardlet",
|
||||
"body": [
|
||||
"if let ${1:a} = ${2:optional} {",
|
||||
"guard let ${1:value} = ${2:optional} else {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Optional Binding statement"
|
||||
"description": "guard statement with optional binding"
|
||||
},
|
||||
"Switch statement": {
|
||||
"switch": {
|
||||
"prefix": "switch",
|
||||
"body": [
|
||||
"switch ${1:switch_on} {",
|
||||
"case ${2:a}:",
|
||||
"switch ${1:value} {",
|
||||
"case ${2:pattern}:",
|
||||
"\t$0",
|
||||
"default:",
|
||||
"\t$1",
|
||||
"\t",
|
||||
"}"
|
||||
],
|
||||
"description": "Switch statement"
|
||||
"description": "switch statement"
|
||||
},
|
||||
"Do catch": {
|
||||
"prefix": "docatch",
|
||||
"do": {
|
||||
"prefix": "do",
|
||||
"body": [
|
||||
"do {",
|
||||
"\ttry ${1:function that throws}",
|
||||
"} catch ${2:pattern} {",
|
||||
"\t$0",
|
||||
"} catch ${1:error} {",
|
||||
"\t$2",
|
||||
"}"
|
||||
],
|
||||
"description": "do statement"
|
||||
},
|
||||
"func": {
|
||||
"prefix": "func",
|
||||
"body": [
|
||||
"func ${1:name}(${2:parameters}) -> ${3:Type} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Try catch"
|
||||
"description": "function declaration"
|
||||
},
|
||||
"Enum": {
|
||||
"struct": {
|
||||
"prefix": "struct",
|
||||
"body": [
|
||||
"struct ${1:Name} {",
|
||||
"",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "struct declaration"
|
||||
},
|
||||
"enum": {
|
||||
"prefix": "enum",
|
||||
"body": [
|
||||
"enum ${1:Name} {",
|
||||
"",
|
||||
"\tcase $0",
|
||||
"}"
|
||||
],
|
||||
"description": "Enum"
|
||||
"description": "enum declaration"
|
||||
},
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"body": [
|
||||
"class ${1:Name} {",
|
||||
"",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "class declaration"
|
||||
},
|
||||
"protocol": {
|
||||
"prefix": "protocol",
|
||||
"body": [
|
||||
"protocol ${1:Name} {",
|
||||
"",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "protocol declaration"
|
||||
},
|
||||
"extension": {
|
||||
"prefix": "extension",
|
||||
"body": [
|
||||
"extension ${1:Type} {",
|
||||
"",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "extension declaration"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
"support.type",
|
||||
"entity.name.type",
|
||||
"entity.name.class",
|
||||
"storage.type.numeric.go",
|
||||
"storage.type.byte.go",
|
||||
"storage.type.boolean.go",
|
||||
"storage.type.string.go",
|
||||
"storage.type.uintptr.go",
|
||||
"storage.type.cs",
|
||||
"storage.type.generic.cs",
|
||||
"storage.type.modifier.cs",
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
"support.type",
|
||||
"entity.name.type",
|
||||
"entity.name.class",
|
||||
"storage.type.numeric.go",
|
||||
"storage.type.byte.go",
|
||||
"storage.type.boolean.go",
|
||||
"storage.type.string.go",
|
||||
"storage.type.uintptr.go",
|
||||
"storage.type.cs",
|
||||
"storage.type.generic.cs",
|
||||
"storage.type.modifier.cs",
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var https = require('https');
|
||||
var url = require('url');
|
||||
let path = require('path');
|
||||
let fs = require('fs');
|
||||
let https = require('https');
|
||||
let url = require('url');
|
||||
|
||||
function getCommitSha(repoId, repoPath) {
|
||||
var commitInfo = 'https://api.github.com/repos/' + repoId + '/commits?path=' + repoPath;
|
||||
let commitInfo = 'https://api.github.com/repos/' + repoId + '/commits?path=' + repoPath;
|
||||
return download(commitInfo).then(function (content) {
|
||||
try {
|
||||
let lastCommit = JSON.parse(content)[0];
|
||||
|
@ -23,7 +23,7 @@ function getCommitSha(repoId, repoPath) {
|
|||
return Promise.resolve(null);
|
||||
}
|
||||
}, function () {
|
||||
console.err('Failed loading ' + commitInfo);
|
||||
console.error('Failed loading ' + commitInfo);
|
||||
return Promise.resolve(null);
|
||||
});
|
||||
}
|
||||
|
@ -33,9 +33,9 @@ function download(source) {
|
|||
return readFile(source);
|
||||
}
|
||||
return new Promise((c, e) => {
|
||||
var _url = url.parse(source);
|
||||
var options = { host: _url.host, port: _url.port, path: _url.path, headers: { 'User-Agent': 'NodeJS' }};
|
||||
var content = '';
|
||||
let _url = url.parse(source);
|
||||
let options = { host: _url.host, port: _url.port, path: _url.path, headers: { 'User-Agent': 'NodeJS' }};
|
||||
let content = '';
|
||||
https.get(options, function (response) {
|
||||
response.on('data', function (data) {
|
||||
content += data.toString();
|
||||
|
@ -69,7 +69,7 @@ function downloadBinary(source, dest) {
|
|||
https.get(source, function (response) {
|
||||
switch(response.statusCode) {
|
||||
case 200:
|
||||
var file = fs.createWriteStream(dest);
|
||||
let file = fs.createWriteStream(dest);
|
||||
response.on('data', function(chunk){
|
||||
file.write(chunk);
|
||||
}).on('end', function(){
|
||||
|
@ -96,16 +96,16 @@ function downloadBinary(source, dest) {
|
|||
|
||||
function copyFile(fileName, dest) {
|
||||
return new Promise((c, e) => {
|
||||
var cbCalled = false;
|
||||
let cbCalled = false;
|
||||
function handleError(err) {
|
||||
if (!cbCalled) {
|
||||
e(err);
|
||||
cbCalled = true;
|
||||
}
|
||||
}
|
||||
var rd = fs.createReadStream(fileName);
|
||||
let rd = fs.createReadStream(fileName);
|
||||
rd.on("error", handleError);
|
||||
var wr = fs.createWriteStream(dest);
|
||||
let wr = fs.createWriteStream(dest);
|
||||
wr.on("error", handleError);
|
||||
wr.on("close", function() {
|
||||
if (!cbCalled) {
|
||||
|
@ -118,10 +118,10 @@ function copyFile(fileName, dest) {
|
|||
}
|
||||
|
||||
function darkenColor(color) {
|
||||
var res = '#';
|
||||
for (var i = 1; i < 7; i+=2) {
|
||||
var newVal = Math.round(parseInt('0x' + color.substr(i, 2), 16) * 0.9);
|
||||
var hex = newVal.toString(16);
|
||||
let res = '#';
|
||||
for (let i = 1; i < 7; i+=2) {
|
||||
let newVal = Math.round(parseInt('0x' + color.substr(i, 2), 16) * 0.9);
|
||||
let hex = newVal.toString(16);
|
||||
if (hex.length == 1) {
|
||||
res += '0';
|
||||
}
|
||||
|
@ -132,23 +132,23 @@ function darkenColor(color) {
|
|||
|
||||
function getLanguageMappings() {
|
||||
let langMappings = {};
|
||||
var allExtensions = fs.readdirSync('..');
|
||||
for (var i= 0; i < allExtensions.length; i++) {
|
||||
let allExtensions = fs.readdirSync('..');
|
||||
for (let i= 0; i < allExtensions.length; i++) {
|
||||
let dirPath = path.join('..', allExtensions[i], 'package.json');
|
||||
if (fs.existsSync(dirPath)) {
|
||||
let content = fs.readFileSync(dirPath).toString();
|
||||
let jsonContent = JSON.parse(content);
|
||||
let languages = jsonContent.contributes && jsonContent.contributes.languages;
|
||||
if (Array.isArray(languages)) {
|
||||
for (var k = 0; k < languages.length; k++) {
|
||||
var languageId = languages[k].id;
|
||||
for (let k = 0; k < languages.length; k++) {
|
||||
let languageId = languages[k].id;
|
||||
if (languageId) {
|
||||
var extensions = languages[k].extensions;
|
||||
var mapping = {};
|
||||
let extensions = languages[k].extensions;
|
||||
let mapping = {};
|
||||
if (Array.isArray(extensions)) {
|
||||
mapping.extensions = extensions.map(function (e) { return e.substr(1).toLowerCase(); });
|
||||
}
|
||||
var filenames = languages[k].filenames;
|
||||
let filenames = languages[k].filenames;
|
||||
if (Array.isArray(filenames)) {
|
||||
mapping.fileNames = filenames.map(function (f) { return f.toLowerCase(); });
|
||||
}
|
||||
|
@ -161,43 +161,45 @@ function getLanguageMappings() {
|
|||
return langMappings;
|
||||
}
|
||||
|
||||
//var font = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti/seti.woff';
|
||||
var font = '../../../seti-ui/styles/_fonts/seti/seti.woff';
|
||||
//let font = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti/seti.woff';
|
||||
let font = '../../../seti-ui/styles/_fonts/seti/seti.woff';
|
||||
|
||||
exports.copyFont = function() {
|
||||
return downloadBinary(font, './icons/seti.woff');
|
||||
};
|
||||
|
||||
//var fontMappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti.less';
|
||||
//var mappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/components/icons/mapping.less';
|
||||
//var colors = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/ui-variables.less';
|
||||
//let fontMappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti.less';
|
||||
//let mappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/components/icons/mapping.less';
|
||||
//let colors = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/ui-variables.less';
|
||||
|
||||
var fontMappings = '../../../seti-ui/styles/_fonts/seti.less';
|
||||
var mappings = '../../../seti-ui/styles/components/icons/mapping.less';
|
||||
var colors = '../../../seti-ui/styles/ui-variables.less';
|
||||
let fontMappings = '../../../seti-ui/styles/_fonts/seti.less';
|
||||
let mappings = '../../../seti-ui/styles/components/icons/mapping.less';
|
||||
let colors = '../../../seti-ui/styles/ui-variables.less';
|
||||
|
||||
exports.update = function () {
|
||||
|
||||
console.log('Reading from ' + fontMappings);
|
||||
var def2Content = {};
|
||||
var ext2Def = {};
|
||||
var fileName2Def = {};
|
||||
var def2ColorId = {};
|
||||
var colorId2Value = {};
|
||||
var lang2Def = {};
|
||||
let def2Content = {};
|
||||
let ext2Def = {};
|
||||
let fileName2Def = {};
|
||||
let def2ColorId = {};
|
||||
let colorId2Value = {};
|
||||
let lang2Def = {};
|
||||
|
||||
function writeFileIconContent(info) {
|
||||
var iconDefinitions = {};
|
||||
let iconDefinitions = {};
|
||||
let allDefs = Object.keys(def2Content).sort();
|
||||
|
||||
for (var def in def2Content) {
|
||||
var entry = { fontCharacter: def2Content[def] };
|
||||
var colorId = def2ColorId[def];
|
||||
for (let i = 0; i < allDefs.length; i++) {
|
||||
let def = allDefs[i];
|
||||
let entry = { fontCharacter: def2Content[def] };
|
||||
let colorId = def2ColorId[def];
|
||||
if (colorId) {
|
||||
var colorValue = colorId2Value[colorId];
|
||||
let colorValue = colorId2Value[colorId];
|
||||
if (colorValue) {
|
||||
entry.fontColor = colorValue;
|
||||
|
||||
var entryInverse = { fontCharacter: entry.fontCharacter, fontColor: darkenColor(colorValue) };
|
||||
let entryInverse = { fontCharacter: entry.fontCharacter, fontColor: darkenColor(colorValue) };
|
||||
iconDefinitions[def + '_light'] = entryInverse;
|
||||
}
|
||||
}
|
||||
|
@ -205,8 +207,8 @@ exports.update = function () {
|
|||
}
|
||||
|
||||
function getInvertSet(input) {
|
||||
var result = {};
|
||||
for (var assoc in input) {
|
||||
let result = {};
|
||||
for (let assoc in input) {
|
||||
let invertDef = input[assoc] + '_light';
|
||||
if (iconDefinitions[invertDef]) {
|
||||
result[assoc] = invertDef;
|
||||
|
@ -215,7 +217,7 @@ exports.update = function () {
|
|||
return result;
|
||||
}
|
||||
|
||||
var res = {
|
||||
let res = {
|
||||
information_for_contributors: [
|
||||
'This file has been generated from data in https://github.com/jesseweed/seti-ui',
|
||||
'- icon definitions: https://github.com/jesseweed/seti-ui/blob/master/styles/_fonts/seti.less',
|
||||
|
@ -246,40 +248,52 @@ exports.update = function () {
|
|||
version: 'https://github.com/jesseweed/seti-ui/commit/' + info.commitSha,
|
||||
};
|
||||
|
||||
var path = './icons/vs-seti-icon-theme.json';
|
||||
let path = './icons/vs-seti-icon-theme.json';
|
||||
fs.writeFileSync(path, JSON.stringify(res, null, '\t'));
|
||||
console.log('written ' + path);
|
||||
}
|
||||
|
||||
|
||||
var match;
|
||||
let match;
|
||||
|
||||
return download(fontMappings).then(function (content) {
|
||||
var regex = /@([\w-]+):\s*'(\\E[0-9A-F]+)';/g;
|
||||
let regex = /@([\w-]+):\s*'(\\E[0-9A-F]+)';/g;
|
||||
let contents = {};
|
||||
while ((match = regex.exec(content)) !== null) {
|
||||
def2Content['_' + match[1]] = match[2];
|
||||
contents[match[1]] = match[2];
|
||||
}
|
||||
|
||||
return download(mappings).then(function (content) {
|
||||
var regex2 = /\.icon-(?:set|partial)\('([\w-\.]+)',\s*'([\w-]+)',\s*(@[\w-]+)\)/g;
|
||||
let regex2 = /\.icon-(?:set|partial)\('([\w-\.]+)',\s*'([\w-]+)',\s*(@[\w-]+)\)/g;
|
||||
while ((match = regex2.exec(content)) !== null) {
|
||||
let pattern = match[1];
|
||||
let def = '_' + match[2];
|
||||
let colorId = match[3];
|
||||
let storedColorId = def2ColorId[def];
|
||||
let i = 1;
|
||||
while (storedColorId && colorId !== storedColorId) { // different colors for the same def?
|
||||
def = `_${match[2]}_${i}`;
|
||||
storedColorId = def2ColorId[def];
|
||||
i++;
|
||||
}
|
||||
if (!def2ColorId[def]) {
|
||||
def2ColorId[def] = colorId;
|
||||
def2Content[def] = contents[match[2]];
|
||||
}
|
||||
|
||||
if (pattern[0] === '.') {
|
||||
ext2Def[pattern.substr(1).toLowerCase()] = def;
|
||||
} else {
|
||||
fileName2Def[pattern.toLowerCase()] = def;
|
||||
}
|
||||
def2ColorId[def] = colorId;
|
||||
}
|
||||
// replace extensions for languageId
|
||||
var langMappings = getLanguageMappings();
|
||||
for (var lang in langMappings) {
|
||||
var mappings = langMappings[lang];
|
||||
var exts = mappings.extensions || [];
|
||||
var fileNames = mappings.fileNames || [];
|
||||
var preferredDef = null;
|
||||
let langMappings = getLanguageMappings();
|
||||
for (let lang in langMappings) {
|
||||
let mappings = langMappings[lang];
|
||||
let exts = mappings.extensions || [];
|
||||
let fileNames = mappings.fileNames || [];
|
||||
let preferredDef = null;
|
||||
// use the first file association for the preferred definition
|
||||
for (let i1 = 0; i1 < exts.length && !preferredDef; i1++) {
|
||||
preferredDef = ext2Def[exts[i1]];
|
||||
|
@ -307,7 +321,7 @@ exports.update = function () {
|
|||
|
||||
|
||||
return download(colors).then(function (content) {
|
||||
var regex3 = /(@[\w-]+):\s*(#[0-9a-z]+)/g;
|
||||
let regex3 = /(@[\w-]+):\s*(#[0-9a-z]+)/g;
|
||||
while ((match = regex3.exec(content)) !== null) {
|
||||
colorId2Value[match[1]] = match[2];
|
||||
}
|
||||
|
|
|
@ -22,12 +22,6 @@
|
|||
}
|
||||
],
|
||||
"iconDefinitions": {
|
||||
"_R": {
|
||||
"fontCharacter": "\\E001"
|
||||
},
|
||||
"_apple": {
|
||||
"fontCharacter": "\\E002"
|
||||
},
|
||||
"_asm_light": {
|
||||
"fontCharacter": "\\E003",
|
||||
"fontColor": "#b8383d"
|
||||
|
@ -68,6 +62,14 @@
|
|||
"fontCharacter": "\\E007",
|
||||
"fontColor": "#cc3e44"
|
||||
},
|
||||
"_c_light": {
|
||||
"fontCharacter": "\\E009",
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_c": {
|
||||
"fontCharacter": "\\E009",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_c-sharp_light": {
|
||||
"fontCharacter": "\\E008",
|
||||
"fontColor": "#498ba7"
|
||||
|
@ -76,11 +78,19 @@
|
|||
"fontCharacter": "\\E008",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_c_light": {
|
||||
"_c_1_light": {
|
||||
"fontCharacter": "\\E009",
|
||||
"fontColor": "#9068b0"
|
||||
},
|
||||
"_c_1": {
|
||||
"fontCharacter": "\\E009",
|
||||
"fontColor": "#a074c4"
|
||||
},
|
||||
"_c_2_light": {
|
||||
"fontCharacter": "\\E009",
|
||||
"fontColor": "#b7b73b"
|
||||
},
|
||||
"_c": {
|
||||
"_c_2": {
|
||||
"fontCharacter": "\\E009",
|
||||
"fontColor": "#cbcb41"
|
||||
},
|
||||
|
@ -100,28 +110,35 @@
|
|||
"fontCharacter": "\\E00B",
|
||||
"fontColor": "#cc3e44"
|
||||
},
|
||||
"_checkbox-unchecked": {
|
||||
"fontCharacter": "\\E00C"
|
||||
},
|
||||
"_checkbox": {
|
||||
"fontCharacter": "\\E00D"
|
||||
},
|
||||
"_cjsx": {
|
||||
"fontCharacter": "\\E00E"
|
||||
},
|
||||
"_clock_light": {
|
||||
"fontCharacter": "\\E00F",
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_clock": {
|
||||
"fontCharacter": "\\E00F",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_clock_1_light": {
|
||||
"fontCharacter": "\\E00F",
|
||||
"fontColor": "#627379"
|
||||
},
|
||||
"_clock": {
|
||||
"_clock_1": {
|
||||
"fontCharacter": "\\E00F",
|
||||
"fontColor": "#6d8086"
|
||||
},
|
||||
"_clojure_light": {
|
||||
"fontCharacter": "\\E010",
|
||||
"fontColor": "#498ba7"
|
||||
"fontColor": "#7fae42"
|
||||
},
|
||||
"_clojure": {
|
||||
"fontCharacter": "\\E010",
|
||||
"fontColor": "#8dc149"
|
||||
},
|
||||
"_clojure_1_light": {
|
||||
"fontCharacter": "\\E010",
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_clojure_1": {
|
||||
"fontCharacter": "\\E010",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
|
@ -141,9 +158,6 @@
|
|||
"fontCharacter": "\\E012",
|
||||
"fontColor": "#cbcb41"
|
||||
},
|
||||
"_coffee_erb": {
|
||||
"fontCharacter": "\\E013"
|
||||
},
|
||||
"_coldfusion_light": {
|
||||
"fontCharacter": "\\E014",
|
||||
"fontColor": "#498ba7"
|
||||
|
@ -162,9 +176,17 @@
|
|||
},
|
||||
"_cpp_light": {
|
||||
"fontCharacter": "\\E016",
|
||||
"fontColor": "#9068b0"
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_cpp": {
|
||||
"fontCharacter": "\\E016",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_cpp_1_light": {
|
||||
"fontCharacter": "\\E016",
|
||||
"fontColor": "#9068b0"
|
||||
},
|
||||
"_cpp_1": {
|
||||
"fontCharacter": "\\E016",
|
||||
"fontColor": "#a074c4"
|
||||
},
|
||||
|
@ -224,19 +246,37 @@
|
|||
"fontCharacter": "\\E01D",
|
||||
"fontColor": "#d4d7d6"
|
||||
},
|
||||
"_deprecation-cop": {
|
||||
"fontCharacter": "\\E01E"
|
||||
},
|
||||
"_docker_light": {
|
||||
"fontCharacter": "\\E01F",
|
||||
"fontColor": "#dd4b78"
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_docker": {
|
||||
"fontCharacter": "\\E01F",
|
||||
"fontColor": "#f55385"
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_editorconfig": {
|
||||
"fontCharacter": "\\E020"
|
||||
"_docker_1_light": {
|
||||
"fontCharacter": "\\E01F",
|
||||
"fontColor": "#455155"
|
||||
},
|
||||
"_docker_1": {
|
||||
"fontCharacter": "\\E01F",
|
||||
"fontColor": "#4d5a5e"
|
||||
},
|
||||
"_docker_2_light": {
|
||||
"fontCharacter": "\\E01F",
|
||||
"fontColor": "#7fae42"
|
||||
},
|
||||
"_docker_2": {
|
||||
"fontCharacter": "\\E01F",
|
||||
"fontColor": "#8dc149"
|
||||
},
|
||||
"_docker_3_light": {
|
||||
"fontCharacter": "\\E01F",
|
||||
"fontColor": "#dd4b78"
|
||||
},
|
||||
"_docker_3": {
|
||||
"fontCharacter": "\\E01F",
|
||||
"fontColor": "#f55385"
|
||||
},
|
||||
"_ejs_light": {
|
||||
"fontCharacter": "\\E021",
|
||||
|
@ -270,14 +310,19 @@
|
|||
"fontCharacter": "\\E024",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_error": {
|
||||
"fontCharacter": "\\E025"
|
||||
},
|
||||
"_eslint_light": {
|
||||
"fontCharacter": "\\E026",
|
||||
"fontColor": "#9068b0"
|
||||
},
|
||||
"_eslint": {
|
||||
"fontCharacter": "\\E026",
|
||||
"fontColor": "#a074c4"
|
||||
},
|
||||
"_eslint_1_light": {
|
||||
"fontCharacter": "\\E026",
|
||||
"fontColor": "#455155"
|
||||
},
|
||||
"_eslint": {
|
||||
"_eslint_1": {
|
||||
"fontCharacter": "\\E026",
|
||||
"fontColor": "#4d5a5e"
|
||||
},
|
||||
|
@ -321,9 +366,6 @@
|
|||
"fontCharacter": "\\E02B",
|
||||
"fontColor": "#e37933"
|
||||
},
|
||||
"_folder": {
|
||||
"fontCharacter": "\\E02C"
|
||||
},
|
||||
"_font_light": {
|
||||
"fontCharacter": "\\E02D",
|
||||
"fontColor": "#b8383d"
|
||||
|
@ -340,15 +382,6 @@
|
|||
"fontCharacter": "\\E02E",
|
||||
"fontColor": "#41535b"
|
||||
},
|
||||
"_git_folder": {
|
||||
"fontCharacter": "\\E02F"
|
||||
},
|
||||
"_git_ignore": {
|
||||
"fontCharacter": "\\E030"
|
||||
},
|
||||
"_github": {
|
||||
"fontCharacter": "\\E031"
|
||||
},
|
||||
"_go_light": {
|
||||
"fontCharacter": "\\E032",
|
||||
"fontColor": "#498ba7"
|
||||
|
@ -397,9 +430,6 @@
|
|||
"fontCharacter": "\\E037",
|
||||
"fontColor": "#cc3e44"
|
||||
},
|
||||
"_hacklang": {
|
||||
"fontCharacter": "\\E038"
|
||||
},
|
||||
"_haml_light": {
|
||||
"fontCharacter": "\\E039",
|
||||
"fontColor": "#b8383d"
|
||||
|
@ -418,9 +448,33 @@
|
|||
},
|
||||
"_haxe_light": {
|
||||
"fontCharacter": "\\E03B",
|
||||
"fontColor": "#9068b0"
|
||||
"fontColor": "#cc6d2e"
|
||||
},
|
||||
"_haxe": {
|
||||
"fontCharacter": "\\E03B",
|
||||
"fontColor": "#e37933"
|
||||
},
|
||||
"_haxe_1_light": {
|
||||
"fontCharacter": "\\E03B",
|
||||
"fontColor": "#b7b73b"
|
||||
},
|
||||
"_haxe_1": {
|
||||
"fontCharacter": "\\E03B",
|
||||
"fontColor": "#cbcb41"
|
||||
},
|
||||
"_haxe_2_light": {
|
||||
"fontCharacter": "\\E03B",
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_haxe_2": {
|
||||
"fontCharacter": "\\E03B",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_haxe_3_light": {
|
||||
"fontCharacter": "\\E03B",
|
||||
"fontColor": "#9068b0"
|
||||
},
|
||||
"_haxe_3": {
|
||||
"fontCharacter": "\\E03B",
|
||||
"fontColor": "#a074c4"
|
||||
},
|
||||
|
@ -514,9 +568,25 @@
|
|||
},
|
||||
"_javascript_light": {
|
||||
"fontCharacter": "\\E047",
|
||||
"fontColor": "#498ba7"
|
||||
"fontColor": "#b7b73b"
|
||||
},
|
||||
"_javascript": {
|
||||
"fontCharacter": "\\E047",
|
||||
"fontColor": "#cbcb41"
|
||||
},
|
||||
"_javascript_1_light": {
|
||||
"fontCharacter": "\\E047",
|
||||
"fontColor": "#cc6d2e"
|
||||
},
|
||||
"_javascript_1": {
|
||||
"fontCharacter": "\\E047",
|
||||
"fontColor": "#e37933"
|
||||
},
|
||||
"_javascript_2_light": {
|
||||
"fontCharacter": "\\E047",
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_javascript_2": {
|
||||
"fontCharacter": "\\E047",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
|
@ -536,9 +606,6 @@
|
|||
"fontCharacter": "\\E049",
|
||||
"fontColor": "#cc3e44"
|
||||
},
|
||||
"_js_erb": {
|
||||
"fontCharacter": "\\E04A"
|
||||
},
|
||||
"_json_light": {
|
||||
"fontCharacter": "\\E04B",
|
||||
"fontColor": "#b7b73b"
|
||||
|
@ -573,9 +640,25 @@
|
|||
},
|
||||
"_license_light": {
|
||||
"fontCharacter": "\\E04F",
|
||||
"fontColor": "#b8383d"
|
||||
"fontColor": "#b7b73b"
|
||||
},
|
||||
"_license": {
|
||||
"fontCharacter": "\\E04F",
|
||||
"fontColor": "#cbcb41"
|
||||
},
|
||||
"_license_1_light": {
|
||||
"fontCharacter": "\\E04F",
|
||||
"fontColor": "#cc6d2e"
|
||||
},
|
||||
"_license_1": {
|
||||
"fontCharacter": "\\E04F",
|
||||
"fontColor": "#e37933"
|
||||
},
|
||||
"_license_2_light": {
|
||||
"fontCharacter": "\\E04F",
|
||||
"fontColor": "#b8383d"
|
||||
},
|
||||
"_license_2": {
|
||||
"fontCharacter": "\\E04F",
|
||||
"fontColor": "#cc3e44"
|
||||
},
|
||||
|
@ -613,9 +696,33 @@
|
|||
},
|
||||
"_makefile_light": {
|
||||
"fontCharacter": "\\E054",
|
||||
"fontColor": "#498ba7"
|
||||
"fontColor": "#cc6d2e"
|
||||
},
|
||||
"_makefile": {
|
||||
"fontCharacter": "\\E054",
|
||||
"fontColor": "#e37933"
|
||||
},
|
||||
"_makefile_1_light": {
|
||||
"fontCharacter": "\\E054",
|
||||
"fontColor": "#9068b0"
|
||||
},
|
||||
"_makefile_1": {
|
||||
"fontCharacter": "\\E054",
|
||||
"fontColor": "#a074c4"
|
||||
},
|
||||
"_makefile_2_light": {
|
||||
"fontCharacter": "\\E054",
|
||||
"fontColor": "#627379"
|
||||
},
|
||||
"_makefile_2": {
|
||||
"fontCharacter": "\\E054",
|
||||
"fontColor": "#6d8086"
|
||||
},
|
||||
"_makefile_3_light": {
|
||||
"fontCharacter": "\\E054",
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_makefile_3": {
|
||||
"fontCharacter": "\\E054",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
|
@ -651,14 +758,19 @@
|
|||
"fontCharacter": "\\E058",
|
||||
"fontColor": "#e37933"
|
||||
},
|
||||
"_new-file": {
|
||||
"fontCharacter": "\\E059"
|
||||
},
|
||||
"_npm_light": {
|
||||
"fontCharacter": "\\E05A",
|
||||
"fontColor": "#3b4b52"
|
||||
},
|
||||
"_npm": {
|
||||
"fontCharacter": "\\E05A",
|
||||
"fontColor": "#41535b"
|
||||
},
|
||||
"_npm_1_light": {
|
||||
"fontCharacter": "\\E05A",
|
||||
"fontColor": "#b8383d"
|
||||
},
|
||||
"_npm": {
|
||||
"_npm_1": {
|
||||
"fontCharacter": "\\E05A",
|
||||
"fontColor": "#cc3e44"
|
||||
},
|
||||
|
@ -734,9 +846,6 @@
|
|||
"fontCharacter": "\\E063",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_project": {
|
||||
"fontCharacter": "\\E064"
|
||||
},
|
||||
"_pug_light": {
|
||||
"fontCharacter": "\\E065",
|
||||
"fontColor": "#b8383d"
|
||||
|
@ -761,9 +870,6 @@
|
|||
"fontCharacter": "\\E067",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_rails": {
|
||||
"fontCharacter": "\\E068"
|
||||
},
|
||||
"_react_light": {
|
||||
"fontCharacter": "\\E069",
|
||||
"fontColor": "#498ba7"
|
||||
|
@ -828,12 +934,6 @@
|
|||
"fontCharacter": "\\E070",
|
||||
"fontColor": "#cc3e44"
|
||||
},
|
||||
"_search": {
|
||||
"fontCharacter": "\\E071"
|
||||
},
|
||||
"_settings": {
|
||||
"fontCharacter": "\\E072"
|
||||
},
|
||||
"_shell_light": {
|
||||
"fontCharacter": "\\E073",
|
||||
"fontColor": "#455155"
|
||||
|
@ -908,14 +1008,35 @@
|
|||
},
|
||||
"_tex_light": {
|
||||
"fontCharacter": "\\E07C",
|
||||
"fontColor": "#bfc2c1"
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_tex": {
|
||||
"fontCharacter": "\\E07C",
|
||||
"fontColor": "#d4d7d6"
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_time-cop": {
|
||||
"fontCharacter": "\\E07D"
|
||||
"_tex_1_light": {
|
||||
"fontCharacter": "\\E07C",
|
||||
"fontColor": "#b7b73b"
|
||||
},
|
||||
"_tex_1": {
|
||||
"fontCharacter": "\\E07C",
|
||||
"fontColor": "#cbcb41"
|
||||
},
|
||||
"_tex_2_light": {
|
||||
"fontCharacter": "\\E07C",
|
||||
"fontColor": "#cc6d2e"
|
||||
},
|
||||
"_tex_2": {
|
||||
"fontCharacter": "\\E07C",
|
||||
"fontColor": "#e37933"
|
||||
},
|
||||
"_tex_3_light": {
|
||||
"fontCharacter": "\\E07C",
|
||||
"fontColor": "#bfc2c1"
|
||||
},
|
||||
"_tex_3": {
|
||||
"fontCharacter": "\\E07C",
|
||||
"fontColor": "#d4d7d6"
|
||||
},
|
||||
"_todo": {
|
||||
"fontCharacter": "\\E07E"
|
||||
|
@ -930,9 +1051,17 @@
|
|||
},
|
||||
"_typescript_light": {
|
||||
"fontCharacter": "\\E080",
|
||||
"fontColor": "#b7b73b"
|
||||
"fontColor": "#498ba7"
|
||||
},
|
||||
"_typescript": {
|
||||
"fontCharacter": "\\E080",
|
||||
"fontColor": "#519aba"
|
||||
},
|
||||
"_typescript_1_light": {
|
||||
"fontCharacter": "\\E080",
|
||||
"fontColor": "#b7b73b"
|
||||
},
|
||||
"_typescript_1": {
|
||||
"fontCharacter": "\\E080",
|
||||
"fontColor": "#cbcb41"
|
||||
},
|
||||
|
@ -1026,9 +1155,17 @@
|
|||
},
|
||||
"_zip_light": {
|
||||
"fontCharacter": "\\E08C",
|
||||
"fontColor": "#627379"
|
||||
"fontColor": "#b8383d"
|
||||
},
|
||||
"_zip": {
|
||||
"fontCharacter": "\\E08C",
|
||||
"fontColor": "#cc3e44"
|
||||
},
|
||||
"_zip_1_light": {
|
||||
"fontCharacter": "\\E08C",
|
||||
"fontColor": "#627379"
|
||||
},
|
||||
"_zip_1": {
|
||||
"fontCharacter": "\\E08C",
|
||||
"fontColor": "#6d8086"
|
||||
}
|
||||
|
@ -1039,7 +1176,11 @@
|
|||
"mdo": "_mdo",
|
||||
"asm": "_asm",
|
||||
"s": "_asm",
|
||||
"h": "_c",
|
||||
"h": "_c_1",
|
||||
"hh": "_cpp_1",
|
||||
"hpp": "_cpp_1",
|
||||
"hxx": "_cpp_1",
|
||||
"edn": "_clojure_1",
|
||||
"cfc": "_coldfusion",
|
||||
"cfm": "_coldfusion",
|
||||
"config": "_config",
|
||||
|
@ -1077,13 +1218,13 @@
|
|||
"hs": "_haskell",
|
||||
"lhs": "_haskell",
|
||||
"hx": "_haxe",
|
||||
"hxs": "_haxe",
|
||||
"hxp": "_haxe",
|
||||
"hxml": "_haxe",
|
||||
"hxs": "_haxe_1",
|
||||
"hxp": "_haxe_2",
|
||||
"hxml": "_haxe_3",
|
||||
"class": "_java",
|
||||
"classpath": "_java",
|
||||
"js.map": "_javascript",
|
||||
"spec.js": "_javascript",
|
||||
"spec.js": "_javascript_1",
|
||||
"es": "_javascript",
|
||||
"es5": "_javascript",
|
||||
"es7": "_javascript",
|
||||
|
@ -1101,8 +1242,8 @@
|
|||
"njs": "_nunjucks",
|
||||
"nj": "_nunjucks",
|
||||
"npm-debug.log": "_npm",
|
||||
"npmignore": "_npm",
|
||||
"npmrc": "_npm",
|
||||
"npmignore": "_npm_1",
|
||||
"npmrc": "_npm_1",
|
||||
"ml": "_ocaml",
|
||||
"mli": "_ocaml",
|
||||
"cmx": "_ocaml",
|
||||
|
@ -1128,18 +1269,18 @@
|
|||
"tf.json": "_terraform",
|
||||
"tfvars": "_terraform",
|
||||
"tex": "_tex",
|
||||
"sty": "_tex",
|
||||
"dtx": "_tex",
|
||||
"ins": "_tex",
|
||||
"sty": "_tex_1",
|
||||
"dtx": "_tex_2",
|
||||
"ins": "_tex_3",
|
||||
"txt": "_default",
|
||||
"toml": "_config",
|
||||
"twig": "_twig",
|
||||
"spec.ts": "_typescript",
|
||||
"spec.ts": "_typescript_1",
|
||||
"vala": "_vala",
|
||||
"vapi": "_vala",
|
||||
"vue": "_vue",
|
||||
"jar": "_zip",
|
||||
"zip": "_zip",
|
||||
"zip": "_zip_1",
|
||||
"wgt": "_wgt",
|
||||
"ai": "_illustrator",
|
||||
"psd": "_photoshop",
|
||||
|
@ -1171,23 +1312,23 @@
|
|||
"wav": "_audio",
|
||||
"babelrc": "_babel",
|
||||
"bowerrc": "_bower",
|
||||
"dockerignore": "_docker",
|
||||
"dockerignore": "_docker_1",
|
||||
"codeclimate.yml": "_code-climate",
|
||||
"eslintrc": "_eslint",
|
||||
"eslintrc.js": "_eslint",
|
||||
"eslintrc.yaml": "_eslint",
|
||||
"eslintrc.yml": "_eslint",
|
||||
"eslintrc.json": "_eslint",
|
||||
"eslintignore": "_eslint",
|
||||
"eslintignore": "_eslint_1",
|
||||
"firebaserc": "_firebase",
|
||||
"jshintrc": "_javascript",
|
||||
"jscsrc": "_javascript",
|
||||
"jshintrc": "_javascript_2",
|
||||
"jscsrc": "_javascript_2",
|
||||
"direnv": "_config",
|
||||
"env": "_config",
|
||||
"static": "_config",
|
||||
"editorconfig": "_config",
|
||||
"slugignore": "_config",
|
||||
"tmp": "_clock",
|
||||
"tmp": "_clock_1",
|
||||
"htaccess": "_config",
|
||||
"key": "_lock",
|
||||
"cert": "_lock",
|
||||
|
@ -1206,9 +1347,9 @@
|
|||
"mime.types": "_config",
|
||||
"jenkinsfile": "_jenkins",
|
||||
"bower.json": "_bower",
|
||||
"docker-healthcheck": "_docker",
|
||||
"docker-compose.yml": "_docker",
|
||||
"docker-compose.yaml": "_docker",
|
||||
"docker-healthcheck": "_docker_2",
|
||||
"docker-compose.yml": "_docker_3",
|
||||
"docker-compose.yaml": "_docker_3",
|
||||
"firebase.json": "_firebase",
|
||||
"geckodriver": "_firefox",
|
||||
"gruntfile.js": "_grunt",
|
||||
|
@ -1226,11 +1367,11 @@
|
|||
"license": "_license",
|
||||
"licence": "_license",
|
||||
"copying": "_license",
|
||||
"compiling": "_license",
|
||||
"contributing": "_license",
|
||||
"qmakefile": "_makefile",
|
||||
"omakefile": "_makefile",
|
||||
"cmakelists.txt": "_makefile",
|
||||
"compiling": "_license_1",
|
||||
"contributing": "_license_2",
|
||||
"qmakefile": "_makefile_1",
|
||||
"omakefile": "_makefile_2",
|
||||
"cmakelists.txt": "_makefile_3",
|
||||
"procfile": "_heroku",
|
||||
"todo": "_todo",
|
||||
"npm-debug.log": "_npm_ignored"
|
||||
|
@ -1258,7 +1399,7 @@
|
|||
"lua": "_lua",
|
||||
"makefile": "_makefile",
|
||||
"markdown": "_markdown",
|
||||
"objective-c": "_c",
|
||||
"objective-c": "_c_2",
|
||||
"perl": "_perl",
|
||||
"php": "_php",
|
||||
"powershell": "_powershell",
|
||||
|
@ -1282,7 +1423,11 @@
|
|||
"mdo": "_mdo_light",
|
||||
"asm": "_asm_light",
|
||||
"s": "_asm_light",
|
||||
"h": "_c_light",
|
||||
"h": "_c_1_light",
|
||||
"hh": "_cpp_1_light",
|
||||
"hpp": "_cpp_1_light",
|
||||
"hxx": "_cpp_1_light",
|
||||
"edn": "_clojure_1_light",
|
||||
"cfc": "_coldfusion_light",
|
||||
"cfm": "_coldfusion_light",
|
||||
"config": "_config_light",
|
||||
|
@ -1320,13 +1465,13 @@
|
|||
"hs": "_haskell_light",
|
||||
"lhs": "_haskell_light",
|
||||
"hx": "_haxe_light",
|
||||
"hxs": "_haxe_light",
|
||||
"hxp": "_haxe_light",
|
||||
"hxml": "_haxe_light",
|
||||
"hxs": "_haxe_1_light",
|
||||
"hxp": "_haxe_2_light",
|
||||
"hxml": "_haxe_3_light",
|
||||
"class": "_java_light",
|
||||
"classpath": "_java_light",
|
||||
"js.map": "_javascript_light",
|
||||
"spec.js": "_javascript_light",
|
||||
"spec.js": "_javascript_1_light",
|
||||
"es": "_javascript_light",
|
||||
"es5": "_javascript_light",
|
||||
"es7": "_javascript_light",
|
||||
|
@ -1344,8 +1489,8 @@
|
|||
"njs": "_nunjucks_light",
|
||||
"nj": "_nunjucks_light",
|
||||
"npm-debug.log": "_npm_light",
|
||||
"npmignore": "_npm_light",
|
||||
"npmrc": "_npm_light",
|
||||
"npmignore": "_npm_1_light",
|
||||
"npmrc": "_npm_1_light",
|
||||
"ml": "_ocaml_light",
|
||||
"mli": "_ocaml_light",
|
||||
"cmx": "_ocaml_light",
|
||||
|
@ -1371,18 +1516,18 @@
|
|||
"tf.json": "_terraform_light",
|
||||
"tfvars": "_terraform_light",
|
||||
"tex": "_tex_light",
|
||||
"sty": "_tex_light",
|
||||
"dtx": "_tex_light",
|
||||
"ins": "_tex_light",
|
||||
"sty": "_tex_1_light",
|
||||
"dtx": "_tex_2_light",
|
||||
"ins": "_tex_3_light",
|
||||
"txt": "_default_light",
|
||||
"toml": "_config_light",
|
||||
"twig": "_twig_light",
|
||||
"spec.ts": "_typescript_light",
|
||||
"spec.ts": "_typescript_1_light",
|
||||
"vala": "_vala_light",
|
||||
"vapi": "_vala_light",
|
||||
"vue": "_vue_light",
|
||||
"jar": "_zip_light",
|
||||
"zip": "_zip_light",
|
||||
"zip": "_zip_1_light",
|
||||
"wgt": "_wgt_light",
|
||||
"ai": "_illustrator_light",
|
||||
"psd": "_photoshop_light",
|
||||
|
@ -1414,23 +1559,23 @@
|
|||
"wav": "_audio_light",
|
||||
"babelrc": "_babel_light",
|
||||
"bowerrc": "_bower_light",
|
||||
"dockerignore": "_docker_light",
|
||||
"dockerignore": "_docker_1_light",
|
||||
"codeclimate.yml": "_code-climate_light",
|
||||
"eslintrc": "_eslint_light",
|
||||
"eslintrc.js": "_eslint_light",
|
||||
"eslintrc.yaml": "_eslint_light",
|
||||
"eslintrc.yml": "_eslint_light",
|
||||
"eslintrc.json": "_eslint_light",
|
||||
"eslintignore": "_eslint_light",
|
||||
"eslintignore": "_eslint_1_light",
|
||||
"firebaserc": "_firebase_light",
|
||||
"jshintrc": "_javascript_light",
|
||||
"jscsrc": "_javascript_light",
|
||||
"jshintrc": "_javascript_2_light",
|
||||
"jscsrc": "_javascript_2_light",
|
||||
"direnv": "_config_light",
|
||||
"env": "_config_light",
|
||||
"static": "_config_light",
|
||||
"editorconfig": "_config_light",
|
||||
"slugignore": "_config_light",
|
||||
"tmp": "_clock_light",
|
||||
"tmp": "_clock_1_light",
|
||||
"htaccess": "_config_light",
|
||||
"key": "_lock_light",
|
||||
"cert": "_lock_light",
|
||||
|
@ -1459,7 +1604,7 @@
|
|||
"lua": "_lua_light",
|
||||
"makefile": "_makefile_light",
|
||||
"markdown": "_markdown_light",
|
||||
"objective-c": "_c_light",
|
||||
"objective-c": "_c_2_light",
|
||||
"perl": "_perl_light",
|
||||
"php": "_php_light",
|
||||
"powershell": "_powershell_light",
|
||||
|
@ -1489,9 +1634,9 @@
|
|||
"mime.types": "_config_light",
|
||||
"jenkinsfile": "_jenkins_light",
|
||||
"bower.json": "_bower_light",
|
||||
"docker-healthcheck": "_docker_light",
|
||||
"docker-compose.yml": "_docker_light",
|
||||
"docker-compose.yaml": "_docker_light",
|
||||
"docker-healthcheck": "_docker_2_light",
|
||||
"docker-compose.yml": "_docker_3_light",
|
||||
"docker-compose.yaml": "_docker_3_light",
|
||||
"firebase.json": "_firebase_light",
|
||||
"geckodriver": "_firefox_light",
|
||||
"gruntfile.js": "_grunt_light",
|
||||
|
@ -1509,11 +1654,11 @@
|
|||
"license": "_license_light",
|
||||
"licence": "_license_light",
|
||||
"copying": "_license_light",
|
||||
"compiling": "_license_light",
|
||||
"contributing": "_license_light",
|
||||
"qmakefile": "_makefile_light",
|
||||
"omakefile": "_makefile_light",
|
||||
"cmakelists.txt": "_makefile_light",
|
||||
"compiling": "_license_1_light",
|
||||
"contributing": "_license_2_light",
|
||||
"qmakefile": "_makefile_1_light",
|
||||
"omakefile": "_makefile_2_light",
|
||||
"cmakelists.txt": "_makefile_3_light",
|
||||
"procfile": "_heroku_light",
|
||||
"npm-debug.log": "_npm_ignored_light"
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue