mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Merge pull request #3552 from microsoft/hediet/educational-blackbird
Fixes commit reveal bug
This commit is contained in:
commit
383b675c0e
1 changed files with 10 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue