Skip to content

Commit

Permalink
Merge branch 'main' into support-three-or-more-chords
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedgreen authored Mar 16, 2023
2 parents cffeedd + c97d581 commit 5303e9d
Show file tree
Hide file tree
Showing 370 changed files with 9,283 additions and 4,161 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"invalidate",
"open",
"override",
"perform",
"receive",
"register",
"remove",
Expand Down
12 changes: 1 addition & 11 deletions build/azure-pipelines/common/telemetry-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@
"excludedDirs": [],
"applyEndpoints": true
},
{
"eventPrefix": "ms-vscode.node2/",
"sourceDirs": [
"vscode-chrome-debug-core",
"vscode-node-debug2"
],
"excludedDirs": [],
"applyEndpoints": true,
"patchDebugEvents": true
},
{
"eventPrefix": "ms-vscode.node/",
"sourceDirs": [
Expand All @@ -69,4 +59,4 @@
"applyEndpoints": true,
"patchDebugEvents": true
}
]
]
3 changes: 3 additions & 0 deletions build/azure-pipelines/win32/cli-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ steps:
VSCODE_CLI_ENV:
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static-md/lib
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static-md/include
RUSTFLAGS: '-C target-feature=+crt-static'

- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
- template: ../cli/cli-compile-and-publish.yml
Expand All @@ -69,6 +70,7 @@ steps:
VSCODE_CLI_ENV:
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static-md/lib
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static-md/include
RUSTFLAGS: '-C target-feature=+crt-static'

- ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}:
- template: ../cli/cli-compile-and-publish.yml
Expand All @@ -78,3 +80,4 @@ steps:
VSCODE_CLI_ENV:
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static-md/lib
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static-md/include
RUSTFLAGS: '-C target-feature=+crt-static'
4 changes: 4 additions & 0 deletions build/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,7 @@ module.exports.eslintFilter = [
.filter(line => !!line)
.map(line => `!${line}`)
];

module.exports.stylelintFilter = [
'src/**/*.css'
];
3 changes: 2 additions & 1 deletion build/gulpfile.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
});
});

const compileEditorAMDTask = task.define('compile-editor-amd', compilation.compileTask('out-editor-src', 'out-editor-build', true));
// Disable mangling for the editor, as it complicates debugging & quite a few users rely on private/protected fields.
const compileEditorAMDTask = task.define('compile-editor-amd', compilation.compileTask('out-editor-src', 'out-editor-build', true, { disableMangle: true }));

const optimizeEditorAMDTask = task.define('optimize-editor-amd', optimize.optimizeTask(
{
Expand Down
6 changes: 3 additions & 3 deletions build/gulpfile.vscode.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const buildDate = new Date().toISOString();
*/
const createVSCodeWebProductConfigurationPatcher = (product) => {
/**
* @param content {string} The contens of the file
* @param content {string} The contents of the file
* @param path {string} The absolute file path, always using `/`, even on Windows
*/
const result = (content, path) => {
Expand All @@ -108,7 +108,7 @@ const createVSCodeWebProductConfigurationPatcher = (product) => {
*/
const createVSCodeWebBuiltinExtensionsPatcher = (extensionsRoot) => {
/**
* @param content {string} The contens of the file
* @param content {string} The contents of the file
* @param path {string} The absolute file path, always using `/`, even on Windows
*/
const result = (content, path) => {
Expand All @@ -128,7 +128,7 @@ const createVSCodeWebBuiltinExtensionsPatcher = (extensionsRoot) => {
*/
const combineContentPatchers = (...patchers) => {
/**
* @param content {string} The contens of the file
* @param content {string} The contents of the file
* @param path {string} The absolute file path, always using `/`, even on Windows
*/
const result = (content, path) => {
Expand Down
9 changes: 8 additions & 1 deletion build/hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const path = require('path');
const fs = require('fs');
const pall = require('p-all');

const { all, copyrightFilter, unicodeFilter, indentationFilter, tsFormattingFilter, eslintFilter } = require('./filters');
const { all, copyrightFilter, unicodeFilter, indentationFilter, tsFormattingFilter, eslintFilter, stylelintFilter } = require('./filters');

const copyrightHeaderLines = [
'/*---------------------------------------------------------------------------------------------',
Expand All @@ -22,6 +22,7 @@ const copyrightHeaderLines = [

function hygiene(some, linting = true) {
const gulpeslint = require('gulp-eslint');
const gulpstylelint = require('./stylelint');
const tsfmt = require('typescript-formatter');

let errorCount = 0;
Expand Down Expand Up @@ -185,6 +186,12 @@ function hygiene(some, linting = true) {
})
)
);
streams.push(
result.pipe(filter(stylelintFilter)).pipe(gulpstylelint((error => {
console.error(error);
errorCount++;
})))
);
}

let count = 0;
Expand Down
6 changes: 3 additions & 3 deletions build/lib/compilation.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/lib/compilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function transpileTask(src: string, out: string, swc: boolean): () => Nod
};
}

export function compileTask(src: string, out: string, build: boolean): () => NodeJS.ReadWriteStream {
export function compileTask(src: string, out: string, build: boolean, options: { disableMangle?: boolean } = {}): () => NodeJS.ReadWriteStream {

return function () {

Expand All @@ -123,7 +123,7 @@ export function compileTask(src: string, out: string, build: boolean): () => Nod

// mangle: TypeScript to TypeScript
let mangleStream = es.through();
if (build) {
if (build && !options.disableMangle) {
let ts2tsMangler = new Mangler(compile.projectPath, (...data) => fancyLog(ansiColors.blue('[mangler]'), ...data));
const newContentsByFileName = ts2tsMangler.computeNewFileContents(new Set(['saveState']));
mangleStream = es.through(function write(data: File & { sourceMap?: RawSourceMap }) {
Expand Down
10 changes: 1 addition & 9 deletions build/lib/extensions.js

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions build/lib/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ export interface IScannedBuiltinExtension {
extensionPath: string;
packageJSON: any;
packageNLS?: any;
browserNlsMetadataPath?: string;
readmePath?: string;
changelogPath?: string;
}
Expand All @@ -441,21 +440,13 @@ export function scanBuiltinExtensions(extensionsRoot: string, exclude: string[]
const children = fs.readdirSync(path.join(extensionsRoot, extensionFolder));
const packageNLSPath = children.filter(child => child === 'package.nls.json')[0];
const packageNLS = packageNLSPath ? JSON.parse(fs.readFileSync(path.join(extensionsRoot, extensionFolder, packageNLSPath)).toString()) : undefined;
let browserNlsMetadataPath: string | undefined;
if (packageJSON.browser) {
const browserEntrypointFolderPath = path.join(extensionFolder, path.dirname(packageJSON.browser));
if (fs.existsSync(path.join(extensionsRoot, browserEntrypointFolderPath, 'nls.metadata.json'))) {
browserNlsMetadataPath = path.join(browserEntrypointFolderPath, 'nls.metadata.json');
}
}
const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0];
const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0];

scannedExtensions.push({
extensionPath: extensionFolder,
packageJSON,
packageNLS,
browserNlsMetadataPath,
readmePath: readme ? path.join(extensionFolder, readme) : undefined,
changelogPath: changelog ? path.join(extensionFolder, changelog) : undefined,
});
Expand Down
4 changes: 4 additions & 0 deletions build/lib/i18n.resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@
"name": "vs/workbench/contrib/notebook",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/interactiveEditor",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/interactiveSession",
"project": "vscode-workbench"
Expand Down
Loading

0 comments on commit 5303e9d

Please sign in to comment.