Commit Graph

186 Commits

Author SHA1 Message Date
Connor Peet
a0b548807a eng: add assertHeap method for memory assertions (#198334)
This adds an `assertHeap` function that can be used in tests. It
takes a heap snapshot, and asserts the state of classes in memory. This
works in Node and the Electron sandbox, but is a no-op in the browser.
Snapshots are process asynchronously and will report failures at the end
of the suite.

This method should be used sparingly (e.g. once at the end of a suite to
ensure nothing leaked before), as gathering a heap snapshot is fairly
slow, at least until V8 11.5.130 (https://v8.dev/blog/speeding-up-v8-heap-snapshots).

When used, the function will ensure the test has a minimum timeout
duration of 20s to avoid immediate failures.

It takes options containing a mapping of class names, and assertion functions
to run on the number of retained instances of that class. For example:

```ts
assertSnapshot({
	classes: {
		ShouldNeverLeak: count => assert.strictEqual(count, 0),
		SomeSingleton: count => assert(count <= 1),
	}
});
```

Closes https://github.com/microsoft/vscode/issues/191920
2023-11-15 10:41:22 -08:00
Benjamin Pasero
cb9c48673f aux window - reduce deprecated $window usages (#197800)
* aux window - reduce deprecated $window usages

* aux window - reduce deprecated $window usages

* aux window - reduce deprecated $window usages

* aux window - reduce deprecated $window usages
2023-11-09 09:09:02 +01:00
Benjamin Pasero
f346494c77 aux window - cleanup eslint rules (#197763) 2023-11-09 05:55:21 +01:00
Benjamin Pasero
c90951b147 aux window - less global document usages (#197701)
* aux window - less global `document` usages

* aux window - less global `document` usages

* aux window - less global `document` usages
2023-11-08 08:39:04 +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
9050cd7553 aux window - reduce global access to window (#197538) 2023-11-06 18:06:36 +01:00
Daniel Imms
3a351bdc29 Move to xterm scoped image addon 2023-11-01 14:47:59 -07:00
Daniel Imms
9d1bc6ae59 Move to scoped xterm.js packages
xterm-addon-image is excluded currently as there are some publishing
issues.

See xtermjs/xterm.js#4859
2023-11-01 12:15:41 -07:00
Connor Peet
331e445eff eng: add a basic 'must use result' and ensure assertSnapshot result is used (#194744)
* eng: add a basic 'must use result' and ensure assertSnapshot result is used

Fixes #194570

* fix found lint
2023-10-03 20:08:56 +01:00
Benjamin Pasero
73cc570f58 Allow for multiple editor parts (#193425)
* demo

* wip

* polish

* allow to toggle

* compile

* enable devtools

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* Avoid using global document, global window

* Fix exception caused by reading the size of the newly created window before it is available

* cleanup

* make it more useful

* apply zoom

* first cut editor parts

* cleanup

* scaffold some services

* preserve view state

* simple label distinction

* introduce accessor

* support dnd

* fix open editors view

* share window options

* cleanup

* 💄

* 💄

* 💄

* 💄

* cleanup on unload

* add todo

* stylescleanup

* avoid instanceof checks

* share more styles

* revert changes partially

* fix custom menus

* more alignment to main window

* codicon does not seem to be needed anymore

* no need for isHTMLElement

* fix icon error on macOS

* prevent `document.createElement`

* close child window when main window closes

* better active groups tracking

* cleanup

* pass along editor parts viewer

* eslint rule for instanceof checks

* add dom tests

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Alex Dima <alexdima@microsoft.com>
2023-10-03 12:20:06 +02:00
Johannes
415bc174ea refine lint config, add missing jsdoc and jsdoc-tag corrections 2023-09-01 14:23:16 +02:00
Johannes
ebfe7fabfb wip - define jsdoc lint rules for vscode.d.ts 2023-08-30 11:37:44 +02:00
Daniel Imms
67a99e361e TerminalExecuteCommandEvent proposal
Part of #145234
2023-08-24 07:58:22 -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
Alex Ross
34442b8b39 Warn on async suites (#188378)
Part of #187718
2023-07-28 17:04:23 +01:00
Johannes
8c19d3f0e7 add lint rule for AMD node imports 2023-07-04 11:31:36 +02:00
Johannes Rieken
69cd1439e5 from ESM land bring over amdX-util and bring over one of its usages (#186748)
* from ESM land bring over amdX-util and bring over one of its usages

* fix tsec violation

* one more exemption

* grrrr

* last try, fingers crossed
2023-06-30 09:05:06 -07:00
Johannes Rieken
654c61dcb1 add lint-rule to discourage native private fields (#186735) 2023-06-30 06:13:18 -07:00
Robo
10cf7f040a chore: add distro info to telemetry on linux (#185261) 2023-06-16 14:55:59 +02:00
Daniel Imms
e7a3127217 Integrate xterm-addon-image 2023-05-14 08:09:17 -07:00
Johannes Rieken
89b615d105 add lint rule to prevent type discrimination properties in API types (#180829)
re https://github.com/microsoft/vscode/issues/63943 and other
2023-04-25 11:22:28 -07:00
Raymond Zhao
22ed59eb3d Bump windows-process-tree with workaround for typings (#179649) 2023-04-11 10:05:56 -07:00
Raymond Zhao
07aec54e2e Bump spdlog (#179642) 2023-04-11 08:00:57 -07:00
Raymond Zhao
84ac780186 Revert "Bump windows-process-tree" (#179508)
Revert "Bump windows-process-tree (#179176)"

This reverts commit 15cb6b36f8.
2023-04-08 00:47:57 +01:00
Raymond Zhao
15cb6b36f8 Bump windows-process-tree (#179176)
* Bump windows-process-tree

* Fix compile error

* Add explanation to source

* Add that the types package has been deprecated
2023-04-05 20:51:26 +02:00
Robo
d317fbf297 chore: revert @vscode/spdlog bump (#179103)
* Revert "chore: update spdlog@0.13.9 (#179087)"

This reverts commit 9eba21c20f.

* Revert "Bump spdlog (#179035)"

This reverts commit 4cc7f76f60.
2023-04-04 10:49:54 +02:00
Raymond Zhao
90089562cc Bump proxy-agent (#179033) 2023-04-03 15:23:31 -07:00
Raymond Zhao
4cc7f76f60 Bump spdlog (#179035) 2023-04-03 11:18:47 -07: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
João Moreno
5f9bbf37c1 Revert "adopt new module locations (#177472)"
This reverts commit 5b6cd9c3c7.
2023-03-17 18:55:13 +01:00
João Moreno
5b6cd9c3c7 adopt new module locations (#177472)
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
2023-03-17 15:34:17 +01:00
Rob Lourens
cd1d31179d Add event fired when the user performs actions on interactive session responses (#176829)
* Add an id to responses that comes from the provider

* Add event fired when the user performs actions on interactive session responses

* Only show user action buttons when the provider has added a response ID
2023-03-10 21:48:37 -08:00
Daniel Imms
4d95bc1be6 Sort out layering/lint problems 2023-03-02 13:02:35 -08:00
Daniel Imms
1dced629d3 Restrict terminal contrib imports from main code 2023-03-02 10:56:52 -08:00
Daniel Imms
ea61e55769 Build out terminal contributions, fix link providers 2023-03-02 08:49:57 -08:00
Daniel Imms
862cb75a68 Move terminal contribs into own folder 2023-03-01 15:42:27 -08:00
João Moreno
07a7d71087 Bump to @vscode/policy-watcher (#174354)
* use latest @vscode/policy-watcher

* fix compile

* ooops

* lock new version
2023-02-14 16:53:34 +01:00
João Moreno
c7930ca55d Revert "bump @vscode/policy-watcher (#174063)" (#174072)
This reverts commit 47e3135bda.

Revert "move to @vscode/policy-watcher (#173950)"

This reverts commit a1e73c96a4.
2023-02-10 16:37:50 +01:00
João Moreno
a1e73c96a4 move to @vscode/policy-watcher (#173950) 2023-02-09 07:12:42 -08:00
Johannes Rieken
98546b2287 eslint: add a new rule to enforce declare _serviceBrand: undefined (#165396) 2022-11-03 10:32:37 -07:00
Benjamin Pasero
3b29b43074 web - only export types not interfaces (#161609)
* web - only export types not interfaces

* fix compile
2022-09-23 19:23:39 +02:00
Matt Bierner
5e92794be6 Re-enable running our eslint rules using ts-node (#159495)
Resubmission of #157532 with the following changes:

- Use `eslint-plugin-local` instead of `yarn` link to run our plugins
- Move our plugins to a top level `.eslintplugin` dir (as required by `eslint-plugin-local`)
- Update all names to `local/`
2022-08-30 08:40:04 +02:00
Matt Bierner
9e5248072a Fix ts-node for eslint (#159483)
Bumps the cachesalt to make sure ts-node is installed
2022-08-29 20:51:12 +02:00
Matt Bierner
5b21c7f28b Run our custom eslint rules using ts-node (#157532)
* Run our custom eslint rules using ts-node

Use `ts-node` to run our custom eslint rules.  This lets us delete the pre-compiled js. It also means you can don't have to compile the rules while editing them

As part of this change, I've also switched us to using an eslint plugin instead of a rulesDir. This is now the preferred way to ship custom rules

* Fix two more disables

* Move ts-node to project root

* Enable transpileOnly
2022-08-29 09:39:09 -07:00
Daniel Imms
2f72682e5d Add canvas renderer addon 2022-08-01 09:29:26 -07:00
Logan Ramos
d6114a70be Remove app insights (#154296)
* Remove app insights

* Update product service to remove asimovKey
2022-07-06 22:23:30 -04: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
Logan Ramos
0edb88f3b5 1DS appender for the web (#152489)
* 1ds web appender

* Start testing web
2022-06-17 15:10:04 -04:00
Alexandru Dima
252c65540d Adopt the same export patterns in vs/css as in vs/nls and bring over tests (#152396)
* Adopt the same export patterns in `vs/css` as in `vs/nls` and bring over tests

* Fix problem with loading nodejs modules
2022-06-17 17:12:27 +02:00
Alexandru Dima
9db5a3674e Bring the nls loader plugin into our sources (#152338) 2022-06-16 22:01:19 +02:00