Skip to content

Commit c916d99

Browse files
author
Tajudeen
committed
Merge latest VS Code stable (1.106.0) - preserving CortexIDE branding and custom code
2 parents fc2e057 + 6ced22d commit c916d99

4,550 files changed

Lines changed: 400394 additions & 105353 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.

.config/1espt/PipelineAutobaseliningConfig.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pipelines:
1212
lastModifiedDate: 2024-09-10
1313
armory:
1414
lastModifiedDate: 2024-09-10
15+
accessibilityinsights:
16+
lastModifiedDate: 2025-06-02
1517
binary:
1618
credscan:
1719
lastModifiedDate: 2025-02-04

.config/configuration.winget

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
2+
# Reference: https://github.com/microsoft/vscode/wiki/How-to-Contribute
3+
properties:
4+
resources:
5+
- resource: Microsoft.WinGet.DSC/WinGetPackage
6+
directives:
7+
description: Install Git
8+
# Requires elevation for the set operation (i.e., for installing the package)
9+
securityContext: elevated
10+
settings:
11+
id: Git.Git
12+
source: winget
13+
- resource: Microsoft.WinGet.DSC/WinGetPackage
14+
id: npm
15+
directives:
16+
description: Install NodeJS version 20
17+
# Requires elevation for the set operation (i.e., for installing the package)
18+
securityContext: elevated
19+
settings:
20+
id: OpenJS.NodeJS.LTS
21+
version: "20.14.0"
22+
source: winget
23+
- resource: Microsoft.WinGet.DSC/WinGetPackage
24+
directives:
25+
description: Install Python 3.10
26+
settings:
27+
id: Python.Python.3.10
28+
source: winget
29+
- resource: Microsoft.WinGet.DSC/WinGetPackage
30+
id: vsPackage
31+
directives:
32+
description: Install Visual Studio 2022 (any edition is OK)
33+
# Requires elevation for the set operation (i.e., for installing the package)
34+
securityContext: elevated
35+
settings:
36+
id: Microsoft.VisualStudio.2022.BuildTools
37+
source: winget
38+
- resource: Microsoft.VisualStudio.DSC/VSComponents
39+
dependsOn:
40+
- vsPackage
41+
directives:
42+
description: Install required VS workloads
43+
# Requires elevation for the get and set operations
44+
securityContext: elevated
45+
allowPrerelease: true
46+
settings:
47+
productId: Microsoft.VisualStudio.Product.BuildTools
48+
channelId: VisualStudio.17.Release
49+
includeRecommended: true
50+
components:
51+
- Microsoft.VisualStudio.Workload.VCTools
52+
- resource: NpmDsc/NpmInstall
53+
dependsOn:
54+
- npm
55+
directives:
56+
description: Install dependencies
57+
allowPrerelease: true
58+
settings:
59+
PackageDirectory: '${WinGetConfigRoot}\..\'
60+
configurationVersion: 0.2.0

.config/guardian/.gdnsuppress

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,68 @@
11
{
2-
"hydrated": false,
2+
"hydrated": true,
33
"properties": {
44
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/suppressions"
55
},
66
"version": "1.0.0",
77
"suppressionSets": {
88
"default": {
99
"name": "default",
10-
"createdDate": "2025-03-17 11:52:32Z",
11-
"lastUpdatedDate": "2025-03-17 11:52:32Z"
10+
"createdDate": "2025-01-28 06:29:05Z",
11+
"lastUpdatedDate": "2025-08-25 17:55:20Z"
1212
}
1313
},
1414
"results": {
15-
"216e2ac9cb596796224b47799f656570a01fa0d9b5f935608b47d15ab613c8e8": {
16-
"signature": "216e2ac9cb596796224b47799f656570a01fa0d9b5f935608b47d15ab613c8e8",
15+
"6216d3477ad4f56cb4ec316a9aaff02e9530a10d56469a4ef4063b8d02fe344b": {
16+
"signature": "6216d3477ad4f56cb4ec316a9aaff02e9530a10d56469a4ef4063b8d02fe344b",
1717
"alternativeSignatures": [
18-
"07746898f43afab7cc50931b33154c2d9e1a35f82a649dbe8aecf785b3d5a813"
18+
"46ad210995b2ff199f3bee5f271938a4251ed7a60058041ace1beaa53e36b51c"
1919
],
20+
"target": "file:///D:/a/_work/1/vscode-server-win32-x64/node.exe",
2021
"memberOf": [
2122
"default"
2223
],
23-
"createdDate": "2025-03-17 11:52:32Z"
24+
"tool": "binskim",
25+
"ruleId": "BA2008",
26+
"createdDate": "2025-08-25 17:54:06Z"
2427
},
25-
"77797a3e44634bb2994bd13ccc95ff4575bba474585dbd2cf3068a1c16bc0624": {
26-
"signature": "77797a3e44634bb2994bd13ccc95ff4575bba474585dbd2cf3068a1c16bc0624",
28+
"b8a4702fb4b855719e5e5033c3b629fbe6267d516ce8a18bd8f3be3b9962434b": {
29+
"signature": "b8a4702fb4b855719e5e5033c3b629fbe6267d516ce8a18bd8f3be3b9962434b",
2730
"alternativeSignatures": [
28-
"4a6cb67bd4b401e9669c13a2162660aaefc0a94a4122e5b50c198414db545672"
31+
"52d986be88f1c5696fc87d7794279d02f5084c645440e2dd2c3b5a2176b6bf52"
2932
],
33+
"target": "file:///D:/a/_work/1/vscode-server-win32-x64-web/node.exe",
3034
"memberOf": [
3135
"default"
3236
],
33-
"createdDate": "2025-03-17 11:52:32Z"
37+
"tool": "binskim",
38+
"ruleId": "BA2008",
39+
"createdDate": "2025-08-25 17:54:06Z"
3440
},
35-
"30418bcc5269eaeb2832a2404465784431d4e72a2af332320c2b1db4768902ad": {
36-
"signature": "30418bcc5269eaeb2832a2404465784431d4e72a2af332320c2b1db4768902ad",
41+
"4dbc45d0405de2e83d53f10227e36b2a9d15eceb2c5e6934da5c4a1bffbfad89": {
42+
"signature": "4dbc45d0405de2e83d53f10227e36b2a9d15eceb2c5e6934da5c4a1bffbfad89",
3743
"alternativeSignatures": [
38-
"b7b9eb974d7d3a4ae14df8695ca5a62592c8c9d20b7eda70a6535d50cbda3e7f"
44+
"b6bab85ba5e97bc4e6ff2e8a7913cb9f4f3346f7bda435d176e0b1e3cfb883cf"
3945
],
46+
"target": "file:///D:/a/_work/1/vscode-server-win32-arm64/node.exe",
4047
"memberOf": [
4148
"default"
4249
],
43-
"createdDate": "2025-03-17 11:52:32Z"
50+
"tool": "binskim",
51+
"ruleId": "BA2008",
52+
"createdDate": "2025-08-25 17:45:35Z"
53+
},
54+
"024ff37af329b63d2d9c83784cc071badf63b7729e3dd0969ab921d2f04d8e09": {
55+
"signature": "024ff37af329b63d2d9c83784cc071badf63b7729e3dd0969ab921d2f04d8e09",
56+
"alternativeSignatures": [
57+
"b46b7d6ed331f3e62eff23c57d3a074f76ef618f108929851065904200f5a572"
58+
],
59+
"target": "file:///D:/a/_work/1/vscode-server-win32-arm64-web/node.exe",
60+
"memberOf": [
61+
"default"
62+
],
63+
"tool": "binskim",
64+
"ruleId": "BA2008",
65+
"createdDate": "2025-08-25 17:45:35Z"
4466
}
4567
}
4668
}

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/typescript-node:20-bookworm
1+
FROM mcr.microsoft.com/devcontainers/typescript-node:22-bookworm
22

33
ADD install-vscode.sh /root/
44
RUN /root/install-vscode.sh

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Next, let's try debugging.
9999

100100
2. Go to your local VS Code client, and use the **Run / Debug** view to launch the **VS Code** configuration. (Typically the default, so you can likely just press <kbd>F5</kbd>).
101101

102-
> **Note:** If launching times out, you can increase the value of `timeout` in the "VS Code", "Attach Main Process", "Attach Extension Host", and "Attach to Shared Process" configurations in [launch.json](../../.vscode/launch.json). However, running `./scripts/code.sh` first will set up Electron which will usually solve timeout issues.
102+
> **Note:** If launching times out, you can increase the value of `timeout` in the "VS Code", "Attach Main Process", "Attach Extension Host", and "Attach to Shared Process" configurations in [launch.json](../.vscode/launch.json). However, running `./scripts/code.sh` first will set up Electron which will usually solve timeout issues.
103103
104104
3. After a bit, Code - OSS will appear with the debugger attached!
105105

.devcontainer/devcontainer-lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"integrity": "sha256:e7dc4d37ab9e3d6e7ebb221bac741f5bfe07dae47025399d038b17af2ed8ddb7"
77
},
88
"ghcr.io/devcontainers/features/rust:1": {
9-
"version": "1.1.3",
10-
"resolved": "ghcr.io/devcontainers/features/rust@sha256:aba6f47303b197976902bf544c786b5efecc03c238ff593583e5e74dfa9c7ccb",
11-
"integrity": "sha256:aba6f47303b197976902bf544c786b5efecc03c238ff593583e5e74dfa9c7ccb"
9+
"version": "1.3.3",
10+
"resolved": "ghcr.io/devcontainers/features/rust@sha256:2521a8eeb4911bfcb22557c8394870ea22eb790d8e52219ddc5182f62d388995",
11+
"integrity": "sha256:2521a8eeb4911bfcb22557c8394870ea22eb790d8e52219ddc5182f62d388995"
1212
}
1313
}
1414
}

.eslint-ignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
**/extensions/markdown-language-features/media/**
1111
**/extensions/markdown-language-features/notebook-out/**
1212
**/extensions/markdown-math/notebook-out/**
13+
**/extensions/mermaid-chat-features/chat-webview-out/**
1314
**/extensions/notebook-renderers/renderer-out/index.js
1415
**/extensions/simple-browser/media/index.js
1516
**/extensions/terminal-suggest/src/completions/upstream/**
@@ -24,9 +25,8 @@
2425
**/extensions/vscode-api-tests/testWorkspace2/**
2526
**/fixtures/**
2627
**/node_modules/**
27-
**/out-*/**/*.js
28-
**/out-editor-*/**
29-
**/out/**/*.js
28+
**/out/**
29+
**/out-*/**
3030
**/src/**/dompurify.js
3131
**/src/**/marked.js
3232
**/src/**/semver.js

.eslint-plugin-local/README.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Custom ESLint rules
2+
3+
We use a set of custom [ESLint](http://eslint.org) to enforce repo specific coding rules and styles. These custom rules are run in addition to many standard ESLint rules we enable in the project. Some example custom rules includes:
4+
5+
- Enforcing proper code layering
6+
- Preventing checking in of `test.only(...)`
7+
- Enforcing conventions in `vscode.d.ts`
8+
9+
Custom rules are mostly used for enforcing or banning certain coding patterns. We tend to leave stylistic choices up to area owners unless there's a good reason to enforce something project wide.
10+
11+
This doc provides a brief overview of how these rules are setup and how you can add a new one.
12+
13+
# Resources
14+
- [ESLint rules](https://eslint.org/docs/latest/extend/custom-rules) — General documentation about writing eslint rules
15+
- [TypeScript ASTs and eslint](https://typescript-eslint.io/blog/asts-and-typescript-eslint/) — Look at how ESLint works with TS programs
16+
- [ESTree selectors](https://eslint.org/docs/latest/extend/selectors) — Info about the selector syntax rules use to target specific nodes in an AST. Works similarly to css selectors.
17+
- [TypeScript ESLint playground](https://typescript-eslint.io/play/#showAST=es) — Useful tool for figuring out the structure of TS programs and debugging custom rule selectors
18+
19+
20+
# Custom Rule Configuration
21+
22+
Custom rules are defined in the `.eslint-plugin-local` folder. Each rule is defined in its own TypeScript file. These follow the naming convention:
23+
24+
- `code-RULE-NAME.ts` — General rules that apply to the entire repo.
25+
- `vscode-dts-RULE-NAME.ts` — Rules that apply just to `vscode.d.ts`.
26+
27+
These rules are then enabled in the `eslint.config.js` file. This is the main eslint configuration for our repo. It defines a set of file scopes which rules should apply to files in those scopes.
28+
29+
For example, here's a configuration that enables the no `test.only` rule in all `*.test.ts` files in the VS Code repo:
30+
31+
```ts
32+
{
33+
// Define which files these rules apply to
34+
files: [
35+
'**/*.test.ts'
36+
],
37+
languageOptions: { parser: tseslint.parser, },
38+
plugins: {
39+
'local': pluginLocal,
40+
},
41+
rules: {
42+
// Enable the rule from .eslint-plugin-local/code-no-test-only.ts
43+
'local/code-no-test-only': 'error',
44+
}
45+
}
46+
```
47+
48+
# Creating a new custom rule
49+
This walks through the steps to create a new eslint rule:
50+
51+
1. Create a new rule file under `.eslint-plugin-local`. Generally you should call it `code-YOUR-RULE-NAME.ts`, for example, `.eslint-plugin-local/code-no-not-null-assertions-on-undefined-values.ts`
52+
53+
2. In this file, add the rule. Here's a template:
54+
55+
```ts
56+
/*---------------------------------------------------------------------------------------------
57+
* Copyright (c) Microsoft Corporation. All rights reserved.
58+
* Licensed under the MIT License. See License.txt in the project root for license information.
59+
*--------------------------------------------------------------------------------------------*/
60+
61+
import * as eslint from 'eslint';
62+
63+
export = new class YourRuleName implements eslint.Rule.RuleModule {
64+
65+
readonly meta: eslint.Rule.RuleMetaData = {
66+
messages: {
67+
customMessageName: 'message text shown in errors/warnings',
68+
},
69+
schema: false,
70+
};
71+
72+
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
73+
return {
74+
[SELECTOR]: (node: any) => {
75+
// Report errors if needed
76+
return context.report({
77+
node,
78+
messageId: 'customMessageName'
79+
});
80+
}
81+
};
82+
}
83+
};
84+
```
85+
86+
- Update the name of the class to match the name of your rule
87+
- Add message entries for any errors you want to report
88+
- Update `SELECTOR` with the [ESTree selector](https://eslint.org/docs/latest/extend/selectors) needed to target the nodes you are interested in. Use the [TypeScript ESLint playground](https://typescript-eslint.io/play/#showAST=es) to figure out which nodes you need and debug selectors
89+
90+
3. Register the rule in `eslint.config.js`
91+
92+
Generally this is just turning on the rule in the rule list like so:
93+
94+
```js
95+
rules: {
96+
// Name should match file name
97+
'local/code-no-not-null-assertions-on-undefined-values': 'warn',
98+
...
99+
}
100+
```
101+
102+
Rules can also take custom arguments. For example, here's how we can pass arguments to a custom rule in the `eslint.config.js`:
103+
104+
```
105+
rules: {
106+
'local/code-no-not-null-assertions-on-undefined-values': ['warn', { testsOk: true }],
107+
...
108+
}
109+
```
110+
111+
In these cases make sure to update the `meta.schema` property on your rule with the JSON schema for the arguments. You can access these arguments using `context.options` in the rule `create` function
112+
113+
114+
## Adding fixes to custom rules
115+
Fixes are a useful way to mechanically fix basic linting issues, such as auto inserting semicolons. These fixes typically work at the AST level, so they are a more reliable way to perform bulk fixes compared to find/replaces.
116+
117+
To add a fix for a custom rule:
118+
119+
1. On the `meta` for your rule, add `fixable: 'code'`
120+
121+
2. When reporting an error in the rule, also include a `fix`. This is a function that takes a `fixer` argument and returns one or more fixes.
122+
123+
See the [Double quoted to single quoted string covert fix](https://github.com/microsoft/vscode/blob/b074375e1884ae01033967bf0bbceeaa4795354a/.eslint-plugin-local/code-no-unexternalized-strings.ts#L128) for an example. The ESLint docs also have [details on adding fixes and the fixer api](https://eslint.org/docs/latest/extend/custom-rules#applying-fixes)
124+
125+
The fixes can be run using `npx eslint --fix` in the VS Code repo

.eslint-plugin-local/code-amd-node-module.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as eslint from 'eslint';
7+
import type * as ESTree from 'estree';
8+
import { readFileSync } from 'fs';
79
import { join } from 'path';
810

911

10-
export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
12+
export default new class ApiProviderNaming implements eslint.Rule.RuleModule {
1113

1214
readonly meta: eslint.Rule.RuleMetaData = {
1315
messages: {
@@ -21,7 +23,8 @@ export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
2123
const modules = new Set<string>();
2224

2325
try {
24-
const { dependencies, optionalDependencies } = require(join(__dirname, '../package.json'));
26+
const packageJson = JSON.parse(readFileSync(join(import.meta.dirname, '../package.json'), 'utf-8'));
27+
const { dependencies, optionalDependencies } = packageJson;
2528
const all = Object.keys(dependencies).concat(Object.keys(optionalDependencies));
2629
for (const key of all) {
2730
modules.add(key);
@@ -33,13 +36,13 @@ export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
3336
}
3437

3538

36-
const checkImport = (node: any) => {
39+
const checkImport = (node: ESTree.Literal & { parent?: ESTree.Node & { importKind?: string } }) => {
3740

38-
if (node.type !== 'Literal' || typeof node.value !== 'string') {
41+
if (typeof node.value !== 'string') {
3942
return;
4043
}
4144

42-
if (node.parent.importKind === 'type') {
45+
if (node.parent?.type === 'ImportDeclaration' && node.parent.importKind === 'type') {
4346
return;
4447
}
4548

.eslint-plugin-local/code-declare-service-brand.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as eslint from 'eslint';
7+
import type * as ESTree from 'estree';
78

8-
export = new class DeclareServiceBrand implements eslint.Rule.RuleModule {
9+
export default new class DeclareServiceBrand implements eslint.Rule.RuleModule {
910

1011
readonly meta: eslint.Rule.RuleMetaData = {
1112
fixable: 'code',
@@ -14,7 +15,7 @@ export = new class DeclareServiceBrand implements eslint.Rule.RuleModule {
1415

1516
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
1617
return {
17-
['PropertyDefinition[key.name="_serviceBrand"][value]']: (node: any) => {
18+
['PropertyDefinition[key.name="_serviceBrand"][value]']: (node: ESTree.PropertyDefinition) => {
1819
return context.report({
1920
node,
2021
message: `The '_serviceBrand'-property should not have a value`,

0 commit comments

Comments
 (0)