From 7d71bad7b4d5f7bf631de9b1ec030661f65139e5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 5 Mar 2024 08:29:05 -0800
Subject: [PATCH] Bump core from `01ba99b` to `abba29c` (#363)
Bumps [core](https://github.com/microsoft/typespec) from `01ba99b` to
`abba29c`.
Commits
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)
---
Dependabot commands and options
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 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)
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Timothee Guerin
---
core | 2 +-
.../package.json | 7 ++++++-
.../test/validate-samples.test.ts | 16 ++++++++++++++++
.../vitest.config.ts | 11 +++++++++++
pnpm-lock.yaml | 18 ++++++++++++++++++
5 files changed, 52 insertions(+), 2 deletions(-)
create mode 100644 packages/typespec-azure-playground-website/test/validate-samples.test.ts
create mode 100644 packages/typespec-azure-playground-website/vitest.config.ts
diff --git a/core b/core
index 01ba99b061..abba29c173 160000
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 01ba99b0613195c543d11af38476e3af67edae22
+Subproject commit abba29c173c24b2efb3d29b63160860197366b19
diff --git a/packages/typespec-azure-playground-website/package.json b/packages/typespec-azure-playground-website/package.json
index fd706d4c95..44aab5c56a 100644
--- a/packages/typespec-azure-playground-website/package.json
+++ b/packages/typespec-azure-playground-website/package.json
@@ -36,6 +36,8 @@
"build-samples": "node ./samples/build.js",
"build": "npm run build-samples && tsc -p . && vite build 2>&1",
"start": "npm run -s watch",
+ "test": "vitest run",
+ "test:watch": "vitest -w",
"watch": "vite --port 5174",
"e2e": "cross-env PW_EXPERIMENTAL_TS_ESM=1 playwright test -c e2e",
"e2e:headed": "cross-env PW_EXPERIMENTAL_TS_ESM=1 playwright test -c e2e --headed",
@@ -73,9 +75,12 @@
"@typespec/bundler": "workspace:~",
"@typespec/eslint-config-typespec": "workspace:~",
"@typespec/playground": "workspace:~",
+ "@vitest/coverage-v8": "^1.2.2",
+ "@vitest/ui": "^1.2.2",
"cross-env": "~7.0.3",
"eslint": "^8.56.0",
"rimraf": "~5.0.5",
- "typescript": "~5.3.3"
+ "typescript": "~5.3.3",
+ "vitest": "^1.2.2"
}
}
diff --git a/packages/typespec-azure-playground-website/test/validate-samples.test.ts b/packages/typespec-azure-playground-website/test/validate-samples.test.ts
new file mode 100644
index 0000000000..5c14a256c0
--- /dev/null
+++ b/packages/typespec-azure-playground-website/test/validate-samples.test.ts
@@ -0,0 +1,16 @@
+import { NodeHost, compile, resolvePath } from "@typespec/compiler";
+import { expectDiagnosticEmpty, findTestPackageRoot } from "@typespec/compiler/testing";
+import { it } from "vitest";
+import { TypeSpecPlaygroundConfig } from "../src/index.js";
+
+const samples = TypeSpecPlaygroundConfig.samples;
+const packageRoot = await findTestPackageRoot(import.meta.url);
+for (const [name, sample] of Object.entries(samples)) {
+ it(`compile ${name}`, async () => {
+ const program = await compile(NodeHost, resolvePath(packageRoot, sample.filename), {
+ noEmit: true,
+ emit: [sample.preferredEmitter],
+ });
+ expectDiagnosticEmpty(program.diagnostics);
+ });
+}
diff --git a/packages/typespec-azure-playground-website/vitest.config.ts b/packages/typespec-azure-playground-website/vitest.config.ts
new file mode 100644
index 0000000000..db9e6ca20a
--- /dev/null
+++ b/packages/typespec-azure-playground-website/vitest.config.ts
@@ -0,0 +1,11 @@
+import { configDefaults, defineConfig, mergeConfig } from "vitest/config";
+import { defaultTypeSpecVitestConfig } from "../../core/vitest.workspace.js";
+
+export default mergeConfig(
+ defaultTypeSpecVitestConfig,
+ defineConfig({
+ test: {
+ exclude: [...configDefaults.exclude, "dist-dev/**/*"],
+ },
+ })
+);
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e38eb8fa91..f7874b162d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -979,6 +979,12 @@ importers:
'@vitejs/plugin-react':
specifier: ~4.2.1
version: 4.2.1(vite@5.1.0)
+ '@vitest/coverage-v8':
+ specifier: ^1.2.2
+ version: 1.2.2(vitest@1.2.2)
+ '@vitest/ui':
+ specifier: ^1.2.2
+ version: 1.2.2(vitest@1.2.2)
c8:
specifier: ^9.1.0
version: 9.1.0
@@ -1000,6 +1006,9 @@ importers:
vite:
specifier: ^5.1.0
version: 5.1.0(@types/node@18.11.19)
+ vitest:
+ specifier: ^1.2.2
+ version: 1.2.2(@types/node@18.11.19)(@vitest/ui@1.2.2)
core/packages/prettier-plugin-typespec:
dependencies:
@@ -1811,6 +1820,12 @@ importers:
'@typespec/playground':
specifier: workspace:~
version: link:../../core/packages/playground
+ '@vitest/coverage-v8':
+ specifier: ^1.2.2
+ version: 1.2.2(vitest@1.2.2)
+ '@vitest/ui':
+ specifier: ^1.2.2
+ version: 1.2.2(vitest@1.2.2)
cross-env:
specifier: ~7.0.3
version: 7.0.3
@@ -1823,6 +1838,9 @@ importers:
typescript:
specifier: ~5.3.3
version: 5.3.3
+ vitest:
+ specifier: ^1.2.2
+ version: 1.2.2(@types/node@18.11.19)(@vitest/ui@1.2.2)
packages/typespec-azure-portal-core:
devDependencies: