Skip to content

Commit dff8892

Browse files
committed
Merge branch 'main' into aiday/contentShowOnFocus
2 parents 7a5f6f0 + 2f1013a commit dff8892

File tree

607 files changed

+11657
-6246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

607 files changed

+11657
-6246
lines changed

.eslintplugin/code-amd-node-module.ts

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as eslint from 'eslint';
7+
import { join } from 'path';
8+
9+
10+
export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
11+
12+
readonly meta: eslint.Rule.RuleMetaData = {
13+
messages: {
14+
amdX: 'Use `import type` for import declarations, use `amdX#importAMDNodeModule` for import expressions'
15+
}
16+
};
17+
18+
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
19+
20+
const modules = new Set<string>();
21+
22+
try {
23+
const { dependencies, optionalDependencies } = require(join(__dirname, '../package.json'));
24+
const all = Object.keys(dependencies).concat(Object.keys(optionalDependencies));
25+
for (const key of all) {
26+
modules.add(key);
27+
}
28+
29+
} catch (e) {
30+
console.error(e);
31+
throw e;
32+
}
33+
34+
35+
const checkImport = (node: any) => {
36+
37+
if (node.type !== 'Literal' || typeof node.value !== 'string') {
38+
return;
39+
}
40+
41+
if (node.parent.importKind === 'type') {
42+
return;
43+
}
44+
45+
if (!modules.has(node.value)) {
46+
return;
47+
}
48+
49+
context.report({
50+
node,
51+
messageId: 'amdX'
52+
});
53+
}
54+
55+
return {
56+
['ImportExpression Literal']: checkImport,
57+
['ImportDeclaration Literal']: checkImport
58+
};
59+
}
60+
};

.eslintplugin/code-import-patterns.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@ export = new class implements eslint.Rule.RuleModule {
180180
const restrictions = (typeof option.restrictions === 'string' ? [option.restrictions] : option.restrictions).slice(0);
181181

182182
if (targetIsVS) {
183-
// Always add "vs/nls"
183+
// Always add "vs/nls" and "vs/amdX"
184184
restrictions.push('vs/nls');
185+
restrictions.push('vs/amdX'); // TODO@jrieken remove after ESM is real
185186
}
186187

187188
if (targetIsVS && option.layer) {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as eslint from 'eslint';
7+
8+
export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
9+
10+
readonly meta: eslint.Rule.RuleMetaData = {
11+
messages: {
12+
slow: 'Native private fields are much slower and should only be used when needed. Ignore this warning if you know what you are doing, use compile-time private otherwise. See https://github.com/microsoft/vscode/issues/185991#issuecomment-1614468158 for details',
13+
}
14+
};
15+
16+
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
17+
18+
return {
19+
['PropertyDefinition PrivateIdentifier']: (node: any) => {
20+
context.report({
21+
node,
22+
messageId: 'slow'
23+
});
24+
},
25+
['MethodDefinition PrivateIdentifier']: (node: any) => {
26+
context.report({
27+
node,
28+
messageId: 'slow'
29+
});
30+
}
31+
};
32+
}
33+
};

.eslintrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
}
7070
],
7171
"local/code-translation-remind": "warn",
72+
"local/code-no-native-private": "warn",
7273
"local/code-no-nls-in-standalone-editor": "warn",
7374
"local/code-no-standalone-editor": "warn",
7475
"local/code-no-unexternalized-strings": "warn",
@@ -193,6 +194,14 @@
193194
]
194195
}
195196
},
197+
{
198+
"files": [
199+
"src/**/{common,browser}/**/*.ts"
200+
],
201+
"rules": {
202+
"local/code-amd-node-module": "warn"
203+
}
204+
},
196205
{
197206
"files": [
198207
"src/**/*.ts"
@@ -595,6 +604,12 @@
595604
"vs/workbench/workbench.common.main"
596605
]
597606
},
607+
{
608+
"target": "src/vs/amdX.ts",
609+
"restrictions": [
610+
"vs/base/common/*"
611+
]
612+
},
598613
{
599614
"target": "src/vs/workbench/{workbench.desktop.main.nls.js,workbench.web.main.nls.js}",
600615
"restrictions": []

.github/commands.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
"action": "updateLabels",
216216
"addLabel": "info-needed",
217217
"removeLabel": "~confirmation-needed",
218-
"comment": "Please perform the following **three tasks** to diagnose the root cause of the issue:\n\n* [ ] **1.) Disable Extensions**\n * Select `View` and pick `Command Palette...`\n * Run `Developer: Reload With Extensions Disabled`\n * 👉 See if the issue reproduces\n\n* [ ] **2.) Disable Configuration**\n * Select `View` and pick `Command Palette...`\n * Run `Profiles: Create a Temporary Profile`\n * 👉 See if the issue reproduces\n\n* [ ] **3.) Try VS Code Insiders**\n * Download [VS Code Insiders](https://code.visualstudio.com/insiders/)\n * Install and Run it\n * 👉 See if the issue reproduces\n \nThen pick one of the three resolutions depending on which step has helped:\n\n<details>\n <summary>Disabling my Extensions helped</summary>\n\nPlease run the command `Start Extension Bisect` and follow the instructions to find the extension that is causing this issue.\n\n<img width='631' alt='image' src='https://user-images.githubusercontent.com/900690/228760008-d5790ad1-74da-46a2-917f-e1bd26281ca8.png'>\n\nPlease report the issue to the extension causing this.\n</details>\n\n<details>\n <summary>Disabling my configuration helped</summary>\nPlease report back more details about your configuration, including settings.\n</details>\n\n<details>\n <summary>Using VS Code Insiders has helped</summary>\n✅ This likely means that the issue has been addressed already and will be available in an upcoming release. You can safely use VS Code Insiders until the new stable version is available.\n</details>"
218+
"comment": "Please diagnose the root cause of the issue by running the command `F1 > Help: Troubleshoot Issue` and following the instructions. Once you have done that, please update the issue with the results.\n\nHappy Coding!"
219219
},
220220
{
221221
"type": "comment",

.github/commands/codespaces_issue.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Learn more about the syntax here:
2+
# https://docs.github.com/en/early-access/github/save-time-with-slash-commands/syntax-for-user-defined-slash-commands
3+
---
4+
trigger: codespaces_issue
5+
title: Codespaces Issue
6+
description: Report downstream
7+
8+
steps:
9+
- type: fill
10+
template: |-
11+
This looks like an issue with the Codespaces service which we don't track in this repository. You can report this to the Codespaces team at https://github.com/orgs/community/discussions/categories/codespaces

.github/workflows/no-yarn-lock-changes.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
- name: Get file changes
2525
uses: trilom/file-changes-action@ce38c8ce2459ca3c303415eec8cb0409857b4272
2626
if: ${{ steps.control.outputs.should_run == 'true' }}
27-
- name: Check for yarn.lock changes
27+
- name: Check for lockfile changes
2828
if: ${{ steps.control.outputs.should_run == 'true' }}
2929
run: |
30-
cat $HOME/files.json | jq -e 'any(test("yarn\\.lock$")) | not' \
31-
|| (echo "Changes to yarn.lock files aren't allowed in PRs." && exit 1)
30+
cat $HOME/files.json | jq -e 'any(test("yarn\\.lock$|Cargo\\.lock$")) | not' \
31+
|| (echo "Changes to yarn.lock/Cargo.lock files aren't allowed in PRs." && exit 1)

.vscode/notebooks/api.github-issues

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"kind": 2,
99
"language": "github-issues",
10-
"value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"June 2023\""
10+
"value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"July 2023\""
1111
},
1212
{
1313
"kind": 1,

.vscode/notebooks/endgame.github-issues

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"kind": 2,
99
"language": "github-issues",
10-
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels\n\n$MILESTONE=milestone:\"June 2023\""
10+
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels\n\n$MILESTONE=milestone:\"July 2023\""
1111
},
1212
{
1313
"kind": 1,

.vscode/notebooks/my-endgame.github-issues

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"kind": 2,
99
"language": "github-issues",
10-
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels\n\n$MILESTONE=milestone:\"June 2023\"\n\n$MINE=assignee:@me"
10+
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels\n\n$MILESTONE=milestone:\"July 2023\"\n\n$MINE=assignee:@me"
1111
},
1212
{
1313
"kind": 1,

0 commit comments

Comments
 (0)