Merge pull request #3552 from microsoft/hediet/educational-blackbird

Fixes commit reveal bug
pull/3554/head
Henning Dieterichs 2 years ago committed by GitHub
commit 383b675c0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,7 +59,16 @@ export async function getVsCodeCommitId(
monacoEditorVersion: string monacoEditorVersion: string
): Promise<string | undefined> { ): Promise<string | undefined> {
// TODO https://cdn.jsdelivr.net/npm/monaco-editor@${monacoEditorVersion}/package.json // TODO https://cdn.jsdelivr.net/npm/monaco-editor@${monacoEditorVersion}/package.json
return knownVersionVsCodeCommitIds[monacoEditorVersion]; let commitId = knownVersionVsCodeCommitIds[monacoEditorVersion];
if (!commitId) {
const json = (await (
await fetch(
`https://cdn.jsdelivr.net/npm/monaco-editor@${monacoEditorVersion}}/package.json`
)
).json()) as { vscodeCommitId: string };
commitId = json.vscodeCommitId;
}
return commitId;
} }
const knownVersionVsCodeCommitIds: Record<string, string> = { const knownVersionVsCodeCommitIds: Record<string, string> = {

Loading…
Cancel
Save