Get rid of mocha and upgrade to vitest which is a more modern
alternative providing, watch, direct typescript compilation out of the
box, expect library and more.
Advantage over mocha:
- Much better cli
- watch mode
- better diff
- Better extension:
- tree organization for files too (not everything flattened)
- update in real time the test(no more need to refresh manually to
discover where are the tests)
- just a little buggy
- Compiles typescript directly
- provides more expectation apis(like jest)
Cons over mocha:
- Slower(about 2x) but that means we don't need to build the test as
part of build which would speed up that part(not as much as is lost)
Todo:
- typespec-azure migration
Problem is vscode still doesn't allow loading es modules so we had all
those hacks to make it work but loading es modules from comon js is
always problematic. Using rollup to generate a commonjs output solve the
problem and we are using that for the published version just not in dev.
Issue with this new approach is `rush watch` won't build the extension
but that's also not something you often need to touch.
progress for [#2044](https://github.com/microsoft/typespec/issues/2044)
Bundle every package and upload it to a referencable endpoint.
Also add the ability for the playground to manage it owns importmap or
bundle local libraries automatically.
Progress towards providing the ref doc generation as a usable tool by
any typespec library.
Detach the generation from the website, instead each package define
where they want their doc and we generate it.
This adds a new `tspd` package and CLI tool that is meant to be used by
library authors. It will have the following functionalities
- generate docs
- generate TS signatures
- lint library?
---------
Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
Adds support for projections, an experimental language feature that lets users write code to modify types dynamically, and a package for implementing versioning on top of this functionality.