Skip to content

Commit 15aa2e1

Browse files
committed
Merge remote-tracking branch 'origin/master' into alex/semantic-document-range
2 parents 2da34cd + d2ae888 commit 15aa2e1

180 files changed

Lines changed: 3124 additions & 1431 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ about: Suggest an idea for this project
44

55
---
66

7+
<!-- Please leave this comment intact to help us with managing issues. NEEDS_VERSION_INFO_IGNORE -->
78
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
89
<!-- Please search existing issues to avoid creating duplicates. -->
910

1011
<!-- Describe the feature you'd like. -->
11-
<!-- Please include the latest version of VS Code you've confirmed to not have this feature -->

.github/commands.json

Lines changed: 130 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,6 @@
127127
"action": "updateLabels",
128128
"addLabel": "~needs more info"
129129
},
130-
{
131-
"type": "label",
132-
"name": "~needs version info",
133-
"action": "updateLabels",
134-
"addLabel": "needs more info",
135-
"removeLabel": "~needs version info",
136-
"comment": "Thanks for creating this issue! We figured it's missing some basic information, such as a version number, or in some other way doesn't follow our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines. Please take the time to review these and update the issue.\n\nHappy Coding!"
137-
},
138130
{
139131
"type": "label",
140132
"name": "~needs more info",
@@ -163,5 +155,135 @@
163155
"name": "*off-topic",
164156
"action": "close",
165157
"comment": "Thanks for creating this issue. We think this issue is unactionable or unrelated to the goals of this project. Please follow our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
158+
},
159+
{
160+
"type": "comment",
161+
"name": "extPython",
162+
"allowUsers": [
163+
"cleidigh",
164+
"usernamehw",
165+
"gjsjohnmurray",
166+
"IllusionMH"
167+
],
168+
"action": "close",
169+
"addLabel": "*caused-by-extension",
170+
"comment": "It looks like this is caused by the Python extension. Please file it with the repository [here](https://github.com/Microsoft/vscode-python). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
171+
},
172+
{
173+
"type": "comment",
174+
"name": "extC",
175+
"allowUsers": [
176+
"cleidigh",
177+
"usernamehw",
178+
"gjsjohnmurray",
179+
"IllusionMH"
180+
],
181+
"action": "close",
182+
"addLabel": "*caused-by-extension",
183+
"comment": "It looks like this is caused by the C extension. Please file it with the repository [here](https://github.com/Microsoft/vscode-cpptools). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
184+
},
185+
{
186+
"type": "comment",
187+
"name": "extC++",
188+
"allowUsers": [
189+
"cleidigh",
190+
"usernamehw",
191+
"gjsjohnmurray",
192+
"IllusionMH"
193+
],
194+
"action": "close",
195+
"addLabel": "*caused-by-extension",
196+
"comment": "It looks like this is caused by the C++ extension. Please file it with the repository [here](https://github.com/Microsoft/vscode-cpptools). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
197+
},
198+
{
199+
"type": "comment",
200+
"name": "extTS",
201+
"allowUsers": [
202+
"cleidigh",
203+
"usernamehw",
204+
"gjsjohnmurray",
205+
"IllusionMH"
206+
],
207+
"action": "close",
208+
"addLabel": "*caused-by-extension",
209+
"comment": "It looks like this is caused by the TypeScript language service. Please file it with the repository [here](https://github.com/microsoft/TypeScript/). Make sure to check their [contributing guidelines](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md) and provide relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
210+
},
211+
{
212+
"type": "comment",
213+
"name": "extJS",
214+
"allowUsers": [
215+
"cleidigh",
216+
"usernamehw",
217+
"gjsjohnmurray",
218+
"IllusionMH"
219+
],
220+
"action": "close",
221+
"addLabel": "*caused-by-extension",
222+
"comment": "It looks like this is caused by the TypeScript/JavaScript language service. Please file it with the repository [here](https://github.com/microsoft/TypeScript/). Make sure to check their [contributing guidelines](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md) and provide relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
223+
},
224+
{
225+
"type": "comment",
226+
"name": "extC#",
227+
"allowUsers": [
228+
"cleidigh",
229+
"usernamehw",
230+
"gjsjohnmurray",
231+
"IllusionMH"
232+
],
233+
"action": "close",
234+
"addLabel": "*caused-by-extension",
235+
"comment": "It looks like this is caused by the C# extension. Please file it with the repository [here](https://github.com/OmniSharp/omnisharp-vscode.git). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
236+
},
237+
{
238+
"type": "comment",
239+
"name": "extGo",
240+
"allowUsers": [
241+
"cleidigh",
242+
"usernamehw",
243+
"gjsjohnmurray",
244+
"IllusionMH"
245+
],
246+
"action": "close",
247+
"addLabel": "*caused-by-extension",
248+
"comment": "It looks like this is caused by the Go extension. Please file it with the repository [here](https://github.com/microsoft/vscode-go). Make sure to check their [contributing guidelines](https://github.com/microsoft/vscode-go/blob/master/CONTRIBUTING.md) and provide relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
249+
},
250+
{
251+
"type": "comment",
252+
"name": "extPowershell",
253+
"allowUsers": [
254+
"cleidigh",
255+
"usernamehw",
256+
"gjsjohnmurray",
257+
"IllusionMH"
258+
],
259+
"action": "close",
260+
"addLabel": "*caused-by-extension",
261+
"comment": "It looks like this is caused by the Powershell extension. Please file it with the repository [here](https://github.com/PowerShell/vscode-powershell). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
262+
},
263+
{
264+
"type": "comment",
265+
"name": "extLiveShare",
266+
"allowUsers": [
267+
"cleidigh",
268+
"usernamehw",
269+
"gjsjohnmurray",
270+
"IllusionMH"
271+
],
272+
"action": "close",
273+
"addLabel": "*caused-by-extension",
274+
"comment": "It looks like this is caused by the LiveShare extension. Please file it with the repository [here](https://github.com/MicrosoftDocs/live-share). Make sure to check their [contributing guidelines](https://github.com/MicrosoftDocs/live-share/blob/master/CONTRIBUTING.md) and provide relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
275+
},
276+
{
277+
"type": "comment",
278+
"name": "extDocker",
279+
"allowUsers": [
280+
"cleidigh",
281+
"usernamehw",
282+
"gjsjohnmurray",
283+
"IllusionMH"
284+
],
285+
"action": "close",
286+
"addLabel": "*caused-by-extension",
287+
"comment": "It looks like this is caused by the Docker extension. Please file it with the repository [here](https://github.com/microsoft/vscode-docker). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines for more information.\n\nHappy Coding!"
166288
}
167289
]

.github/workflows/commands.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
uses: actions/checkout@v2
1414
with:
1515
repository: 'JacksonKearl/vscode-triage-github-actions'
16-
ref: v2
16+
ref: v6
1717
- name: Run Commands
1818
uses: ./commands
1919
with:

.github/workflows/copycat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
uses: actions/checkout@v2
1212
with:
1313
repository: 'JacksonKearl/vscode-triage-github-actions'
14-
ref: v2
14+
ref: v6
1515
- name: Run CopyCat (JacksonKearl/testissues)
1616
uses: ./copycat
1717
with:
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Needs Version Info
22
on:
33
issues:
4-
types: [opened]
4+
types: [opened, edited]
55

66
jobs:
77
main:
@@ -11,10 +11,13 @@ jobs:
1111
uses: actions/checkout@v2
1212
with:
1313
repository: 'JacksonKearl/vscode-triage-github-actions'
14-
ref: v2
15-
# - name: Run Needs Version Info
16-
# uses: ./needs-more-info
17-
# with:
18-
# token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
19-
# matcher: '\b(\d\.\d{2,3}\.\d|insiders?|1\.\d\d\d?)\b'
20-
# label: ~needs version info
14+
ref: v6
15+
- name: Run Needs Version Info
16+
uses: ./needs-more-info
17+
with:
18+
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
19+
matcher: '\b(\d\.\d{2,3}\.\d|insiders?|1\.\d\d\d?)\b'
20+
tags: NEEDS_VERSION_INFO_IGNORE
21+
bots: vscodebot|vscode-triage-bot
22+
comment: "Thanks for creating this issue! We detected it's missing some basic information, such as your VS Code and operating system versions, or in some other way doesn't follow our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines. Please take the time to review these guidelines and update the issue.\n\nThis comment will go away once sufficient information is included in your issue.\n\nHappy Coding!"
23+
label: needs more info

build/lib/i18n.resources.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@
110110
"name": "vs/workbench/contrib/output",
111111
"project": "vscode-workbench"
112112
},
113-
{
114-
"name": "vs/workbench/contrib/openInDesktop",
115-
"project": "vscode-workbench"
116-
},
117113
{
118114
"name": "vs/workbench/contrib/performance",
119115
"project": "vscode-workbench"

extensions/git/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,6 @@
18081808
},
18091809
"dependencies": {
18101810
"byline": "^5.0.0",
1811-
"dayjs": "1.8.19",
18121811
"file-type": "^7.2.0",
18131812
"iconv-lite": "^0.4.24",
18141813
"jschardet": "2.1.1",
@@ -1821,7 +1820,7 @@
18211820
"@types/byline": "4.2.31",
18221821
"@types/file-type": "^5.2.1",
18231822
"@types/mocha": "2.2.43",
1824-
"@types/node": "^12.11.7",
1823+
"@types/node": "^12.12.31",
18251824
"@types/which": "^1.0.28",
18261825
"mocha": "^3.2.0",
18271826
"mocha-junit-reporter": "^1.23.3",

extensions/git/src/git.ts

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { promises as fs, exists } from 'fs';
6+
import { promises as fs, exists, realpath } from 'fs';
77
import * as path from 'path';
88
import * as os from 'os';
99
import * as cp from 'child_process';
@@ -21,6 +21,7 @@ import { StringDecoder } from 'string_decoder';
2121

2222
// https://github.com/microsoft/vscode/issues/65693
2323
const MAX_CLI_LENGTH = 30000;
24+
const isWindows = process.platform === 'win32';
2425

2526
export interface IGit {
2627
path: string;
@@ -419,8 +420,40 @@ export class Git {
419420

420421
async getRepositoryRoot(repositoryPath: string): Promise<string> {
421422
const result = await this.exec(repositoryPath, ['rev-parse', '--show-toplevel']);
423+
422424
// Keep trailing spaces which are part of the directory name
423-
return path.normalize(result.stdout.trimLeft().replace(/(\r\n|\r|\n)+$/, ''));
425+
const repoPath = path.normalize(result.stdout.trimLeft().replace(/(\r\n|\r|\n)+$/, ''));
426+
427+
if (isWindows) {
428+
// On Git 2.25+ if you call `rev-parse --show-toplevel` on a mapped drive, instead of getting the mapped drive path back, you get the UNC path for the mapped drive.
429+
// So we will try to normalize it back to the mapped drive path, if possible
430+
const repoUri = Uri.file(repoPath);
431+
const pathUri = Uri.file(repositoryPath);
432+
if (repoUri.authority.length !== 0 && pathUri.authority.length === 0) {
433+
let match = /(?<=^\/?)([a-zA-Z])(?=:\/)/.exec(pathUri.path);
434+
if (match !== null) {
435+
const [, letter] = match;
436+
437+
try {
438+
const networkPath = await new Promise<string>(resolve =>
439+
realpath.native(`${letter}:`, { encoding: 'utf8' }, (err, resolvedPath) =>
440+
// eslint-disable-next-line eqeqeq
441+
resolve(err != null ? undefined : resolvedPath),
442+
),
443+
);
444+
if (networkPath !== undefined) {
445+
return path.normalize(
446+
repoUri.fsPath.replace(networkPath, `${letter.toLowerCase()}:`),
447+
);
448+
}
449+
} catch { }
450+
}
451+
452+
return path.normalize(pathUri.fsPath);
453+
}
454+
}
455+
456+
return repoPath;
424457
}
425458

426459
async getRepositoryDotGit(repositoryPath: string): Promise<string> {

extensions/git/src/timelineProvider.ts

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as nls from 'vscode-nls';
7-
import * as dayjs from 'dayjs';
8-
import * as advancedFormat from 'dayjs/plugin/advancedFormat';
9-
import { CancellationToken, Disposable, Event, EventEmitter, ThemeIcon, Timeline, TimelineChangeEvent, TimelineItem, TimelineOptions, TimelineProvider, Uri, workspace } from 'vscode';
7+
import { CancellationToken, Disposable, env, Event, EventEmitter, ThemeIcon, Timeline, TimelineChangeEvent, TimelineItem, TimelineOptions, TimelineProvider, Uri, workspace } from 'vscode';
108
import { Model } from './model';
119
import { Repository, Resource } from './repository';
1210
import { debounce } from './decorators';
1311

14-
dayjs.extend(advancedFormat);
15-
1612
const localize = nls.loadMessageBundle();
1713

18-
// TODO@eamodio: Localize or use a setting for date format
19-
2014
export class GitTimelineItem extends TimelineItem {
2115
static is(item: TimelineItem): item is GitTimelineItem {
2216
return item instanceof GitTimelineItem;
@@ -145,16 +139,15 @@ export class GitTimelineProvider implements TimelineProvider {
145139
commits.splice(commits.length - 1, 1);
146140
}
147141

148-
let dateFormatter: dayjs.Dayjs;
142+
const dateFormatter = new Intl.DateTimeFormat(env.language, { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' });
143+
149144
const items = commits.map<GitTimelineItem>((c, i) => {
150145
const date = c.commitDate; // c.authorDate
151146

152-
dateFormatter = dayjs(date);
153-
154147
const item = new GitTimelineItem(c.hash, commits[i + 1]?.hash ?? `${c.hash}^`, c.message, date?.getTime() ?? 0, c.hash, 'git:file:commit');
155148
item.iconPath = new (ThemeIcon as any)('git-commit');
156149
item.description = c.authorName;
157-
item.detail = `${c.authorName} (${c.authorEmail}) \u2014 ${c.hash.substr(0, 8)}\n${dateFormatter.format('MMMM Do, YYYY h:mma')}\n\n${c.message}`;
150+
item.detail = `${c.authorName} (${c.authorEmail}) \u2014 ${c.hash.substr(0, 8)}\n${dateFormatter.format(date)}\n\n${c.message}`;
158151
item.command = {
159152
title: 'Open Comparison',
160153
command: 'git.timeline.openDiff',
@@ -170,13 +163,12 @@ export class GitTimelineProvider implements TimelineProvider {
170163
const index = repo.indexGroup.resourceStates.find(r => r.resourceUri.fsPath === uri.fsPath);
171164
if (index) {
172165
const date = this.repoStatusDate ?? new Date();
173-
dateFormatter = dayjs(date);
174166

175167
const item = new GitTimelineItem('~', 'HEAD', localize('git.timeline.stagedChanges', 'Staged Changes'), date.getTime(), 'index', 'git:file:index');
176168
// TODO@eamodio: Replace with a better icon -- reflecting its status maybe?
177169
item.iconPath = new (ThemeIcon as any)('git-commit');
178170
item.description = '';
179-
item.detail = localize('git.timeline.detail', '{0} \u2014 {1}\n{2}\n\n{3}', you, localize('git.index', 'Index'), dateFormatter.format('MMMM Do, YYYY h:mma'), Resource.getStatusText(index.type));
171+
item.detail = localize('git.timeline.detail', '{0} \u2014 {1}\n{2}\n\n{3}', you, localize('git.index', 'Index'), dateFormatter.format(date), Resource.getStatusText(index.type));
180172
item.command = {
181173
title: 'Open Comparison',
182174
command: 'git.timeline.openDiff',
@@ -189,13 +181,12 @@ export class GitTimelineProvider implements TimelineProvider {
189181
const working = repo.workingTreeGroup.resourceStates.find(r => r.resourceUri.fsPath === uri.fsPath);
190182
if (working) {
191183
const date = new Date();
192-
dateFormatter = dayjs(date);
193184

194185
const item = new GitTimelineItem('', index ? '~' : 'HEAD', localize('git.timeline.uncommitedChanges', 'Uncommited Changes'), date.getTime(), 'working', 'git:file:working');
195186
// TODO@eamodio: Replace with a better icon -- reflecting its status maybe?
196187
item.iconPath = new (ThemeIcon as any)('git-commit');
197188
item.description = '';
198-
item.detail = localize('git.timeline.detail', '{0} \u2014 {1}\n{2}\n\n{3}', you, localize('git.workingTree', 'Working Tree'), dateFormatter.format('MMMM Do, YYYY h:mma'), Resource.getStatusText(working.type));
189+
item.detail = localize('git.timeline.detail', '{0} \u2014 {1}\n{2}\n\n{3}', you, localize('git.workingTree', 'Working Tree'), dateFormatter.format(date), Resource.getStatusText(working.type));
199190
item.command = {
200191
title: 'Open Comparison',
201192
command: 'git.timeline.openDiff',

extensions/git/yarn.lock

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb"
2727
integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ==
2828

29-
"@types/node@^12.11.7":
30-
version "12.11.7"
31-
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.7.tgz#57682a9771a3f7b09c2497f28129a0462966524a"
32-
integrity sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==
29+
"@types/node@^12.12.31":
30+
version "12.12.31"
31+
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.31.tgz#d6b4f9645fee17f11319b508fb1001797425da51"
32+
integrity sha512-T+wnJno8uh27G9c+1T+a1/WYCHzLeDqtsGJkoEdSp2X8RTh3oOCZQcUnjAx90CS8cmmADX51O0FI/tu9s0yssg==
3333

3434
"@types/which@^1.0.28":
3535
version "1.0.28"
@@ -185,11 +185,6 @@ dashdash@^1.12.0:
185185
dependencies:
186186
assert-plus "^1.0.0"
187187

188-
dayjs@1.8.19:
189-
version "1.8.19"
190-
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.19.tgz#5117dc390d8f8e586d53891dbff3fa308f51abfe"
191-
integrity sha512-7kqOoj3oQSmqbvtvGFLU5iYqies+SqUiEGNT0UtUPPxcPYgY1BrkXR0Cq2R9HYSimBXN+xHkEN4Hi399W+Ovlg==
192-
193188
debug@2.6.8:
194189
version "2.6.8"
195190
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"

0 commit comments

Comments
 (0)