提交 97dfc68f 编写于 作者: D Daniel Imms

Merge remote-tracking branch 'origin/master' into alexr00/terminalExitRace

......@@ -18,6 +18,8 @@ out-vscode-min/
out-vscode-reh/
out-vscode-reh-min/
out-vscode-reh-pkg/
src/vs/server
resources/server
build/node_modules
coverage/
test_data/
......
......@@ -4,6 +4,7 @@
"recommendations": [
"ms-vscode.vscode-typescript-tslint-plugin",
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"msjsdiag.debugger-for-chrome"
]
}
......@@ -148,6 +148,9 @@
"request": "launch",
"name": "Launch VS Code (Main Process)",
"runtimeExecutable": "${workspaceFolder}/scripts/code.sh",
"windows": {
"runtimeExecutable": "${workspaceFolder}/scripts/code.bat",
},
"runtimeArgs": [
"--no-cached-data"
],
......@@ -276,4 +279,4 @@
]
},
]
}
}
\ No newline at end of file
disturl "https://atom.io/download/electron"
target "4.2.3"
target "4.2.4"
runtime "electron"
......@@ -67,14 +67,6 @@ windows-process-tree/build/**
windows-process-tree/src/**
!windows-process-tree/**/*.node
gc-signals/binding.gyp
gc-signals/build/**
gc-signals/src/**
gc-signals/deps/**
!gc-signals/build/Release/*.node
!gc-signals/src/index.js
keytar/binding.gyp
keytar/build/**
keytar/src/**
......@@ -112,4 +104,4 @@ vscode-windows-ca-certs/**/*
!vscode-windows-ca-certs/package.json
!vscode-windows-ca-certs/**/*.node
node-addon-api/**/*
\ No newline at end of file
node-addon-api/**/*
......@@ -47,7 +47,7 @@ steps:
PACKAGEJSON="$(ls $SNAP_ROOT/code*/usr/share/code*/resources/app/package.json)"
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
SNAP_PATH="$SNAP_ROOT/$SNAP_FILENAME"
(cd $SNAP_ROOT/code-* && sudo snapcraft snap --output "$SNAP_PATH")
(cd $SNAP_ROOT/code-* && sudo --preserve-env snapcraft snap --output "$SNAP_PATH")
# Publish snap package
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
......
......@@ -4,7 +4,7 @@ resources:
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
endpoint: VSCodeHub
- container: snapcraft
image: snapcore/snapcraft
image: snapcore/snapcraft:stable
jobs:
- job: Windows
......
......@@ -7,6 +7,20 @@
const gulp = require('gulp');
const path = require('path');
const es = require('event-stream');
const util = require('./lib/util');
const task = require('./lib/task');
const vfs = require('vinyl-fs');
const flatmap = require('gulp-flatmap');
const gunzip = require('gulp-gunzip');
const untar = require('gulp-untar');
const File = require('vinyl');
const fs = require('fs');
const REPO_ROOT = path.dirname(__dirname);
const noop = () => { return Promise.resolve(); };
gulp.task('vscode-reh-win32-ia32-min', noop);
......@@ -14,3 +28,90 @@ gulp.task('vscode-reh-win32-x64-min', noop);
gulp.task('vscode-reh-darwin-min', noop);
gulp.task('vscode-reh-linux-x64-min', noop);
gulp.task('vscode-reh-linux-armhf-min', noop);
function getNodeVersion() {
const yarnrc = fs.readFileSync(path.join(REPO_ROOT, 'remote', '.yarnrc'), 'utf8');
const target = /^target "(.*)"$/m.exec(yarnrc)[1];
return target;
}
function ensureDirs(dirPath) {
if (!fs.existsSync(dirPath)) {
ensureDirs(path.dirname(dirPath));
fs.mkdirSync(dirPath);
}
}
/* Downloads the node executable used for the remote server to ./build/node-remote */
gulp.task(task.define('node-remote', () => {
const VERSION = getNodeVersion();
const nodePath = path.join('.build', 'node-remote');
const nodeVersionPath = path.join(nodePath, 'version');
if (!fs.existsSync(nodeVersionPath) || fs.readFileSync(nodeVersionPath).toString() !== VERSION) {
ensureDirs(nodePath);
util.rimraf(nodePath);
fs.writeFileSync(nodeVersionPath, VERSION);
return nodejs(process.platform, process.arch).pipe(vfs.dest(nodePath));
}
return vfs.src(nodePath);
}));
function nodejs(platform, arch) {
const VERSION = getNodeVersion();
if (arch === 'ia32') {
arch = 'x86';
}
if (platform === 'win32') {
const downloadPath = `/dist/v${VERSION}/win-${arch}/node.exe`;
return (
util.download({ host: 'nodejs.org', path: downloadPath })
.pipe(es.through(function (data) {
// base comes in looking like `https:\nodejs.org\dist\v10.2.1\win-x64\node.exe`
this.emit('data', new File({
path: data.path,
base: data.base.replace(/\\node\.exe$/, ''),
contents: data.contents,
stat: {
isFile: true,
mode: /* 100755 */ 33261
}
}));
}))
);
}
if (platform === 'darwin') {
arch = 'x64';
}
if (arch === 'armhf') {
arch = 'armv7l';
}
const downloadPath = `/dist/v${VERSION}/node-v${VERSION}-${platform}-${arch}.tar.gz`;
return (
util.download({ host: 'nodejs.org', path: downloadPath })
.pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
.pipe(es.through(function (data) {
// base comes in looking like `https:/nodejs.org/dist/v8.9.3/node-v8.9.3-darwin-x64.tar.gz`
// => we must remove the `.tar.gz`
// Also, keep only bin/node
if (/\/bin\/node$/.test(data.path)) {
this.emit('data', new File({
path: data.path.replace(/bin\/node$/, 'node'),
base: data.base.replace(/\.tar\.gz$/, ''),
contents: data.contents,
stat: {
isFile: true,
mode: /* 100755 */ 33261
}
}));
}
}))
);
}
......@@ -538,14 +538,14 @@ gulp.task('vscode-translations-import', function () {
// Sourcemaps
gulp.task('upload-vscode-sourcemaps', () => {
const vs = gulp.src('out-vscode-min/**/*.map', { base: 'out-vscode-min' })
const vs = gulp.src('out-vscode-min/**/*.map', { base: 'out-vscode-min' }) // client source-maps only
.pipe(es.mapSync(f => {
f.path = `${f.base}/core/${f.relative}`;
return f;
}));
const extensionsOut = gulp.src('extensions/**/out/**/*.map', { base: '.' });
const extensionsDist = gulp.src('extensions/**/dist/**/*.map', { base: '.' });
const extensionsOut = gulp.src(['extensions/**/out/**/*.map', '!extensions/**/node_modules/**'], { base: '.' });
const extensionsDist = gulp.src(['extensions/**/dist/**/*.map', '!extensions/**/node_modules/**'], { base: '.' });
return es.merge(vs, extensionsOut, extensionsDist)
.pipe(es.through(function (data) {
......
......@@ -4,6 +4,7 @@
"description": "",
"author": "Microsoft ",
"private": true,
"license": "MIT",
"devDependencies": {
"gulp-watch": "^4.3.9"
}
......
......@@ -3,22 +3,13 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const opn = require('opn');
const cp = require('child_process');
const path = require('path');
const proc = cp.execFile(path.join(__dirname, process.platform === 'win32' ? 'remoteExtensionAgent.bat' : 'remoteExtensionAgent.sh'));
function exec(cmdLine) {
console.log(cmdLine);
cp.execSync(cmdLine, {stdio: "inherit"});
}
let launched = false;
proc.stdout.on("data", data => {
if (!launched && data.toString().indexOf('Extension host agent listening on 8000')) {
launched = true;
setTimeout(() => {
const url = 'http://127.0.0.1:8000';
console.log(`Open ${url} in your browser`);
opn(url);
}, 100);
}
});
\ No newline at end of file
exec('git fetch distro');
exec(`git checkout ${process.env['npm_package_distro']} -- src/vs/server resources/server`);
exec('git reset HEAD src/vs/server resources/server');
\ No newline at end of file
{
"name": "code-oss-dev-build",
"version": "1.0.0",
"license": "MIT",
"devDependencies": {
"@types/ansi-colors": "^3.2.0",
"@types/azure": "0.9.19",
......@@ -39,7 +40,7 @@
"minimist": "^1.2.0",
"request": "^2.85.0",
"tslint": "^5.9.1",
"typescript": "3.5.1",
"typescript": "3.5.2",
"vsce": "1.48.0",
"xml2js": "^0.4.17"
},
......
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "build_const"
version = "0.2.0"
......@@ -27,7 +29,7 @@ dependencies = [
[[package]]
name = "inno_updater"
version = "0.7.1"
version = "0.8.0"
dependencies = [
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
......
......@@ -2,7 +2,7 @@
AddContextMenuFiles=Add "Open with %1" action to Windows Explorer file context menu
AddContextMenuFolders=Add "Open with %1" action to Windows Explorer directory context menu
AssociateWithFiles=Register %1 as an editor for supported file types
AddToPath=Add to PATH (available after restart)
AddToPath=Add to PATH (requires shell restart)
RunAfter=Run %1 after installation
Other=Other:
SourceFile=%1 Source File
\ No newline at end of file
......@@ -1894,10 +1894,10 @@ typed-rest-client@^0.9.0:
tunnel "0.0.4"
underscore "1.8.3"
typescript@3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202"
integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==
typescript@3.5.2:
version "3.5.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.5"
......
......@@ -65,7 +65,7 @@
},
"isOnlyProductionDependency": true,
"license": "MIT",
"version": "4.2.3"
"version": "4.2.4"
},
{
"component": {
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js mmims/language-batchfile grammars/batchfile.cson ./syntaxes/batchfile.tmLanguage.json"
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js atom/language-clojure grammars/clojure.cson ./syntaxes/clojure.tmLanguage.json"
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js atom/language-coffee-script grammars/coffeescript.cson ./syntaxes/coffeescript.tmLanguage.json"
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "^1.0.0"
},
......
......@@ -5,6 +5,7 @@
"type": "object",
"definitions": {
"devContainerCommon": {
"type": "object",
"properties": {
"name": {
"type": "string",
......@@ -18,11 +19,14 @@
}
},
"settings": {
"type": "object",
"$ref": "vscode://schemas/settings/machine",
"description": "Machine specific settings that should be copied into the container."
},
"postCreateCommand": {
"type": ["string", "array"],
"type": [
"string",
"array"
],
"description": "A command to run after creating the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.",
"items": {
"type": "string"
......@@ -35,12 +39,20 @@
}
},
"nonComposeBase": {
"type": "object",
"properties": {
"appPort": {
"type": ["integer", "string", "array"],
"type": [
"integer",
"string",
"array"
],
"description": "Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. \"8000:8010\".",
"items": {
"type": ["integer", "string"]
"type": [
"integer",
"string"
]
}
},
"runArgs": {
......@@ -52,7 +64,10 @@
},
"shutdownAction": {
"type": "string",
"enum": ["none", "stopContainer"],
"enum": [
"none",
"stopContainer"
],
"description": "Action to take when VS Code is shutting down. The default is to stop the container."
},
"overrideCommand": {
......@@ -70,6 +85,7 @@
}
},
"dockerFileContainer": {
"type": "object",
"properties": {
"dockerFile": {
"type": "string",
......@@ -80,21 +96,30 @@
"description": "The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file."
}
},
"required": ["dockerFile"]
"required": [
"dockerFile"
]
},
"imageContainer": {
"type": "object",
"properties": {
"image": {
"type": "string",
"description": "The docker image that will be used to create the container."
}
},
"required": ["image"]
"required": [
"image"
]
},
"composeContainer": {
"type": "object",
"properties": {
"dockerComposeFile": {
"type": ["string", "array"],
"type": [
"string",
"array"
],
"description": "The name of the docker-compose file(s) used to start the services.",
"items": {
"type": "string"
......@@ -110,11 +135,18 @@
},
"shutdownAction": {
"type": "string",
"enum": ["none", "stopCompose"],
"enum": [
"none",
"stopCompose"
],
"description": "Action to take when VS Code is shutting down. The default is to stop the containers."
}
},
"required": ["dockerComposeFile", "service", "workspaceFolder"]
"required": [
"dockerComposeFile",
"service",
"workspaceFolder"
]
}
},
"allOf": [
......
......@@ -6,11 +6,11 @@
"git": {
"name": "jeff-hykin/cpp-textmate-grammar",
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
"commitHash": "85ef67461698ec3c0b64411a53705daa0b68fc13"
"commitHash": "ccdbfcae7454d7f00e9a6ebe0c3df3ab4e19e33b"
}
},
"license": "MIT",
"version": "1.11.3",
"version": "1.11.7",
"description": "The files syntaxes/c.json and syntaxes/c++.json were derived from https://github.com/atom/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
},
{
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ./build/update-grammars.js"
......
......@@ -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/jeff-hykin/cpp-textmate-grammar/commit/f88ac364a66b447bc16b966a66af52ae8b31795c",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/5a701cf1028d9c517fa2ee5210628935e0d7b19a",
"name": "C",
"scopeName": "source.c",
"patterns": [
......@@ -847,8 +847,102 @@
"name": "storage.type.built-in.c"
},
{
"match": "(?-mix:\\b(asm|__asm__|enum|struct|union)\\b)",
"match": "(?-mix:\\b(enum|struct|union)\\b)",
"name": "storage.type.$1.c"
},
{
"name": "meta.asm.c",
"begin": "(\\b(?:__asm__|asm)\\b)\\s*((?:volatile)?)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "storage.type.asm.c"
},
"2": {
"name": "storage.modifier.c"
},
"3": {
"name": "punctuation.section.parens.begin.bracket.round.assembly.c"
}
},
"end": "(\\))",
"endCaptures": {
"1": {
"name": "punctuation.section.parens.end.bracket.round.assembly.c"
}
},
"patterns": [
{
"name": "string.quoted.double.c",
"contentName": "meta.embedded.assembly.c",
"begin": "(R?)(\")",
"beginCaptures": {
"1": {
"name": "meta.encoding.c"
},
"2": {
"name": "punctuation.definition.string.begin.assembly.c"
}
},
"end": "(\")",
"endCaptures": {
"1": {
"name": "punctuation.definition.string.end.assembly.c"
}
},
"patterns": [
{
"include": "source.asm"
},
{
"include": "source.x86"
},
{
"include": "source.x86_64"
},
{
"include": "source.arm"
},
{
"include": "#backslash_escapes"
},
{
"include": "#string_escaped_char"
},
{
"match": "(?=not)possible"
}
]
},
{
"begin": "(\\()",
"beginCaptures": {
"1": {
"name": "punctuation.section.parens.begin.bracket.round.assembly.inner.c"
}
},
"end": "(\\))",
"endCaptures": {
"1": {
"name": "punctuation.section.parens.end.bracket.round.assembly.inner.c"
}
},
"patterns": [
{
"include": "#evaluation_context"
}
]
},
{
"match": ":",
"name": "punctuation.separator.delimiter.colon.assembly.c"
},
{
"include": "#comments_context"
},
{
"include": "#comments"
}
]
}
]
},
......@@ -2239,6 +2333,10 @@
}
]
},
"backslash_escapes": {
"match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )",
"name": "constant.character.escape.c"
},
"conditional_context": {
"patterns": [
{
......@@ -2249,8 +2347,18 @@
}
]
},
"evalutation_context": {
"patterns": [
{
"include": "#function-call-innards"
},
{
"include": "$base"
}
]
},
"member_access": {
"match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())",
"match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())",
"captures": {
"1": {
"name": "variable.other.object.access.c"
......@@ -2292,7 +2400,7 @@
},
"method_access": {
"contentName": "meta.function-call.member.c",
"begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()",
"begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()",
"beginCaptures": {
"1": {
"name": "variable.other.object.access.c"
......@@ -3371,7 +3479,7 @@
"end": "(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"patterns": [
{
"match": "(\\G0[xX])(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?<!')([pP])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:([lLfF](?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"match": "(\\G0[xX])([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)?((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)?((?<!')([pP])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)))?([lLfF](?!\\w))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"captures": {
"1": {
"name": "keyword.other.unit.hexadecimal.c"
......@@ -3427,7 +3535,7 @@
}
},
{
"match": "(\\G(?=[0-9.])(?!0[xXbB]))(?:([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9])\\.|\\.(?=[0-9])))(?:([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?<!')([eE])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:([lLfF](?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)?((?:(?<=[0-9])\\.|\\.(?=[0-9])))([0-9](?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)?((?<!')([eE])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)))?([lLfF](?!\\w))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"captures": {
"2": {
"name": "constant.numeric.decimal.c",
......@@ -3480,7 +3588,7 @@
}
},
{
"match": "(\\G0[bB])([01](?:(?:[01]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"match": "(\\G0[bB])([01](?:[01]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"captures": {
"1": {
"name": "keyword.other.unit.binary.c"
......@@ -3503,7 +3611,7 @@
}
},
{
"match": "(\\G0)((?:(?:[0-7]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))+)(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"match": "(\\G0)((?:[0-7]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))+)((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"captures": {
"1": {
"name": "keyword.other.unit.octal.c"
......@@ -3526,7 +3634,7 @@
}
},
{
"match": "(\\G0[xX])([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?<!')([pP])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"match": "(\\G0[xX])([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)((?<!')([pP])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)))?((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"captures": {
"1": {
"name": "keyword.other.unit.hexadecimal.c"
......@@ -3567,7 +3675,7 @@
}
},
{
"match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?<!')([eE])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)((?<!')([eE])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)))?((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))",
"captures": {
"2": {
"name": "constant.numeric.decimal.c",
......@@ -3605,7 +3713,7 @@
}
},
{
"match": "(?:(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))+",
"match": "(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-])+",
"name": "invalid.illegal.constant.numeric"
}
]
......
......@@ -672,7 +672,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.qualified_type.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -694,7 +694,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.head.function.definition.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -1574,7 +1574,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.head.function.definition.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -1772,7 +1772,7 @@
},
{
"c": "asm",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp storage.type.asm.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.asm.cpp storage.type.asm.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
......@@ -1783,7 +1783,7 @@
},
{
"c": "(",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.parens.cpp punctuation.section.parens.begin.bracket.round.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.asm.cpp punctuation.section.parens.begin.bracket.round.assembly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -1794,18 +1794,7 @@
},
{
"c": "\"",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.parens.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
"dark_vs": "string: #CE9178",
"light_vs": "string: #A31515",
"hc_black": "string: #CE9178"
}
},
{
"c": "movw $0x38, ",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.parens.cpp string.quoted.double.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.asm.cpp string.quoted.double.cpp punctuation.definition.string.begin.assembly.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
......@@ -1815,52 +1804,19 @@
}
},
{
"c": "%a",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.parens.cpp string.quoted.double.cpp constant.other.placeholder.cpp",
"c": "movw $0x38, %ax; ltr %ax",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.asm.cpp string.quoted.double.cpp meta.embedded.assembly.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
"dark_vs": "string: #CE9178",
"light_vs": "string: #A31515",
"hc_black": "string: #CE9178"
}
},
{
"c": "x; ltr ",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.parens.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
"dark_vs": "string: #CE9178",
"light_vs": "string: #A31515",
"hc_black": "string: #CE9178"
}
},
{
"c": "%a",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.parens.cpp string.quoted.double.cpp constant.other.placeholder.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
"dark_vs": "string: #CE9178",
"light_vs": "string: #A31515",
"hc_black": "string: #CE9178"
}
},
{
"c": "x",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.parens.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
"dark_vs": "string: #CE9178",
"light_vs": "string: #A31515",
"hc_black": "string: #CE9178"
"dark_plus": "meta.embedded: #D4D4D4",
"light_plus": "meta.embedded: #000000",
"dark_vs": "meta.embedded: #D4D4D4",
"light_vs": "meta.embedded: #000000",
"hc_black": "meta.embedded: #FFFFFF"
}
},
{
"c": "\"",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.parens.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.asm.cpp string.quoted.double.cpp punctuation.definition.string.end.assembly.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
......@@ -1871,7 +1827,7 @@
},
{
"c": ")",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.parens.cpp punctuation.section.parens.end.bracket.round.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.body.function.definition.cpp meta.asm.cpp punctuation.section.parens.end.bracket.round.assembly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......
......@@ -298,7 +298,7 @@
},
{
"c": ":",
"t": "source.cpp source.cpp meta.block.class.cpp meta.body.class.cpp storage.type.modifier.access.control.public.cpp colon.cpp",
"t": "source.cpp source.cpp meta.block.class.cpp meta.body.class.cpp storage.type.modifier.access.control.public.cpp colon.cpp punctuation.separator.delimiter.colon.access.control.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
......@@ -331,7 +331,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.cpp meta.head.function.definition.cpp",
"t": "source.cpp source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -353,7 +353,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.cpp meta.head.function.definition.cpp",
"t": "source.cpp source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -452,7 +452,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.cpp meta.head.function.definition.cpp",
"t": "source.cpp source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -617,7 +617,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.head.function.definition.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -661,7 +661,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.head.function.definition.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -914,7 +914,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.head.function.definition.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......@@ -936,7 +936,7 @@
},
{
"c": " ",
"t": "source.cpp source.cpp meta.function.definition.cpp meta.head.function.definition.cpp",
"t": "source.cpp source.cpp meta.function.definition.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "0.10.x"
},
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "^1.29.0"
},
......@@ -732,8 +733,8 @@
]
},
"dependencies": {
"vscode-languageclient": "^5.2.1",
"vscode-nls": "^4.0.0"
"vscode-languageclient": "^5.3.0-next.6",
"vscode-nls": "^4.1.1"
},
"devDependencies": {
"@types/node": "^10.14.8",
......
......@@ -9,15 +9,15 @@
},
"main": "./out/cssServerMain",
"dependencies": {
"vscode-css-languageservice": "^4.0.2-next.4",
"vscode-languageserver": "^5.3.0-next.2"
"vscode-css-languageservice": "^4.0.2",
"vscode-languageserver": "^5.3.0-next.8"
},
"devDependencies": {
"@types/mocha": "2.2.33",
"@types/node": "^10.14.8",
"glob": "^7.1.2",
"mocha": "^5.2.0",
"mocha-junit-reporter": "^1.17.0",
"glob": "^7.1.4",
"mocha": "^6.1.4",
"mocha-junit-reporter": "^1.23.0",
"mocha-multi-reporters": "^1.1.7"
},
"scripts": {
......
......@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import {
createConnection, IConnection, TextDocuments, InitializeParams, InitializeResult, ServerCapabilities, ConfigurationRequest, WorkspaceFolder
createConnection, IConnection, TextDocuments, InitializeParams, InitializeResult, ServerCapabilities, ConfigurationRequest, WorkspaceFolder, TextDocumentSyncKind
} from 'vscode-languageserver';
import URI from 'vscode-uri';
import { TextDocument, CompletionList, Position } from 'vscode-languageserver-types';
......@@ -32,9 +32,8 @@ process.on('unhandledRejection', (e: any) => {
connection.console.error(formatError(`Unhandled exception`, e));
});
// Create a simple text document manager. The text document manager
// supports full document sync only
const documents: TextDocuments = new TextDocuments();
// Create a text document manager.
const documents: TextDocuments = new TextDocuments(TextDocumentSyncKind.Incremental);
// Make the text document manager listen on the connection
// for open, change and close text document events
documents.listen(connection);
......
......@@ -67,13 +67,13 @@ suite('Links', () => {
);
});
// test('url links', function () {
test('node module resolving', function () {
// let testUri = getTestResource('about.css');
// let folders = [{ name: 'x', uri: getTestResource('') }];
let testUri = getTestResource('about.css');
let folders = [{ name: 'x', uri: getTestResource('') }];
// assertLinks('html { background-image: url("~foo/hello.html|")',
// [{ offset: 29, value: '"~foo/hello.html"', target: getTestResource('node_modules/foo/hello.html') }], testUri, folders
// );
// });
assertLinks('html { background-image: url("~foo/hello.html|")',
[{ offset: 29, value: '"~foo/hello.html"', target: getTestResource('node_modules/foo/hello.html') }], testUri, folders
);
});
});
\ No newline at end of file
......@@ -57,13 +57,17 @@ export function getDocumentContext(documentUri: string, workspaceFolders: Worksp
// and [sass-loader's](https://github.com/webpack-contrib/sass-loader#imports)
// convention, if an import path starts with ~ then use node module resolution
// *unless* it starts with "~/" as this refers to the user's home directory.
if (ref[0] === '~' && ref[1] !== '/' && startsWith(base, 'file://')) {
const moduleName = getModuleNameFromPath(ref.substring(1));
const modulePath = resolvePathToModule(moduleName, base);
if (modulePath) {
const pathWithinModule = ref.substring(moduleName.length + 2);
return url.resolve(modulePath, pathWithinModule);
if (ref[0] === '~' && ref[1] !== '/') {
ref = ref.substring(1);
if (startsWith(base, 'file://')) {
const moduleName = getModuleNameFromPath(ref);
const modulePath = resolvePathToModule(moduleName, base);
if (modulePath) {
const pathWithinModule = ref.substring(moduleName.length + 1);
return url.resolve(modulePath, pathWithinModule);
}
}
}
return url.resolve(base, ref);
},
......
......@@ -162,36 +162,36 @@ supports-color@5.4.0:
dependencies:
has-flag "^3.0.0"
vscode-jsonrpc@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz#a7bf74ef3254d0a0c272fab15c82128e378b3be9"
integrity sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==
vscode-languageclient@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-5.2.1.tgz#7cfc83a294c409f58cfa2b910a8cfeaad0397193"
integrity sha512-7jrS/9WnV0ruqPamN1nE7qCxn0phkH5LjSgSp9h6qoJGoeAKzwKz/PF6M+iGA/aklx4GLZg1prddhEPQtuXI1Q==
vscode-jsonrpc@^4.1.0-next.2:
version "4.1.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-4.1.0-next.2.tgz#3bd318910a48e631742b290975386e3dae685be3"
integrity sha512-GsBLjP9DxQ42yl1mW9GEIlnSc0+R8mfzhaebwmmTPEJjezD5SPoAo3DFrIAFZha9yvQ1nzZfZlhtVpGQmgxtXg==
vscode-languageclient@^5.3.0-next.6:
version "5.3.0-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-5.3.0-next.6.tgz#35e74882781158e8b111911c0953869d3df08777"
integrity sha512-DxT8+gkenjCjJV6ArcP75/AQfx6HP6m6kHIbacPCpffMeoE1YMLKj6ZixA9J87yr0fMtBmqumLmDeGe7MIF2bw==
dependencies:
semver "^5.5.0"
vscode-languageserver-protocol "3.14.1"
vscode-languageserver-protocol "^3.15.0-next.6"
vscode-languageserver-protocol@3.14.1:
version "3.14.1"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz#b8aab6afae2849c84a8983d39a1cf742417afe2f"
integrity sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==
vscode-languageserver-protocol@^3.15.0-next.6:
version "3.15.0-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.0-next.6.tgz#a8aeb7e7dd65da8216b386db59494cdfd3215d92"
integrity sha512-/yDpYlWyNs26mM23mT73xmOFsh1iRfgZfBdHmfAxwDKwpQKLoOSqVidtYfxlK/pD3IEKGcAVnT4WXTsguxxAMQ==
dependencies:
vscode-jsonrpc "^4.0.0"
vscode-languageserver-types "3.14.0"
vscode-languageserver-types@3.14.0:
version "3.14.0"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz#d3b5952246d30e5241592b6dde8280e03942e743"
integrity sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==
vscode-nls@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002"
integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw==
vscode-jsonrpc "^4.1.0-next.2"
vscode-languageserver-types "^3.15.0-next.2"
vscode-languageserver-types@^3.15.0-next.2:
version "3.15.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.2.tgz#a0601332cdaafac21931f497bb080cfb8d73f254"
integrity sha512-2JkrMWWUi2rlVLSo9OFR2PIGUzdiowEM8NgNYiwLKnXTjpwpjjIrJbNNxDik7Rv4oo9KtikcFQZKXbrKilL/MQ==
vscode-nls@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c"
integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A==
wrappy@1:
version "1.0.2"
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "0.10.x"
},
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "^1.5.0"
},
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js moby/moby contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json"
......
......@@ -3,7 +3,8 @@
"displayName": "Emmet",
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "^1.13.0"
},
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "^1.4.0"
},
......
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js ionide/ionide-fsgrammar grammar/fsharp.json ./syntaxes/fsharp.tmLanguage.json"
......
......@@ -3,6 +3,7 @@
"displayName": "%displayName%",
"description": "%description%",
"publisher": "vscode",
"license": "MIT",
"version": "1.0.0",
"engines": {
"vscode": "^1.5.0"
......@@ -318,12 +319,12 @@
},
{
"command": "git.pushWithTags",
"title": "%command.pushWithTags%",
"title": "%command.pushFollowTags%",
"category": "Git"
},
{
"command": "git.pushWithTagsForce",
"title": "%command.pushWithTagsForce%",
"title": "%command.pushFollowTagsForce%",
"category": "Git"
},
{
......
......@@ -47,8 +47,8 @@
"command.pushForce": "Push (Force)",
"command.pushTo": "Push to...",
"command.pushToForce": "Push to... (Force)",
"command.pushWithTags": "Push With Tags",
"command.pushWithTagsForce": "Push With Tags (Force)",
"command.pushFollowTags": "Push (Follow Tags)",
"command.pushFollowTagsForce": "Push (Follow Tags, Force)",
"command.addRemote": "Add Remote",
"command.removeRemote": "Remove Remote",
"command.sync": "Sync",
......
此差异已折叠。
......@@ -329,8 +329,8 @@ export class Git {
this.env = options.env || {};
}
open(repository: string): Repository {
return new Repository(this, repository);
open(repository: string, dotGit: string): Repository {
return new Repository(this, repository, dotGit);
}
async init(repository: string): Promise<void> {
......@@ -370,6 +370,17 @@ export class Git {
return path.normalize(result.stdout.trim());
}
async getRepositoryDotGit(repositoryPath: string): Promise<string> {
const result = await this.exec(repositoryPath, ['rev-parse', '--git-dir']);
let dotGitPath = result.stdout.trim();
if (!path.isAbsolute(dotGitPath)) {
dotGitPath = path.join(repositoryPath, dotGitPath);
}
return path.normalize(dotGitPath);
}
async exec(cwd: string, args: string[], options: SpawnOptions = {}): Promise<IExecutionResult<string>> {
options = assign({ cwd }, options || {});
return await this._exec(args, options);
......@@ -649,7 +660,8 @@ export class Repository {
constructor(
private _git: Git,
private repositoryRoot: string
private repositoryRoot: string,
readonly dotGit: string
) { }
get git(): Git {
......@@ -1419,7 +1431,7 @@ export class Repository {
}
if (tags) {
args.push('--tags');
args.push('--follow-tags');
}
if (remote) {
......
......@@ -78,7 +78,7 @@ export class Model {
this.disposables.push(fsWatcher);
const onWorkspaceChange = anyEvent(fsWatcher.onDidChange, fsWatcher.onDidCreate, fsWatcher.onDidDelete);
const onGitRepositoryChange = filterEvent(onWorkspaceChange, uri => /\/\.git\//.test(uri.path));
const onGitRepositoryChange = filterEvent(onWorkspaceChange, uri => /\/\.git/.test(uri.path));
const onPossibleGitRepositoryChange = filterEvent(onGitRepositoryChange, uri => !this.getRepository(uri));
onPossibleGitRepositoryChange(this.onPossibleGitRepositoryChange, this, this.disposables);
......@@ -232,7 +232,8 @@ export class Model {
return;
}
const repository = new Repository(this.git.open(repositoryRoot), this.globalState);
const dotGit = await this.git.getRepositoryDotGit(repositoryRoot);
const repository = new Repository(this.git.open(repositoryRoot, dotGit), this.globalState);
this.open(repository);
} catch (err) {
......
此差异已折叠。
......@@ -4,6 +4,7 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js atom/language-go grammars/go.cson ./syntaxes/go.tmLanguage.json"
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册