Skip to content

Commit

Permalink
Merge pull request #370 from Azure/update-compiler
Browse files Browse the repository at this point in the history
Update compiler to 0.42.0
  • Loading branch information
kairu-ms committed Jun 6, 2024
2 parents 3c42809 + 8ec15f5 commit d86c8cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
},
"devDependencies": {
"@pnpm/find-workspace-packages": "^6.0.9",
"prettier-plugin-organize-imports": "^3.2.4",
"@chronus/chronus": "^0.10.2",
"@pnpm/logger": "^5.0.0",
"rimraf": "~5.0.5"
},
Expand Down
2 changes: 1 addition & 1 deletion src/typespec
Submodule typespec updated 363 files
11 changes: 9 additions & 2 deletions src/web/src/typespec/brower-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,18 @@ export async function createBrowserHost(
},

getLibDirs() {
return [resolveVirtualPath("node_modules/@typespec/compiler/lib")];
if (
virtualFs.has(resolveVirtualPath("node_modules/@typespec/compiler/lib/std/main.tsp"))
) {
return [resolveVirtualPath("node_modules/@typespec/compiler/lib/std")];
} else {
// To load older version of the compiler < 0.55.0
return [resolveVirtualPath("node_modules/@typespec/compiler/lib")];
}
},

getExecutionRoot() {
return rootPath;
return resolveVirtualPath("node_modules/@typespec/compiler");
},

async getJsImport(path) {
Expand Down

0 comments on commit d86c8cd

Please sign in to comment.