* chore: update electron@28.1.4
* ci: use latest Node.js v18 release
18.18.2 has npm version that has removed the node-gyp script
which will cause native modules fail to build that rely on
something like `install: node-gyp rebuild`
Refs c93edb55f5
* chore: update rpm dependencies
* chore: bump electron@28.2.1
* chore: bump nodejs@18.18.2
* chore: bump electron@28.2.2
* chore: bump distro
* eng: allow css nesting via postcss plugin
CSS nesting has landed in most browsers at this point, but we don't want
to break users who are still stuck on old browser (mainly older iOS
devices.) This PR adds a postcss plugin to the build process that
de-nests nested CSS.
The plugin required a newer version of postcss as well, so I have
updated that and a couple other modules to their latest versions.
* update build's package.json versions too
- Allow coverage bar color thresholds to be configurable as the Java
folks requested.
- Update some of our scripts for integration into
the selfhost test runner.
- Initial parts of showing function coverage in the Test Coverage view.
(Still a work in progress, more tomorrow)
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