Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit ce59706

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 8e189d3 + 08baa8a commit ce59706

File tree

566 files changed

+6406
-13092
lines changed

Some content is hidden

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

566 files changed

+6406
-13092
lines changed

.devcontainer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you already have VS Code and Docker installed, you can click the badge above
1818
1919
3. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Dev Containers](https://aka.ms/vscode-remote/download/containers) extension.
2020

21-
![Image of Dev Containers extension](https://microsoft.github.io/vscode-remote-release/images/remote-containers-extn.png)
21+
![Image of Dev Containers extension](https://microsoft.github.io/vscode-remote-release/images/dev-containers-extn.png)
2222

2323
> **Note:** The Dev Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details.
2424
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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 DeclareServiceBrand implements eslint.Rule.RuleModule {
9+
10+
readonly meta: eslint.Rule.RuleMetaData = {
11+
fixable: 'code'
12+
};
13+
14+
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
15+
return {
16+
['PropertyDefinition[key.name="_serviceBrand"][value]']: (node: any) => {
17+
return context.report({
18+
node,
19+
message: `The '_serviceBrand'-property should not have a value`,
20+
fix: (fixer) => {
21+
return fixer.replaceText(node, 'declare _serviceBrand: undefined;')
22+
}
23+
});
24+
}
25+
};
26+
}
27+
};

.eslintplugin/code-no-unexternalized-strings.ts

+30
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,27 @@ export = new class NoUnexternalizedStrings implements eslint.Rule.RuleModule {
8585
}
8686
}
8787

88+
function visitL10NCall(node: TSESTree.CallExpression) {
89+
90+
// localize(key, message)
91+
const [messageNode] = (<TSESTree.CallExpression>node).arguments;
92+
93+
// remove message-argument from doubleQuoted list and make
94+
// sure it is a string-literal
95+
if (isStringLiteral(messageNode)) {
96+
doubleQuotedStringLiterals.delete(messageNode);
97+
} else if (messageNode.type === AST_NODE_TYPES.ObjectExpression) {
98+
for (const prop of messageNode.properties) {
99+
if (prop.type === AST_NODE_TYPES.Property) {
100+
if (prop.key.type === AST_NODE_TYPES.Identifier && prop.key.name === 'message') {
101+
doubleQuotedStringLiterals.delete(prop.value);
102+
break;
103+
}
104+
}
105+
}
106+
}
107+
}
108+
88109
function reportBadStringsAndBadKeys() {
89110
// (1)
90111
// report all strings that are in double quotes
@@ -117,7 +138,16 @@ export = new class NoUnexternalizedStrings implements eslint.Rule.RuleModule {
117138
return {
118139
['Literal']: (node: any) => collectDoubleQuotedStrings(node),
119140
['ExpressionStatement[directive] Literal:exit']: (node: any) => doubleQuotedStringLiterals.delete(node),
141+
142+
// localize(...)
120143
['CallExpression[callee.type="MemberExpression"][callee.object.name="nls"][callee.property.name="localize"]:exit']: (node: any) => visitLocalizeCall(node),
144+
145+
// vscode.l10n.t(...)
146+
['CallExpression[callee.type="MemberExpression"][callee.object.property.name="l10n"][callee.property.name="t"]:exit']: (node: any) => visitL10NCall(node),
147+
148+
// l10n.t(...)
149+
['CallExpression[callee.object.name="l10n"][callee.property.name="t"]:exit']: (node: any) => visitL10NCall(node),
150+
121151
['CallExpression[callee.name="localize"][arguments.length>=2]:exit']: (node: any) => visitLocalizeCall(node),
122152
['Program:exit']: reportBadStringsAndBadKeys,
123153
};

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"local/code-no-nls-in-standalone-editor": "warn",
7373
"local/code-no-standalone-editor": "warn",
7474
"local/code-no-unexternalized-strings": "warn",
75+
"local/code-declare-service-brand": "warn",
7576
"local/code-layering": [
7677
"warn",
7778
{
@@ -331,7 +332,7 @@
331332
"vs/base/parts/*/~",
332333
"vs/platform/*/~",
333334
"tas-client-umd", // node module allowed even in /common/
334-
"@microsoft/1ds-core-js",// node module allowed even in /common/
335+
"@microsoft/1ds-core-js", // node module allowed even in /common/
335336
"@microsoft/1ds-post-js" // node module allowed even in /common/
336337
]
337338
},

.github/classifier.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"labels": {
88
"L10N": {"assign": ["TylerLeonhardt", "csigs"]},
99
"VIM": {"assign": []},
10-
"accessibility": { "assign": ["isidorn"]},
10+
"accessibility": { "assign": ["meganrogge"]},
1111
"api": {"assign": ["jrieken"]},
1212
"api-finalization": {"assign": []},
1313
"api-proposal": {"assign": ["jrieken"]},

.github/commands.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@
451451
],
452452
"action": "comment",
453453
"addLabel": "info-needed",
454-
"comment": "Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, `.gif` files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.\n\nIf the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (`Developer: Toggle Screencast Mode` in the command palette).\n\nHappy coding!"
454+
"comment": "Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, `.gif` files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.\n\nIf the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (`Developer: Toggle Screencast Mode` in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.\n\nHappy coding!"
455455
},
456456
{
457457
"__comment__": "Allows folks on the team to label issues by commenting: `\\label My-Label` ",

.vscode/notebooks/api.github-issues

+1-1
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:\"October 2022\""
10+
"value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"November 2022\""
1111
},
1212
{
1313
"kind": 1,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
{
158158
"kind": 2,
159159
"language": "github-issues",
160-
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:andreamah -author:bamurtaugh -author:bpasero -author:chrisdias -author:chrmarti -author:Chuxel -author:claudiaregio -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:DonJayamanne -author:egamma -author:fiveisprime -author:gregvanl -author:hediet -author:IanMatthewHuff -author:isidorn -author:joaomoreno -author:joyceerhl -author:jrieken -author:karrtikr -author:kieferrm -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:roblourens -author:rzhao271 -author:sandy081 -author:sbatten -author:stevencl -author:tanhakabir -author:TylerLeonhardt -author:Tyriar -author:weinand -author:amunger"
160+
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:andreamah -author:bamurtaugh -author:bpasero -author:chrisdias -author:chrmarti -author:Chuxel -author:claudiaregio -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:DonJayamanne -author:egamma -author:fiveisprime -author:gregvanl -author:hediet -author:isidorn -author:joaomoreno -author:joyceerhl -author:jrieken -author:karrtikr -author:kieferrm -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:roblourens -author:rzhao271 -author:sandy081 -author:sbatten -author:stevencl -author:tanhakabir -author:TylerLeonhardt -author:Tyriar -author:weinand -author:amunger"
161161
},
162162
{
163163
"kind": 1,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"kind": 2,
99
"language": "github-issues",
10-
"value": "// list of repos we work in\n$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-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-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n\n\n// current milestone name\n$milestone=milestone:\"October 2022\""
10+
"value": "// list of repos we work in\n$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-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-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n\n\n// current milestone name\n$milestone=milestone:\"November 2022\""
1111
},
1212
{
1313
"kind": 1,

.vscode/notebooks/verification.github-issues

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
{
3333
"kind": 2,
3434
"language": "github-issues",
35-
"value": "$repos $milestone is:closed reason:completed -assignee:@me label:bug -label:verified -label:*duplicate -author:@me -assignee:@me label:bug -label:verified -author:@me -author:aeschli -author:alexdima -author:alexr00 -author:bpasero -author:chrisdias -author:chrmarti -author:connor4312 -author:dbaeumer -author:deepak1556 -author:eamodio -author:egamma -author:gregvanl -author:isidorn -author:JacksonKearl -author:joaomoreno -author:jrieken -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:RMacfarlane -author:roblourens -author:sana-ajani -author:sandy081 -author:sbatten -author:Tyriar -author:weinand -author:rzhao271 -author:kieferrm -author:TylerLeonhardt -author:bamurtaugh -author:hediet -author:joyceerhl -author:rchiodo -author:IanMatthewHuff"
35+
"value": "$repos $milestone is:closed reason:completed -assignee:@me label:bug -label:verified -label:*duplicate -author:@me -assignee:@me label:bug -label:verified -author:@me -author:aeschli -author:alexdima -author:alexr00 -author:bpasero -author:chrisdias -author:chrmarti -author:connor4312 -author:dbaeumer -author:deepak1556 -author:eamodio -author:egamma -author:gregvanl -author:isidorn -author:JacksonKearl -author:joaomoreno -author:jrieken -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:RMacfarlane -author:roblourens -author:sana-ajani -author:sandy081 -author:sbatten -author:Tyriar -author:weinand -author:rzhao271 -author:kieferrm -author:TylerLeonhardt -author:bamurtaugh -author:hediet -author:joyceerhl -author:rchiodo"
3636
},
3737
{
3838
"kind": 1,

build/.webignore

+13
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,16 @@ xterm-addon-webgl/out/**
3636
# This makes sure the model is included in the package
3737
!@vscode/vscode-languagedetection/model/**
3838

39+
# Ensure only the required telemetry pieces are loaded in web to reduce bundle size
40+
@microsoft/1ds-core-js/**
41+
@microsoft/1ds-post-js/**
42+
@microsoft/applicationinsights-core-js/**
43+
@microsoft/applicationinsights-shims/**
44+
!@microsoft/1ds-core-js/dist/ms.core.min.js
45+
!@microsoft/1ds-post-js/dist/ms.post.min.js
46+
!@microsoft/applicationinsights-core-js/browser/applicationinsights-core-js.min.js
47+
!@microsoft/applicationinsights-shims/dist/umd/applicationinsights-shims.min.js
48+
49+
50+
51+

build/azure-pipelines/linux/product-build-alpine.yml

+17-14
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,23 @@ steps:
5959
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
6060
displayName: Setup NPM Registry
6161

62+
# In Alpine, we always want to setup and authenticate against the NPM_REGISTRY
63+
# because of the Prebuild step, since it always runs `yarn` from inside an alpine
64+
# container
65+
- script: |
66+
set -e
67+
npm config set registry "$NPM_REGISTRY" --location=project
68+
npm config set always-auth=true --location=project
69+
yarn config set registry "$NPM_REGISTRY"
70+
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
71+
displayName: Setup NPM & Yarn
72+
73+
- task: npmAuthenticate@0
74+
inputs:
75+
workingFile: .npmrc
76+
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
77+
displayName: Setup NPM Authentication
78+
6279
- script: |
6380
mkdir -p .build
6481
node build/azure-pipelines/common/computeNodeModulesCacheKey.js "alpine" > .build/yarnlockhash
@@ -84,20 +101,6 @@ steps:
84101
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
85102
displayName: Extract node_modules cache
86103
87-
- script: |
88-
set -e
89-
npm config set registry "$NPM_REGISTRY" --location=project
90-
npm config set always-auth=true --location=project
91-
yarn config set registry "$NPM_REGISTRY"
92-
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
93-
displayName: Setup NPM & Yarn
94-
95-
- task: npmAuthenticate@0
96-
inputs:
97-
workingFile: .npmrc
98-
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
99-
displayName: Setup NPM Authentication
100-
101104
- script: |
102105
set -e
103106
for i in {1..3}; do # try 3 times

build/azure-pipelines/product-publish.yml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ steps:
1010
KeyVaultName: vscode
1111
SecretsFilter: "github-distro-mixin-password"
1212

13+
# allow-any-unicode-next-line
14+
- pwsh: Write-Host "##vso[build.addbuildtag]🚀"
15+
displayName: Add build tag
16+
1317
- script: |
1418
set -e
1519
cat << EOF > ~/.netrc

build/azure-pipelines/win32/product-build-win32.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,13 @@ steps:
8686
8787
- powershell: |
8888
if (!(Test-Path ".build")) { New-Item -Path ".build" -ItemType Directory }
89-
"$(VSCODE_ARCH)" | Out-File -Encoding ascii -NoNewLine .build\arch
90-
node build/azure-pipelines/common/computeNodeModulesCacheKey.js > .build/yarnlockhash
89+
node build/azure-pipelines/common/computeNodeModulesCacheKey.js $(VSCODE_ARCH) > .build/yarnlockhash
9190
node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
9291
displayName: Prepare yarn cache flags
9392
9493
- task: Cache@2
9594
inputs:
96-
key: "nodeModules | $(Agent.OS) | .build/arch, .build/yarnlockhash"
95+
key: "nodeModules | $(Agent.OS) | .build/yarnlockhash"
9796
path: .build/node_modules_cache
9897
cacheHitVar: NODE_MODULES_RESTORED
9998
displayName: Restore node_modules cache

build/gulpfile.vscode.win32.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function buildWin32Setup(arch, target) {
8787
productJson['target'] = target;
8888
fs.writeFileSync(productJsonPath, JSON.stringify(productJson, undefined, '\t'));
8989

90-
const quality = product.quality;
90+
const quality = product.quality || 'dev';
9191
const definitions = {
9292
NameLong: product.nameLong,
9393
NameShort: product.nameShort,
@@ -115,11 +115,7 @@ function buildWin32Setup(arch, target) {
115115
};
116116

117117
if (quality === 'insider') {
118-
const appxPackagePrefix = 'code_insiders';
119-
definitions['AppxPackage'] = `${appxPackagePrefix}_explorer_${arch}.appx`;
120-
if (arch === 'ia32') {
121-
definitions['AppxPackage'] = `${appxPackagePrefix}_explorer_x86.appx`;
122-
}
118+
definitions['AppxPackage'] = `code_insiders_explorer_${arch === 'ia32' ? 'x86' : arch}.appx`;
123119
definitions['AppxPackageFullname'] = `Microsoft.${product.win32RegValueName}_1.0.0.0_neutral__8wekyb3d8bbwe`;
124120
}
125121

build/lib/compilation.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,12 @@ function watchTask(out, build) {
122122
exports.watchTask = watchTask;
123123
const REPO_SRC_FOLDER = path.join(__dirname, '../../src');
124124
class MonacoGenerator {
125+
_isWatch;
126+
stream;
127+
_watchedFiles;
128+
_fsProvider;
129+
_declarationResolver;
125130
constructor(isWatch) {
126-
this._executeSoonTimer = null;
127131
this._isWatch = isWatch;
128132
this.stream = es.through();
129133
this._watchedFiles = {};
@@ -153,6 +157,7 @@ class MonacoGenerator {
153157
});
154158
}
155159
}
160+
_executeSoonTimer = null;
156161
_executeSoon() {
157162
if (this._executeSoonTimer !== null) {
158163
clearTimeout(this._executeSoonTimer);

0 commit comments

Comments
 (0)