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"