Skip to content

Commit feda9df

Browse files
authored
Merge branch 'main' into dev/mjbvz/bump-katex
2 parents 0ba5249 + ea66f72 commit feda9df

File tree

27 files changed

+340
-107
lines changed

27 files changed

+340
-107
lines changed

.eslint-plugin-local/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5+
// @ts-check
56
const glob = require('glob');
67
const path = require('path');
78

89
require('ts-node').register({ experimentalResolver: true, transpileOnly: true });
910

1011
// Re-export all .ts files as rules
12+
/** @type {Record<string, import('@typescript-eslint/utils/dist/ts-eslint').LooseRuleDefinition>} */
1113
const rules = {};
1214
glob.sync(`${__dirname}/*.ts`).forEach((file) => {
1315
rules[path.basename(file, '.ts')] = require(file);

.github/workflows/pr-darwin-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
VSCODE_ARCH: ${{ env.VSCODE_ARCH }}
6969
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
7070
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
7272
# Avoid using dlopen to load Kerberos on macOS which can cause missing libraries
7373
# https://github.com/mongodb-js/kerberos/commit/04044d2814ad1d01e77f1ce87f26b03d86692cf2
7474
# flipped the default to support legacy linux distros which shouldn't happen
@@ -100,7 +100,7 @@ jobs:
100100
if: steps.cache-builtin-extensions.outputs.cache-hit != 'true'
101101
run: node build/lib/builtInExtensions.js
102102
env:
103-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
104104

105105
- name: Transpile client and extensions
106106
run: npm run gulp transpile-client-esbuild transpile-extensions
@@ -124,7 +124,7 @@ jobs:
124124
sleep 5 # optional: add a small delay between retries
125125
done
126126
env:
127-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
127+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
128128

129129
- name: 🧪 Run unit tests (Electron)
130130
if: ${{ inputs.electron_tests }}

.github/workflows/pr-linux-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
echo "Npm install failed $i, trying again..."
8080
done
8181
env:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
8383

8484
- name: Install dependencies
8585
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@@ -101,7 +101,7 @@ jobs:
101101
VSCODE_ARCH: ${{ env.VSCODE_ARCH }}
102102
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
103103
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
104-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
105105

106106
- name: Create node_modules archive
107107
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@@ -128,7 +128,7 @@ jobs:
128128
if: steps.cache-builtin-extensions.outputs.cache-hit != 'true'
129129
run: node build/lib/builtInExtensions.js
130130
env:
131-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
132132

133133
- name: Transpile client and extensions
134134
run: npm run gulp transpile-client-esbuild transpile-extensions
@@ -152,7 +152,7 @@ jobs:
152152
sleep 5 # optional: add a small delay between retries
153153
done
154154
env:
155-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
155+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
156156

157157
- name: 🧪 Run unit tests (Electron)
158158
if: ${{ inputs.electron_tests }}

.github/workflows/pr-node-modules.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
env:
5353
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
5454
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
GITHUB_TOKEN: ${{ secrets.VSCODE_OSS }}
5656

5757
- name: Create node_modules archive
5858
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@@ -79,7 +79,7 @@ jobs:
7979
if: steps.cache-builtin-extensions.outputs.cache-hit != 'true'
8080
run: node build/lib/builtInExtensions.js
8181
env:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
GITHUB_TOKEN: ${{ secrets.VSCODE_OSS }}
8383

8484
linux:
8585
name: Linux
@@ -123,7 +123,7 @@ jobs:
123123
echo "Npm install failed $i, trying again..."
124124
done
125125
env:
126-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126+
GITHUB_TOKEN: ${{ secrets.VSCODE_OSS }}
127127

128128
- name: Install dependencies
129129
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@@ -145,7 +145,7 @@ jobs:
145145
VSCODE_ARCH: ${{ env.VSCODE_ARCH }}
146146
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
147147
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
148-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148+
GITHUB_TOKEN: ${{ secrets.VSCODE_OSS }}
149149

150150
- name: Create node_modules archive
151151
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@@ -203,7 +203,7 @@ jobs:
203203
VSCODE_ARCH: ${{ env.VSCODE_ARCH }}
204204
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
205205
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
206-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
206+
GITHUB_TOKEN: ${{ secrets.VSCODE_OSS }}
207207
# Avoid using dlopen to load Kerberos on macOS which can cause missing libraries
208208
# https://github.com/mongodb-js/kerberos/commit/04044d2814ad1d01e77f1ce87f26b03d86692cf2
209209
# flipped the default to support legacy linux distros which shouldn't happen
@@ -275,7 +275,7 @@ jobs:
275275
VSCODE_ARCH: ${{ env.VSCODE_ARCH }}
276276
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
277277
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
278-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
278+
GITHUB_TOKEN: ${{ secrets.VSCODE_OSS }}
279279

280280
- name: Create node_modules archive
281281
if: steps.node-modules-cache.outputs.cache-hit != 'true'

.github/workflows/pr-win32-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
VSCODE_ARCH: ${{ env.VSCODE_ARCH }}
7979
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
8080
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
81-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
8282

8383
- name: Create node_modules archive
8484
if: steps.node-modules-cache.outputs.cache-hit != 'true'
@@ -109,7 +109,7 @@ jobs:
109109
if: steps.cache-builtin-extensions.outputs.cache-hit != 'true'
110110
run: node build/lib/builtInExtensions.js
111111
env:
112-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
113113

114114
- name: Transpile client and extensions
115115
shell: pwsh
@@ -133,7 +133,7 @@ jobs:
133133
}
134134
}
135135
env:
136-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
137137

138138
- name: 🧪 Run unit tests (Electron)
139139
if: ${{ inputs.electron_tests }}

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
env:
6565
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
6666
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
67-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
6868

6969
- name: Create node_modules archive
7070
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@@ -84,7 +84,7 @@ jobs:
8484
- name: Compile & Hygiene
8585
run: npm exec -- npm-run-all -lp core-ci-pr extensions-ci-pr hygiene eslint valid-layers-check define-class-fields-check vscode-dts-compile-check tsec-compile-check
8686
env:
87-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
GITHUB_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.VSCODE_OSS || secrets.GITHUB_TOKEN }}
8888

8989
linux-cli-tests:
9090
name: Linux

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ vscode.db
2020
/cli/openssl
2121
product.overrides.json
2222
*.snap.actual
23+
*.tsbuildinfo
2324
.vscode-test

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import tseslint from 'typescript-eslint';
99
import { fileURLToPath } from 'url';
1010

1111
import stylisticTs from '@stylistic/eslint-plugin-ts';
12-
import pluginLocal from 'eslint-plugin-local';
12+
import * as pluginLocal from './.eslint-plugin-local/index.js';
1313
import pluginJsdoc from 'eslint-plugin-jsdoc';
1414

1515
import pluginHeader from 'eslint-plugin-header';

extensions/terminal-suggest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"main": "./out/terminalSuggestMain",
2727
"activationEvents": [
28-
"onTerminalCompletionsRequested"
28+
"onTerminalShellIntegration:*"
2929
],
3030
"repository": {
3131
"type": "git",

extensions/terminal-suggest/src/fig/figInterface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ export async function getFigSuggestions(
8383
: availableCommands.filter(command => specLabel === (command.definitionCommand ?? (typeof command.label === 'string' ? command.label : command.label.label))));
8484
if (
8585
!(osIsWindows()
86-
? commandAndAliases.some(e => currentCommand.startsWith(removeAnyFileExtension((typeof e.label === 'string' ? e.label : e.label.label))))
87-
: commandAndAliases.some(e => currentCommand.startsWith(typeof e.label === 'string' ? e.label : e.label.label)))
86+
? commandAndAliases.some(e => currentCommand === (removeAnyFileExtension((typeof e.label === 'string' ? e.label : e.label.label))))
87+
: commandAndAliases.some(e => currentCommand === (typeof e.label === 'string' ? e.label : e.label.label)))
8888
) {
8989
continue;
9090
}

0 commit comments

Comments
 (0)