Commit graph

71 commits

Author SHA1 Message Date
Benjamin Pasero 754190f326
Run unit tests against node.js too (#137790)
* tests - run unit tests also against node.js

* fixes

* fail if major node.js version mismatch

* -tfs is unsupported

* Add `@ts-check` and remove `jsdom`

* tests - process.env layer breaker

* Improve loader config

* skip one test

* address todos

* try to force color output

* Use a file: URI as baseUrl

Co-authored-by: Alex Dima <alexdima@microsoft.com>
2021-11-24 13:45:17 +01:00
Logan Ramos 76c3eb94c9
On the fly tab model construction (#133025)
* Enrich the change event

* Initial tab model building

* Work in progress model construction

* Add pauseable emitter

* Attempt using microtask

* Make tests pass

* Update active tab logic

* Fix layering issue

* event rename

* PR feedback

* Remove stray new line

* Add test for microtask emitter

* Add move event

* Add mmerge functionality to Microtask emitter

* Fix compilation errrors

* Fix tests

* Add tests to address feedback

* Change editor change event to an array

* Add array support to editorsChangeEvent

* Update src/vs/workbench/common/editor/editorGroupModel.ts

Co-authored-by: Benjamin Pasero <benjpas@microsoft.com>

* Switch to a less efficient array method

* Add console.log for debugging

* Test with different notebook

* Fix notebook URI

* For now split up file open for better debugging

* Don't use notebook in test for now

* Cleanup event

* Fix tests

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
Co-authored-by: Benjamin Pasero <benjpas@microsoft.com>
2021-09-16 14:34:54 -04:00
Matt Bierner 494cbbd02d
Organize imports in vs/base 2021-08-04 12:28:27 -07:00
Johannes Rieken b57065709d
adopt allSettled in AsyncEmitter and move back into event.ts, https://github.com/microsoft/vscode/issues/121144 2021-06-25 14:24:12 +02:00
Johannes Rieken b8c5203cd9
fix https://github.com/microsoft/vscode/issues/126658 2021-06-18 13:26:24 +02:00
Johannes Rieken a7984f3e52
remove unused stopwatch event util, https://github.com/microsoft/vscode/issues/123487 2021-06-18 08:51:38 +02:00
Johannes Rieken 65ecd10b48
remove fromPromise-util and adopt single user 2021-06-17 16:07:09 +02:00
Wendell Hu 764d8fdc3d
test: add test for event Relay (#119070)
* test: add test for event Relay

* whitespace & syntax

Co-authored-by: João Moreno <joao.moreno@microsoft.com>
2021-05-26 05:51:15 -07:00
Connor Peet 46a1ca7824
notebook: initial renderer communication 2021-05-19 17:08:13 -07:00
Logan Ramos d5a670eaeb
Switch to deepStrictEqual part of #118667 2021-03-30 12:05:06 -04:00
Benjamin Pasero 0627cf0a2d event - adopt Promises.settled in async emitter (#115522) 2021-02-01 11:33:09 +01:00
Konstantin Solomatov 28bf0b1f56 Use leading flag set to true in debouncing events from extension trees (#88051)
* Use leading flag set to true in debouncing events from extension trees

* - remove the flag for debounce in extHostTreeView
- refactor test extHostTreeView's test to test prod behavior
- fix a small bug in debounce

* Minor cleanup
2020-01-24 12:02:19 +01:00
Johannes Rieken f80a6f9b96 update rule-disablements (eslint-disable for tslint-disable) 2020-01-02 20:28:59 +01:00
Johannes Rieken 839719d489 simplify AsyncEmitter usage 2019-11-19 12:11:19 +01:00
Johannes Rieken 094fd80e20 adding configurable timeout, #43768 2019-11-19 11:37:36 +01:00
Matt Bierner 2f253d2ee8 Fixing a few more strict function type errors
For #81574
2019-11-18 15:35:11 -08:00
Johannes Rieken 4b7e789109 AsyncEmitter shouldn't fail when listener fails 2019-11-01 11:18:24 +01:00
Matt Bierner 029009eafd Marking most private emitters as readonly
Emitters should generally not be reassigned as their corresponding event would also be lost. Marking these as readonly just to enforce this
2019-09-23 17:31:18 -07:00
Johannes Rieken a3ff1a4e22 make Event<T> accept DisposableStore in addition to IDisposable[], #74250 2019-06-07 17:15:58 +02:00
Joao Moreno bd4130c0db remove unused code 2019-04-10 16:09:45 +02:00
Johannes Rieken 1c1ff994d9 add PauseableEmitter to support #71642 2019-04-03 18:05:09 +02:00
Joao Moreno ef8484fae2 snapshot every event modifier 2019-02-21 15:35:34 +01:00
Joao Moreno 0656498cb4 introduce Event.snapshot
fixes #68811
2019-02-20 16:21:21 +01:00
Matt Bierner af35040758 Always require an explicit argument for Emitter.fire
Calling `fire` with zero arguments results in the emitter firing with `undefined`. This is often not expected or desired. It should be explicit that the emitter is fired with undefined
2019-01-03 17:39:12 -08:00
Rob Lourens ef2547d547 replace void 0 with undefined 2019-01-03 11:20:19 -08:00
Chris Ganga 11b943278a enable strict null check (#65444) 2018-12-19 21:54:24 -08:00
Matt Bierner 68a4e01246 Use resolve(void 0) instead of resolve(null) for void promises
Fixes a common type error
2018-12-13 15:20:46 -08:00
Johannes Rieken 653280d133 debt - Thenable -> Promise 2018-12-13 11:31:54 +01:00
Joao Moreno 408e03220c event namespace consolidation & docs 2018-12-11 10:14:38 +01:00
Johannes Rieken b7761829fb debt - less TPromise 2018-11-05 16:09:57 +01:00
Matt Bierner 3ad13abc58 ÏSwitch tests to use await / async 2018-10-04 13:15:59 -07:00
Matt Bierner 7ebea5fba0 Remove "use strict" directives in tests
We set alwaysStrict so this directive is not needed
2018-10-02 15:59:35 -07:00
Matt Bierner 09c738074e Converting many test functions to use arrow functions
Standardizing syntax and discouraging use of `this` inside tests
2018-10-01 15:44:58 -07:00
Johannes Rieken 10cf7b121a less TPromise.as/wrap/wrapError 2018-09-20 10:51:52 +02:00
Joao Moreno c3aebef836 remove usages of TPromise.timeout
fixes #57866
2018-09-05 17:58:14 +02:00
Johannes Rieken e73417d249 add AsyncEmitter #43768 2018-06-22 12:22:28 +02:00
Joao Moreno b0bfd9538a fixes #46240 2018-03-22 10:12:32 +01:00
Matt Bierner ab1669f898 Revert "Revert "Avoid using import x = require('...')""
This reverts commit 27256832f3 which turns out did not break the import of vs/nls
2018-03-15 10:17:18 -07:00
Matt Bierner 27256832f3 Revert "Avoid using import x = require('...')"
This reverts commit 7de696a202.

Seems to have broken loading vs/nls in at least one case in insiders
2018-03-15 00:47:33 -07:00
Matt Bierner 7de696a202 Avoid using import x = require('...')
Don't use this import form in places where it is not needed. This prevents us from correctly detecting duplicate imports
2018-03-14 14:45:59 -07:00
Matt Bierner 81767beaca Make Event a named export
There are many places in the code that do `import Event, { ...} from '.../event'`.
2018-03-14 14:25:30 -07:00
Benjamin Pasero 4f19e8f619 tests - favour promise over done callback (for #45209) 2018-03-08 09:13:20 +01:00
Johannes Rieken 59d559fa68 fix in-order event delivery, #38522 2017-11-17 10:38:46 +01:00
Joao Moreno ef34faa912 remove EventEmitter reference from event.ts
related to #38417
2017-11-16 18:25:17 +01:00
Johannes Rieken ad70ad12c1 make order gurantee optional for now, workaround for #38522 2017-11-16 15:55:31 +01:00
Johannes Rieken e133265ba8 ensure in-order delivery of events inside events, #38417 2017-11-16 10:49:41 +01:00
Matt Bierner dff8887e09 Fix more noImplicitAny errors in vs code tests 2017-11-07 14:41:59 -08:00
Johannes Rieken a60a65d804 Revert "Revert "allow to reuse the same function/context when listening to events""
This reverts commit 4a3dbb6c44.
2017-09-25 14:25:25 +02:00
Johannes Rieken 4a3dbb6c44 Revert "allow to reuse the same function/context when listening to events"
This reverts commit 7cb8ac43e6.
2017-09-25 14:11:32 +02:00
Johannes Rieken 7cb8ac43e6 allow to reuse the same function/context when listening to events 2017-09-25 12:40:49 +02:00