From 52beb60a6b9a490891d2f94eb328cf35159f5168 Mon Sep 17 00:00:00 2001 From: Christopher Radek <14189820+chrisradek@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:16:07 -0700 Subject: [PATCH] add missing packages to upload-bundler (#4681) #4678 ended up not working on account of the imports being incorrect. Unfortunately updating to use the dist directory still causes problems with ESM resolution (it attempts to import monaco editor since the playground website is bundled into a single file), so reverting to the hard-coded list for now to fix #4674 --------- Co-authored-by: Christopher Radek --- eng/tsp-core/scripts/upload-bundler-packages.js | 16 ++++++++++++++-- packages/playground-website/package.json | 3 +++ packages/playground-website/src/config.ts | 3 +++ pnpm-lock.yaml | 9 +++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/eng/tsp-core/scripts/upload-bundler-packages.js b/eng/tsp-core/scripts/upload-bundler-packages.js index 9a08e893c2..0d443596bc 100644 --- a/eng/tsp-core/scripts/upload-bundler-packages.js +++ b/eng/tsp-core/scripts/upload-bundler-packages.js @@ -3,12 +3,24 @@ import { bundleAndUploadPackages, getPackageVersion, } from "../../../packages/bundle-uploader/dist/src/index.js"; -import { TypeSpecPlaygroundConfig } from "../../../packages/playground-website/src/index.js"; import { repoRoot } from "../../common/scripts/helpers.js"; await bundleAndUploadPackages({ repoRoot: repoRoot, indexName: "typespec", indexVersion: await getPackageVersion(repoRoot, "@typespec/compiler"), - packages: [...TypeSpecPlaygroundConfig.libraries], + packages: [ + "@typespec/compiler", + "@typespec/http", + "@typespec/rest", + "@typespec/openapi", + "@typespec/versioning", + "@typespec/openapi3", + "@typespec/json-schema", + "@typespec/protobuf", + "@typespec/streams", + "@typespec/events", + "@typespec/sse", + "@typespec/xml", + ], }); diff --git a/packages/playground-website/package.json b/packages/playground-website/package.json index 69e071e13a..36d6a8a522 100644 --- a/packages/playground-website/package.json +++ b/packages/playground-website/package.json @@ -56,6 +56,7 @@ "@fluentui/react-components": "~9.55.0", "@fluentui/react-icons": "^2.0.260", "@typespec/compiler": "workspace:~", + "@typespec/events": "workspace:~", "@typespec/html-program-viewer": "workspace:~", "@typespec/http": "workspace:~", "@typespec/json-schema": "workspace:~", @@ -64,8 +65,10 @@ "@typespec/playground": "workspace:~", "@typespec/protobuf": "workspace:~", "@typespec/rest": "workspace:~", + "@typespec/sse": "workspace:~", "@typespec/streams": "workspace:~", "@typespec/versioning": "workspace:~", + "@typespec/xml": "workspace:~", "es-module-shims": "~1.10.0", "react": "~18.3.1", "react-dom": "~18.3.1" diff --git a/packages/playground-website/src/config.ts b/packages/playground-website/src/config.ts index 543d8e6755..ee32fdfa69 100644 --- a/packages/playground-website/src/config.ts +++ b/packages/playground-website/src/config.ts @@ -12,6 +12,9 @@ export const TypeSpecPlaygroundConfig = { "@typespec/json-schema", "@typespec/protobuf", "@typespec/streams", + "@typespec/events", + "@typespec/sse", + "@typespec/xml", ], samples, } as const; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f7fa273e20..c1dab02044 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1049,6 +1049,9 @@ importers: '@typespec/compiler': specifier: workspace:~ version: link:../compiler + '@typespec/events': + specifier: workspace:~ + version: link:../events '@typespec/html-program-viewer': specifier: workspace:~ version: link:../html-program-viewer @@ -1073,12 +1076,18 @@ importers: '@typespec/rest': specifier: workspace:~ version: link:../rest + '@typespec/sse': + specifier: workspace:~ + version: link:../sse '@typespec/streams': specifier: workspace:~ version: link:../streams '@typespec/versioning': specifier: workspace:~ version: link:../versioning + '@typespec/xml': + specifier: workspace:~ + version: link:../xml es-module-shims: specifier: ~1.10.0 version: 1.10.0