diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile
new file mode 100644
index 0000000000000..e98ad04da9ad4
--- /dev/null
+++ b/.gitpod.Dockerfile
@@ -0,0 +1,21 @@
+FROM gitpod/workspace-full:latest
+
+USER gitpod
+
+# We use latest major version of Node.js distributed VS Code. (see about dialog in your local VS Code)
+RUN bash -c ". .nvm/nvm.sh \
+ && nvm install 16 \
+ && nvm use 16 \
+ && nvm alias default 16"
+
+RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix
+
+# Install dependencies
+RUN sudo apt-get update \
+ && sudo apt-get install -y --no-install-recommends \
+ xvfb x11vnc fluxbox dbus-x11 x11-utils x11-xserver-utils xdg-utils \
+ fbautostart xterm eterm gnome-terminal gnome-keyring seahorse nautilus \
+ libx11-dev libxkbfile-dev libsecret-1-dev libnotify4 libnss3 libxss1 \
+ libasound2 libgbm1 xfonts-base xfonts-terminus fonts-noto fonts-wqy-microhei \
+ fonts-droid-fallback vim-tiny nano libgconf2-dev libgtk-3-dev twm \
+ && sudo apt-get clean && sudo rm -rf /var/cache/apt/* && sudo rm -rf /var/lib/apt/lists/* && sudo rm -rf /tmp/*
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 0000000000000..90932a95d2597
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,29 @@
+image:
+ file: .gitpod.Dockerfile
+ports:
+ - port: 9888
+ onOpen: open-browser
+tasks:
+ - init: |
+ yarn
+ yarn server:init
+ command: |
+ gp sync-done init
+ export NODE_ENV=development
+ export VSCODE_DEV=1
+ yarn gulp watch-init
+ name: watch app
+ - command: |
+ export NODE_ENV=development
+ export VSCODE_DEV=1
+ gp sync-await init
+ ./scripts/code-server.sh --without-connection-token
+ name: run app
+ openMode: split-right
+github:
+ prebuilds:
+ branches: true
+ pullRequestsFromForks: true
+vscode:
+ extensions:
+ - dbaeumer.vscode-eslint
diff --git a/README.md b/README.md
index 0c7c6236c42c6..6ad61b2849f3e 100644
--- a/README.md
+++ b/README.md
@@ -1,77 +1,108 @@
-# Visual Studio Code - Open Source ("Code - OSS")
-[](https://github.com/microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc)
-[](https://github.com/microsoft/vscode/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3Abug)
-[](https://gitter.im/Microsoft/vscode)
+# OpenVSCode Server
-## The Repository
+[](https://gitpod.io/from-referrer)
+[](https://github.com/gitpod-io/openvscode-server/blob/main/LICENSE.txt)
+[](https://www.gitpod.io/chat)
-This repository ("`Code - OSS`") is where we (Microsoft) develop the [Visual Studio Code](https://code.visualstudio.com) product together with the community. Not only do we work on code and issues here, we also publish our [roadmap](https://github.com/microsoft/vscode/wiki/Roadmap), [monthly iteration plans](https://github.com/microsoft/vscode/wiki/Iteration-Plans), and our [endgame plans](https://github.com/microsoft/vscode/wiki/Running-the-Endgame). This source code is available to everyone under the standard [MIT license](https://github.com/microsoft/vscode/blob/main/LICENSE.txt).
+## What is this?
-## Visual Studio Code
+This project provides a version of VS Code that runs a server on a remote machine and allows access through a modern web browser. It's based on the very same architecture used by [Gitpod](https://www.gitpod.io) or [GitHub Codespaces](https://github.com/features/codespaces) at scale.
-
-
-
+
-[Visual Studio Code](https://code.visualstudio.com) is a distribution of the `Code - OSS` repository with Microsoft-specific customizations released under a traditional [Microsoft product license](https://code.visualstudio.com/License/).
+## Why?
-[Visual Studio Code](https://code.visualstudio.com) combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools.
+VS Code has traditionally been a desktop IDE built with web technologies. A few years back, people started patching it in order to run it in a remote context and to make it accessible through web browsers. These efforts have been complex and error prone, because many changes had to be made across the large code base of VS Code.
-Visual Studio Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on [Visual Studio Code's website](https://code.visualstudio.com/Download). To get the latest releases every day, install the [Insiders build](https://code.visualstudio.com/insiders).
+Luckily, in 2019 the VS Code team started to refactor its architecture to support a browser-based working mode. While this architecture has been adopted by Gitpod and GitHub, the important bits have not been open-sourced, until now. As a result, many people in the community still use the old, hard to maintain and error-prone approach.
-## Contributing
+At Gitpod, we've been asked a lot about how we do it. So we thought we might as well share the minimal set of changes needed so people can rely on the latest version of VS Code, have a straightforward upgrade path and low maintenance effort.
+
+## Getting started
+
+### Docker
+
+- Start the server:
+```bash
+docker run -it --init -p 3000:3000 -v "$(pwd):/home/workspace:cached" gitpod/openvscode-server
+```
+- Visit the URL printed in your terminal.
+
+
+_Note_: Feel free to use the `nightly` tag to test the latest version, i.e. `gitpod/openvscode-server:nightly`.
+
+#### Custom Environment
+- If you want to add dependencies to this Docker image, here is a template to help:
+ ```Dockerfile
+
+ FROM gitpod/openvscode-server:latest
+
+ USER root # to get permissions to install packages and such
+ RUN # the installation process for software needed
+ USER openvscode-server # to restore permissions for the web interface
-There are many ways in which you can participate in this project, for example:
+ ```
+- For additional possibilities, please consult the `Dockerfile` for OpenVSCode Server at https://github.com/gitpod-io/openvscode-releases/
-* [Submit bugs and feature requests](https://github.com/microsoft/vscode/issues), and help us verify as they are checked in
-* Review [source code changes](https://github.com/microsoft/vscode/pulls)
-* Review the [documentation](https://github.com/microsoft/vscode-docs) and make pull requests for anything from typos to additional and new content
+### Linux
-If you are interested in fixing issues and contributing directly to the code base,
-please see the document [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute), which covers the following:
+- [Download the latest release](https://github.com/gitpod-io/openvscode-server/releases/latest)
+- Untar and run the server
+ ```bash
+ tar -xzf openvscode-server-v${OPENVSCODE_SERVER_VERSION}.tar.gz
+ cd openvscode-server-v${OPENVSCODE_SERVER_VERSION}
+ ./bin/openvscode-server # you can add arguments here, use --help to list all of the possible options
+ ```
-* [How to build and run from source](https://github.com/microsoft/vscode/wiki/How-to-Contribute)
-* [The development workflow, including debugging and running tests](https://github.com/microsoft/vscode/wiki/How-to-Contribute#debugging)
-* [Coding guidelines](https://github.com/microsoft/vscode/wiki/Coding-Guidelines)
-* [Submitting pull requests](https://github.com/microsoft/vscode/wiki/How-to-Contribute#pull-requests)
-* [Finding an issue to work on](https://github.com/microsoft/vscode/wiki/How-to-Contribute#where-to-contribute)
-* [Contributing to translations](https://aka.ms/vscodeloc)
+ From the possible entrypoint arguments, the most notable ones are
+ - `--port` - the port number to start the server on, this is 3000 by default
+ - `--without-connection-token` - used by default in the docker image
+ - `--connection-token` & `--connection-secret` for securing access to the IDE, you can read more about it in [Securing access to your IDE](#securing-access-to-your-ide).
+ - `--host` - determines the host the server is listening on. It defaults to `localhost`, so for accessing remotely it's a good idea to add `--host 0.0.0.0` to your launch arguments.
-## Feedback
+- Visit the URL printed in your terminal.
-* Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/vscode)
-* [Request a new feature](CONTRIBUTING.md)
-* Upvote [popular feature requests](https://github.com/microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc)
-* [File an issue](https://github.com/microsoft/vscode/issues)
-* Connect with the extension author community on [GitHub Discussions](https://github.com/microsoft/vscode-discussions/discussions) or [Slack](https://aka.ms/vscode-dev-community)
-* Follow [@code](https://twitter.com/code) and let us know what you think!
+_Note_: You can use [pre-releases](https://github.com/gitpod-io/openvscode-server/releases) to test nightly changes.
-See our [wiki](https://github.com/microsoft/vscode/wiki/Feedback-Channels) for a description of each of these channels and information on some other available community-driven channels.
+### Securing access to your IDE
-## Related Projects
+Since OpenVSCode Server v1.64, you can access the Web UI without authentication (anyone can access the IDE using just the hostname and port), if you need some kind of basic authentication then you can start the server with `--connection-token YOUR_TOKEN`, the provided `YOUR_TOKEN` will be used and the authenticated URL will be displayed in your terminal once you start the server. You can also create a plaintext file with the desired token as its contents and provide it to the server with `--connection-secret YOUR_SECRET_FILE`.
-Many of the core components and extensions to VS Code live in their own repositories on GitHub. For example, the [node debug adapter](https://github.com/microsoft/vscode-node-debug) and the [mono debug adapter](https://github.com/microsoft/vscode-mono-debug) repositories are separate from each other. For a complete list, please visit the [Related Projects](https://github.com/microsoft/vscode/wiki/Related-Projects) page on our [wiki](https://github.com/microsoft/vscode/wiki).
+If you want to use a connection token and are working with OpenVSCode Server via [the Docker image](https://hub.docker.com/r/gitpod/openvscode-server), you will have to edit the `ENTRYPOINT` in [the Dockerfile](https://github.com/gitpod-io/openvscode-releases/blob/eb59ab37e23f8d17532b4af4de37eafaf48037a5/Dockerfile#L64) or modify it with the [`entrypoint` option](https://docs.docker.com/compose/compose-file/compose-file-v3/#entrypoint) when working with `docker-compose`.
-## Bundled Extensions
+Note that while OpenVSCode Server is safe for multiple users, they will share the same filesystem.
-VS Code includes a set of built-in extensions located in the [extensions](extensions) folder, including grammars and snippets for many languages. Extensions that provide rich language support (code completion, Go to Definition) for a language have the suffix `language-features`. For example, the `json` extension provides coloring for `JSON` and the `json-language-features` extension provides rich language support for `JSON`.
+### Deployment guides
-## Development Container
+Please refer to [Guides](https://github.com/gitpod-io/openvscode-server/tree/docs/guides) to learn how to deploy OpenVSCode Server to your cloud provider of choice.
-This repository includes a Visual Studio Code Dev Containers / GitHub Codespaces development container.
+## The scope of this project
+
+This project only adds minimal bits required to run VS Code in a server scenario. We have no intention of changing VS Code in any way or to add additional features to VS Code itself. Please report feature requests, bug fixes, etc. in the upstream repository.
+
+> **For any feature requests, bug reports, or contributions that are not specific to running VS Code in a server context, please go to [Visual Studio Code - Open Source "OSS"](https://github.com/microsoft/vscode)**
+
+## Documentation
+
+All documentation is available in [the `docs` branch](https://github.com/gitpod-io/openvscode-server/tree/docs) of this project.
+
+## Supporters
+
+The project is supported by companies such as [GitLab](https://gitlab.com/), [VMware](https://www.vmware.com/), [Uber](https://www.uber.com/), [SAP](https://www.sap.com/), [Sourcegraph](https://sourcegraph.com/), [RStudio](https://www.rstudio.com/), [SUSE](https://rancher.com/), [Tabnine](https://www.tabnine.com/), [Render](https://render.com/) and [TypeFox](https://www.typefox.io/).
+
+## Contributing
-- For [Dev Containers](https://aka.ms/vscode-remote/download/containers), use the **Dev Containers: Clone Repository in Container Volume...** command which creates a Docker volume for better disk I/O on macOS and Windows.
- - If you already have VS Code and Docker installed, you can also click [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode) to get started. This will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
-- For Codespaces, install the [GitHub Codespaces](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension in VS Code, and use the **Codespaces: Create New Codespace** command.
+Thanks for your interest in contributing to the project 🙏. You can start a development environment with the following button:
-Docker / the Codespace should have at least **4 Cores and 6 GB of RAM (8 GB recommended)** to run full build. See the [development container README](.devcontainer/README.md) for more information.
+[](https://gitpod.io/from-referrer)
-## Code of Conduct
+To learn about the code structure and other topics related to contributing, please refer to the [development docs](https://github.com/gitpod-io/openvscode-server/blob/docs/development.md).
-This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
+## Community & Feedback
-## License
+To learn what others are up to and to provide feedback, please head over to the [Discussions](https://github.com/gitpod-io/openvscode-server/discussions).
-Copyright (c) Microsoft Corporation. All rights reserved.
+You can also follow us on Twitter [@gitpod](https://twitter.com/gitpod) or come [chat with us](https://www.gitpod.io/chat).
-Licensed under the [MIT](LICENSE.txt) license.
+## Legal
+This project is not affiliated with Microsoft Corporation.
diff --git a/build/gulpfile.js b/build/gulpfile.js
index e945c06eed45d..d8bc2987d5d75 100644
--- a/build/gulpfile.js
+++ b/build/gulpfile.js
@@ -34,6 +34,8 @@ gulp.task(compileClientTask);
const watchClientTask = task.define('watch-client', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), task.parallel(watchTask('out', false), watchApiProposalNamesTask)));
gulp.task(watchClientTask);
+gulp.task(task.define('watch-init', require('./lib/compilation').watchTask('out', false)));
+
// All
const _compileTask = task.define('compile', task.parallel(monacoTypecheckTask, compileClientTask, compileExtensionsTask, compileExtensionMediaTask));
gulp.task(_compileTask);
diff --git a/build/lib/compilation.js b/build/lib/compilation.js
index f5d46d7b20cad..862ee91706d94 100644
--- a/build/lib/compilation.js
+++ b/build/lib/compilation.js
@@ -19,6 +19,9 @@ const os = require("os");
const File = require("vinyl");
const task = require("./task");
const watch = require('./watch');
+const packageJson = require('../../package.json');
+const productJson = require('../../product.json');
+const replace = require('gulp-replace');
// --- gulp-tsb: compile and transpile --------------------------------
const reporter = (0, reporter_1.createReporter)();
function getTypeScriptCompilerOptions(src) {
@@ -53,8 +56,19 @@ function createCompile(src, build, emitError, transpileOnly) {
const utf8Filter = util.filter(data => /(\/|\\)test(\/|\\).*utf8/.test(data.path));
const tsFilter = util.filter(data => /\.ts$/.test(data.path));
const noDeclarationsFilter = util.filter(data => !(/\.d\.ts$/.test(data.path)));
+ const productJsFilter = util.filter(data => !build && data.path.endsWith('vs/platform/product/common/product.ts'));
+ const productConfiguration = JSON.stringify({
+ ...productJson,
+ version: `${packageJson.version}-dev`,
+ nameShort: `${productJson.nameShort} Dev`,
+ nameLong: `${productJson.nameLong} Dev`,
+ dataFolderName: `${productJson.dataFolderName}-dev`
+ });
const input = es.through();
const output = input
+ .pipe(productJsFilter)
+ .pipe(replace(/{\s*\/\*BUILD->INSERT_PRODUCT_CONFIGURATION\*\/\s*}/, productConfiguration, { skipBinary: true }))
+ .pipe(productJsFilter.restore)
.pipe(utf8Filter)
.pipe(bom()) // this is required to preserve BOM in test files that loose it otherwise
.pipe(utf8Filter.restore)
diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts
index b9769822d73f1..82e9c1a8ab368 100644
--- a/build/lib/compilation.ts
+++ b/build/lib/compilation.ts
@@ -18,6 +18,9 @@ import ts = require('typescript');
import * as File from 'vinyl';
import * as task from './task';
const watch = require('./watch');
+const packageJson = require('../../package.json');
+const productJson = require('../../product.json');
+const replace = require('gulp-replace');
// --- gulp-tsb: compile and transpile --------------------------------
@@ -63,8 +66,20 @@ function createCompile(src: string, build: boolean, emitError: boolean, transpil
const tsFilter = util.filter(data => /\.ts$/.test(data.path));
const noDeclarationsFilter = util.filter(data => !(/\.d\.ts$/.test(data.path)));
+ const productJsFilter = util.filter(data => !build && data.path.endsWith('vs/platform/product/common/product.ts'));
+ const productConfiguration = JSON.stringify({
+ ...productJson,
+ version: `${packageJson.version}-dev`,
+ nameShort: `${productJson.nameShort} Dev`,
+ nameLong: `${productJson.nameLong} Dev`,
+ dataFolderName: `${productJson.dataFolderName}-dev`
+ });
+
const input = es.through();
const output = input
+ .pipe(productJsFilter)
+ .pipe(replace(/{\s*\/\*BUILD->INSERT_PRODUCT_CONFIGURATION\*\/\s*}/, productConfiguration, { skipBinary: true }))
+ .pipe(productJsFilter.restore)
.pipe(utf8Filter)
.pipe(bom()) // this is required to preserve BOM in test files that loose it otherwise
.pipe(utf8Filter.restore)
diff --git a/package.json b/package.json
index 8ae0697e2de51..432e2ab58d0ed 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,9 @@
"hygiene": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js hygiene",
"core-ci": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js core-ci",
"extensions-ci": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js extensions-ci",
- "webview-generate-csp-hash": "npx github:apaatsio/csp-hash-from-html csp-hash ./src/vs/workbench/contrib/webview/browser/pre/index.html"
+ "webview-generate-csp-hash": "npx github:apaatsio/csp-hash-from-html csp-hash ./src/vs/workbench/contrib/webview/browser/pre/index.html",
+ "server:init": "yarn --cwd ./build compile && yarn compile && yarn download-builtin-extensions",
+ "server:smoketest": "yarn --cwd ./test/smoke compile && yarn smoketest-no-compile --web --verbose --headless --electronArgs=\"--disable-dev-shm-usage --use-gl=swiftshader\""
},
"dependencies": {
"@microsoft/1ds-core-js": "^3.2.2",
diff --git a/product.json b/product.json
index c76943372f180..ba63ee6b86b54 100644
--- a/product.json
+++ b/product.json
@@ -1,34 +1,610 @@
{
- "nameShort": "Code - OSS",
- "nameLong": "Code - OSS",
- "applicationName": "code-oss",
- "dataFolderName": ".vscode-oss",
- "win32MutexName": "vscodeoss",
+ "nameShort": "OpenVSCode Server",
+ "nameLong": "OpenVSCode Server",
+ "applicationName": "openvscode-server",
+ "dataFolderName": ".openvscode-server",
+ "win32MutexName": "openvscodeserver",
"licenseName": "MIT",
- "licenseUrl": "https://github.com/microsoft/vscode/blob/main/LICENSE.txt",
+ "licenseUrl": "https://github.com/gitpod-io/openvscode-server/blob/main/LICENSE.txt",
"serverGreeting": [],
"serverLicense": [],
"serverLicensePrompt": "",
- "serverApplicationName": "code-server-oss",
- "serverDataFolderName": ".vscode-server-oss",
- "tunnelApplicationName": "code-tunnel-oss",
- "win32DirName": "Microsoft Code OSS",
- "win32NameVersion": "Microsoft Code OSS",
- "win32RegValueName": "CodeOSS",
+ "serverApplicationName": "openvscode-server",
+ "serverDataFolderName": ".openvscode-server",
+ "tunnelApplicationName": "openvscode-server-tunnel",
+ "win32DirName": "OpenVSCode Server",
+ "win32NameVersion": "OpenVSCode Server",
+ "win32RegValueName": "OpenVSCodeServer",
"win32AppId": "{{E34003BB-9E10-4501-8C11-BE3FAA83F23F}",
"win32x64AppId": "{{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}",
"win32arm64AppId": "{{D1ACE434-89C5-48D1-88D3-E2991DF85475}",
"win32UserAppId": "{{C6065F05-9603-4FC4-8101-B9781A25D88E}",
"win32x64UserAppId": "{{CC6B787D-37A0-49E8-AE24-8559A032BE0C}",
"win32arm64UserAppId": "{{3AEBF0C8-F733-4AD4-BADE-FDB816D53D7B}",
- "win32AppUserModelId": "Microsoft.CodeOSS",
- "win32ShellNameShort": "C&ode - OSS",
- "darwinBundleIdentifier": "com.visualstudio.code.oss",
- "linuxIconName": "com.visualstudio.code.oss",
+ "win32AppUserModelId": "OpenVSCode Server",
+ "win32ShellNameShort": "OpenVSC&ode Server",
+ "darwinBundleIdentifier": "openvscode.server",
+ "linuxIconName": "openvscode.server",
"licenseFileName": "LICENSE.txt",
- "reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
- "urlProtocol": "code-oss",
+ "twitterUrl": "https://twitter.com/gitpod",
+ "reportIssueUrl": "https://github.com/gitpod-io/openvscode-server/issues/new",
+ "requestFeatureUrl": "https://github.com/gitpod-io/openvscode-server/issues",
+ "reportMarketplaceIssueUrl": "https://github.com/eclipse/openvsx/issues",
+ "sendASmile": {
+ "reportIssueUrl": "https://github.com/gitpod-io/openvscode-server/issues/new",
+ "requestFeatureUrl": "https://github.com/gitpod-io/openvscode-server/issues"
+ },
+ "urlProtocol": "openvscode-server",
+ "embedderIdentifier": "openvscode-server",
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/ef65ac1ba57f57f2a3961bfe94aa20481caca4c6/out/vs/workbench/contrib/webview/browser/pre/",
+ "extensionTips": {
+ "muhammad-sammy.csharp": "{**/*.cs,**/project.json,**/global.json,**/*.csproj,**/*.cshtml,**/*.sln,**/appsettings.json}",
+ "firefox-devtools.vscode-firefox-debug": "{**/*.ts,**/*.tsx,**/*.js,**/*.jsx,**/*.es6,**/.babelrc}",
+ "ms-edgedevtools.vscode-edge-devtools": "{**/*.ts,**/*.tsx,**/*.js,**/*.css,**/*.html}",
+ "golang.Go": "**/*.go",
+ "ms-vscode.PowerShell": "{**/*.ps1,**/*.psd1,**/*.psm1,**/*.ps.config,**/*.ps1.config}",
+ "Ionide.Ionide-fsharp": "{**/*.fsx,**/*.fsi,**/*.fs,**/*.ml,**/*.mli}",
+ "dbaeumer.vscode-eslint": "{**/*.js,**/*.jsx,**/*.es6,**/.eslintrc.*,**/.eslintrc,**/.babelrc,**/jsconfig.json}",
+ "ms-vscode.vscode-typescript-tslint-plugin": "{**/tslint.json}",
+ "bmewburn.vscode-intelephense-client": "{**/*.php,**/php.ini}",
+ "xdebug.php-debug": "{**/*.php,**/php.ini}",
+ "rust-lang.rust-analyzer": "{**/*.rs,**/*.rslib}",
+ "DavidAnson.vscode-markdownlint": "{**/*.md}",
+ "ms-azuretools.vscode-docker": "{**/dockerfile,**/Dockerfile,**/docker-compose.yml,**/docker-compose.*.yml,**/*.cs,**/project.json,**/global.json,**/*.csproj,**/*.cshtml,**/*.sln,**/appsettings.json,**/*.py,**/*.ipynb,**/*.js,**/*.ts,**/package.json}",
+ "EditorConfig.EditorConfig": "{**/.editorconfig}",
+ "HookyQR.beautify": "{**/.jsbeautifyrc}",
+ "donjayamanne.githistory": "{**/.gitignore,**/.git}",
+ "felipecaputo.git-project-manager": "{**/.gitignore,**/.git}",
+ "eamodio.gitlens": "{**/.gitignore,**/.git}",
+ "rebornix.Ruby": "{**/*.rb,**/*.erb,**/*.reek,**/.fasterer.yml,**/ruby-lint.yml,**/.rubocop.yml}",
+ "DotJoshJohnson.xml": "{**/*.xml}",
+ "stylelint.vscode-stylelint": "{**/.stylelintrc,**/stylelint.config.js}",
+ "ms-mssql.mssql": "{**/*.sql}",
+ "mtxr.sqltools": "{**/*.sql}",
+ "ms-vscode.sublime-keybindings": "{**/.sublime-project,**/.sublime-workspace}",
+ "k--kato.intellij-idea-keybindings": "{**/.idea}",
+ "christian-kohler.npm-intellisense": "{**/package.json}",
+ "vue.volar": "{**/*.vue}",
+ "ms-python.python": "{**/*.py,**/*.ipynb}",
+ "ms-toolsai.jupyter": "{**/*.ipynb}",
+ "cake-build.cake-vscode": "{**/build.cake}",
+ "Angular.ng-template": "{**/.angular-cli.json,**/angular.json,**/*.ng.html,**/*.ng,**/*.ngml}",
+ "vscjava.vscode-maven": "**/pom.xml",
+ "HashiCorp.terraform": "**/*.tf",
+ "vsciot-vscode.vscode-arduino": "**/*.ino",
+ "ms-kubernetes-tools.vscode-kubernetes-tools": "{**/Chart.yaml}",
+ "GoogleCloudTools.cloudcode": "{**/skaffold.yaml}",
+ "Oracle.oracledevtools": "{**/*.sql}",
+ "ms-vscode.vscode-github-issue-notebooks": "{**/*.github-issues}",
+ "REditorSupport.r": "**/*.r"
+ },
+ "extensionImportantTips": {
+ "muhammad-sammy.csharp": {
+ "name": "C#",
+ "languages": [
+ "csharp"
+ ],
+ "pattern": "{**/*.cs,**/global.json,**/*.csproj,**/*.cshtml,**/*.sln}"
+ },
+ "ms-python.python": {
+ "name": "Python",
+ "languages": [
+ "python"
+ ],
+ "pattern": "{**/*.py}"
+ },
+ "golang.Go": {
+ "name": "Go",
+ "languages": [
+ "go"
+ ],
+ "pattern": "**/*.go"
+ },
+ "vscjava.vscode-java-pack": {
+ "name": "Java",
+ "languages": [
+ "java"
+ ],
+ "pattern": "{**/*.java}",
+ "isExtensionPack": true,
+ "whenNotInstalled": [
+ "ASF.apache-netbeans-java"
+ ]
+ },
+ "ms-vscode.PowerShell": {
+ "name": "PowerShell",
+ "languages": [
+ "powershell"
+ ],
+ "pattern": "{**/*.ps1,**/*.psd1,**/*.psm1}"
+ },
+ "ms-azuretools.vscode-docker": {
+ "name": "Docker",
+ "languages": [
+ "dockerfile"
+ ],
+ "pattern": "{**/dockerfile,**/Dockerfile,**/docker-compose.yml,**/docker-compose.*.yml}"
+ },
+ "vue.volar": {
+ "name": "Vetur",
+ "languages": [
+ "vue"
+ ],
+ "pattern": "{**/*.vue}"
+ },
+ "ms-vscode.makefile-tools": {
+ "name": "Makefile Tools",
+ "languages": [
+ "makefile"
+ ],
+ "pattern": "{**/makefile,**/Makefile}"
+ },
+ "ms-vscode.cmake-tools": {
+ "name": "CMake Tools",
+ "pattern": "{**/CMakeLists.txt}"
+ },
+ "svelte.svelte-vscode": {
+ "name": "Svelte",
+ "pattern": "{**/*.svelte}"
+ },
+ "ms-vscode.vscode-github-issue-notebooks": {
+ "name": "GitHub Issue Notebooks",
+ "pattern": "{**/*.github-issues}"
+ },
+ "ms-playwright.playwright": {
+ "name": "Playwright",
+ "pattern": "{**/*playwright*.config.ts,**/*playwright*.config.js,**/*playwright*.config.mjs}"
+ },
+ "REditorSupport.r": {
+ "name": "R",
+ "languages": [
+ "r"
+ ],
+ "pattern": "{**/*.r}"
+ }
+ },
+ "keymapExtensionTips": [
+ "vscodevim.vim",
+ "ms-vscode.sublime-keybindings",
+ "ms-vscode.atom-keybindings",
+ "ms-vscode.brackets-keybindings",
+ "ms-vscode.vs-keybindings",
+ "ms-vscode.notepadplusplus-keybindings",
+ "k--kato.intellij-idea-keybindings",
+ "lfs.vscode-emacs-friendly",
+ "alphabotsec.vscode-eclipse-keybindings",
+ "alefragnani.delphi-keybindings"
+ ],
+ "languageExtensionTips": [
+ "ms-python.python",
+ "muhammad-sammy.csharp",
+ "ms-toolsai.jupyter",
+ "vscjava.vscode-java-pack",
+ "ecmel.vscode-html-css",
+ "vue.volar",
+ "bmewburn.vscode-intelephense-client",
+ "dsznajder.es7-react-js-snippets",
+ "golang.go",
+ "ms-vscode.powershell",
+ "dart-code.dart-code",
+ "rust-lang.rust-analyzer",
+ "rebornix.ruby"
+ ],
+ "configBasedExtensionTips": {
+ "git": {
+ "configPath": ".git/config",
+ "configName": "Git",
+ "recommendations": {
+ "github.vscode-pull-request-github": {
+ "name": "GitHub Pull Request",
+ "remotes": [
+ "github.com"
+ ]
+ },
+ "eamodio.gitlens": {
+ "name": "GitLens"
+ }
+ }
+ },
+ "maven": {
+ "configPath": "pom.xml",
+ "configName": "Maven",
+ "recommendations": {
+ "vscjava.vscode-java-pack": {
+ "name": "Java",
+ "important": true,
+ "isExtensionPack": true,
+ "whenNotInstalled": [
+ "ASF.apache-netbeans-java"
+ ]
+ },
+ "Pivotal.vscode-boot-dev-pack": {
+ "name": "Spring Boot Extension Pack",
+ "isExtensionPack": true
+ }
+ }
+ },
+ "gradle": {
+ "configPath": "build.gradle",
+ "configName": "Gradle",
+ "recommendations": {
+ "vscjava.vscode-java-pack": {
+ "name": "Java",
+ "important": true,
+ "isExtensionPack": true,
+ "whenNotInstalled": [
+ "ASF.apache-netbeans-java"
+ ]
+ }
+ }
+ },
+ "github-pull-request": {
+ "configPath": ".vscode/.github-pull-request.rec",
+ "configName": "GitHub",
+ "configScheme": "vscode-vfs",
+ "recommendations": {
+ "github.vscode-pull-request-github": {
+ "name": "GitHub Pull Request",
+ "important": true
+ }
+ }
+ }
+ },
+ "extensionKeywords": {
+ "md": [
+ "Markdown"
+ ],
+ "js": [
+ "JavaScript"
+ ],
+ "jsx": [
+ "JavaScript"
+ ],
+ "es6": [
+ "JavaScript"
+ ],
+ "html": [
+ "Html"
+ ],
+ "ts": [
+ "TypeScript"
+ ],
+ "tsx": [
+ "TypeScript"
+ ],
+ "css": [
+ "CSS"
+ ],
+ "scss": [
+ "SASS"
+ ],
+ "txt": [
+ "Text"
+ ],
+ "php": [
+ "PHP"
+ ],
+ "php3": [
+ "PHP"
+ ],
+ "php4": [
+ "PHP"
+ ],
+ "ph3": [
+ "PHP"
+ ],
+ "ph4": [
+ "PHP"
+ ],
+ "xml": [
+ "XML"
+ ],
+ "py": [
+ "Python"
+ ],
+ "pyc": [
+ "Python"
+ ],
+ "pyd": [
+ "Python"
+ ],
+ "pyo": [
+ "Python"
+ ],
+ "pyw": [
+ "Python"
+ ],
+ "pyz": [
+ "Python"
+ ],
+ "java": [
+ "Java"
+ ],
+ "class": [
+ "Java"
+ ],
+ "jar": [
+ "Java"
+ ],
+ "c": [
+ "c",
+ "objective c",
+ "objective-c"
+ ],
+ "m": [
+ "objective c",
+ "objective-c"
+ ],
+ "mm": [
+ "objective c",
+ "objective-c"
+ ],
+ "cpp": [
+ "cpp",
+ "c plus plus",
+ "c",
+ "c++"
+ ],
+ "cc": [
+ "cpp",
+ "c plus plus",
+ "c",
+ "c++"
+ ],
+ "cxx": [
+ "cpp",
+ "c plus plus",
+ "c++"
+ ],
+ "hh": [
+ "cpp",
+ "c plus plus",
+ "c++"
+ ],
+ "hpp": [
+ "cpp",
+ "c++"
+ ],
+ "h": [
+ "cpp",
+ "c plus plus",
+ "c++",
+ "c",
+ "objective c",
+ "objective-c"
+ ],
+ "sql": [
+ "sql"
+ ],
+ "sh": [
+ "bash"
+ ],
+ "bash": [
+ "bash"
+ ],
+ "zsh": [
+ "bash",
+ "zshell"
+ ],
+ "cs": [
+ "c#",
+ "csharp"
+ ],
+ "csproj": [
+ "c#",
+ "csharp"
+ ],
+ "sln": [
+ "c#",
+ "csharp"
+ ],
+ "go": [
+ "go"
+ ],
+ "sty": [
+ "latex"
+ ],
+ "tex": [
+ "latex"
+ ],
+ "ps": [
+ "powershell"
+ ],
+ "ps1": [
+ "powershell"
+ ],
+ "rs": [
+ "rust"
+ ],
+ "rslib": [
+ "rust"
+ ],
+ "hs": [
+ "haskell"
+ ],
+ "lhs": [
+ "haskell"
+ ],
+ "scm": [
+ "scheme"
+ ],
+ "ss": [
+ "scheme"
+ ],
+ "clj": [
+ "clojure"
+ ],
+ "cljs": [
+ "clojure"
+ ],
+ "cljc": [
+ "clojure"
+ ],
+ "edn": [
+ "clojure"
+ ],
+ "erl": [
+ "erlang"
+ ],
+ "hrl": [
+ "erlang"
+ ],
+ "scala": [
+ "scala"
+ ],
+ "sc": [
+ "scala"
+ ],
+ "pl": [
+ "perl"
+ ],
+ "pm": [
+ "perl"
+ ],
+ "t": [
+ "perl"
+ ],
+ "pod": [
+ "perl"
+ ],
+ "groovy": [
+ "groovy"
+ ],
+ "swift": [
+ "swift"
+ ],
+ "rb": [
+ "ruby"
+ ],
+ "rbw": [
+ "ruby"
+ ],
+ "jl": [
+ "julia"
+ ],
+ "f": [
+ "fortran"
+ ],
+ "for": [
+ "fortran"
+ ],
+ "f90": [
+ "fortran"
+ ],
+ "f95": [
+ "fortran"
+ ],
+ "coffee": [
+ "CoffeeScript"
+ ],
+ "litcoffee": [
+ "CoffeeScript"
+ ],
+ "yaml": [
+ "yaml"
+ ],
+ "yml": [
+ "yaml"
+ ],
+ "dart": [
+ "dart"
+ ],
+ "json": [
+ "json"
+ ]
+ },
+ "extensionAllowedBadgeProviders": [
+ "api.bintray.com",
+ "api.travis-ci.com",
+ "api.travis-ci.org",
+ "app.fossa.io",
+ "badge.buildkite.com",
+ "badge.fury.io",
+ "badge.waffle.io",
+ "badgen.net",
+ "badges.frapsoft.com",
+ "badges.gitter.im",
+ "badges.greenkeeper.io",
+ "cdn.travis-ci.com",
+ "cdn.travis-ci.org",
+ "ci.appveyor.com",
+ "circleci.com",
+ "cla.opensource.microsoft.com",
+ "codacy.com",
+ "codeclimate.com",
+ "codecov.io",
+ "coveralls.io",
+ "david-dm.org",
+ "deepscan.io",
+ "dev.azure.com",
+ "docs.rs",
+ "flat.badgen.net",
+ "gemnasium.com",
+ "githost.io",
+ "gitlab.com",
+ "godoc.org",
+ "goreportcard.com",
+ "img.shields.io",
+ "isitmaintained.com",
+ "marketplace.visualstudio.com",
+ "nodesecurity.io",
+ "opencollective.com",
+ "snyk.io",
+ "travis-ci.com",
+ "travis-ci.org",
+ "visualstudio.com",
+ "vsmarketplacebadge.apphb.com",
+ "www.bithound.io",
+ "www.versioneye.com"
+ ],
+ "extensionAllowedBadgeProvidersRegex": [
+ "^https:\\/\\/github\\.com\\/[^/]+\\/[^/]+\\/(actions\\/)?workflows\\/.*badge\\.svg"
+ ],
+ "extensionKind": {
+ "Shan.code-settings-sync": [
+ "ui"
+ ],
+ "shalldie.background": [
+ "ui"
+ ],
+ "techer.open-in-browser": [
+ "ui"
+ ],
+ "CoenraadS.bracket-pair-colorizer-2": [
+ "ui"
+ ],
+ "CoenraadS.bracket-pair-colorizer": [
+ "ui",
+ "workspace"
+ ],
+ "hiro-sun.vscode-emacs": [
+ "ui",
+ "workspace"
+ ],
+ "hnw.vscode-auto-open-markdown-preview": [
+ "ui",
+ "workspace"
+ ],
+ "wayou.vscode-todo-highlight": [
+ "ui",
+ "workspace"
+ ],
+ "aaron-bond.better-comments": [
+ "ui",
+ "workspace"
+ ],
+ "vscodevim.vim": [
+ "ui"
+ ],
+ "ollyhayes.colmak-vim": [
+ "ui"
+ ]
+ },
+ "extensionPointExtensionKind": {
+ "typescriptServerPlugins": [
+ "workspace"
+ ]
+ },
"builtInExtensions": [
{
"name": "ms-vscode.js-debug-companion",
@@ -75,5 +651,17 @@
"publisherDisplayName": "Microsoft"
}
}
+ ],
+ "extensionsGallery": {
+ "serviceUrl": "https://open-vsx.org/vscode/gallery",
+ "itemUrl": "https://open-vsx.org/vscode/item",
+ "resourceUrlTemplate": "https://open-vsx.org/vscode/asset/{publisher}/{name}/{version}/Microsoft.VisualStudio.Code.WebResources/{path}",
+ "controlUrl": "",
+ "recommendationsUrl": "",
+ "nlsBaseUrl": "",
+ "publisherUrl": ""
+ },
+ "linkProtectionTrustedDomains": [
+ "https://open-vsx.org"
]
}
diff --git a/scripts/sync-helper.js b/scripts/sync-helper.js
new file mode 100644
index 0000000000000..9f49f8dfa1575
--- /dev/null
+++ b/scripts/sync-helper.js
@@ -0,0 +1,221 @@
+/* eslint-disable header/header */
+
+const path = require('path');
+const fs = require('fs');
+const https = require('https');
+
+const pickKeys = [
+ 'extensionTips',
+ 'extensionImportantTips',
+ 'keymapExtensionTips',
+ 'configBasedExtensionTips',
+ 'extensionKeywords',
+ 'extensionAllowedBadgeProviders',
+ 'extensionAllowedBadgeProvidersRegex',
+ 'extensionAllowedProposedApi',
+ 'extensionEnabledApiProposals',
+ 'extensionKind',
+ 'languageExtensionTips'
+];
+
+const AllowMissKeys = [
+ 'win32SetupExeBasename',
+ 'darwinCredits',
+ 'darwinExecutable',
+ 'downloadUrl',
+ 'updateUrl',
+ 'webEndpointUrl',
+ 'webEndpointUrlTemplate',
+ 'quality',
+ 'exeBasedExtensionTips',
+ 'webExtensionTips',
+ 'remoteExtensionTips',
+ 'crashReporter',
+ 'appCenter',
+ 'enableTelemetry',
+ 'aiConfig',
+ 'msftInternalDomains',
+ 'sendASmile',
+ 'documentationUrl',
+ 'releaseNotesUrl',
+ 'keyboardShortcutsUrlMac',
+ 'keyboardShortcutsUrlLinux',
+ 'keyboardShortcutsUrlWin',
+ 'introductoryVideosUrl',
+ 'tipsAndTricksUrl',
+ 'newsletterSignupUrl',
+ 'twitterUrl',
+ 'requestFeatureUrl',
+ 'reportMarketplaceIssueUrl',
+ 'privacyStatementUrl',
+ 'showTelemetryOptOut',
+ 'npsSurveyUrl',
+ 'cesSurveyUrl',
+ 'checksumFailMoreInfoUrl',
+ 'electronRepository',
+ 'settingsSearchUrl',
+ 'surveys',
+ 'tasConfig',
+ 'experimentsUrl',
+ 'extensionSyncedKeys',
+ 'extensionVirtualWorkspacesSupport',
+ 'auth',
+ 'configurationSync.store',
+ 'commit',
+ 'date',
+ 'checksums',
+ 'settingsSearchBuildId',
+ 'darwinUniversalAssetId',
+];
+
+const propiertaryExtension = [
+ 'ms-vscode-remote.remote-containers',
+ 'ms-dotnettools.csharp',
+ 'ms-vscode.cpptools-extension-pack',
+ 'ms-azure-devops.azure-pipelines',
+ 'msazurermtools.azurerm-vscode-tools',
+ 'ms-azuretools.vscode-bicep',
+ 'usqlextpublisher.usql-vscode-ext',
+ 'ms-azuretools.vscode-azureterraform',
+ 'VisualStudioExptTeam.vscodeintellicode-completions',
+ 'ms-vsliveshare.vsliveshare',
+ 'ms-toolsai.vscode-ai-remote',
+ 'GitHub.codespaces',
+ 'ms-vscode.azure-repos',
+ 'ms-vscode.remote-repositories',
+ 'ms-vscode-remote.remote-wsl',
+ 'ms-vscode-remote.remote-ssh',
+ 'ms-vscode.remote-server',
+ 'GitHub.copilot',
+ 'GitHub.copilot-nightly',
+ 'GitHub.remotehub',
+ 'GitHub.remotehub-insiders',
+ 'ms-python.vscode-pylance',
+ 'ms-vscode.azure-sphere-tools-ui',
+ 'ms-azuretools.vscode-azureappservice',
+];
+
+const openvsxExtensionMap = {
+ 'ms-dotnettools.csharp': 'muhammad-sammy.csharp'
+};
+
+function filterObj(obj, predicate) {
+ const result = Object.create(null);
+ for (const [key, value] of Object.entries(obj)) {
+ if (predicate(key, value)) {
+ result[key] = value;
+ }
+ }
+ return result;
+}
+
+function renameObjKey(obj, predicate) {
+ const result = Object.create(null);
+ for (const [key, value] of Object.entries(obj)) {
+ const newKey = predicate(key, value) ?? key;
+ result[newKey] = value;
+ }
+ return result;
+}
+
+async function start() {
+ const localPath = path.join(__dirname, '../product.json');
+ const releasePath = path.join(__dirname, '../product-release.json');
+ if (!fs.existsSync(releasePath)) {
+ console.error('product-release.json is not exists, please copy product.json from VSCode Desktop Stable');
+ return;
+ }
+
+ const branchProduct = JSON.parse(await fs.promises.readFile(localPath, { encoding: 'utf8' }));
+ const releaseProduct = JSON.parse(await fs.promises.readFile(releasePath, { encoding: 'utf8' }));
+ const tmpProductPath = path.join(__dirname, '../product-tmp.json');
+ for (let key of pickKeys) {
+ let newValue = releaseProduct[key];
+ if (Array.isArray(newValue) && newValue.length && typeof newValue[0] === 'string') {
+ newValue = newValue.map(v => openvsxExtensionMap[v] ?? v).filter(v => !propiertaryExtension.includes(v));
+ } else if (typeof newValue === 'object' && newValue !== null) {
+ newValue = renameObjKey(newValue, k => openvsxExtensionMap[k] ?? k);
+ newValue = filterObj(newValue, k => !propiertaryExtension.includes(k));
+ }
+ branchProduct[key] = newValue;
+ }
+
+ await fs.promises.writeFile(tmpProductPath, JSON.stringify(branchProduct, null, '\t'));
+
+ if (keysDiff(branchProduct, releaseProduct)) {
+ // allow-any-unicode-next-line
+ console.log('📦 check if you need these keys or not');
+ }
+ await checkProductExtensions(branchProduct);
+ // allow-any-unicode-next-line
+ console.log('📦 you can copy product-tmp.json file to product.json file and resolve logs above by yourself');
+ // allow-any-unicode-next-line
+ console.log('✅ done');
+}
+
+function keysDiff(branch, release) {
+ const toMap = (ret, e) => {
+ ret[e] = true;
+ return ret;
+ };
+ const map1 = Object.keys(branch).reduce(toMap, {});
+ const map2 = Object.keys(release).reduce(toMap, {});
+ let changed = false;
+ for (let key in branch) {
+ if (!!!map2[key]) {
+ changed = true;
+ // allow-any-unicode-next-line
+ console.log(`🟠 Remove key: ${key}`);
+ }
+ }
+ for (let key in release) {
+ if (!!!map1[key] && !AllowMissKeys.includes(key)) {
+ changed = true;
+ // allow-any-unicode-next-line
+ console.log(`🟠 Add key: ${key}`);
+ }
+ }
+ return changed;
+}
+
+async function checkProductExtensions(product) {
+ const uniqueExtIds = new Set();
+ // Allow extension that downloaded from ms marketplace by users to use proposed api
+ // uniqueExtIds.push(...product.extensionAllowedProposedApi);
+
+ // Check recommand extension tips
+ for (let key in product.configBasedExtensionTips) {
+ Object.keys(product.configBasedExtensionTips[key].recommendations ?? {}).forEach(id => uniqueExtIds.add(id));
+ }
+ Object.keys(product.extensionImportantTips).forEach(id => uniqueExtIds.add(id));
+ Object.keys(product.extensionTips).forEach(id => uniqueExtIds.add(id));
+ Object.keys(product.extensionEnabledApiProposals).forEach(id => uniqueExtIds.add(id));
+ product.keymapExtensionTips.forEach(id => uniqueExtIds.add(id));
+ product.languageExtensionTips.forEach(id => uniqueExtIds.add(id));
+
+ // Check if extensions exists in openvsx
+ for (let id of uniqueExtIds) {
+ if (propiertaryExtension.includes(id)) {
+ continue;
+ }
+
+ const openvsxUrl = `https://open-vsx.org/api/${id.replace(/\./g, '/')}`;
+ const ok = await urlExists(openvsxUrl);
+ if (!ok) {
+ // allow-any-unicode-next-line
+ console.error(`🔴 Extension not exists: ${id}`);
+ }
+ }
+}
+
+async function urlExists(url) {
+ return new Promise((resolve, reject) => {
+ https.get(url, res => {
+ resolve(res.statusCode === 200);
+ }).on('error', error => {
+ reject(error);
+ });
+ });
+}
+
+start().catch(console.error);
diff --git a/scripts/sync-with-upstream.sh b/scripts/sync-with-upstream.sh
new file mode 100755
index 0000000000000..4f0fe912064c0
--- /dev/null
+++ b/scripts/sync-with-upstream.sh
@@ -0,0 +1,89 @@
+#!/usr/bin/env bash
+
+echo "Syncing openvscode-server with upstream"
+
+upstream_url="https://github.com/microsoft/vscode.git"
+upstream_branch=${1:-"upstream/main"}
+local_branch=${2:-"main"}
+base_commit_msg=${3:-"code web server initial commit"}
+only_sync=${4:-"true"}
+
+exit_script() {
+ reason=$1
+ echo "Update script ended unsucessfully"
+ echo "Reason: $reason"
+ exit 1
+}
+
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
+ ROOT=$(dirname $(dirname $(realpath "$0")))
+else
+ ROOT=$(dirname $(dirname $(readlink -f $0)))
+ # --disable-dev-shm-usage --use-gl=swiftshader: when run on docker containers where size of /dev/shm
+ # partition < 64MB which causes OOM failure for chromium compositor that uses the partition for shared memory
+ LINUX_EXTRA_ARGS="--disable-dev-shm-usage --use-gl=swiftshader"
+fi
+
+# Checks is there's an upstream remote repository and if not
+# set it to $upstream_url
+check_upstream() {
+ git remote -v | grep --quiet upstream
+ if [[ $? -ne 0 ]]; then
+ echo "Upstream repository not configured"
+ echo "Setting upstream URL to ${upstream_url}"
+ git remote add upstream $upstream_url
+ fi
+}
+
+# Gets the base commit
+get_base_commit() {
+ local base_commit=$(git log --pretty="%H" --max-count=1 --grep "$base_commit_msg")
+ if [[ -z $base_commit ]]; then
+ exit_script "Could not find base commit"
+ fi
+ echo $base_commit
+}
+
+# Fetch updates from upstream and rebase
+sync() {
+ echo "Shallow fetching upstream..."
+ git fetch upstream
+ git checkout $local_branch
+ echo "Rebasing $local_branch branch onto $upstream_branch from upstream"
+ git rebase --onto=$upstream_branch $(get_base_commit)~ $local_branch
+ if [[ $? -ne 0 ]]; then
+ echo "There are merge conflicts doing the rebase."
+ echo "Please resolve them or abort the rebase."
+ exit_script "Could not rebase succesfully"
+ fi
+ echo "$local_branch sucessfully updated"
+}
+
+cd $ROOT
+
+# Sync
+check_upstream
+sync
+
+if [[ "$only_sync" == "true" ]]; then
+ exit 0
+fi
+
+# Clean and build
+# git clean -dfx
+yarn && yarn server:init
+if [[ $? -ne 0 ]]; then
+ exit_script "There are some errors during compilation"
+fi
+
+# Configuration
+export NODE_ENV=development
+export VSCODE_DEV=1
+export VSCODE_CLI=1
+
+# Run smoke tests
+yarn smoketest --web --headless --verbose --electronArgs=$LINUX_EXTRA_ARGS
+if [[ $? -ne 0 ]]; then
+ exit_script "Some smoke test are failing"
+fi
diff --git a/src/server-main.js b/src/server-main.js
index 27ecbaed0d6af..0ab6326eff2ef 100644
--- a/src/server-main.js
+++ b/src/server-main.js
@@ -181,7 +181,9 @@ function sanitizeStringArg(val) {
* then find a free port in that range. Throw error if no
* free port available in range.
*
- * In absence of specified ports, connect to port 8000.
+ * If only `--port` is provided then connect to that port.
+ *
+ * In absence of specified ports, connect to port 3000.
* @param {string | undefined} host
* @param {string | undefined} strPort
* @returns {Promise}
@@ -205,7 +207,7 @@ async function parsePort(host, strPort) {
process.exit(1);
}
}
- return 8000;
+ return 3000;
}
/**
diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts
index 9f34c85cc2d33..cc049b16ccef7 100644
--- a/src/vs/code/browser/workbench/workbench.ts
+++ b/src/vs/code/browser/workbench/workbench.ts
@@ -492,22 +492,30 @@ function doCreateUri(path: string, queryValues: Map): URI {
return URI.parse(window.location.href).with({ path, query });
}
-(function () {
+(function () {
// Find config by checking for DOM
const configElement = document.getElementById('vscode-workbench-web-configuration');
const configElementAttribute = configElement ? configElement.getAttribute('data-settings') : undefined;
if (!configElement || !configElementAttribute) {
throw new Error('Missing web configuration element');
}
- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = JSON.parse(configElementAttribute);
+ const originalConfig: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = JSON.parse(configElementAttribute);
+ const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = {
+ remoteAuthority: window.location.host,
+ developmentOptions: originalConfig.developmentOptions,
+ settingsSyncOptions: originalConfig.settingsSyncOptions,
+ folderUri: originalConfig.folderUri,
+ workspaceUri: originalConfig.workspaceUri,
+ callbackRoute: originalConfig.callbackRoute
+ };
// Create workbench
create(document.body, {
...config,
- settingsSyncOptions: config.settingsSyncOptions ? {
- enabled: config.settingsSyncOptions.enabled,
- } : undefined,
+ developmentOptions: {
+ ...config.developmentOptions
+ },
workspaceProvider: WorkspaceProvider.create(config),
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
credentialsProvider: config.remoteAuthority ? undefined : new LocalStorageCredentialsProvider() // with a remote, we don't use a local credentials provider
diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
index acccff1f096f4..99905a1f72ee4 100644
--- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
+++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
@@ -1482,7 +1482,7 @@ class ProposedApiController {
this._envEnabledExtensions = new Set((_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id)));
- this._envEnablesProposedApiForAll =
+ this._envEnablesProposedApiForAll = true || // always enable proposed API
!_environmentService.isBuilt || // always allow proposed API when running out of sources
(_environmentService.isExtensionDevelopment && productService.quality !== 'stable') || // do not allow proposed API against stable builds when developing an extension
(this._envEnabledExtensions.size === 0 && Array.isArray(_environmentService.extensionEnabledProposedApi)); // always allow proposed API if --enable-proposed-api is provided without extension ID
diff --git a/test/smoke/src/areas/statusbar/statusbar.test.ts b/test/smoke/src/areas/statusbar/statusbar.test.ts
index d6b7069afd6ff..721ccf3a9476e 100644
--- a/test/smoke/src/areas/statusbar/statusbar.test.ts
+++ b/test/smoke/src/areas/statusbar/statusbar.test.ts
@@ -16,9 +16,11 @@ export function setup(logger: Logger) {
it('verifies presence of all default status bar elements', async function () {
const app = this.app as Application;
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.BRANCH_STATUS);
- if (app.quality !== Quality.Dev && app.quality !== Quality.OSS) {
+ /*
+ if (app.quality !== Quality.Dev) {
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.FEEDBACK_ICON);
}
+ */
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.SYNC_STATUS);
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.PROBLEMS_STATUS);
@@ -67,7 +69,7 @@ export function setup(logger: Logger) {
await app.workbench.statusbar.waitForEOL('CRLF');
});
- it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () {
+ it.skip(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () {
const app = this.app as Application;
if (app.quality === Quality.Dev || app.quality === Quality.OSS) {
return this.skip();