From ae5cab77cb1789abfbb83e5b462be83ec8bbaea0 Mon Sep 17 00:00:00 2001 From: RoccoC Date: Tue, 5 Nov 2024 12:07:29 -0800 Subject: [PATCH 1/3] update webpack plugin to support module workers --- webpack-plugin/package.json | 2 +- webpack-plugin/src/index.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/webpack-plugin/package.json b/webpack-plugin/package.json index 48e5e135..07ac8fed 100644 --- a/webpack-plugin/package.json +++ b/webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "monaco-editor-webpack-plugin", - "version": "7.1.0", + "version": "7.1.1", "description": "A webpack plugin for the Monaco Editor", "main": "out/index.js", "typings": "./out/index.d.ts", diff --git a/webpack-plugin/src/index.ts b/webpack-plugin/src/index.ts index 529dd044..ea8ca293 100644 --- a/webpack-plugin/src/index.ts +++ b/webpack-plugin/src/index.ts @@ -296,7 +296,14 @@ function createLoaderRules( if(/^(\\/\\/)/.test(result)) { result = window.location.protocol + result } - var js = '/*' + label + '*/importScripts("' + result + '");'; + var js = '/*' + label + '*/'; + if (typeof import.meta !== 'undefined') { + // module worker + js += 'import "' + result + '";'; + } else { + // classic worker + js += 'importScripts("' + result + '");'; + } var blob = new Blob([js], { type: 'application/javascript' }); return URL.createObjectURL(blob); } From dd6bdfe8dae1b3c134fa7bc7b176b43fd294916e Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Thu, 8 May 2025 18:19:05 +0200 Subject: [PATCH 2/3] Fixes https://github.com/microsoft/monaco-editor/issues/4799 (#4895) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixes https://github.com/microsoft/monaco-editor/issues/4799 * updates ubuntu version * Update ci.yml This change pins the GitHub Actions runner to Ubuntu 22.04 instead of the default ubuntu-latest (currently 24.04) because Playwright's install-deps script is not yet compatible with Ubuntu 24.04. Several packages it tries to install—such as libasound2, libffi7, and libx264-163—have been removed, renamed, or replaced in 24.04, causing the dependency installation to fail and the CI job to exit with an error. Ubuntu 22.04 remains fully supported by Playwright and ensures a stable, consistent environment for browser testing and dependency management until 24.04 compatibility is added upstream. --------- Co-authored-by: Megan Rogge --- .github/workflows/ci.yml | 2 +- .../website/pages/playground/PlaygroundPageContent.tsx | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ba0bdc4..f2b14066 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: build: name: CI - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/website/src/website/pages/playground/PlaygroundPageContent.tsx b/website/src/website/pages/playground/PlaygroundPageContent.tsx index 4681b0fb..4b163669 100644 --- a/website/src/website/pages/playground/PlaygroundPageContent.tsx +++ b/website/src/website/pages/playground/PlaygroundPageContent.tsx @@ -19,7 +19,6 @@ import { Preview } from "./Preview"; import { SettingsDialog } from "./SettingsDialog"; import { getNpmVersionsSync } from "./getNpmVersionsSync"; import { PlaygroundExample, getPlaygroundExamples } from "./playgroundExamples"; -import { getDefaultSettings, toLoaderConfig } from "./SettingsModel"; @hotComponent(module) @observer @@ -85,6 +84,7 @@ export class PlaygroundPageContent extends React.Component< } > @@ -94,6 +94,7 @@ export class PlaygroundPageContent extends React.Component<
; height?: MonacoEditorHeight; + label: string; }> { private editor: monaco.editor.IStandaloneCodeEditor | undefined = undefined; private disposables: monaco.IDisposable[] = []; @@ -504,6 +507,9 @@ class Editor extends React.Component<{ initializeEditor(editor: monaco.editor.IStandaloneCodeEditor) { this.editor = editor; + editor.updateOptions({ + ariaLabel: this.props.label, + }); this.disposables.push(this.editor); this.disposables.push( this.editor.onDidChangeModelContent((e) => { From 8ae32433da868c0589415fbd17d37dad962720b4 Mon Sep 17 00:00:00 2001 From: Shifra Williams Date: Fri, 13 Jun 2025 02:32:24 -0700 Subject: [PATCH 3/3] feat: add snowflake sql keywords (#4915) Added Snowflake SQL keywords from this doc: https://docs.snowflake.com/en/sql-reference/reserved-keywords --- src/basic-languages/sql/keywords.js | 102 ++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/src/basic-languages/sql/keywords.js b/src/basic-languages/sql/keywords.js index 9573a25f..25c7c771 100644 --- a/src/basic-languages/sql/keywords.js +++ b/src/basic-languages/sql/keywords.js @@ -7,6 +7,7 @@ const keywordsSet = new Set(); addArrToSet(keywordsSet, getMicrosoftSQLKeywords()); addArrToSet(keywordsSet, getSQLiteKeywords()); +addArrToSet(keywordsSet, getSnowflakeSQLKeywords()); const keywords = setToArr(keywordsSet); keywords.sort(); @@ -610,3 +611,104 @@ function getSQLiteKeywords() { .map((t) => t.trim()) .filter((t) => !!t); } + +function getSnowflakeSQLKeywords() { + // https://docs.snowflake.com/en/sql-reference/reserved-keywords + return ` + ACCOUNT + ALL + ALTER + AND + ANY + AS + BETWEEN + BY + CASE + CAST + CHECK + COLUMN + CONNECT + CONNECTION + CONSTRAINT + CREATE + CROSS + CURRENT + CURRENT_DATE + CURRENT_TIME + CURRENT_TIMESTAMP + CURRENT_USER + DATABASE + DELETE + DISTINCT + DROP + ELSE + EXISTS + FALSE + FOLLOWING + FOR + FROM + FULL + GRANT + GROUP + GSCLUSTER + HAVING + ILIKE + IN + INCREMENT + INNER + INSERT + INTERSECT + INTO + IS + ISSUE + JOIN + LATERAL + LEFT + LIKE + LOCALTIME + LOCALTIMESTAMP + MINUS + NATURAL + NOT + NULL + OF + ON + OR + ORDER + ORGANIZATION + QUALIFY + REGEXP + REVOKE + RIGHT + RLIKE + ROW + ROWS + SAMPLE + SCHEMA + SELECT + SET + SOME + START + TABLE + TABLESAMPLE + THEN + TO + TRIGGER + TRUE + TRY_CAST + UNION + UNIQUE + UPDATE + USING + VALUES + VIEW + WHEN + WHENEVER + WHERE + WINDOW + WITH + ` + .split(/\r\n|\r|\n/) + .map((t) => t.trim()) + .filter((t) => !!t); +}