Skip to content

Commit b5c0483

Browse files
authored
Merge branch 'main' into main
2 parents ae7ecaf + f7dc254 commit b5c0483

32 files changed

+705
-810
lines changed

.devcontainer/devcontainer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye"
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12+
// "forwardPorts": [],
13+
14+
// Use 'postCreateCommand' to run commands after the container is created.
15+
// "postCreateCommand": "yarn install",
16+
17+
// Configure tool-specific properties.
18+
// "customizations": {},
19+
20+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21+
// "remoteUser": "root"
22+
}

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- Adds a _Refresh_ action to the _Commit Details_ view
12+
13+
### Fixed
14+
15+
- Fixes [#2850](https://github.com/gitkraken/vscode-gitlens/issues/2850) - For custom remotes, the URL resulting from the branches is truncated
16+
- Fixes [#2841](https://github.com/gitkraken/vscode-gitlens/issues/2841) - Error when trying to browse commits
17+
- Fixes [#2847](https://github.com/gitkraken/vscode-gitlens/issues/2847) - 14.2.0 Breaks "pull" action works fine in 14.1.1
18+
919
## [14.2.0] - 2023-08-04
1020

1121
### Added

ThirdPartyNotices.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ This project incorporates components from the projects listed below.
77
2. @microsoft/fast-react-wrapper version 0.3.18 (https://github.com/Microsoft/fast)
88
3. @octokit/core version 4.2.4 (https://github.com/octokit/core.js)
99
4. @opentelemetry/api version 1.4.1 (https://github.com/open-telemetry/opentelemetry-js)
10-
5. @opentelemetry/exporter-trace-otlp-http version 0.41.1 (https://github.com/open-telemetry/opentelemetry-js)
11-
6. @opentelemetry/sdk-trace-base version 1.15.1 (https://github.com/open-telemetry/opentelemetry-js)
10+
5. @opentelemetry/exporter-trace-otlp-http version 0.41.2 (https://github.com/open-telemetry/opentelemetry-js)
11+
6. @opentelemetry/sdk-trace-base version 1.15.2 (https://github.com/open-telemetry/opentelemetry-js)
1212
7. @vscode/codicons version 0.0.33 (https://github.com/microsoft/vscode-codicons)
1313
8. @vscode/webview-ui-toolkit version 1.2.2 (https://github.com/microsoft/vscode-webview-ui-toolkit)
1414
9. ansi-regex version 6.0.1 (https://github.com/chalk/ansi-regex)
15-
10. billboard.js version 3.9.1 (https://github.com/naver/billboard.js)
15+
10. billboard.js version 3.9.3 (https://github.com/naver/billboard.js)
1616
11. https-proxy-agent version 5.0.1 (https://github.com/TooTallNate/node-https-proxy-agent)
1717
12. iconv-lite version 0.6.3 (https://github.com/ashtuchkin/iconv-lite)
18-
13. lit version 2.7.6 (https://github.com/lit/lit)
18+
13. lit version 2.8.0 (https://github.com/lit/lit)
1919
14. microsoft/vscode (https://github.com/microsoft/vscode)
2020
15. node-fetch version 2.6.9 (https://github.com/bitinn/node-fetch)
2121
16. os-browserify version 0.3.0 (https://github.com/CoderPuppy/os-browserify)

package.json

Lines changed: 65 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -66,41 +66,41 @@
6666
"configuration": [
6767
{
6868
"id": "current-line-blame",
69-
"title": "Current Line Blame",
69+
"title": "Inline Blame",
7070
"order": 10,
7171
"properties": {
7272
"gitlens.currentLine.enabled": {
7373
"type": "boolean",
7474
"default": true,
75-
"markdownDescription": "Specifies whether to provide a blame annotation for the current line, by default. Use the `Toggle Line Blame Annotations` command (`gitlens.toggleLineBlame`) to toggle the annotations on and off for the current window",
75+
"markdownDescription": "Specifies whether to provide an inline blame annotation for the current line, by default. Use the `Toggle Line Blame Annotations` command (`gitlens.toggleLineBlame`) to toggle the annotations on and off for the current window",
7676
"scope": "window",
7777
"order": 10
7878
},
7979
"gitlens.currentLine.pullRequests.enabled": {
8080
"type": "boolean",
8181
"default": true,
82-
"markdownDescription": "Specifies whether to provide information about the Pull Request (if any) that introduced the commit in the current line blame annotation. Requires a connection to a supported remote service (e.g. GitHub)",
82+
"markdownDescription": "Specifies whether to provide information about the Pull Request (if any) that introduced the commit in the inline blame annotation. Requires a connection to a supported remote service (e.g. GitHub)",
8383
"scope": "window",
8484
"order": 20
8585
},
8686
"gitlens.currentLine.format": {
8787
"type": "string",
8888
"default": "${author, }${agoOrDate}${' via 'pullRequest}${ • message|50?}",
89-
"markdownDescription": "Specifies the format of the current line blame annotation. See [_Commit Tokens_](https://github.com/gitkraken/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs. Date formatting is controlled by the `#gitlens.currentLine.dateFormat#` setting",
89+
"markdownDescription": "Specifies the format of the inline blame annotation. See [_Commit Tokens_](https://github.com/gitkraken/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs. Date formatting is controlled by the `#gitlens.currentLine.dateFormat#` setting",
9090
"scope": "window",
9191
"order": 30
9292
},
9393
"gitlens.currentLine.uncommittedChangesFormat": {
9494
"type": "string",
9595
"default": null,
96-
"markdownDescription": "Specifies the uncommitted changes format of the current line blame annotation. See [_Commit Tokens_](https://github.com/gitkraken/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs. Date formatting is controlled by the `#gitlens.currentLine.dateFormat#` setting.\n\n**NOTE**: Setting this to an empty string will disable current line blame annotations for uncommitted changes.",
96+
"markdownDescription": "Specifies the uncommitted changes format of the inline blame annotation. See [_Commit Tokens_](https://github.com/gitkraken/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs. Date formatting is controlled by the `#gitlens.currentLine.dateFormat#` setting.\n\n**NOTE**: Setting this to an empty string will disable inline blame annotations for uncommitted changes.",
9797
"scope": "window",
9898
"order": 31
9999
},
100100
"gitlens.currentLine.scrollable": {
101101
"type": "boolean",
102102
"default": true,
103-
"markdownDescription": "Specifies whether the current line blame annotation can be scrolled into view when it is outside the viewport. **NOTE**: Setting this to `false` will inhibit the hovers from showing over the annotation; Set `#gitlens.hovers.currentLine.over#` to `line` to enable the hovers to show anywhere over the line.",
103+
"markdownDescription": "Specifies whether the inline blame annotation can be scrolled into view when it is outside the viewport. **NOTE**: Setting this to `false` will inhibit the hovers from showing over the annotation; Set `#gitlens.hovers.currentLine.over#` to `line` to enable the hovers to show anywhere over the line.",
104104
"scope": "window",
105105
"order": 40
106106
},
@@ -110,7 +110,7 @@
110110
"null"
111111
],
112112
"default": null,
113-
"markdownDescription": "Specifies how to format absolute dates (e.g. using the `${date}` token) for the current line blame annotation. See the [Moment.js docs](https://momentjs.com/docs/#/displaying/format/) for supported formats",
113+
"markdownDescription": "Specifies how to format absolute dates (e.g. using the `${date}` token) for the cinline blame annotation. See the [Moment.js docs](https://momentjs.com/docs/#/displaying/format/) for supported formats",
114114
"scope": "window",
115115
"order": 50
116116
}
@@ -3444,7 +3444,7 @@
34443444
},
34453445
"currentLine": {
34463446
"type": "boolean",
3447-
"description": "Specifies whether to show a blame annotation for the current line when this user-defined mode is active"
3447+
"description": "Specifies whether to show an inline blame annotation for the current line when this user-defined mode is active"
34483448
},
34493449
"hovers": {
34503450
"type": "boolean",
@@ -3477,7 +3477,7 @@
34773477
},
34783478
"currentLine": {
34793479
"type": "boolean",
3480-
"description": "Specifies whether to show a blame annotation for the current line when this user-defined mode is active"
3480+
"description": "Specifies whether to show an inline blame annotation for the current line when this user-defined mode is active"
34813481
},
34823482
"hovers": {
34833483
"type": "boolean",
@@ -3528,7 +3528,7 @@
35283528
},
35293529
"currentLine": {
35303530
"type": "boolean",
3531-
"description": "Specifies whether to show a blame annotation for the current line when this user-defined mode is active"
3531+
"description": "Specifies whether to show an inline blame annotation for the current line when this user-defined mode is active"
35323532
},
35333533
"hovers": {
35343534
"type": "boolean",
@@ -3831,6 +3831,13 @@
38313831
"scope": "window",
38323832
"order": 110
38333833
},
3834+
"gitlens.experimental.nativeGit": {
3835+
"type": "boolean",
3836+
"default": false,
3837+
"markdownDescription": "(Experimental) Specifies whether to use Git directly for fetch/push/pull operation instead of relying on VS Code's built-in Git implementation",
3838+
"scope": "window",
3839+
"order": 120
3840+
},
38343841
"gitlens.advanced.useSymmetricDifferenceNotation": {
38353842
"deprecationMessage": "Deprecated. This setting is no longer used",
38363843
"markdownDescription": "Deprecated. This setting is no longer used"
@@ -4017,7 +4024,7 @@
40174024
},
40184025
{
40194026
"id": "gitlens.trailingLineBackgroundColor",
4020-
"description": "Specifies the background color of the blame annotation for the current line",
4027+
"description": "Specifies the background color of the inline blame annotation for the current line",
40214028
"defaults": {
40224029
"dark": "#00000000",
40234030
"light": "#00000000",
@@ -4026,7 +4033,7 @@
40264033
},
40274034
{
40284035
"id": "gitlens.trailingLineForegroundColor",
4029-
"description": "Specifies the foreground color of the blame annotation for the current line",
4036+
"description": "Specifies the foreground color of the inline blame annotation for the current line",
40304037
"defaults": {
40314038
"dark": "#99999959",
40324039
"light": "#99999959",
@@ -6280,6 +6287,12 @@
62806287
"title": "Hide Branch Pull Requests",
62816288
"category": "GitLens"
62826289
},
6290+
{
6291+
"command": "gitlens.views.commitDetails.refresh",
6292+
"title": "Refresh",
6293+
"category": "GitLens",
6294+
"icon": "$(refresh)"
6295+
},
62836296
{
62846297
"command": "gitlens.views.commits.copy",
62856298
"title": "Copy",
@@ -6485,6 +6498,12 @@
64856498
"title": "Hide Avatars",
64866499
"category": "GitLens"
64876500
},
6501+
{
6502+
"command": "gitlens.views.graphDetails.refresh",
6503+
"title": "Refresh",
6504+
"category": "GitLens",
6505+
"icon": "$(refresh)"
6506+
},
64886507
{
64896508
"command": "gitlens.views.home.refresh",
64906509
"title": "Refresh",
@@ -9075,6 +9094,10 @@
90759094
"command": "gitlens.views.branches.setShowBranchPullRequestOff",
90769095
"when": "false"
90779096
},
9097+
{
9098+
"command": "gitlens.views.commitDetails.refresh",
9099+
"when": "false"
9100+
},
90789101
{
90799102
"command": "gitlens.views.commits.copy",
90809103
"when": "false"
@@ -9223,6 +9246,10 @@
92239246
"command": "gitlens.views.fileHistory.setShowAvatarsOff",
92249247
"when": "false"
92259248
},
9249+
{
9250+
"command": "gitlens.views.graphDetails.refresh",
9251+
"when": "false"
9252+
},
92269253
{
92279254
"command": "gitlens.views.home.refresh",
92289255
"when": "false"
@@ -10590,6 +10617,11 @@
1059010617
"when": "view =~ /^gitlens\\.views\\.commits/ && gitlens:plus:enabled",
1059110618
"group": "navigation@11"
1059210619
},
10620+
{
10621+
"command": "gitlens.views.commitDetails.refresh",
10622+
"when": "view =~ /^gitlens\\.views\\.commitDetails/",
10623+
"group": "navigation@99"
10624+
},
1059310625
{
1059410626
"command": "gitlens.views.commits.setMyCommitsOnlyOff",
1059510627
"when": "view =~ /^gitlens\\.views\\.commits/ && gitlens:views:commits:myCommitsOnly",
@@ -10785,6 +10817,11 @@
1078510817
"when": "view =~ /^gitlens\\.views\\.fileHistory/ && config.gitlens.views.fileHistory.avatars",
1078610818
"group": "5_gitlens@0"
1078710819
},
10820+
{
10821+
"command": "gitlens.views.graphDetails.refresh",
10822+
"when": "view =~ /^gitlens\\.views\\.graphDetails/",
10823+
"group": "navigation@99"
10824+
},
1078810825
{
1078910826
"command": "gitlens.views.home.refresh",
1079010827
"when": "view =~ /^gitlens\\.views\\.home/",
@@ -14714,21 +14751,21 @@
1471414751
"vscode:prepublish": "yarn run bundle"
1471514752
},
1471614753
"dependencies": {
14717-
"@gitkraken/gitkraken-components": "10.1.9",
14754+
"@gitkraken/gitkraken-components": "10.1.12",
1471814755
"@gitkraken/shared-web-components": "^0.1.1-rc.6",
1471914756
"@microsoft/fast-element": "1.12.0",
1472014757
"@microsoft/fast-react-wrapper": "0.3.18",
1472114758
"@octokit/core": "4.2.4",
1472214759
"@opentelemetry/api": "1.4.1",
14723-
"@opentelemetry/exporter-trace-otlp-http": "0.41.1",
14724-
"@opentelemetry/sdk-trace-base": "1.15.1",
14760+
"@opentelemetry/exporter-trace-otlp-http": "0.41.2",
14761+
"@opentelemetry/sdk-trace-base": "1.15.2",
1472514762
"@vscode/codicons": "0.0.33",
1472614763
"@vscode/webview-ui-toolkit": "1.2.2",
1472714764
"ansi-regex": "6.0.1",
14728-
"billboard.js": "3.9.1",
14765+
"billboard.js": "3.9.3",
1472914766
"https-proxy-agent": "5.0.1",
1473014767
"iconv-lite": "0.6.3",
14731-
"lit": "2.7.6",
14768+
"lit": "2.8.0",
1473214769
"node-fetch": "2.6.9",
1473314770
"os-browserify": "0.3.0",
1473414771
"path-browserify": "1.0.1",
@@ -14743,11 +14780,11 @@
1474314780
"@types/react-dom": "17.0.17",
1474414781
"@types/sortablejs": "1.15.1",
1474514782
"@types/vscode": "1.78.1",
14746-
"@typescript-eslint/eslint-plugin": "6.2.1",
14747-
"@typescript-eslint/parser": "6.2.1",
14783+
"@typescript-eslint/eslint-plugin": "6.3.0",
14784+
"@typescript-eslint/parser": "6.3.0",
1474814785
"@vscode/test-electron": "2.3.4",
1474914786
"@vscode/test-web": "0.0.44",
14750-
"@vscode/vsce": "2.20.0",
14787+
"@vscode/vsce": "2.20.1",
1475114788
"circular-dependency-plugin": "5.2.2",
1475214789
"clean-webpack-plugin": "4.0.0",
1475314790
"concurrently": "8.2.0",
@@ -14756,16 +14793,16 @@
1475614793
"css-loader": "6.8.1",
1475714794
"css-minimizer-webpack-plugin": "5.0.1",
1475814795
"cssnano-preset-advanced": "6.0.1",
14759-
"esbuild": "0.17.19",
14760-
"esbuild-loader": "3.0.1",
14796+
"esbuild": "0.19.0",
14797+
"esbuild-loader": "4.0.0",
1476114798
"esbuild-sass-plugin": "2.10.0",
1476214799
"eslint": "8.46.0",
1476314800
"eslint-cli": "1.1.1",
14764-
"eslint-config-prettier": "8.9.0",
14765-
"eslint-import-resolver-typescript": "3.5.5",
14801+
"eslint-config-prettier": "9.0.0",
14802+
"eslint-import-resolver-typescript": "3.6.0",
1476614803
"eslint-plugin-anti-trojan-source": "1.1.1",
1476714804
"eslint-plugin-import": "2.28.0",
14768-
"eslint-plugin-lit": "1.8.3",
14805+
"eslint-plugin-lit": "1.9.1",
1476914806
"eslint-plugin-wc": "1.5.0",
1477014807
"fantasticon": "1.2.3",
1477114808
"fork-ts-checker-webpack-plugin": "6.5.3",
@@ -14777,16 +14814,16 @@
1477714814
"lz-string": "1.5.0",
1477814815
"mini-css-extract-plugin": "2.7.6",
1477914816
"mocha": "10.2.0",
14780-
"prettier": "3.0.0",
14781-
"sass": "1.64.2",
14817+
"prettier": "3.0.1",
14818+
"sass": "1.65.0",
1478214819
"sass-loader": "13.3.2",
1478314820
"schema-utils": "4.2.0",
1478414821
"sharp": "0.32.4",
1478514822
"svgo": "3.0.2",
1478614823
"terser-webpack-plugin": "5.3.9",
1478714824
"ts-loader": "9.4.4",
1478814825
"tsc-alias": "1.8.7",
14789-
"typescript": "5.2.0-beta",
14826+
"typescript": "5.2.1-rc",
1479014827
"webpack": "5.88.2",
1479114828
"webpack-bundle-analyzer": "4.9.0",
1479214829
"webpack-cli": "5.1.4",

src/codelens/codeLensProvider.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { configuration } from '../system/configuration';
3131
import { is, once } from '../system/function';
3232
import { filterMap, find, first, join, map } from '../system/iterable';
3333
import { Logger } from '../system/logger';
34+
import { pluralize } from '../system/string';
3435
import { isVirtualUri } from '../system/utils';
3536

3637
class GitRecentChangeCodeLens extends CodeLens {
@@ -477,10 +478,10 @@ export class GitCodeLensProvider implements CodeLensProvider {
477478

478479
private resolveGitRecentChangeCodeLens(lens: GitRecentChangeCodeLens, _token: CancellationToken): CodeLens {
479480
const blame = lens.getBlame();
480-
if (blame == null) return lens;
481+
if (blame == null) return applyCommandWithNoClickAction('Unknown, (Blame failed)', lens);
481482

482483
const recentCommit = first(blame.commits.values());
483-
if (recentCommit == null) return lens;
484+
if (recentCommit == null) return applyCommandWithNoClickAction('Unknown, (Blame failed)', lens);
484485

485486
// TODO@eamodio This is FAR too expensive, but this accounts for commits that delete lines -- is there another way?
486487
// if (lens.uri != null) {
@@ -553,12 +554,12 @@ export class GitCodeLensProvider implements CodeLensProvider {
553554

554555
private resolveGitAuthorsCodeLens(lens: GitAuthorsCodeLens, _token: CancellationToken): CodeLens {
555556
const blame = lens.getBlame();
556-
if (blame == null) return lens;
557+
if (blame == null) return applyCommandWithNoClickAction('? authors (Blame failed)', lens);
557558

558559
const count = blame.authors.size;
559560
const author = first(blame.authors.values())?.name ?? 'Unknown';
560561

561-
let title = `${count} ${count > 1 ? 'authors' : 'author'} (${author}${count > 1 ? ' and others' : ''})`;
562+
let title = `${pluralize('author', count, { zero: '?' })} (${author}${count > 1 ? ' and others' : ''})`;
562563
if (configuration.get('debug')) {
563564
title += ` [${lens.languageId}: ${SymbolKind[lens.symbol.kind]}(${lens.range.start.character}-${
564565
lens.range.end.character
@@ -577,7 +578,7 @@ export class GitCodeLensProvider implements CodeLensProvider {
577578
}
578579

579580
const commit = find(blame.commits.values(), c => c.author.name === author) ?? first(blame.commits.values());
580-
if (commit == null) return lens;
581+
if (commit == null) return applyCommandWithNoClickAction(title, lens);
581582

582583
switch (lens.desiredCommand) {
583584
case CodeLensCommand.CopyRemoteCommitUrl:

0 commit comments

Comments
 (0)