Skip to content

Commit

Permalink
Merge branch 'main' into justin/machop
Browse files Browse the repository at this point in the history
  • Loading branch information
justschen authored Nov 25, 2024
2 parents d52d98b + f08b93e commit 2fafe42
Show file tree
Hide file tree
Showing 234 changed files with 5,526 additions and 2,253 deletions.
5 changes: 5 additions & 0 deletions .vscode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ const extensions = [
workspaceFolder: `extensions/vscode-colorize-tests/test`,
mocha: { timeout: 60_000 }
},
{
label: 'terminal-suggest',
workspaceFolder: path.join(os.tmpdir(), `terminal-suggest-${Math.floor(Math.random() * 100000)}`),
mocha: { timeout: 60_000 }
},
{
label: 'vscode-colorize-perf-tests',
workspaceFolder: `extensions/vscode-colorize-perf-tests/test`,
Expand Down
11 changes: 10 additions & 1 deletion build/azure-pipelines/common/sign.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion build/azure-pipelines/common/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ export function main([esrpCliPath, type, folderPath, pattern]: string[]) {
const tmp = new Temp();
process.on('exit', () => tmp.dispose());

const key = crypto.randomBytes(32);
const iv = crypto.randomBytes(16);
const cipher = crypto.createCipheriv('aes-256-cbc', key, iv);
const encryptedToken = cipher.update(process.env['SYSTEM_ACCESSTOKEN']!.trim(), 'utf8', 'hex') + cipher.final('hex');

const encryptionDetailsPath = tmp.tmpNameSync();
fs.writeFileSync(encryptionDetailsPath, JSON.stringify({ key: key.toString('hex'), iv: iv.toString('hex') }));

const encryptedTokenPath = tmp.tmpNameSync();
fs.writeFileSync(encryptedTokenPath, encryptedToken);

const patternPath = tmp.tmpNameSync();
fs.writeFileSync(patternPath, pattern);

Expand All @@ -157,7 +168,8 @@ export function main([esrpCliPath, type, folderPath, pattern]: string[]) {
managedIdentityTenantId: process.env['VSCODE_ESRP_TENANT_ID'],
serviceConnectionId: process.env['VSCODE_ESRP_SERVICE_CONNECTION_ID'],
tempDirectory: os.tmpdir(),
systemAccessToken: process.env['SYSTEM_ACCESSTOKEN']
systemAccessToken: encryptedTokenPath,
encryptionKey: encryptionDetailsPath
};

const args = [
Expand Down
12 changes: 4 additions & 8 deletions build/azure-pipelines/product-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -790,16 +790,12 @@ extends:
name: 1es-ubuntu-22.04-x64
os: linux
jobs:
- deployment: ApproveRelease
- job: ApproveRelease
displayName: "Approve Release"
environment: "vscode"
variables:
skipComponentGovernanceDetection: true
strategy:
runOnce:
deploy:
steps:
- checkout: none
- group: VSCodePeerApproval
- name: skipComponentGovernanceDetection
value: true

- ${{ if or(and(parameters.VSCODE_RELEASE, eq(variables['VSCODE_PRIVATE_BUILD'], false)), and(in(parameters.VSCODE_QUALITY, 'insider', 'exploration'), eq(variables['VSCODE_SCHEDULEDBUILD'], true))) }}:
- stage: Release
Expand Down
1 change: 1 addition & 0 deletions build/gulpfile.extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const compilations = [
'extensions/markdown-math/tsconfig.json',
'extensions/media-preview/tsconfig.json',
'extensions/merge-conflict/tsconfig.json',
'extensions/terminal-suggest/tsconfig.json',
'extensions/microsoft-authentication/tsconfig.json',
'extensions/notebook-renderers/tsconfig.json',
'extensions/npm/tsconfig.json',
Expand Down
25 changes: 22 additions & 3 deletions build/lib/policies.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 42 additions & 3 deletions build/lib/policies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function renderADMLString(prefix: string, moduleName: string, nlsString: NlsStri
value = nlsString.value;
}

return `<string id="${prefix}_${nlsString.nlsKey}">${value}</string>`;
return `<string id="${prefix}_${nlsString.nlsKey.replace(/\./g, '_')}">${value}</string>`;
}

abstract class BasePolicy implements Policy {
Expand All @@ -78,7 +78,7 @@ abstract class BasePolicy implements Policy {

renderADMX(regKey: string) {
return [
`<policy name="${this.name}" class="Both" displayName="$(string.${this.name})" explainText="$(string.${this.name}_${this.description.nlsKey})" key="Software\\Policies\\Microsoft\\${regKey}" presentation="$(presentation.${this.name})">`,
`<policy name="${this.name}" class="Both" displayName="$(string.${this.name})" explainText="$(string.${this.name}_${this.description.nlsKey.replace(/\./g, '_')})" key="Software\\Policies\\Microsoft\\${regKey}" presentation="$(presentation.${this.name})">`,
` <parentCategory ref="${this.category.name.nlsKey}" />`,
` <supportedOn ref="Supported_${this.minimumVersion.replace(/\./g, '_')}" />`,
` <elements>`,
Expand Down Expand Up @@ -232,6 +232,44 @@ class StringPolicy extends BasePolicy {
}
}

class ObjectPolicy extends BasePolicy {

static from(
name: string,
category: Category,
minimumVersion: string,
description: NlsString,
moduleName: string,
settingNode: Parser.SyntaxNode
): ObjectPolicy | undefined {
const type = getStringProperty(settingNode, 'type');

if (type !== 'object' && type !== 'array') {
return undefined;
}

return new ObjectPolicy(name, category, minimumVersion, description, moduleName);
}

private constructor(
name: string,
category: Category,
minimumVersion: string,
description: NlsString,
moduleName: string,
) {
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
}

protected renderADMXElements(): string[] {
return [`<multiText id="${this.name}" valueName="${this.name}" required="true" />`];
}

renderADMLPresentationContents() {
return `<multiTextBox refId="${this.name}" />`;
}
}

class StringEnumPolicy extends BasePolicy {

static from(
Expand Down Expand Up @@ -402,6 +440,7 @@ const PolicyTypes = [
IntPolicy,
StringEnumPolicy,
StringPolicy,
ObjectPolicy
];

function getPolicy(
Expand Down Expand Up @@ -474,7 +513,7 @@ function getPolicies(moduleName: string, node: Parser.SyntaxNode): Policy[] {
arguments: (arguments (object (pair
key: [(property_identifier)(string)] @propertiesKey (#eq? @propertiesKey properties)
value: (object (pair
key: [(property_identifier)(string)]
key: [(property_identifier)(string)(computed_property_name)]
value: (object (pair
key: [(property_identifier)(string)] @policyKey (#eq? @policyKey policy)
value: (object) @policy
Expand Down
1 change: 1 addition & 0 deletions build/lib/stylelint/vscode-known-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@
"--dropdown-padding-bottom",
"--dropdown-padding-top",
"--inline-chat-frame-progress",
"--inline-chat-hint-progress",
"--insert-border-color",
"--last-tab-margin-right",
"--monaco-monospace-font",
Expand Down
6 changes: 3 additions & 3 deletions extensions/emmet/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions extensions/emmet/src/test/completion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ suite('Tests for completion in CSS embedded in HTML', () => {
});

// https://github.com/microsoft/vscode/issues/79766
test('#79766, correct region determination', async () => {
test('microsoft/vscode#79766, correct region determination', async () => {
await testCompletionProvider('html', `<div style="color: #000">di|</div>`, [
{ label: 'div', documentation: `<div>|</div>` }
]);
});

// https://github.com/microsoft/vscode/issues/86941
test('#86941, widows should be completed after width', async () => {
test('microsoft/vscode#86941, widows should be completed after width', async () => {
await testCompletionProvider('css', `.foo { wi| }`, [
{ label: 'width: ;', documentation: `width: |;` }
]);
Expand All @@ -56,21 +56,28 @@ suite('Tests for completion in CSS embedded in HTML', () => {
});

// https://github.com/microsoft/vscode/issues/117020
test('#117020, ! at end of abbreviation should have completion', async () => {
test('microsoft/vscode#117020, ! at end of abbreviation should have completion', async () => {
await testCompletionProvider('css', `.foo { bdbn!| }`, [
{ label: 'border-bottom: none !important;', documentation: `border-bottom: none !important;` }
]);
});

// https://github.com/microsoft/vscode/issues/138461
test('#138461, JSX array noise', async () => {
test('microsoft/vscode#138461, JSX array noise', async () => {
await testCompletionProvider('jsx', 'a[i]', undefined);
await testCompletionProvider('jsx', 'Component[a b]', undefined);
await testCompletionProvider('jsx', '[a, b]', undefined);
await testCompletionProvider('jsx', '[a=b]', [
{ label: '<div a="b"></div>', documentation: '<div a="b">|</div>' }
]);
});

// https://github.com/microsoft/vscode-emmet-helper/pull/90
test('microsoft/vscode-emmet-helper#90', async () => {
await testCompletionProvider('html', 'dialog', [
{ label: '<dialog></dialog>', documentation: '<dialog>|</dialog>' }
]);
});
});

interface TestCompletionItem {
Expand Down
27 changes: 27 additions & 0 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3197,6 +3197,33 @@
"tags": [
"experimental"
]
},
"git.blame.editorDecoration.template": {
"type": "string",
"default": "${subject}, ${authorName} (${authorDateAgo})",
"markdownDescription": "%config.blameEditorDecoration.template%",
"scope": "resource",
"tags": [
"experimental"
]
},
"git.blame.statusBarItem.enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "%config.blameStatusBarItem.enabled%",
"scope": "resource",
"tags": [
"experimental"
]
},
"git.blame.statusBarItem.template": {
"type": "string",
"default": "$(git-commit) ${authorName} (${authorDateAgo})",
"markdownDescription": "%config.blameStatusBarItem.template%",
"scope": "resource",
"tags": [
"experimental"
]
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion extensions/git/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@
"config.publishBeforeContinueOn.never": "Never publish unpublished Git state when using Continue Working On from a Git repository",
"config.publishBeforeContinueOn.prompt": "Prompt to publish unpublished Git state when using Continue Working On from a Git repository",
"config.similarityThreshold": "Controls the threshold of the similarity index (the amount of additions/deletions compared to the file's size) for changes in a pair of added/deleted files to be considered a rename. **Note:** Requires Git version `2.18.0` or later.",
"config.blameEditorDecoration.enabled": "Controls whether to show git blame information in the editor using editor decorations",
"config.blameEditorDecoration.enabled": "Controls whether to show blame information in the editor using editor decorations.",
"config.blameEditorDecoration.template": "Template for the blame information editor decoration. Supported variables:\n\n* `hash`: Commit hash\n\n* `hashShort`: First 8 characters of the commit hash\n\n* `subject`: First line of the commit message\n\n* `authorName`: Author name\n\n* `authorEmail`: Author email\n\n* `authorDate`: Author date\n\n* `authorDateAgo`: Time difference between now and the author date\n\n",
"config.blameStatusBarItem.enabled": "Controls whether to show blame information in the status bar.",
"config.blameStatusBarItem.template": "Template for the blame information status bar item. Supported variables:\n\n* `hash`: Commit hash\n\n* `hashShort`: First 8 characters of the commit hash\n\n* `subject`: First line of the commit message\n\n* `authorName`: Author name\n\n* `authorEmail`: Author email\n\n* `authorDate`: Author date\n\n* `authorDateAgo`: Time difference between now and the author date\n\n",
"submenu.explorer": "Git",
"submenu.commit": "Commit",
"submenu.commit.amend": "Amend",
Expand Down
8 changes: 6 additions & 2 deletions extensions/git/src/api/api1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { toGitUri } from '../uri';
import { GitExtensionImpl } from './extension';
import { GitBaseApi } from '../git-base';
import { PickRemoteSourceOptions } from './git-base';
import { Operation, OperationResult } from '../operation';
import { OperationKind, OperationResult } from '../operation';

class ApiInputBox implements InputBox {
set value(value: string) { this._inputBox.value = value; }
Expand Down Expand Up @@ -67,7 +67,11 @@ export class ApiRepository implements Repository {
readonly state: RepositoryState = new ApiRepositoryState(this.repository);
readonly ui: RepositoryUIState = new ApiRepositoryUIState(this.repository.sourceControl);

readonly onDidCommit: Event<void> = mapEvent<OperationResult, void>(filterEvent(this.repository.onDidRunOperation, e => e.operation === Operation.Commit), () => null);
readonly onDidCommit: Event<void> = mapEvent<OperationResult, void>(
filterEvent(this.repository.onDidRunOperation, e => e.operation.kind === OperationKind.Commit), () => null);

readonly onDidCheckout: Event<void> = mapEvent<OperationResult, void>(
filterEvent(this.repository.onDidRunOperation, e => e.operation.kind === OperationKind.Checkout || e.operation.kind === OperationKind.CheckoutTracking), () => null);

constructor(readonly repository: BaseRepository) { }

Expand Down
Loading

0 comments on commit 2fafe42

Please sign in to comment.