Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .chronus/changes/upgrade-deps-vuln-2026-03-31-2026-2-31-17-0-38.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: internal
packages:
- "@typespec/bundler"
- "@typespec/playground"
- typespec-vscode
---

Update dependency to fix vulnerabilities
1 change: 0 additions & 1 deletion packages/bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"@typespec/compiler": "workspace:^",
"esbuild": "catalog:",
"esbuild-plugins-node-modules-polyfill": "catalog:",
"node-stdlib-browser": "catalog:",
"picocolors": "catalog:",
"yargs": "catalog:"
},
Expand Down
3 changes: 0 additions & 3 deletions packages/playground/src/vite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ export function definePlaygroundViteConfig(config: PlaygroundUserConfig): UserCo
},
},
},
esbuild: {
logOverride: { "this-is-undefined-in-esm": "silent" },
},
assetsInclude: [/\.tsp$/],
optimizeDeps: {
exclude: ["swagger-ui"],
Expand Down
3 changes: 0 additions & 3 deletions packages/playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ export default defineConfig({
external: (id) => externals.some((x) => id.startsWith(x)),
},
},
esbuild: {
logOverride: { "this-is-undefined-in-esm": "silent" },
},
assetsInclude: [/\.tsp$/],
optimizeDeps: {},
plugins: [
Expand Down
2 changes: 0 additions & 2 deletions packages/typespec-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@
},
"devDependencies": {
"@types/cross-spawn": "catalog:",
"@types/mocha": "catalog:",
"@types/node": "catalog:",
"@types/semver": "catalog:",
"@types/vscode": "~1.110.0",
Expand All @@ -300,7 +299,6 @@
"c8": "catalog:",
"cross-spawn": "catalog:",
"esbuild": "catalog:",
"mocha": "catalog:",
"playwright": "catalog:",
"rimraf": "catalog:",
"semver": "catalog:",
Expand Down
28 changes: 2 additions & 26 deletions packages/typespec-vscode/test/web/suite.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
// // imports mocha for the browser, defining the `mocha` global.
import "mocha/mocha";

mocha.setup({
ui: "bdd",
reporter: undefined,
timeout: 20000,
});

export async function run(): Promise<void> {
await import("./web.test.js");
return new Promise((c, e) => {
try {
// Run the mocha test
mocha.run((failures) => {
if (failures > 0) {
e(new Error(`${failures} tests failed.`));
} else {
c();
}
});
} catch (err) {
// eslint-disable-next-line no-console
console.error(err);
e(err);
}
});
const { runWebTests } = await import("./web.test.js");
await runWebTests();
}
31 changes: 12 additions & 19 deletions packages/typespec-vscode/test/web/web.test.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
import * as vscode from "vscode";

describe("Web Extension", () => {
vscode.window.showInformationMessage("Start all tests.");
export async function runWebTests(): Promise<void> {
const ext = vscode.extensions.getExtension("typespec.typespec-vscode");
if (!ext) {
throw new Error("Could not find extension!");
}
await ext.activate();

let basicUri: vscode.Uri;
before(async () => {
const ext = vscode.extensions.getExtension("typespec.typespec-vscode");
if (!ext) {
throw new Error("Could not find extension!");
}
await ext!.activate();
const scheme = ext.extensionUri.scheme === "file" ? "file" : "vscode-test-web";
const pathPrefix = scheme === "file" ? ext.extensionUri.fsPath + "/test" : "";
const basicUri = vscode.Uri.from({ scheme, path: pathPrefix + "/basic.tsp" });

const scheme = ext?.extensionUri.scheme === "file" ? "file" : "vscode-test-web";
const pathPrefix = scheme === "file" ? ext?.extensionUri.fsPath + "/test" : "";

basicUri = vscode.Uri.from({ scheme, path: pathPrefix + "/basic.tsp" });
});

it("open tsp file", async () => {
await vscode.workspace.openTextDocument(basicUri);
});
});
// Test: open tsp file
await vscode.workspace.openTextDocument(basicUri);
}
2 changes: 1 addition & 1 deletion packages/typespec-vscode/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"noEmitOnError": true,
"outDir": "dist",
"skipLibCheck": true,
"types": ["mocha"],
"types": [],
"rootDir": "."
},
"exclude": ["dist", "temp", "templates", "vitest.config.ts"]
Expand Down
Loading
Loading