Commit Graph

66 Commits

Author SHA1 Message Date
Benjamin Pasero
a7566cb484 eng - fix layer checker (#249196)
Adding __global to CORE_TYPES allows node.js types in all layers.
2025-05-18 09:48:02 +02:00
Robo
12326f9906 chore: update to Electron 35 (#245423)
* chore: bump electron@35.0.1

* chore: update types/node@22.x

* chore: update web types for node v22.x

* chore: bump electron@35.1.2

* chore: update node.js build

* chore: update app.dock usage

Refs 71f3ff6bf2

* chore: bump electron@35.1.4

* chore: bump electron@35.1.5

* ci: bump sysroot to glibc 2.28 and gcc 10.5.0

* ci: enable timeout for smoketests

* chore: bump min glibcxx to 3.4.26 for server

* Revert "ci: enable timeout for smoketests"

This reverts commit afb637e85d.

* chore: update debian dependencies

* fix: workaround npm.ps1 argument parsing with powershell

* chore: update rpm dependencies

* test: partially revert changes from 242535

* test: remove redudant keybinding dispatch for selectTab

* test: fix test failure from running configured tasks

* test: focus settings editor for preferences.test.ts

* node - adopt compile cache (#246835)

* node - adopt compile cache

* adopt for utility process

* tweaks

* log state of compilation cache

* Revert "log state of compilation cache"

This reverts commit f3840387a583013834762e2c44f6e8424929297f.

* Revert "node - adopt compile cache (#246835)"

This reverts commit 673a00cab66c9bac87f3cd27b80efa41c80150f1.

* chore: update builds

* chore: bump electron@35.2.0

* chore: bump electron@35.2.1

* chore: bump electron@35.2.2

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2025-05-09 19:03:36 +09:00
Justin Chen
94590884c8 refactor ui element selection to standalone service (#248185)
* big refator to ui element's own service

* move native to own file

* add native type

* fix in layer checker

* fix in layer checker

* fix whitespace

* fix another whitespace

* Update layersChecker.js

* build still not passing

* Update layersChecker.js

* update layerChecker using npm run compile

* try updating layer checker rules

* rename simple browser service

* another rename in app.ts
2025-05-07 01:24:21 -07:00
Connor Peet
c5759394bf mcp: support streamable HTTP (#246557)
This PR adds support for 'streamable HTTP' MCP servers. This is
backwards-compatible with existing SSE servers. We'll first try to
initialize the server in streamable HTTP mode, and then fall back to
legacy SSE if that fails.

This PR also adds our own small SSE parser, `eventsource` was too high
level to do what we need to do.

Refs https://github.com/microsoft/vscode/issues/244751
2025-04-14 23:40:28 +00:00
Matt Bierner
b998a666c0 Fix layer check errors 2025-03-24 15:00:51 -07:00
Connor Peet
2ff4921966 eng: allow structuredClone (since node 17/chrome 98) in all layers 2025-03-18 10:11:32 -07:00
Connor Peet
248739282e mcp: support sse (#243621)
* mcp: support sse

Didn't seem like Claude Desktop configs have SSE support yet, but I did
the obvious of having an object with a `url`. I also added a `type`
(optional for stdio) so we can better disambiguate types of configs.

Example .vscode/mcp.json:

```
{
  "servers": {
    "everything": {
      "type": "sse",
      "url": "http://localhost:3001/sse"
    }
	}
}
```

Closes #243242

* update layer check
2025-03-15 06:32:00 +00:00
Connor Peet
0a721d35a2 update layer check 2025-03-11 17:01:42 -07:00
Aman Karmani
e76c50f20e build: switch build/tsconfig.json to module: nodenext (#238426)
* build/tsconfig: switch to module: nodenext for bun compat

* build: rewrite imports for nodenext compat

* build: re-generate
2025-01-22 20:12:39 +01:00
Alex Ross
d24b8fb490 Add a token store for tree sitter (#237885)
* Add a token store for tree sitter

* Handle root node change

* Split tokens, changes between syntax nodes, proper new end position when multiple edits

* Holes between nodes

* Add guess token store

* Fix deleting tokens

* Switch over to range based and capture offsets early

* 🧹

* 🗑️

* Only block for 5 ms, comments in monaco.d.ts

* Faster and more scoped changed range finding

* Revert "Faster and more scoped changed range finding"

This reverts commit 84b3f4a612.

* Faster and more scoped changed range finding

* Use already computed end position

* Only expose fully parsed trees from tree sitter and do capture immediately.

* Improve race by only firing tree change event when the tree parse is on the same version as the model

* Fix race

* Fix disposable leak in test

* Fix parsing loop bug

* Fix race condition in the token store layer

* Don't block when collecting tokens

* Fix tests

* Fix some tests

* Add Performance to CORE_TYPES

* Add missing js file
2025-01-21 15:02:16 +00:00
Christof Marti
3d41ba214c Proxy support for Node.js fetch (#228697) 2024-11-06 00:22:35 +01:00
Christof Marti
bbf4ab6683 Fix layering 2024-11-01 08:59:46 +01:00
Benjamin Pasero
c5b6ef14e6 esm - more cleanup (#230285) 2024-10-02 11:55:17 +02:00
Connor Peet
8a32f69162 refactor: cleanup debt for hashing (#230174)
* refactor: cleanup debt for hashing

- Adds a type to avoid direct usage of sync `hash()` for consumers
  working with binary input.
- Moved the previous browser-only `sha1Hex` to `hash.ts` now that
  webcrypto is quite universal, including in Node.js since 19.
- Cleaned up some code that is replaced with modern built-in functions
  like `TypedArray.fill` and `padStart`.
- The `NotebookSimpleWorker` was manually calculating the hash for
  its binary data (probably to avoid the same issue as #229619), so
  I swapped that to use webcrypto as well which is much speedier for
  large inputs (125ms vs 8ms for 10MB of data) @rebornix

Closes https://github.com/microsoft/vscode/issues/229845

* update layer checker
2024-09-30 20:56:03 -07:00
Benjamin Pasero
1d219d75ef esm - fix layer checker 2024-09-27 08:58:11 +02:00
Sandeep Somavarapu
ebc02af2d8 rename electron-node to electron-utility (#227672) 2024-09-05 00:49:23 -07:00
Sandeep Somavarapu
01fcf004a6 Use electron net directly in shared process (#227553)
* Use electron net directly in shared process

* add built file

* introduce shared electron-node layer

* remove electron-utility layer

* fix (overlook): move back cli files to node
2024-09-04 07:26:43 -07:00
Benjamin Pasero
6b924c5152 ESM merge to main (#227184)
Co-authored-by: Johannes Rieken <jrieken@microsoft.com>
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
2024-08-30 10:31:46 +02:00
Matt Bierner
84607a2fe2 Fix some always true/false errors in codebase (#223359)
* Fix some always true/false errors in codebase

Testing out latest TS nightly that can identify when an expression is always true/false. This caught a few likely coding mistakes in our codebase

Unsure about the intent in some of these cases but I've tried my best to understand them. Pinging relevant code owners for the confusing cases

* Bump TS version

* Fix unreachable in build scripts

* Bump versions

* restore intent

* Revert package.json change

* Fixing a few new layer checker errors

These are global in node now

* Skip lib check in integration project

* One more skiplibcheck

* More skip lib

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com>
2024-07-30 15:37:27 -07:00
Benjamin Pasero
83f03bbb7b debt - enlist most JS files in tsconfig.json (#216566) 2024-06-19 08:35:55 +02:00
Robo
5216c04428 chore: update to electron 29 (#209818)
* chore: update electron@29.1.0

* chore: update typings to 20.x

* chore: bump electron@29.1.5

* ci: fix crash in compiling extensions-ci

* chore: disable .d.ts check for build/

$ ../node_modules/.bin/tsc -p tsconfig.build.json
node_modules/@types/chokidar/index.d.ts:21:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/@types/chokidar/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

21 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
                ~~~~~~~~~

node_modules/chokidar/types/index.d.ts:8:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/chokidar/types/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

8 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
               ~~~~~~~~~

Found 2 errors in 2 files.

Errors  Files
     1  node_modules/@types/chokidar/index.d.ts:21
     1  node_modules/chokidar/types/index.d.ts:8

Refs a0f9e09f64

* chore: update core types

* temp: fix layer validation

* chore: update nodejs checksums

* ci: use latest v20 LTS for missing node-gyp

Refs eacec5f490

* ci: define LIBCPP_HARDENING_MODE

* ci: fix crash in vscode-web-min-ci

* chore: update rpm deps-list

* chore: bump tree-sitter-typescript@0.20.5

* chore: bump electron@29.3.0

* chore: bump electron@29.3.1

* chore: update rpm deps-list for x86_64

* ci: disable io_uring UV backend on linux

* ci: disable io_uring backend for oss as well

* chore: update typings to 20.x

* ci: add TODO for io_uring workaround

* chore: bump distro

* chore: update preinstall node version checks

* chore: update @types/gulp

Refs https://github.com/microsoft/vscode/issues/212442

* ci: disable io_uring in more test suites
2024-05-11 01:20:28 +09:00
João Moreno
e469272e45 remove inline sourcemaps from build files (#198842) 2023-11-22 14:05:46 +01:00
Benjamin Pasero
f9b5584b73 aux window - reduce direct setInterval uses (#197741) 2023-11-08 16:09:30 +01:00
Benjamin Pasero
38db856f35 debt - use globalThis and remove deprecated globals (#197712)
* debt - use `globalThis` and remove deprecated `globals`

* fix build
2023-11-08 09:13:03 +01:00
Benjamin Pasero
3453c4f9f0 aux window - avoid/flag more globals (#197614)
* aux window - avoid/flag more globals

* fix access from worker

* allow `queueMicrotask`

* more adoptions

* fix build

* avoid $globalThis
2023-11-07 12:52:20 +01:00
Benjamin Pasero
912c2d98e3 aux window - ensure native host service is properly typed in all contexts (#197527) 2023-11-06 12:00:24 +01:00
Matt Bierner
10d94ba0f3 Pick up latest TS nightly for building VS Code (#194631) 2023-10-02 19:40:35 +01:00
Matt Bierner
70139e827a Pick up latest TS nightly for building VS Code (#193534)
Required fixing a real typing error
2023-09-19 17:25:11 -07:00
Robo
ea490e5545 chore: update to Electron 25 (#188268)
* chore: update electron@25.3.0

* ci: update NodeTool version

* chore: update @types/node

* add more common types to layers checker

* chore: update debian dependencies

* chore: update rpm dependencies

* fix: use legacy dns result order of Node.js

* ci: remove deprecated always-auth npm config

Refs npm/cli@72a7eeb

* chore: update deb and rpm dependencies

* chore: update armhf rpm dependencies

* chore: update x64 debian dependencies

* chore: update x64 rpm dependencies

* chore: update electron@25.3.1

* chore: update electron@25.4.0

* chore: bump distro

* chore: bump distro

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2023-08-07 21:46:27 +09:00
Robo
e5f61433b5 chore: update to Electron 22 (#177600)
* Revert "chore: revert to Electron 19 (#175851)"

This reverts commit 3a11b47eee.

* chore: bump electron@22.3.3

* build: use custom version for V8 sandbox

* chore: update electron@22.4.1

* chore: enable forceAllocationsToV8Sandbox for extension host

* chore: bump electron@22.4.2

* chore: bump electron@22.4.3

* sandbox - cleanup from electron 22 update (#178919)

* Revert "chore: revert to Electron 19 (#175851)"

This reverts commit 3a11b47eee.

* chore: bump electron@22.3.3

* build: use custom version for V8 sandbox

* chore: update electron@22.4.1

* chore: enable forceAllocationsToV8Sandbox for extension host

* chore: bump electron@22.4.2

* chore: bump electron@22.4.3

* temp: update distro

* sandbox - cleanup from electron 22 update

* missing comile

* more changes

* fix build

* restore

* 💄

* compile

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2023-04-03 09:09:31 +02:00
Robo
3a11b47eee chore: revert to Electron 19 (#175851)
* Revert "Update to min supported version of node (#175723)"

This reverts commit f749e6be2d.

* Revert "chore: update min node version for development (#175663)"

This reverts commit f2a822fbe9.

* Revert "electron 22 sandbox - enable for OSS (#175659)"

This reverts commit 2551af21f8.

* Revert "chore: update to Electron 22 (#166430)"

This reverts commit 6e85d2b51e.
2023-03-02 02:58:46 -08:00
Robo
6e85d2b51e chore: update to Electron 22 (#166430)
* chore: bump electron@22.0.0-beta.5

* chore: bump electron@22.0.0-beta.7

* chore: update libc++ flags

* chore: switch to c++17

* chore: bump electron@22.0.0

* chore: bump electron@22.0.2

* chore: cleanup build config for linux

* chore: update debian dependencies

* chore: update rpm dependencies

* chore: update electron@22.0.3

* chore: bump electron@22.2.0

* chore: remove deprecated utility process invoker

* chore: bump electron@22.2.1

* chore: remove unused methods

* chore: update internal electron version

* chore: bump electron@22.3.0

* temp: update electron with default PGO

* chore: bump electron@22.3.1

* cleanup

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2023-02-28 07:04:00 -08:00
Benjamin Pasero
9bbce647b3 debt - strict layer rules for more services (#175411) 2023-02-25 15:49:47 +01:00
Johannes
696c1cf199 build utils with source map to enable JS debug console 2022-11-10 15:05:47 +01:00
Matt Bierner
99e126b0b2 Pick up latest TS version for building VS Code (#162786)
Pick up latest TS for building VS Code
2022-10-06 12:08:45 -07:00
Benjamin Pasero
0895639566 debt - mention our wiki when putting out layer errors (#157768) 2022-08-10 15:37:21 +02:00
Matt Bierner
a43e9acd68 Add AbortController to core types 2022-08-04 16:26:18 -07:00
Benjamin Pasero
f4f1b04d87 Add a setting to enable sandbox: true for windows (#154062)
* sandbox - allow enabled sandbox in a full build

* sandbox - reduce `electron-browser` in workbench

* sandbox - reduce `electron-browser` in platform

* sandbox - add a setting to enable sandbox mode for window

* fix lint

* Revert "sandbox - reduce `electron-browser` in workbench"

This reverts commit 36a5167cf9.

* Revert "sandbox - reduce `electron-browser` in platform"

This reverts commit 6f49d704a5.

* fix layer issue

* fix some js errors
2022-07-05 09:54:28 +02:00
Benjamin Pasero
be376cfef0 debt - improve ipc validation code 2022-04-12 07:46:21 +02:00
Benjamin Pasero
95c2a71018 Revert "ipcMain validation (#147071)"
This reverts commit 508b173177.
2022-04-11 19:34:12 +02:00
Benjamin Pasero
508b173177 ipcMain validation (#147071)
* first cut ipc validation

* clean up

* comment
2022-04-11 18:11:19 +02:00
João Moreno
d06e16b59a layer checker: follow parent symbols 2022-04-04 15:05:34 +02:00
Benjamin Pasero
693b2fdbaf debt - make URL available as core type 2022-04-04 11:21:57 +02:00
Alex Dima
79e83ab7fa Go back to using buitlin URL
This reverts commit 014814146e.
2022-03-25 09:25:49 +01:00
Benjamin Pasero
066b362943 fix layers checker to support trace 2022-03-15 21:06:22 +01:00
Robo
32d40cf44e chore: update to electron 17 (#143223)
* chore: bump electron@17.0.0

* Revert "chore: revert to electron@13 (#143851)"

This reverts commit df645f1450.

* chore: bump electron@17.1.0

* Revert "ci: fix build with latest node-gyp"

This reverts commit c3e948aa30.

* chore: revert ci changes for node v16

* chore: update yarn.lock

* chore: bump electron@17.1.1
2022-03-11 00:51:37 +09:00
Matt Bierner
433bf7cd88 Update build scripts to target es2020 2022-02-28 14:00:17 -08:00
Robo
df645f1450 chore: revert to electron@13 (#143851)
* Revert "chore: update to electron 16 (#137241)"

This reverts commit 01df559c18.
This reverts commit 46301339b7

* ci: fix remote compiler for sdl-scan

* chore: fix remote/.yarnrc

* chore: fix build/npm/postinstall.js

* chore: rm crash reporter from shared process

* chore: rm crash reporter from ext host

* chore: fix build/lib/layersChecker.ts

* :chore: preserve some more changes

* fix tests

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2022-02-24 17:49:49 +01:00
Benjamin Pasero
ae0864d995 fix valid layers checker 2022-02-14 08:41:24 +01:00
Robo
01df559c18 chore: update to electron 16 (#137241)
* chore: bump electron@15.3.0

* chore: bump node@16.x

* chore: enable render process reuse

* Revert "watcher - use `type` property for crash reporter location"

This reverts commit bfa488dd8f.

* Revert "watcher - enable crash reports on linux (#136264)"

This reverts commit af261488f8.

* chore: enable crashpad on linux

* chore: bump electron@15.3.1

* chore: update api changes

* chore: bump @vscode/sqlite3@5.0.3

* spec: skip non-context aware module unittests

* chore: fix perf hook integration with node environment

* fix: adopt fs api changes

* chore: fix integration tests

* chore: bump electron@15.3.2

* chore: bump electron@16.0.0

* temp(macOS): kill test instances in OSS

* Revert "temp(macOS): kill test instances in OSS"

This reverts commit b0d796c8d64227a5ec012c060bbbee7d9da27568.

* chore: update chromium version for clang downloader

* some 💄 changes

* align with changes

* adopt more fs.rm

* 💄

* chore: bump @vscode/sqlite3@5.0.4

* fix layers check to account for duplicated types from node.js

* update todo for type casts

* smoke - fix compile issue

* chore: update module cache

* watcher - fix unhandled rejection (fix #137416)

* ci: update node version

* enable stack dumping

* update electron types to 16.x

* chore: bump @vscode/sqlite3@5.0.5

Refs https://github.com/microsoft/vscode/issues/137496

* fix layer issue

* add `AbortSignal` to core types

* chore: update linux compile flags

Refs 797723ec83

* ci: fix linux build

* ci: update github ci cache

* ci: fix remote build in github ci

* ci: better fix for remote build

* chore: bump azure cache

* chore: fix merge conflict

* :chore: update to electron@16.0.2

* chore: bump @vscode/sqlite3@5.0.7

* ci: update to gcc-4.9 for remote

Refs https://github.com/microsoft/vscode/issues/137659

* ci: switch to buster for linux arm

Refs https://github.com/microsoft/vscode/issues/137927

* ci: fix build on linux arm64

* ci: fix arm client compiler toolchain

Refs #137927

* chore: bump electron@16.0.3

* ci: fix compile flags for the c toolchain

* chore: bump electron@16.0.4

* Add experimental dark mode flag (#139109)

* Add experimental dark mode flag

* Apply PR feedback

* chore: bump electron@16.0.6

* chore: bump electron@16.0.7

Fixes https://github.com/microsoft/vscode/issues/138792
Fixes https://github.com/microsoft/vscode/issues/139300

* chore: experimental highlight API

* smoke - fix compile issue

* FIXME: custom ELECTRON_RUN_AS_NODE with node worker

* Revert "chore: bump electron@16.0.7"

This reverts commit 5fd01cf37c.

* Revert "Revert "chore: bump electron@16.0.7""

This reverts commit a7f1b73951.

* chore: fix github linux workflow

* chore: address review feedback

* chore: bump electron@16.0.8

* ci: revert to stretch distro for linux arm

Refs https://github.com/microsoft/vscode/issues/137927

* ci: force build

* chore: update yarn.lock

* address feedback

* Revert "FIXME: custom ELECTRON_RUN_AS_NODE with node worker"

This reverts commit 7b48fa3732.

* ci: fix remote folder build

* chore: fix github linux ci

* 🆙 `versionSpec`

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
Co-authored-by: Raymond Zhao <raymondzhao@microsoft.com>
2022-02-08 20:09:00 +01:00