From d0175a01649a14980a140e6a891ad3d9a0f621bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 00:47:23 +0800 Subject: [PATCH 1/4] chore(deps): bump ws from 8.8.0 to 8.17.1 (#579) Bumps [ws](https://github.com/websockets/ws) from 8.8.0 to 8.17.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.8.0...8.17.1) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index aa7df9d68..2d5ba4261 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4338,9 +4338,9 @@ wrappy@1: integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== ws@^8.4.2: - version "8.8.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769" - integrity sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== y18n@^5.0.5: version "5.0.8" From bafbc60e76114a8a2aff0078d9b2e161d9e6284c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 00:47:32 +0800 Subject: [PATCH 2/4] chore(deps): bump braces from 3.0.2 to 3.0.3 (#577) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2d5ba4261..d8ed03fc8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -821,11 +821,11 @@ brace-expansion@^1.1.7: concat-map "0.0.1" braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" browserslist@^4.14.5: version "4.21.5" @@ -1759,10 +1759,10 @@ file-loader@^6.2.0: loader-utils "^2.0.0" schema-utils "^3.0.0" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" From 16d9f3fca84a68ad5aa560a55ebc443018f9acbb Mon Sep 17 00:00:00 2001 From: netcon Date: Mon, 12 Aug 2024 14:57:40 +0800 Subject: [PATCH 3/4] chore: bump vscode to 1.92.1 (#580) --- .github/workflows/build.yml | 2 +- .github/workflows/test-wtih-vscode-build.yml | 4 +- package.json | 2 +- public/index.html | 2 +- vscode-web/.VERSION | 2 +- vscode-web/package.json | 2 +- vscode-web/scripts/.patch | 8 ++-- .../parts/activitybar/activitybarPart.ts | 43 ++++++------------- .../src/vs/workbench/browser/web.main.ts | 4 +- .../contrib/webview/browser/pre/index.html | 10 +++-- .../textfile/browser/textFileService.ts | 7 ++- yarn.lock | 8 ++-- 12 files changed, 41 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bab593222..911f783bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - node-version: [18.x] + node-version: [20.x] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test-wtih-vscode-build.yml b/.github/workflows/test-wtih-vscode-build.yml index f3bf9e120..8743f46e8 100644 --- a/.github/workflows/test-wtih-vscode-build.yml +++ b/.github/workflows/test-wtih-vscode-build.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - node-version: [18.16.0] + node-version: [20.16.0] runs-on: ${{ matrix.os }} @@ -35,7 +35,7 @@ jobs: restore-keys: | ${{ runner.os }}-yarn-${{ matrix.node-version }} - - run: sudo apt -y install libkrb5-dev + - run: sudo apt update && sudo apt install -y libkrb5-dev - run: yarn --frozen-lockfile - run: yarn build:vscode - run: yarn yalc && yarn build diff --git a/package.json b/package.json index 12ed7fd68..c8174b480 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "lib": "lib" }, "devDependencies": { - "@github1s/vscode-web": "0.20.0", + "@github1s/vscode-web": "0.21.0", "@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/parser": "^5.40.1", "chokidar": "^3.5.3", diff --git a/public/index.html b/public/index.html index 5c121b451..378a80339 100644 --- a/public/index.html +++ b/public/index.html @@ -35,7 +35,7 @@

You need to enable JavaScript to run this app.

<% if (devVscode) { %> <% } else { %> - + <% } %> diff --git a/vscode-web/.VERSION b/vscode-web/.VERSION index 6737000a1..82343d0bf 100644 --- a/vscode-web/.VERSION +++ b/vscode-web/.VERSION @@ -1 +1 @@ -1.89.1 \ No newline at end of file +1.92.1 \ No newline at end of file diff --git a/vscode-web/package.json b/vscode-web/package.json index 2090973d8..3e6af22da 100644 --- a/vscode-web/package.json +++ b/vscode-web/package.json @@ -1,6 +1,6 @@ { "name": "@github1s/vscode-web", - "version": "0.20.0", + "version": "0.21.0", "description": "VS Code web for GitHub1s", "author": "github1s", "license": "MIT", diff --git a/vscode-web/scripts/.patch b/vscode-web/scripts/.patch index dd9051f8d..4aabb8971 100644 --- a/vscode-web/scripts/.patch +++ b/vscode-web/scripts/.patch @@ -1,11 +1,11 @@ { "vs/code/browser/workbench/workbench.ts": "4d5caa66a9d8d5c862c4ee6a928c4e1cb7cc93fc481dc9c471245229be7323e1", - "vs/workbench/browser/parts/activitybar/activitybarPart.ts": "f1f646360d161b62ac857698cfe4f1e2f63107c86f8100f630c8d704f15049f5", + "vs/workbench/browser/parts/activitybar/activitybarPart.ts": "b07df66ce53deb7b5a27f7cb6ff0f538c9ea501feffd7d2088412b0cd5794d85", "vs/workbench/browser/parts/titlebar/media/titlebarpart.css": "253c6b6b1212d0ca80e1969959d3d09d0c1040f3bea3ad076f2708783bd14544", - "vs/workbench/browser/web.main.ts": "afc8cfaf89611b7c18b6087ad0fb4d5eeec1ef71bd035a8b0f88505af4953496", + "vs/workbench/browser/web.main.ts": "1d2b5be2afca548654bfcfa7e340128e194c35dda0c63fc69dd7d48f8c7d5303", "vs/workbench/contrib/files/browser/editors/fileEditorInput.ts": "86663454cc80d8fb63900ffd88f826ad971071976e54c2b9dfbbcab17bd6dc49", - "vs/workbench/contrib/webview/browser/pre/index.html": "7bcd1298e5cc21a5526e89954c09c225a33a22713f840a7aa172305b517d11d7", + "vs/workbench/contrib/webview/browser/pre/index.html": "1ed907f3e7e0dc14c9e0e45313b7edd5d4f80abb7d26607103ea1807aca0e0ff", "vs/workbench/services/extensionManagement/browser/builtinExtensionsScannerService.ts": "8cbb23b36f1e35436c0cd53b10f6ba2d3a51c92cee297d1fd956b9dcd6e33b1a", "vs/workbench/services/label/common/labelService.ts": "73237cce0f9496151ea8ae5079676bbdfa15ce49de9b05621d39fcd04e9c1f0d", - "vs/workbench/services/textfile/browser/textFileService.ts": "9d0831d6f49ad0ac8482a941e1b3b36b58e7a9db2fedc6e66ba94499719617e9" + "vs/workbench/services/textfile/browser/textFileService.ts": "ce29c4161401a02203832bd95b673012c9a183b715e3d30b19fdb03a312df34e" } \ No newline at end of file diff --git a/vscode-web/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/vscode-web/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index e22a65aba..00daa5e15 100644 --- a/vscode-web/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/vscode-web/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -389,10 +389,9 @@ export class ActivityBarCompositeBar extends PaneCompositeBar { } getActivityBarContextMenuActions(): IAction[] { - const activityBarPositionMenu = this.menuService.createMenu(MenuId.ActivityBarPositionMenu, this.contextKeyService); + const activityBarPositionMenu = this.menuService.getMenuActions(MenuId.ActivityBarPositionMenu, this.contextKeyService, { shouldForwardArgs: true, renderShortTitle: true }); const positionActions: IAction[] = []; - createAndFillInContextMenuActions(activityBarPositionMenu, { shouldForwardArgs: true, renderShortTitle: true }, { primary: [], secondary: positionActions }); - activityBarPositionMenu.dispose(); + createAndFillInContextMenuActions(activityBarPositionMenu, { primary: [], secondary: positionActions }); return [ new SubmenuAction('workbench.action.panel.position', localize('activity bar position', "Activity Bar Position"), positionActions), toAction({ id: ToggleSidebarPositionAction.ID, label: ToggleSidebarPositionAction.getLabel(this.layoutService), run: () => this.instantiationService.invokeFunction(accessor => new ToggleSidebarPositionAction().run(accessor)) }) @@ -640,42 +639,24 @@ registerThemingParticipant((theme, collector) => { const outline = theme.getColor(activeContrastBorder); if (outline) { collector.addRule(` - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:before { - content: ""; - position: absolute; - top: 8px; - left: 8px; - height: 32px; - width: 32px; - z-index: 1; + .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item .action-label::before{ + padding: 6px; } - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.profile-activity-item:before { - top: -6px; + .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active .action-label::before, + .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:hover .action-label::before, + .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .action-label::before, + .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:hover .action-label::before { + outline: 1px solid ${outline}; } - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:before, - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:hover:before, - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:before, - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:hover:before { - outline: 1px solid; - } - - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover:before { - outline: 1px dashed; + .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover .action-label::before { + outline: 1px dashed ${outline}; } .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator:before { border-left-color: ${outline}; } - - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:before, - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:hover:before, - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:before, - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:hover:before, - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover:before { - outline-color: ${outline}; - } `); } @@ -684,7 +665,7 @@ registerThemingParticipant((theme, collector) => { const focusBorderColor = theme.getColor(focusBorder); if (focusBorderColor) { collector.addRule(` - .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator:before { + .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator::before { border-left-color: ${focusBorderColor}; } `); diff --git a/vscode-web/src/vs/workbench/browser/web.main.ts b/vscode-web/src/vs/workbench/browser/web.main.ts index 6ba6c9ea2..3260c129f 100644 --- a/vscode-web/src/vs/workbench/browser/web.main.ts +++ b/vscode-web/src/vs/workbench/browser/web.main.ts @@ -177,7 +177,7 @@ export class BrowserMain extends Disposable { let logger: DelayedLogChannel | undefined = undefined; - return { + return { commands: { executeCommand: (command, ...args) => commandService.executeCommand(command, ...args) }, @@ -248,7 +248,7 @@ export class BrowserMain extends Disposable { } }, shutdown: () => lifecycleService.shutdown() - }; + } satisfies IWorkbench; }); } diff --git a/vscode-web/src/vs/workbench/contrib/webview/browser/pre/index.html b/vscode-web/src/vs/workbench/contrib/webview/browser/pre/index.html index fa3a9982e..166d79343 100644 --- a/vscode-web/src/vs/workbench/contrib/webview/browser/pre/index.html +++ b/vscode-web/src/vs/workbench/contrib/webview/browser/pre/index.html @@ -112,6 +112,10 @@ color: var(--vscode-textLink-foreground); } + p > a { + text-decoration: var(--text-link-decoration); + } + a:hover { color: var(--vscode-textLink-activeForeground); } @@ -945,7 +949,7 @@ const previousPendingFrame = getPendingFrame(); if (previousPendingFrame) { previousPendingFrame.setAttribute('id', ''); - document.body.removeChild(previousPendingFrame); + previousPendingFrame.remove(); } if (!wasFirstLoad) { pendingMessages = []; @@ -1042,9 +1046,7 @@ if (newFrame && newFrame.contentDocument && newFrame.contentDocument === contentDocument) { const wasFocused = document.hasFocus(); const oldActiveFrame = getActiveFrame(); - if (oldActiveFrame) { - document.body.removeChild(oldActiveFrame); - } + oldActiveFrame?.remove(); // Styles may have changed since we created the element. Make sure we re-style if (initialStyleVersion !== styleVersion) { applyStyles(newFrame.contentDocument, newFrame.contentDocument.body); diff --git a/vscode-web/src/vs/workbench/services/textfile/browser/textFileService.ts b/vscode-web/src/vs/workbench/services/textfile/browser/textFileService.ts index 629daadd2..fe53c92db 100644 --- a/vscode-web/src/vs/workbench/services/textfile/browser/textFileService.ts +++ b/vscode-web/src/vs/workbench/services/textfile/browser/textFileService.ts @@ -308,7 +308,12 @@ export abstract class AbstractTextFileService extends Disposable implements ITex // read through encoding library return toDecodeStream(stream, { acceptTextOnly: options?.acceptTextOnly ?? false, - guessEncoding: options?.autoGuessEncoding || this.textResourceConfigurationService.getValue(resource, 'files.autoGuessEncoding'), + guessEncoding: + options?.autoGuessEncoding || + this.textResourceConfigurationService.getValue(resource, 'files.autoGuessEncoding'), + candidateGuessEncodings: + options?.candidateGuessEncodings || + this.textResourceConfigurationService.getValue(resource, 'files.candidateGuessEncodings'), overwriteEncoding: async detectedEncoding => { const { encoding } = await this.encoding.getPreferredReadEncoding(resource, options, detectedEncoding ?? undefined); diff --git a/yarn.lock b/yarn.lock index d8ed03fc8..3ea743593 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,10 +31,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@github1s/vscode-web@0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@github1s/vscode-web/-/vscode-web-0.20.0.tgz#c4abf4166a1523e6e68d5e5c8a12d0054c3dbb5a" - integrity sha512-0ElKHfGQh2rvUp5Kc3Og9eCNIue/7A4k/UOnaK8HoypNi9J+tXeV/m2RCtFJk7cXCzfvlDfGehFHxNX0QN2+5A== +"@github1s/vscode-web@0.21.0": + version "0.21.0" + resolved "https://registry.yarnpkg.com/@github1s/vscode-web/-/vscode-web-0.21.0.tgz#1bbd8b7032b80617ad82c552e55942de295d8229" + integrity sha512-ggFCCS9u1iPuiNLFgvMCrB+cJegnHvnOIogbqKRj8tT8b7bU6NH7NP1IfWyfPlBPp7eXc/9mY6SG/1s/4l0HRw== dependencies: "@vscode/iconv-lite-umd" "0.7.0" "@vscode/vscode-languagedetection" "1.0.21" From 3c57ec48a0650d159e254824130c361f82f51074 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 18:35:40 +0800 Subject: [PATCH 4/4] chore(deps): bump braces in /api/gitlab-auth-callback (#581) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- api/gitlab-auth-callback/yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/api/gitlab-auth-callback/yarn.lock b/api/gitlab-auth-callback/yarn.lock index 52dfcb40d..c88ca58ce 100644 --- a/api/gitlab-auth-callback/yarn.lock +++ b/api/gitlab-auth-callback/yarn.lock @@ -348,11 +348,11 @@ brace-expansion@^1.1.7: concat-map "0.0.1" braces@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" cacheable-lookup@^5.0.3: version "5.0.4" @@ -649,10 +649,10 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1"