Граф коммитов

126 Коммитов

Автор SHA1 Сообщение Дата
Timothee Guerin 49004b60d5
Update dependencies (#3948)
New pr from this branch as it had some weird docusaurus issue not
reproducable anywhere else and just changing branch fixes it somehow
https://github.com/microsoft/typespec/pull/3934
Notable:
- vitest: 2.x
- prettier update that does a minor formatting change by adding
parentheses in some ternary expression
2024-07-23 21:02:34 +00:00
Timothee Guerin af65ce9220
Bump versions for release 0.57 (#3855) 2024-07-17 00:10:54 +00:00
Timothee Guerin e54a7f8fd0
TypeGraph Viewer V2 (#3713)
https://cadlplayground.z22.web.core.windows.net/prs/3713/
<img width="1155" alt="image"
src="https://github.com/microsoft/typespec/assets/1031227/6adfa086-fc97-4ab8-8557-a5e50a291a57">
2024-07-03 20:18:39 +00:00
Timothee Guerin f3c2c9b67c
Dependency updates July 2024 (#3718)
Notable: Typescript 5.5
2024-07-01 21:42:11 +00:00
Timothee Guerin 216f423a8c
Fix crash in program viewer when trying to display new value type (#3585)
fix https://github.com/Azure/typespec-azure/issues/1016
### Fix crash in the program viewer
When we were trying to display a value(only case right now is using a
default value as property) it would blow up

### Add error boundary to only crash the output view and ability to
retry so the entire UI is not lost

![image](https://github.com/microsoft/typespec/assets/1031227/d856c8c9-41d9-4c86-9c6b-432e60a12d53)
2024-06-14 18:20:30 +00:00
Allen Zhang 9c701cc272
TypeSpec 0.57 - June 2024 Release publish branch (#3578)
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
2024-06-13 21:47:55 +00:00
Timothee Guerin 12e26a35fa
Custom output viewer (#3465)
Provide a way to pass a custom program viewer to the playground. This
should enable scnearios like having a `TypeSpec UI` viewer similar to
swagger UI.
Moved the viewer selection to be some vertical tabs with icons to the
right instead

File output viewer
<img width="723" alt="image"
src="https://github.com/microsoft/typespec/assets/1031227/e58caee7-8df5-4a9a-be16-9d6fec6701b4">

Type graph viewer

<img width="713" alt="image"
src="https://github.com/microsoft/typespec/assets/1031227/8bc2c4a0-42dc-4f91-a9ed-7b52bcad3692">


Also fix issues related to the playground build not validating the
typesript
2024-06-05 22:56:54 +00:00
Timothee Guerin 42e72b813d
Add storybook for playground library (#3412)
Don't include it anwhere but this will help showcasing all the
components available in the playground.


![image](https://github.com/microsoft/typespec/assets/1031227/8a7e130f-2e3f-4149-9f33-ed8991950ea2)
2024-05-24 02:37:11 +00:00
Timothee Guerin 71784e2bc2
Simplify to use vite for building playground library (#3403)
Using rollup wasn't working super well when running in watch mode with
the playground-website package refresh and needed some restart.

Unfortunatelly can't seem to find a good way to just run `pnpm start` in
`/playground-website` and have that working so still have to do `pnpm
watch` in `/playground` as well.
2024-05-20 22:07:51 +00:00
Timothee Guerin e316792dcd
Update dependencies - May 2024 (#3401) 2024-05-20 16:31:39 +00:00
Timothee Guerin dec504364c
Bump versions for 0.56.0 release (#3298) 2024-05-08 00:34:05 +00:00
Timothee Guerin df4dac296d
Blog redo with fixes (#3236)
- old date
- merge conflict that drop `diff` support
- non needed export
- broken playground class
2024-04-26 14:37:48 +00:00
Timothee Guerin d290c17b5e
Update dependencies - april 2024 (#3169)
Notable: 
- vitest `1.5.0` which solves some issues with running in the extension
- remove `sinon` from compiler which is not needed anymore as vitest
provide spies built-in
2024-04-15 10:24:38 -07:00
Timothee Guerin 35f5c90343
Migrate to eslint flat config (#3123)
resolve https://github.com/microsoft/typespec/issues/3121
same change in typespec-azure
https://github.com/Azure/typespec-azure/pull/620

## Single top level config
This makes it a little nicer to run as you know get the absolute path
for errors
No need to have the hacky rushstack dependency to allow using the same
shared config.

## Able to lint the projects that are outside of the pnpm workspace
<img width="1054" alt="image"
src="https://github.com/microsoft/typespec/assets/1031227/f88691d9-1bf2-4140-ba2b-533207b15f9d">


## Eslint 9 -no yet

eslint 9 was just released firday which makes this config the new
default however it does include breaking changes and not all our plugins
have updated
2024-04-08 09:58:19 -07:00
Timothee Guerin 0c1b96be47
Ci improvements (#3099)
- Use corepack to install pnpm: Faster and respect the pnpm version set
in package.json instead of having another place to keep up to date
- dependency cache
- upgrade to new code coverage task
- Move all consitency check to independent github action workflow(Makes
it easier to see which one failed immediately without having to open
devops and dig into the steps)
2024-04-03 16:19:59 -07:00
Timothee Guerin 2f53533d94
Bump versions for release 0.55.0 - april 2024 (#3096) 2024-04-02 14:55:47 -07:00
Timothee Guerin cda7ccf4d9
Playground: Migrate from swagger-ui-react to swagger-ui-dist (#3089)
swagger-ui-react pull in all the swagger ui dependencies which is a bit
anyoing as they are mostly optional and with pnpm requires you to build
native dependencies.
2024-04-01 17:13:08 -07:00
Timothee Guerin 0dea649cd7
Update dependencies to resolve vulnerabilities and license issue (#3081)
- Remove unused rollup-plugin-dts dep that had problematic license
- Update dependencies to fix vulnerabilies
2024-03-29 21:22:06 +00:00
Timothee Guerin 4199f83575
Upgrade dependencies march 2024 (#3027)
General update of all dependencies, notable
- typescript 5.4
- vitest 1.4
2024-03-18 10:52:06 -07:00
Timothee Guerin 9881002f1c
Bump versions for release march 2024 (#2988) 2024-03-05 15:31:47 -08:00
Timothee Guerin 7452fe9a57
Update dependencies - feb 2024 (#2900)
General dependency updates, notable:
- typescript 5.3
- chronus 0.6.0 (BREAKING  THE CHANGELOG FORMAT)
2024-02-08 15:14:01 -08:00
Timothee Guerin 173c0de73c
Merge hotfix back into main (#2899) 2024-02-08 11:37:38 -08:00
Timothee Guerin ad74773b53
Bump version for February release (#2890) 2024-02-06 16:14:38 -08:00
Timothee Guerin be9f6d8145
Rename references from microsoft.github.io/typespec to typespec.io (#2858)
All reference but the README as it is being rewritten here
https://github.com/microsoft/typespec/pull/2855
2024-01-30 12:58:42 -08:00
dependabot[bot] 5b44d6e52d
Bump vite from 5.0.10 to 5.0.12 (#2825)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite)
from 5.0.10 to 5.0.12.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.0.12 (2024-01-19)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: await <code>configResolved</code> hooks of worker plugins (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15597">#15597</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15605">#15605</a>)
(<a href="https://github.com/vitejs/vite/commit/ef89f80">ef89f80</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15597">#15597</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/15605">#15605</a></li>
<li>fix: fs deny for case insensitive systems (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15653">#15653</a>)
(<a href="https://github.com/vitejs/vite/commit/91641c4">91641c4</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15653">#15653</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.0.11 (2024-01-05)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: don't pretransform classic script links (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15361">#15361</a>)
(<a href="https://github.com/vitejs/vite/commit/19e3c9a">19e3c9a</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15361">#15361</a></li>
<li>fix: inject <code>__vite__mapDeps</code> code before sourcemap file
comment (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15483">#15483</a>)
(<a href="https://github.com/vitejs/vite/commit/d2aa096">d2aa096</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15483">#15483</a></li>
<li>fix(assets): avoid splitting <code>,</code> inside base64 value of
<code>srcset</code> attribute (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15422">#15422</a>)
(<a href="https://github.com/vitejs/vite/commit/8de7bd2">8de7bd2</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15422">#15422</a></li>
<li>fix(html): handle offset magic-string slice error (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15435">#15435</a>)
(<a href="https://github.com/vitejs/vite/commit/5ea9edb">5ea9edb</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15435">#15435</a></li>
<li>chore(deps): update dependency strip-literal to v2 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15475">#15475</a>)
(<a href="https://github.com/vitejs/vite/commit/49d21fe">49d21fe</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15475">#15475</a></li>
<li>chore(deps): update tj-actions/changed-files action to v41 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15476">#15476</a>)
(<a href="https://github.com/vitejs/vite/commit/2a540ee">2a540ee</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15476">#15476</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ee81e19676"><code>ee81e19</code></a>
release: v5.0.12</li>
<li><a
href="91641c4da0"><code>91641c4</code></a>
fix: fs deny for case insensitive systems (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15653">#15653</a>)</li>
<li><a
href="ef89f8092f"><code>ef89f80</code></a>
fix: await <code>configResolved</code> hooks of worker plugins (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15597">#15597</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15605">#15605</a>)</li>
<li><a
href="b44c49302f"><code>b44c493</code></a>
release: v5.0.11</li>
<li><a
href="d2aa0969ee"><code>d2aa096</code></a>
fix: inject <code>__vite__mapDeps</code> code before sourcemap file
comment (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15483">#15483</a>)</li>
<li><a
href="2a540eee82"><code>2a540ee</code></a>
chore(deps): update tj-actions/changed-files action to v41 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15476">#15476</a>)</li>
<li><a
href="5ea9edbc9c"><code>5ea9edb</code></a>
fix(html): handle offset magic-string slice error (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15435">#15435</a>)</li>
<li><a
href="49d21fe1fe"><code>49d21fe</code></a>
chore(deps): update dependency strip-literal to v2 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15475">#15475</a>)</li>
<li><a
href="8de7bd2b68"><code>8de7bd2</code></a>
fix(assets): avoid splitting <code>,</code> inside base64 value of
<code>srcset</code> attribute (#...</li>
<li><a
href="19e3c9a8a1"><code>19e3c9a</code></a>
fix: don't pretransform classic script links (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15361">#15361</a>)</li>
<li>See full diff in <a
href="https://github.com/vitejs/vite/commits/v5.0.12/packages/vite">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vite&package-manager=npm_and_yarn&previous-version=5.0.10&new-version=5.0.12)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/typespec/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-24 21:57:59 +00:00
Timothee Guerin 842405e8d1
Get rid of rush and move to pnpm (#2775)
Remove the opinionated (wrongly so most of the time) middleman that
brings more config pain than value.

Things to check:
- [x] Parallel build performance vs rush
- [ ] Publishing with submodule
- [x] Changesets
2024-01-24 13:37:34 -08:00
Mark Cowlishaw 345cd594da
Prepare Publish for January Release (#2816) 2024-01-24 11:14:23 -08:00
Timothee Guerin 5af94f0762
Website public beta (#2418)
This is a feature branch containing the progress for the website

URL: https://tspwebsitepr.z22.web.core.windows.net/prs/2418/
2024-01-19 09:42:25 -08:00
Timothee Guerin 563df8bd2a
Fixes to the playground usage (#2750)
Add `styles.css` exports as an altenative to `style.css` as this name
makes more sense and is what the README.md documents
2024-01-04 10:00:40 -08:00
Timothee Guerin 9c7bf80187
Migrate test framework to vitest (#2769)
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
2024-01-02 11:40:29 -08:00
Timothee Guerin bcdf3761c6
Backmerge openapi hotfix (#2756)
Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
2023-12-18 14:56:38 -08:00
Timothee Guerin 9f15ba5502
General dependency upgrades (#2753)
Major:
- Typescript 5.3
- Vite 5
- Rollup 4
2023-12-13 21:01:13 +00:00
Mark Cowlishaw e52a32c76a
Prepare Publish for December release (#2740) 2023-12-06 12:43:01 -08:00
Timothee Guerin fb7de9c832
More UI changes to the playground (#2683)
Changes:
## Get rid of emotion and use pure css modules

## Better UI for errors  and warnings
Errors and warnings are now an expandable banner at the bottom of the
UI, it is completely resizable in the same way as the left and right
pane are.

<img width="363" alt="image"
src="https://github.com/microsoft/typespec/assets/1031227/3c126340-10e4-4dca-9ba2-a76fa9393119">

<img width="336" alt="image"
src="https://github.com/microsoft/typespec/assets/1031227/0cef33df-df5e-4017-8d42-d7a8fbcb053f">

<img width="730" alt="image"
src="https://github.com/microsoft/typespec/assets/1031227/baab69fe-5ea5-497d-8377-110a809e467a">

## Output tabs align with the command bar and use fluentui tabs(Makes
the tabs accessible)

<img width="627" alt="image"
src="https://github.com/microsoft/typespec/assets/1031227/90f9ac54-3c02-48f1-a7ed-f85b57e360fd">
2023-11-22 08:43:13 -08:00
Timothee Guerin 86569b3f57
Playground version picker (#2661)
fix https://github.com/microsoft/typespec/issues/2044

<img width="456" alt="image"
src="https://github.com/microsoft/typespec/assets/1031227/63f2b07f-7eba-4d0f-9bbd-2ef6348efd4c">
2023-11-17 08:04:18 -08:00
Timothee Guerin b8dc20f989
Playground directly into the website (#2638)
Stop using an iframe and load the latest version(not next)
2023-11-08 14:25:21 -08:00
Mark Cowlishaw 6d69297a05
Prepare typespec publish for November Release (#2646) 2023-11-07 16:56:19 -08:00
Timothee Guerin 3695abb65a
Fix: Default must be last (#2636)
`default` entry must be last in `exports`. Most tools do not care but it
seems like webpack and docusaurus do. This is causing issue when trying
to imoport the playground directly there.
2023-11-06 22:50:49 +00:00
Timothee Guerin 043ab92925
Use rollup in playground (#2584)
Use rollup to bundle the playground UI library package.

This allows to bundle the css with watch.
2023-11-01 16:52:45 +00:00
Timothee Guerin 7d2ec8ba70
Playground bundle storage (#2587)
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.
2023-10-31 15:04:48 -07:00
Timothee Guerin f1daf15666
update playwright (#2606)
fix [#2457](https://github.com/microsoft/typespec/issues/2457)
2023-10-30 19:47:46 +00:00
Timothee Guerin 533c974a47
Drop support for node 16 (#2605)
fix [#1847](https://github.com/microsoft/typespec/issues/1847)
2023-10-26 11:41:54 -07:00
Timothee Guerin 9d2cf852e7
Add support for resizing panes in the playground (#2581)
fix #2422 


![Kapture 2023-10-17 at 15 12
37](https://github.com/microsoft/typespec/assets/1031227/e2eea00b-3d2f-454a-9c89-76c678c6dedb)
2023-10-18 15:59:03 +00:00
Mark Cowlishaw e76223066e
Prepare typespec publish (#2567) 2023-10-11 17:38:29 -07:00
Timothee Guerin 99d80f82da
Fix playground usage from external package (#2540)
Playground usage was completely broken when used as a package. Local
reference seems to make it work but hwne the package is in node_modules
vite doesn't allow certain things
2023-10-05 12:59:06 -07:00
Timothee Guerin 08807689e9
Upgrade swagger ui (#2487)
This is a dependency that has been blocked a while back due to its dep
requiring some native build. This seems to have been resolved. The
current version is causing some vulnerability issue on some dependency
2023-09-28 18:32:39 +00:00
Timothee Guerin fb76f02b12
Mark playground and bundler for release and change versions to `-alpha` (#2455)
Prepare the playground and bundler for some `-alpha` release. Goal is to
have partner try to use this first version and get feedback on usage
before releasing to the same version as the rest of the packages.
2023-09-26 08:18:45 -07:00
Timothee Guerin 61ba17d2d2
General dependencies update september 2023 (#2445)
fix https://github.com/Azure/typespec-azure/issues/3602

Notable change:
- yaml update removes the uncessary escaping of openapi paths
2023-09-21 13:34:11 -07:00
Mark Cowlishaw aa4d05ac5b
Backmerge 2023 09 19 hotfixes (#2444)
Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
Co-authored-by: adam-joffe <58192966+adam-joffe@users.noreply.github.com>
2023-09-19 15:13:38 -07:00
Mark Cowlishaw c9a2751618
Prepare typespec publish for September release (#2409) 2023-09-12 16:38:24 -07:00