Skip to content

Commit

Permalink
Merge branch 'microsoft:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
d0a1c3f7 authored Jul 10, 2024
2 parents ef8df64 + 172fc4d commit 3cf6736
Show file tree
Hide file tree
Showing 1,880 changed files with 44,696 additions and 23,289 deletions.
4 changes: 2 additions & 2 deletions .configurations/configuration.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ properties:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: npm
directives:
description: Install NodeJS version >=18.15.x and <19
description: Install NodeJS version 20
allowPrerelease: true
settings:
id: OpenJS.NodeJS.LTS
version: "18.18.0"
version: "20.14.0"
source: winget
- resource: NpmDsc/NpmPackage
id: yarn
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:18-bookworm
FROM mcr.microsoft.com/devcontainers/typescript-node:20-bookworm

ADD install-vscode.sh /root/
RUN /root/install-vscode.sh
Expand Down
56 changes: 56 additions & 0 deletions .eslintplugin/code-no-static-self-ref.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as eslint from 'eslint';
import { TSESTree } from '@typescript-eslint/experimental-utils';

/**
* WORKAROUND for https://github.com/evanw/esbuild/issues/3823
*/
export = new class implements eslint.Rule.RuleModule {

create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {

function checkProperty(inNode: any) {

const classDeclaration = context.getAncestors().find(node => node.type === 'ClassDeclaration');
const propertyDefinition = <TSESTree.PropertyDefinition>inNode;

if (!classDeclaration || !classDeclaration.id?.name) {
return;
}

if (!propertyDefinition.value) {
return;
}

const classCtor = classDeclaration.body.body.find(node => node.type === 'MethodDefinition' && node.kind === 'constructor')

if (!classCtor) {
return;
}

const name = classDeclaration.id.name;
const valueText = context.getSourceCode().getText(<any>propertyDefinition.value)

if (valueText.includes(name + '.')) {

if (classCtor.value?.type === 'FunctionExpression' && !classCtor.value.params.find((param: any) => param.type === 'TSParameterProperty' && param.decorators?.length > 0)) {
return
}

context.report({
loc: propertyDefinition.value.loc,
message: `Static properties in decorated classes should not reference the class they are defined in. Use 'this' instead. This is a workaround for https://github.com/evanw/esbuild/issues/3823.`
});
}

}

return {
'PropertyDefinition[static=true]': checkProperty,
};
}
};
20 changes: 13 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@
]
}
},
{
"files": [
"src/**/*.ts"
],
"rules": {
"local/code-no-static-self-ref": "warn"
}
},
{
"files": [
"src/vs/**/*.test.ts"
Expand Down Expand Up @@ -645,7 +653,6 @@
"events",
"fs",
"fs/promises",
"graceful-fs",
"http",
"https",
"minimist",
Expand All @@ -667,6 +674,7 @@
"vscode-regexpp",
"vscode-textmate",
"worker_threads",
"@xterm/addon-clipboard",
"@xterm/addon-image",
"@xterm/addon-search",
"@xterm/addon-serialize",
Expand Down Expand Up @@ -1016,11 +1024,7 @@
]
},
{
"target": "src/vs/workbench/{workbench.desktop.main.nls.js,workbench.web.main.nls.js}",
"restrictions": []
},
{
"target": "src/vs/{loader.d.ts,css.ts,css.build.ts,monaco.d.ts,nls.ts,nls.build.ts,nls.mock.ts}",
"target": "src/vs/{loader.d.ts,css.ts,css.build.ts,monaco.d.ts,nls.ts}",
"restrictions": []
},
{
Expand Down Expand Up @@ -1094,7 +1098,9 @@
"local/code-no-runtime-import": [
"error",
{
"src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts": ["**/*"]
"src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts": [
"**/*"
]
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions .github/classifier.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"debug": {"assign": ["roblourens"]},
"debug-disassembly": {"assign": []},
"dialogs": {"assign": ["sbatten"]},
"diff-editor": {"assign": ["alexdima"]},
"diff-editor": {"assign": ["hediet"]},
"dropdown": {"assign": ["lramos15"]},
"editor-api": {"assign": ["alexdima"]},
"editor-autoclosing": {"assign": ["alexdima"]},
Expand Down Expand Up @@ -116,7 +116,7 @@
"json": {"assign": ["aeschli"]},
"json-sorting": {"assign": ["aiday-mar"]},
"keybindings": {"assign": ["ulugbekna"]},
"keybindings-editor": {"assign": ["sandy081"]},
"keybindings-editor": {"assign": ["ulugbekna"]},
"keyboard-layout": {"assign": ["ulugbekna"]},
"L10N": {"assign": ["TylerLeonhardt", "csigs"]},
"l10n-platform": {"assign": ["TylerLeonhardt"]},
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deep-classifier-assign-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ jobs:
with:
botName: VSCodeTriageBot
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
2 changes: 0 additions & 2 deletions .github/workflows/deep-classifier-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ jobs:
excludeLabels: feature-request|testplan-item
configPath: classifier
blobContainerName: vscode-issue-classifier
blobStorageKey: ${{secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING}}
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/deep-classifier-scraper.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: "Deep Classifier: Scraper"

permissions:
id-token: write
contents: read

on:
schedule:
- cron: 0 0 15 * * # 15th of the month
Expand All @@ -9,7 +14,13 @@ on:
jobs:
main:
runs-on: ubuntu-latest
environment: main
steps:
- uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: Checkout Actions
uses: actions/checkout@v4
with:
Expand All @@ -25,6 +36,4 @@ jobs:
uses: ./actions/classifier-deep/train/fetch-issues
with:
blobContainerName: vscode-issue-classifier
blobStorageKey: ${{secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING}}
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
1 change: 0 additions & 1 deletion .github/workflows/deep-classifier-unassign-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ jobs:
with:
botName: VSCodeTriageBot
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
13 changes: 11 additions & 2 deletions .github/workflows/latest-release-monitor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: Latest Release Monitor

permissions:
id-token: write
contents: read

on:
schedule:
- cron: 0/5 * * * *
Expand All @@ -8,7 +13,13 @@ on:
jobs:
main:
runs-on: ubuntu-latest
environment: main
steps:
- uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: Checkout Actions
uses: actions/checkout@v4
with:
Expand All @@ -22,6 +33,4 @@ jobs:
- name: Run Latest Release Monitor
uses: ./actions/latest-release-monitor
with:
storageKey: ${{secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING}}
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
3 changes: 2 additions & 1 deletion .github/workflows/locker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
- name: Run Locker
uses: ./actions/locker
with:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
daysSinceClose: 45
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
daysSinceUpdate: 3
ignoredLabel: "*out-of-scope,accessibility"
ignoreLabelUntil: "author-verification-requested"
ignoredMilestones: "Backlog Candidates"
labelUntil: "verified"
11 changes: 11 additions & 0 deletions .github/workflows/on-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ jobs:
- name: Install Actions
run: npm install --production --prefix ./actions

- name: Check for Validity
uses: ./actions/validity-checker
with:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}

- name: Run CopyCat (VSCodeTriageBot/testissues)
if: github.event.issue.user.login != 'ghost'
uses: ./actions/copycat
with:
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
Expand All @@ -25,6 +31,7 @@ jobs:
repo: testissues

- name: Run New Release
if: github.event.issue.user.login != 'ghost'
uses: ./actions/new-release
with:
label: new release
Expand All @@ -36,6 +43,7 @@ jobs:
days: 5

- name: Run Clipboard Labeler
if: github.event.issue.user.login != 'ghost'
uses: ./actions/regex-labeler
with:
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
Expand All @@ -44,6 +52,7 @@ jobs:
comment: "It looks like you're using the VS Code Issue Reporter but did not paste the text generated into the created issue. We've closed this issue, please open a new one containing the text we placed in your clipboard.\n\nHappy Coding!"

- name: Run Clipboard Labeler (Chinese)
if: github.event.issue.user.login != 'ghost'
uses: ./actions/regex-labeler
with:
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
Expand All @@ -53,6 +62,7 @@ jobs:

# source of truth in ./english-please.yml
- name: Run English Please
if: github.event.issue.user.login != 'ghost'
uses: ./actions/english-please
with:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
Expand All @@ -64,6 +74,7 @@ jobs:
translatorRequestedLabelColor: "c29cff"
# source of truth in ./test-plan-item-validator.yml
- name: Run Test Plan Item Validator
if: github.event.issue.user.login != 'ghost'
uses: ./actions/test-plan-item-validator
with:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/on-reopen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: On Reopen
on:
issues:
types: [reopened]

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v4
with:
repository: "microsoft/vscode-github-triage-actions"
ref: stable
path: ./actions
- name: Install Actions
run: npm install --production --prefix ./actions

- name: Check for Validity
uses: ./actions/validity-checker
with:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.12.1
20.14.0
Loading

0 comments on commit 3cf6736

Please sign in to comment.