Compare commits

..

No commits in common. "main" and "v0.55.0-dev-20251103" have entirely different histories.

46 changed files with 1126 additions and 3932 deletions

View file

@ -62,9 +62,6 @@ extends:
- script: npm ci - script: npm ci
displayName: Install NPM dependencies displayName: Install NPM dependencies
- script: npx playwright install --with-deps
displayName: Install Playwright Dependencies
- script: yarn ts-node ./scripts/ci/build-monaco-editor-core-pkg nightly - script: yarn ts-node ./scripts/ci/build-monaco-editor-core-pkg nightly
env: env:
VSCODE_REF: ${{ parameters.vscodeRef }} VSCODE_REF: ${{ parameters.vscodeRef }}

View file

@ -50,9 +50,6 @@ extends:
- script: npm ci - script: npm ci
displayName: Install NPM dependencies displayName: Install NPM dependencies
- script: npx playwright install --with-deps
displayName: Install Playwright Dependencies
- script: yarn ts-node ./scripts/ci/build-monaco-editor-core-pkg stable - script: yarn ts-node ./scripts/ci/build-monaco-editor-core-pkg stable
displayName: Setup, Build & Test monaco-editor-core displayName: Setup, Build & Test monaco-editor-core

150
.github/commands.json vendored
View file

@ -1,150 +0,0 @@
[
{
"type": "comment",
"name": "question",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "*question"
},
{
"type": "label",
"name": "*question",
"action": "close",
"reason": "not_planned",
"comment": "We closed this issue because it is a question about using Monaco Editor rather than an issue or feature request. Please search for help on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor), where the community has already answered many similar questions. See also our [issue reporting guidelines](https://github.com/microsoft/monaco-editor#contributing).\n\nHappy Coding!"
},
{
"type": "label",
"name": "*out-of-scope",
"action": "close",
"reason": "not_planned",
"comment": "We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.\n\nThanks for your understanding, and happy coding!"
},
{
"type": "label",
"name": "wont-fix",
"action": "close",
"reason": "not_planned",
"comment": "We closed this issue because we don't plan to address it.\n\nThanks for your understanding, and happy coding!"
},
{
"type": "comment",
"name": "duplicate",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "*duplicate"
},
{
"type": "label",
"name": "*duplicate",
"action": "close",
"reason": "not_planned",
"comment": "Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for [existing issues](https://github.com/microsoft/monaco-editor/issues).\n\nHappy Coding!"
},
{
"type": "comment",
"name": "verified",
"allowUsers": [
"@author"
],
"action": "updateLabels",
"addLabel": "verified",
"removeLabel": "author-verification-requested",
"requireLabel": "author-verification-requested",
"disallowLabel": "unreleased"
},
{
"type": "comment",
"name": "confirm",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "confirmed",
"removeLabel": "confirmation-pending"
},
{
"type": "comment",
"name": "confirmationPending",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "confirmation-pending",
"removeLabel": "confirmed"
},
{
"type": "comment",
"name": "needsMoreInfo",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "~info-needed"
},
{
"type": "comment",
"name": "closedWith",
"allowUsers": [],
"action": "close",
"reason": "completed",
"addLabel": "unreleased"
},
{
"type": "comment",
"name": "spam",
"allowUsers": [],
"action": "close",
"reason": "not_planned",
"addLabel": "invalid"
},
{
"__comment__": "Allows folks on the team to label issues by commenting: `\\label My-Label` ",
"type": "comment",
"name": "label",
"allowUsers": []
},
{
"type": "label",
"name": "~verification-steps-needed",
"action": "updateLabels",
"addLabel": "verification-steps-needed",
"removeLabel": "~verification-steps-needed",
"comment": "Friendly ping! Looks like this issue requires some further steps to be verified. Please provide us with the steps necessary to verify this issue."
},
{
"type": "label",
"name": "~info-needed",
"action": "updateLabels",
"addLabel": "info-needed",
"removeLabel": "~info-needed",
"comment": "Thanks for creating this issue! We figured it's missing some basic information or doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.\n\nHappy Coding!"
},
{
"type": "label",
"name": "~version-info-needed",
"action": "updateLabels",
"addLabel": "info-needed",
"removeLabel": "~version-info-needed",
"comment": "Thanks for creating this issue! We figured it's missing some basic information, such as a version number. Please take the time to update the issue with the Monaco Editor version you're using.\n\nHappy Coding!"
},
{
"type": "label",
"name": "~confirmation-needed",
"action": "updateLabels",
"addLabel": "info-needed",
"removeLabel": "~confirmation-needed",
"comment": "Please try to reproduce this issue with the latest version of Monaco Editor. If the issue persists, please update the issue with confirmation.\n\nHappy Coding!"
},
{
"type": "comment",
"name": "gifPlease",
"allowUsers": [],
"action": "comment",
"addLabel": "info-needed",
"comment": "Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, `.gif` files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.\n\nHappy coding!"
},
{
"type": "comment",
"name": "upstream",
"allowUsers": [],
"action": "close",
"reason": "not_planned",
"addLabel": "upstream",
"comment": "This issue is caused by an upstream dependency (VS Code editor core). The fix needs to happen in the [VS Code repository](https://github.com/microsoft/vscode). Please check if there's already an issue filed there, or create one if not.\n\nHappy Coding!"
}
]

View file

@ -83,18 +83,14 @@ jobs:
- name: Run smoke test - name: Run smoke test
run: npm run smoketest run: npm run smoketest
- name: Install website node modules # - name: Install website node modules
working-directory: website # working-directory: website
run: npm ci # run: yarn install --frozen-lockfile
- name: Install most recent version of monaco-editor # - name: Build website
working-directory: website # working-directory: website
run: npm install monaco-editor # run: yarn run build
- name: Build website # - name: Test website
working-directory: website # working-directory: website
run: npm run build # run: yarn test
- name: Test website
working-directory: website
run: npm run test

View file

@ -39,10 +39,8 @@ jobs:
- name: execute `npm ci` (1) - name: execute `npm ci` (1)
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npm ci run: npm ci
# For TypeDoc
- name: Build - name: Build
run: npm run build run: npm run build-monaco-editor
- name: Install website node modules - name: Install website node modules
working-directory: website working-directory: website
@ -56,10 +54,6 @@ jobs:
working-directory: website working-directory: website
run: npm run build run: npm run build
- name: Test website
working-directory: website
run: npm run test
- name: Setup Pages - name: Setup Pages
uses: actions/configure-pages@v5 uses: actions/configure-pages@v5
- name: Upload artifact - name: Upload artifact

2
.nvmrc
View file

@ -1 +1 @@
22.21.1 22.18.0

View file

@ -1,20 +1,5 @@
# Monaco Editor Changelog # Monaco Editor Changelog
## [0.55.1]
- Fixes missing language exports (monaco.json/typescript/...) due to wrong "types" path - [#5123](https://github.com/microsoft/monaco-editor/issues/5123)
## [0.55.0]
### Breaking Changes
- Moves nested namespaces (`languages.css`, `languages.html`, `languages.json`, `languages.typescript`) to top level namespaces (`css`, `html`, `json`, `typescript`) to simplify the build process and align with typescript recommendations.
### New Features
- Adds native LSP support (see new `lsp` namespace).
### Bug Fixes
- Updates dompurify to 3.2.7
## [0.54.0] ## [0.54.0]
- Adds option `editor.mouseMiddleClickAction` - Adds option `editor.mouseMiddleClickAction`

View file

@ -28,15 +28,6 @@ You will get:
:warning: The monaco editor also ships an `AMD` build for backwards-compatibility reasons, but the `AMD` support is deprecated and will be removed in future versions. :warning: The monaco editor also ships an `AMD` build for backwards-compatibility reasons, but the `AMD` support is deprecated and will be removed in future versions.
## Localization
To load the editor in a specific language, make sure that the corresponding nls script file is loaded before the main monaco editor script. For example, to load the editor in German, include the following script tag:
```html
<script src="path/to/monaco-editor/esm/nls.messages.de.js"></script>
```
Check the sources for available languages.
## Concepts ## Concepts
Monaco editor is best known for being the text editor that powers VS Code. However, it's a bit more nuanced. Some basic understanding about the underlying concepts is needed to use Monaco editor effectively. Monaco editor is best known for being the text editor that powers VS Code. However, it's a bit more nuanced. Some basic understanding about the underlying concepts is needed to use Monaco editor effectively.

View file

@ -9,22 +9,45 @@ import nodeResolve from '@rollup/plugin-node-resolve';
import { join } from 'path'; import { join } from 'path';
import { defineConfig } from 'rollup'; import { defineConfig } from 'rollup';
import { dts } from 'rollup-plugin-dts'; import { dts } from 'rollup-plugin-dts';
import { dtsDeprecationWarning, mapModuleId } from '../shared.mjs';
const root = join(import.meta.dirname, '../../');
const outDir = join(import.meta.dirname, './out');
/**
* @param {string} filePath
* @param {string} newExt
*/
function changeExt(filePath, newExt) {
const idx = filePath.lastIndexOf('.');
if (idx === -1) {
return filePath + newExt;
} else {
return filePath.substring(0, idx) + newExt;
}
}
const mappedPaths = {
[join(root, 'node_modules/monaco-editor-core/esm/')]: '.',
[join(root, 'node_modules/')]: 'external/',
[join(root, 'src/')]: 'vs/'
};
export default defineConfig({ export default defineConfig({
input: { input: {
types: join(import.meta.dirname, './src/types.ts') types: join(import.meta.dirname, './src/types.ts')
}, },
output: { output: {
dir: join(import.meta.dirname, './out'), dir: outDir,
format: 'es', format: 'es',
preserveModules: false, preserveModules: false,
entryFileNames: function (chunkInfo) { entryFileNames: function (chunkInfo) {
const moduleId = chunkInfo.facadeModuleId; const moduleId = chunkInfo.facadeModuleId;
if (moduleId) { if (moduleId) {
const m = mapModuleId(moduleId, '.d.ts'); for (const [key, val] of Object.entries(mappedPaths)) {
if (m !== undefined) { if (moduleId.startsWith(key)) {
return m; const relativePath = moduleId.substring(key.length);
return changeExt(join(val, relativePath), '.d.ts');
}
} }
} }
return '[name].d.ts'; return '[name].d.ts';
@ -38,7 +61,6 @@ export default defineConfig({
stripInternal: true stripInternal: true
}, },
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client'] includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
}), })
dtsDeprecationWarning(),
] ]
}); });

View file

@ -1,13 +1,23 @@
import { readFileSync } from 'node:fs'; import { readFileSync } from 'node:fs';
import { dirname, resolve } from 'node:path'; import { glob } from 'node:fs/promises';
import { basename, dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import { urlToEsmPlugin } from './plugin'; import { urlToEsmPlugin } from './plugin';
import { getNlsEntryPoints } from '../shared.mjs';
const __dirname = dirname(fileURLToPath(import.meta.url)); const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig(async (args) => { export default defineConfig(async (args) => {
const monacoEditorCoreDir = join(
dirname(require.resolve('monaco-editor-core/package.json')),
'esm'
);
const nlsEntries = {};
for await (const path of glob(`${monacoEditorCoreDir}/nls.messages.*.js`)) {
const entryName = basename(path).replace('.js', '');
nlsEntries[entryName] = path;
}
/** @type {import('vite').UserConfig} */ /** @type {import('vite').UserConfig} */
return { return {
base: './', base: './',
@ -18,7 +28,7 @@ export default defineConfig(async (args) => {
lib: { lib: {
cssFileName: 'editor/editor.main', cssFileName: 'editor/editor.main',
entry: { entry: {
...getNlsEntryPoints(), ...nlsEntries,
'nls.messages-loader': resolve(__dirname, 'src/nls.messages-loader.js'), 'nls.messages-loader': resolve(__dirname, 'src/nls.messages-loader.js'),
'editor/editor.main': resolve(__dirname, 'src/editor.main.ts'), 'editor/editor.main': resolve(__dirname, 'src/editor.main.ts'),
'basic-languages/monaco.contribution': resolve( 'basic-languages/monaco.contribution': resolve(

View file

@ -8,11 +8,11 @@ import fs = require('fs');
import { REPO_ROOT, readFiles, writeFiles } from '../build/utils'; import { REPO_ROOT, readFiles, writeFiles } from '../build/utils';
import { generateEsmMetadataJsAndDTs } from './releaseMetadata'; import { generateEsmMetadataJsAndDTs } from './releaseMetadata';
import { buildESM } from './esm/build.script'; import { buildESM } from './esm/build.script';
import { removeDir } from './fs';
import { buildAmdMinDev } from './amd/build.script'; import { buildAmdMinDev } from './amd/build.script';
import { rm } from 'fs/promises';
async function run() { async function run() {
await rm(path.join(REPO_ROOT, './out/monaco-editor'), { recursive: true, force: true }); removeDir(`out/monaco-editor`);
await buildESM(); await buildESM();
await buildAmdMinDev(); await buildAmdMinDev();

View file

@ -9,25 +9,46 @@ import nodeResolve from '@rollup/plugin-node-resolve';
import { join } from 'path'; import { join } from 'path';
import { defineConfig } from 'rollup'; import { defineConfig } from 'rollup';
import { dts } from "rollup-plugin-dts"; import { dts } from "rollup-plugin-dts";
import { dtsDeprecationWarning, mapModuleId } from '../shared.mjs';
const root = join(import.meta.dirname, '../../'); const root = join(import.meta.dirname, '../../');
const outDir = join(root, './out/monaco-editor/esm');
/**
* @param {string} filePath
* @param {string} newExt
* @returns {string}
*/
function changeExt(filePath, newExt) {
const idx = filePath.lastIndexOf('.');
if (idx === -1) {
return filePath + newExt;
} else {
return filePath.substring(0, idx) + newExt;
}
}
const mappedPaths = {
[join(root, 'node_modules/monaco-editor-core/esm/')]: '.',
[join(root, 'node_modules/')]: 'external/',
[join(root, 'src/')]: 'vs/',
};
export default defineConfig({ export default defineConfig({
input: { input: {
entry: join(root, './src/editor/editor.main.ts'), entry: join(root, './src/editor/editor.main.ts'),
editorApi: join(root, './src/editor/editor.api.ts'),
}, },
output: { output: {
dir: join(root, './out/monaco-editor/esm'), dir: outDir,
format: 'es', format: 'es',
preserveModules: false, preserveModules: false,
entryFileNames: function (chunkInfo) { entryFileNames: function (chunkInfo) {
const moduleId = chunkInfo.facadeModuleId; const moduleId = chunkInfo.facadeModuleId;
if (moduleId) { if (moduleId) {
const m = mapModuleId(moduleId, '.d.ts'); for (const [key, val] of Object.entries(mappedPaths)) {
if (m !== undefined) { if (moduleId.startsWith(key)) {
return m; const relativePath = moduleId.substring(key.length);
return changeExt(join(val, relativePath), '.d.ts');
}
} }
} }
return '[name].d.ts'; return '[name].d.ts';
@ -42,6 +63,5 @@ export default defineConfig({
}, },
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client'] includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
}), }),
dtsDeprecationWarning(f => f.endsWith('editor.api.d.ts')),
], ],
}); });

View file

@ -13,13 +13,33 @@ import del from 'rollup-plugin-delete';
import keepCssImports from './rollup-plugin-keep-css-imports/dist/index.mjs'; import keepCssImports from './rollup-plugin-keep-css-imports/dist/index.mjs';
import nodeResolve from '@rollup/plugin-node-resolve'; import nodeResolve from '@rollup/plugin-node-resolve';
import { urlToEsmPlugin } from './rollup-url-to-module-plugin/index.mjs'; import { urlToEsmPlugin } from './rollup-url-to-module-plugin/index.mjs';
import { getNlsEntryPoints, mapModuleId } from '../shared.mjs'; import { copyFileSync, mkdirSync } from 'fs';
import { readFileSync } from 'fs'; import { dirname } from 'path';
const root = join(import.meta.dirname, '../../'); const root = join(import.meta.dirname, '../../');
const outDir = join(root, './out/monaco-editor/esm'); const outDir = join(root, './out/monaco-editor/esm');
/**
* @param {string} filePath
* @param {string} newExt
* @returns {string}
*/
function changeExt(filePath, newExt) {
const idx = filePath.lastIndexOf('.');
if (idx === -1) {
return filePath + newExt;
} else {
return filePath.substring(0, idx) + newExt;
}
}
const mappedPaths = {
[join(root, 'node_modules/monaco-editor-core/esm/')]: '.',
[join(root, 'node_modules/')]: 'external/',
[join(root, 'monaco-lsp-client/')]: 'external/monaco-lsp-client/',
[join(root, 'src/')]: 'vs/',
};
export default defineConfig({ export default defineConfig({
input: { input: {
entry: join(root, './src/editor/editor.main.ts'), entry: join(root, './src/editor/editor.main.ts'),
@ -27,7 +47,6 @@ export default defineConfig({
edcoreMain: join(root, './src/editor/edcore.main.ts'), edcoreMain: join(root, './src/editor/edcore.main.ts'),
editorApi: join(root, './src/editor/editor.api.ts'), editorApi: join(root, './src/editor/editor.api.ts'),
editorWorker: join(root, './src/editor/editor.worker.ts'), editorWorker: join(root, './src/editor/editor.worker.ts'),
...getNlsEntryPoints(),
}, },
output: { output: {
@ -37,9 +56,11 @@ export default defineConfig({
entryFileNames: function (chunkInfo) { entryFileNames: function (chunkInfo) {
const moduleId = chunkInfo.facadeModuleId; const moduleId = chunkInfo.facadeModuleId;
if (moduleId) { if (moduleId) {
const r = mapModuleId(moduleId, '.js'); for (const [key, val] of Object.entries(mappedPaths)) {
if (r !== undefined) { if (moduleId.startsWith(key)) {
return r; const relativePath = moduleId.substring(key.length);
return changeExt(join(val, relativePath), '.js');
}
} }
} }
return '[name].js'; return '[name].js';
@ -53,12 +74,11 @@ export default defineConfig({
{ {
name: 'copy-codicon-font', name: 'copy-codicon-font',
generateBundle() { buildEnd() {
this.emitFile({ const codiconSource = join(root, 'node_modules/monaco-editor-core/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf');
type: 'asset', const codiconDest = join(outDir, 'vs/base/browser/ui/codicons/codicon/codicon.ttf');
fileName: 'vs/base/browser/ui/codicons/codicon/codicon.ttf', mkdirSync(dirname(codiconDest), { recursive: true });
source: readFileSync(join(root, 'node_modules/monaco-editor-core/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf')) copyFileSync(codiconSource, codiconDest);
});
} }
}, },
@ -70,10 +90,13 @@ export default defineConfig({
* @param {string} assetId * @param {string} assetId
*/ */
outputPath: (assetId) => { outputPath: (assetId) => {
const r = mapModuleId(assetId, '.css'); for (const [key, val] of Object.entries(mappedPaths)) {
if (r !== undefined) { if (assetId.startsWith(key)) {
return join(outDir, r); const relativePath = assetId.substring(key.length);
return changeExt(join(outDir, val, relativePath), '.css');
}
} }
const relativePath = join(outDir, relative(root, assetId)); const relativePath = join(outDir, relative(root, assetId));
return relativePath.replace(/(\.s[ca]ss)$/, ".min$1") return relativePath.replace(/(\.s[ca]ss)$/, ".min$1")
}, },

View file

@ -23,12 +23,25 @@ export function ensureDir(dirname: string) {
if (!existingDirCache.has(dir)) { if (!existingDirCache.has(dir)) {
try { try {
fs.mkdirSync(dir); fs.mkdirSync(dir);
} catch (err) { } } catch (err) {}
existingDirCache.add(dir); existingDirCache.add(dir);
} }
}); });
} }
/**
* Copy a file.
*/
export function copyFile(_source: string, _destination: string) {
const source = path.join(REPO_ROOT, _source);
const destination = path.join(REPO_ROOT, _destination);
ensureDir(path.dirname(destination));
fs.writeFileSync(destination, fs.readFileSync(source));
console.log(`Copied ${_source} to ${_destination}`);
}
/** /**
* Remove a directory and all its contents. * Remove a directory and all its contents.
*/ */

View file

@ -1,96 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// @ts-check
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
import { readdirSync } from 'fs';
/**
* @param {string} filePath
* @param {string} newExt
*/
export function changeExt(filePath, newExt) {
const idx = filePath.lastIndexOf('.');
if (idx === -1) {
return filePath + newExt;
} else {
return filePath.substring(0, idx) + newExt;
}
}
export function getNlsEntryPoints() {
const nlsDir = dirname(fileURLToPath(import.meta.resolve('monaco-editor-core/esm/nls.messages.en.js')));
const nlsFiles = readdirSync(nlsDir)
.filter(file => file.startsWith('nls.messages.') && file.endsWith('.js'))
.reduce((acc, file) => {
// @ts-ignore
acc[file] = join(nlsDir, file);
return acc;
}, {});
return nlsFiles;
}
const root = join(import.meta.dirname, '../');
const mappedPaths = {
[join(root, 'node_modules/monaco-editor-core/esm/')]: '.',
[join(root, 'node_modules/')]: 'external/',
[join(root, 'monaco-lsp-client/')]: 'external/monaco-lsp-client/',
[join(root, 'src/')]: 'vs/',
};
/**
* @param {string} moduleId
* @param {string} newExt (with leading .)
* @returns {string | undefined}
*/
export function mapModuleId(moduleId, newExt) {
for (const [key, val] of Object.entries(mappedPaths)) {
if (moduleId.startsWith(key)) {
const relativePath = moduleId.substring(key.length);
return changeExt(join(val, relativePath), newExt);
}
}
return undefined;
}
/**
* @param {(moduleId: string) => boolean} [filter]
* @return {import('rollup').Plugin}
*/
export function dtsDeprecationWarning(filter) {
return {
name: 'add-dts-deprecation-warning',
generateBundle(options, bundle) {
for (const fileName in bundle) {
if (filter && !filter(fileName)) {
continue;
}
const file = bundle[fileName];
if (file.type === 'chunk' && fileName.endsWith('.d.ts')) {
let content = file.code.toString();
content = content + `
declare namespace languages {
/** @deprecated Use the new top level "css" namespace instead. */
export const css: { deprecated: true };
/** @deprecated Use the new top level "html" namespace instead. */
export const html: { deprecated: true };
/** @deprecated Use the new top level "json" namespace instead. */
export const json: { deprecated: true };
/** @deprecated Use the new top level "typescript" namespace instead. */
export const typescript: { deprecated: true };
}
`;
file.code = content;
}
}
}
};
}

View file

@ -21,6 +21,22 @@
"monaco-editor-core": "^0.54.0-dev-20250929" "monaco-editor-core": "^0.54.0-dev-20250929"
} }
}, },
"../../../hediet/typed-json-rpc/json-rpc": {
"name": "@hediet/json-rpc",
"version": "0.5.0",
"license": "MIT",
"devDependencies": {
"typescript": "^5.8.3"
}
},
"../../../hediet/typed-json-rpc/json-rpc-browser": {
"name": "@hediet/json-rpc-browser",
"version": "0.5.1",
"license": "MIT",
"dependencies": {
"@hediet/json-rpc": "^0.5.0"
}
},
"../../../hediet/typed-json-rpc/json-rpc-node": { "../../../hediet/typed-json-rpc/json-rpc-node": {
"name": "@hediet/json-rpc-node", "name": "@hediet/json-rpc-node",
"version": "0.5.0", "version": "0.5.0",
@ -39,6 +55,16 @@
"source-map-support": "^0.5.12" "source-map-support": "^0.5.12"
} }
}, },
"../../../hediet/typed-json-rpc/json-rpc-websocket": {
"name": "@hediet/json-rpc-websocket",
"version": "0.5.1",
"license": "MIT",
"dependencies": {
"@hediet/json-rpc": "^0.5.0",
"@types/ws": "^6.0.4",
"isomorphic-ws": "^5.0.0"
}
},
"../../hediet/typed-json-rpc/json-rpc-browser": { "../../hediet/typed-json-rpc/json-rpc-browser": {
"extraneous": true "extraneous": true
}, },
@ -144,30 +170,16 @@
} }
}, },
"node_modules/@hediet/json-rpc": { "node_modules/@hediet/json-rpc": {
"version": "0.5.0", "resolved": "../../../hediet/typed-json-rpc/json-rpc",
"resolved": "https://registry.npmjs.org/@hediet/json-rpc/-/json-rpc-0.5.0.tgz", "link": true
"integrity": "sha512-SApO7NbKJztClcznEqg46ZGQzO2v3Q3gVIuRVC9QE/m75J/5AipJdclxEXgT++7j4x4LI2JjEpf2xhi67Ngu9A==",
"license": "MIT"
}, },
"node_modules/@hediet/json-rpc-browser": { "node_modules/@hediet/json-rpc-browser": {
"version": "0.5.1", "resolved": "../../../hediet/typed-json-rpc/json-rpc-browser",
"resolved": "https://registry.npmjs.org/@hediet/json-rpc-browser/-/json-rpc-browser-0.5.1.tgz", "link": true
"integrity": "sha512-iR+WrTdM7WozRJ/MElfeT8CmH2f911Y8P6xfcj5RCfywp7kjnnqKPUV/VnNnzToxRZUO8WAfJtLvmhDBsSjMtA==",
"license": "MIT",
"dependencies": {
"@hediet/json-rpc": "^0.5.0"
}
}, },
"node_modules/@hediet/json-rpc-websocket": { "node_modules/@hediet/json-rpc-websocket": {
"version": "0.5.1", "resolved": "../../../hediet/typed-json-rpc/json-rpc-websocket",
"resolved": "https://registry.npmjs.org/@hediet/json-rpc-websocket/-/json-rpc-websocket-0.5.1.tgz", "link": true
"integrity": "sha512-1H9UjKyR00ZjwcReQdzTxyEoZKaEubeOvxBVrwHGo4n9HeQt6SvQgtef+1AJ9MT7/sV2Qfe0VWarYivx6BWgIA==",
"license": "MIT",
"dependencies": {
"@hediet/json-rpc": "^0.5.0",
"@types/ws": "^6.0.4",
"isomorphic-ws": "^5.0.0"
}
}, },
"node_modules/@jridgewell/gen-mapping": { "node_modules/@jridgewell/gen-mapping": {
"version": "0.3.13", "version": "0.3.13",
@ -876,24 +888,6 @@
"license": "MIT", "license": "MIT",
"peer": true "peer": true
}, },
"node_modules/@types/node": {
"version": "24.10.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.0.tgz",
"integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==",
"license": "MIT",
"dependencies": {
"undici-types": "~7.16.0"
}
},
"node_modules/@types/ws": {
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.4.tgz",
"integrity": "sha512-PpPrX7SZW9re6+Ha8ojZG4Se8AZXgf0GK6zmfqEuCsY49LFDNXO3SByp44X3dFEqtB73lkCDAdUazhAjVPiNwg==",
"license": "MIT",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/ansis": { "node_modules/ansis": {
"version": "4.2.0", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/ansis/-/ansis-4.2.0.tgz", "resolved": "https://registry.npmjs.org/ansis/-/ansis-4.2.0.tgz",
@ -1182,15 +1176,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/isomorphic-ws": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz",
"integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==",
"license": "MIT",
"peerDependencies": {
"ws": "*"
}
},
"node_modules/jsesc": { "node_modules/jsesc": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
@ -1562,12 +1547,6 @@
"license": "0BSD", "license": "0BSD",
"optional": true "optional": true
}, },
"node_modules/undici-types": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
"license": "MIT"
},
"node_modules/unicorn-magic": { "node_modules/unicorn-magic": {
"version": "0.3.0", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz",
@ -1580,28 +1559,6 @@
"funding": { "funding": {
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
},
"node_modules/ws": {
"version": "8.18.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": ">=5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
} }
} }
} }

61
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "monaco-editor", "name": "monaco-editor",
"version": "0.55.1", "version": "0.54.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "monaco-editor", "name": "monaco-editor",
"version": "0.55.1", "version": "0.54.0",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
@ -30,7 +30,7 @@
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0", "jsonc-parser": "^3.0.0",
"mocha": "^11.7.4", "mocha": "^11.7.4",
"monaco-editor-core": "^0.55.0-rc", "monaco-editor-core": "^0.55.0-dev-20251008",
"parcel": "^2.7.0", "parcel": "^2.7.0",
"pin-github-action": "^1.8.0", "pin-github-action": "^1.8.0",
"postcss-url": "^10.1.3", "postcss-url": "^10.1.3",
@ -4493,22 +4493,11 @@
} }
}, },
"node_modules/dompurify": { "node_modules/dompurify": {
"version": "3.2.7", "version": "3.1.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz",
"integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==", "integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==",
"dev": true, "dev": true,
"license": "(MPL-2.0 OR Apache-2.0)", "license": "(MPL-2.0 OR Apache-2.0)"
"optionalDependencies": {
"@types/trusted-types": "^2.0.7"
}
},
"node_modules/dompurify/node_modules/@types/trusted-types": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
"dev": true,
"license": "MIT",
"optional": true
}, },
"node_modules/domutils": { "node_modules/domutils": {
"version": "2.8.0", "version": "2.8.0",
@ -6523,13 +6512,13 @@
} }
}, },
"node_modules/monaco-editor-core": { "node_modules/monaco-editor-core": {
"version": "0.55.0-rc", "version": "0.55.0-dev-20251009",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.55.0-rc.tgz", "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.55.0-dev-20251009.tgz",
"integrity": "sha512-LZAAUGilhXX+u+JNxqBABDFyvIVjW6Gmn3EkP0ztdvNxvP6+voiRm2/ZMLokSUGrdOeCZXA2nM6w1xjKkrqNjQ==", "integrity": "sha512-QyipMtg/vrAXaurn2BpAehWAKsMYlX1bfMxLBjGAI2DJJ/6isZ8+jpPcrOgIPa8Lu4AKrv4vQ0qYGtgSqp0R7Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"dompurify": "3.2.7", "dompurify": "3.1.7",
"marked": "14.0.0" "marked": "14.0.0"
} }
}, },
@ -12102,22 +12091,10 @@
} }
}, },
"dompurify": { "dompurify": {
"version": "3.2.7", "version": "3.1.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz",
"integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==", "integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==",
"dev": true, "dev": true
"requires": {
"@types/trusted-types": "^2.0.7"
},
"dependencies": {
"@types/trusted-types": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
"dev": true,
"optional": true
}
}
}, },
"domutils": { "domutils": {
"version": "2.8.0", "version": "2.8.0",
@ -13435,12 +13412,12 @@
} }
}, },
"monaco-editor-core": { "monaco-editor-core": {
"version": "0.55.0-rc", "version": "0.55.0-dev-20251009",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.55.0-rc.tgz", "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.55.0-dev-20251009.tgz",
"integrity": "sha512-LZAAUGilhXX+u+JNxqBABDFyvIVjW6Gmn3EkP0ztdvNxvP6+voiRm2/ZMLokSUGrdOeCZXA2nM6w1xjKkrqNjQ==", "integrity": "sha512-QyipMtg/vrAXaurn2BpAehWAKsMYlX1bfMxLBjGAI2DJJ/6isZ8+jpPcrOgIPa8Lu4AKrv4vQ0qYGtgSqp0R7Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"dompurify": "3.2.7", "dompurify": "3.1.7",
"marked": "14.0.0" "marked": "14.0.0"
} }
}, },

View file

@ -1,7 +1,7 @@
{ {
"name": "monaco-editor", "name": "monaco-editor",
"version": "0.55.1", "version": "0.54.0",
"vscodeRef": "86f5a62f058e3905f74a9fa65d04b2f3b533408e", "vscodeRef": "484fdf69b8509c1c9370d913b32e9f6d3a68cc99",
"private": true, "private": true,
"description": "A browser based code editor", "description": "A browser based code editor",
"homepage": "https://github.com/microsoft/monaco-editor", "homepage": "https://github.com/microsoft/monaco-editor",
@ -33,12 +33,12 @@
"build-monaco-editor": "ts-node ./build/build-monaco-editor", "build-monaco-editor": "ts-node ./build/build-monaco-editor",
"build-lsp": "cd monaco-lsp-client && npm install && npm run build" "build-lsp": "cd monaco-lsp-client && npm install && npm run build"
}, },
"typings": "./esm/vs/editor/editor.main.d.ts", "typings": "./esm/vs/editor/editor.api.d.ts",
"main": "./min/vs/editor/editor.main.js", "main": "./min/vs/editor/editor.main.js",
"module": "./esm/vs/editor/editor.main.js", "module": "./esm/vs/editor/editor.main.js",
"exports": { "exports": {
".": { ".": {
"types": "./esm/vs/editor/editor.main.d.ts", "types": "./esm/vs/editor/editor.api.d.ts",
"import": "./esm/vs/editor/editor.main.js", "import": "./esm/vs/editor/editor.main.js",
"require": "./min/vs/editor/editor.main.js" "require": "./min/vs/editor/editor.main.js"
}, },
@ -69,7 +69,7 @@
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0", "jsonc-parser": "^3.0.0",
"mocha": "^11.7.4", "mocha": "^11.7.4",
"monaco-editor-core": "^0.55.0-rc", "monaco-editor-core": "^0.55.0-dev-20251008",
"parcel": "^2.7.0", "parcel": "^2.7.0",
"pin-github-action": "^1.8.0", "pin-github-action": "^1.8.0",
"postcss-url": "^10.1.3", "postcss-url": "^10.1.3",

View file

@ -13,7 +13,7 @@
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"typescript": "^5.4.5", "typescript": "^5.4.5",
"vite": "^5.4.21" "vite": "^5.4.20"
} }
}, },
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
@ -1761,9 +1761,9 @@
} }
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "5.4.21", "version": "5.4.20",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.20.tgz",
"integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", "integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"esbuild": "^0.21.3", "esbuild": "^0.21.3",
@ -2923,9 +2923,9 @@
"dev": true "dev": true
}, },
"vite": { "vite": {
"version": "5.4.21", "version": "5.4.20",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.20.tgz",
"integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", "integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==",
"dev": true, "dev": true,
"requires": { "requires": {
"esbuild": "^0.21.3", "esbuild": "^0.21.3",

View file

@ -15,6 +15,6 @@
"@types/react-dom": "^17.0.11", "@types/react-dom": "^17.0.11",
"@vitejs/plugin-react": "^1.1.4", "@vitejs/plugin-react": "^1.1.4",
"typescript": "^5.4.5", "typescript": "^5.4.5",
"vite": "^5.4.21" "vite": "^5.4.20"
} }
} }

View file

@ -1,2 +0,0 @@
dist
src/**/*.js

View file

@ -1,12 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>browser-esm-vite</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/main.ts"></script>
</body>
</html>

View file

@ -1,13 +0,0 @@
import './style.css';
import * as monaco from '../../src/editor/editor.main';
monaco.languages.register({ id: 'typescript' });
const tm = monaco.editor.createModel(`class Test {}`, 'typescript',
monaco.Uri.parse('file:///main.ts'));
const editor = monaco.editor.create(document.getElementById('root')!, {
model: tm,
language: 'typescript',
theme: 'vs-dark',
});

File diff suppressed because it is too large Load diff

View file

@ -1,14 +0,0 @@
{
"name": "browser-esm-vite",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview"
},
"dependencies": {},
"devDependencies": {
"monaco-editor": "^0.54.0",
"typescript": "^5.9.3",
"vite": "^7.1.11"
}
}

View file

@ -1,8 +0,0 @@
html,
body,
#root {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}

View file

@ -1,11 +0,0 @@
{
"compilerOptions": {
"target": "ESNext",
"strict": true,
"module": "ESNext",
"jsx": "react-jsx",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true
},
"include": ["./"]
}

View file

@ -1,19 +0,0 @@
import { defineConfig } from 'vite';
import { join } from 'path';
export default defineConfig({
server: {
fs: {
allow: ['../../', '../../../vscode']
}
},
resolve: {
alias: [{
find: 'monaco-editor-core/esm/vs',
replacement: join(__dirname, '../../../vscode/src/vs')
}, {
find: 'monaco-editor-core',
replacement: join(__dirname, '../../../vscode/src/vs/editor/editor.main.ts')
}],
}
});

View file

@ -721,7 +721,6 @@
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
}, },
@ -748,7 +747,6 @@
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"fast-uri": "^3.0.1", "fast-uri": "^3.0.1",
@ -964,7 +962,6 @@
} }
], ],
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001737", "caniuse-lite": "^1.0.30001737",
"electron-to-chromium": "^1.5.211", "electron-to-chromium": "^1.5.211",
@ -1262,34 +1259,35 @@
} }
}, },
"node_modules/compression": { "node_modules/compression": {
"version": "1.8.1", "version": "1.7.4",
"resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz",
"integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"bytes": "3.1.2", "accepts": "~1.3.5",
"compressible": "~2.0.18", "bytes": "3.0.0",
"compressible": "~2.0.16",
"debug": "2.6.9", "debug": "2.6.9",
"negotiator": "~0.6.4", "on-headers": "~1.0.2",
"on-headers": "~1.1.0", "safe-buffer": "5.1.2",
"safe-buffer": "5.2.1",
"vary": "~1.1.2" "vary": "~1.1.2"
}, },
"engines": { "engines": {
"node": ">= 0.8.0" "node": ">= 0.8.0"
} }
}, },
"node_modules/compression/node_modules/negotiator": { "node_modules/compression/node_modules/bytes": {
"version": "0.6.4", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
"integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">= 0.6" "node": ">= 0.8"
} }
}, },
"node_modules/compression/node_modules/safe-buffer": {
"version": "5.1.2",
"dev": true,
"license": "MIT"
},
"node_modules/concat-map": { "node_modules/concat-map": {
"version": "0.0.1", "version": "0.0.1",
"dev": true, "dev": true,
@ -2186,21 +2184,6 @@
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/function-bind": { "node_modules/function-bind": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
@ -3177,12 +3160,11 @@
} }
}, },
"node_modules/monaco-editor": { "node_modules/monaco-editor": {
"version": "0.53.0", "version": "0.53.0-dev-20250905",
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.53.0.tgz", "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.53.0-dev-20250905.tgz",
"integrity": "sha512-0WNThgC6CMWNXXBxTbaYYcunj08iB5rnx4/G56UOPeL9UVIUGGHA1GR0EWIh9Ebabj7NpCRawQ5b0hfN1jQmYQ==", "integrity": "sha512-dz8KD6kfIkQ9vQgUlUPBf24zFiDo/tPbI6HmDoBToURc3vXSlmxnR3NccA5NAaG/k3SrYZ+m4Pd+sjGtc7SV8w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/trusted-types": "^1.0.6" "@types/trusted-types": "^1.0.6"
} }
@ -3259,9 +3241,9 @@
} }
}, },
"node_modules/node-forge": { "node_modules/node-forge": {
"version": "1.3.3", "version": "1.3.1",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.3.tgz", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
"integrity": "sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg==", "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
"dev": true, "dev": true,
"license": "(BSD-3-Clause OR GPL-2.0)", "license": "(BSD-3-Clause OR GPL-2.0)",
"engines": { "engines": {
@ -3361,9 +3343,7 @@
} }
}, },
"node_modules/on-headers": { "node_modules/on-headers": {
"version": "1.1.0", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
"integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@ -3581,7 +3561,6 @@
"url": "https://github.com/sponsors/ai" "url": "https://github.com/sponsors/ai"
} }
], ],
"peer": true,
"dependencies": { "dependencies": {
"nanoid": "^3.3.6", "nanoid": "^3.3.6",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
@ -4013,7 +3992,6 @@
"version": "6.12.6", "version": "6.12.6",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"fast-deep-equal": "^3.1.1", "fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0", "fast-json-stable-stringify": "^2.0.0",
@ -4745,8 +4723,7 @@
"node_modules/tslib": { "node_modules/tslib": {
"version": "2.4.0", "version": "2.4.0",
"dev": true, "dev": true,
"license": "0BSD", "license": "0BSD"
"peer": true
}, },
"node_modules/tunnel": { "node_modules/tunnel": {
"version": "0.0.6", "version": "0.0.6",
@ -4788,7 +4765,6 @@
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"dev": true, "dev": true,
"peer": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
@ -4918,7 +4894,6 @@
"integrity": "sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A==", "integrity": "sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/eslint-scope": "^3.7.7", "@types/eslint-scope": "^3.7.7",
"@types/estree": "^1.0.8", "@types/estree": "^1.0.8",
@ -4966,7 +4941,6 @@
"version": "4.10.0", "version": "4.10.0",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@discoveryjs/json-ext": "^0.5.0", "@discoveryjs/json-ext": "^0.5.0",
"@webpack-cli/configtest": "^1.2.0", "@webpack-cli/configtest": "^1.2.0",

View file

@ -81,6 +81,7 @@ async function buildAndTest() {
// Run checks and compilation // Run checks and compilation
await run('npm run gulp hygiene', { cwd: vscodePath }); await run('npm run gulp hygiene', { cwd: vscodePath });
await run('npm run valid-layers-check', { cwd: vscodePath }); await run('npm run valid-layers-check', { cwd: vscodePath });
await run('npm run compile', { cwd: join(vscodePath, 'build') });
await run('npm run eslint', { cwd: vscodePath }); await run('npm run eslint', { cwd: vscodePath });
await run('npm run monaco-compile-check', { cwd: vscodePath }); await run('npm run monaco-compile-check', { cwd: vscodePath });
await run('npm run --max_old_space_size=4095 compile', { cwd: vscodePath }); await run('npm run --max_old_space_size=4095 compile', { cwd: vscodePath });
@ -88,8 +89,10 @@ async function buildAndTest() {
// Build editor distribution // Build editor distribution
await run('npm run gulp editor-distro', { cwd: vscodePath }); await run('npm run gulp editor-distro', { cwd: vscodePath });
return; // To save CI time.
// Run browser tests // Run browser tests
await run('npm run test-browser -- --browser chromium', { cwd: vscodePath }); await run('npm run test-browser --browser chromium', { cwd: vscodePath });
// TypeScript typings test // TypeScript typings test
await run('mkdir typings-test', { cwd: vscodePath }); await run('mkdir typings-test', { cwd: vscodePath });
@ -107,4 +110,6 @@ async function buildAndTest() {
await run('npm test', { cwd: testMonacoDir }); await run('npm test', { cwd: testMonacoDir });
} }
//buildAndTest();
//prepareMonacoEditorCoreRelease('0.99.0', 'main');
prepareMonacoEditorCoreReleaseStableOrNightly(); prepareMonacoEditorCoreReleaseStableOrNightly();

View file

@ -54,7 +54,6 @@ export async function gitShallowClone(
await run(`git fetch --depth 1 origin ${ref}`, options); await run(`git fetch --depth 1 origin ${ref}`, options);
await run(`git checkout ${ref}`, options); await run(`git checkout ${ref}`, options);
const commitId = await gitCommitId(targetPath); const commitId = await gitCommitId(targetPath);
console.log(`Cloned ${repositoryUrl} (${commitId}) to ${targetPath}`);
return { commitId }; return { commitId };
} }

View file

@ -1,10 +1,10 @@
import * as css from '../../language/css/monaco.contribution'; import * as css from '../../language/css/monaco.contribution.js';
import * as html from '../../language/html/monaco.contribution'; import * as html from '../../language/html/monaco.contribution.js';
import * as json from '../../language/json/monaco.contribution'; import * as json from '../../language/json/monaco.contribution.js';
import * as typescript from '../../language/typescript/monaco.contribution'; import * as typescript from '../../language/typescript/monaco.contribution.js';
import '../../basic-languages/monaco.contribution'; import '../../basic-languages/monaco.contribution.js';
import * as lsp from '@vscode/monaco-lsp-client'; import * as lsp from '@vscode/monaco-lsp-client';
export * from 'monaco-editor-core'; export * from 'monaco-editor-core';
export { createWebWorker, type IWebWorkerOptions } from '../../common/workers'; export { createWebWorker, type IWebWorkerOptions } from '../../common/workers.js';
export { css, html, json, typescript, lsp }; export { css, html, json, typescript, lsp };

View file

@ -1,4 +1,4 @@
import * as monaco from 'monaco-editor-core/esm/vs/editor/editor.api'; import * as monaco from 'monaco-editor-core/esm/vs/editor/editor.api.js';
export function getGlobalMonaco(): any { export function getGlobalMonaco(): any {
return monaco; return monaco;

View file

@ -67,7 +67,7 @@ type CompilerOptionsValue =
| null | null
| undefined; | undefined;
export interface CompilerOptions { interface CompilerOptions {
allowJs?: boolean; allowJs?: boolean;
allowSyntheticDefaultImports?: boolean; allowSyntheticDefaultImports?: boolean;
allowUmdGlobalAccess?: boolean; allowUmdGlobalAccess?: boolean;

2494
website/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -17,18 +17,18 @@
"@vscode/web-editors": "./vscode-web-editors.tgz", "@vscode/web-editors": "./vscode-web-editors.tgz",
"base64-js": "^1.5.1", "base64-js": "^1.5.1",
"bootstrap": "^5.2.0", "bootstrap": "^5.2.0",
"bootstrap-icons": "^1.13.1", "bootstrap-icons": "^1.9.1",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"html-inline-css-webpack-plugin": "^1.11.1", "html-inline-css-webpack-plugin": "^1.11.1",
"lzma": "^2.3.2", "lzma": "^2.3.2",
"messagepack": "^1.1.12", "messagepack": "^1.1.12",
"mini-css-extract-plugin": "^2.6.1", "mini-css-extract-plugin": "^2.6.1",
"mobx": "^5.15.4", "mobx": "^5.15.4",
"mobx-react": "^5.0.0", "mobx-react": "^6.2.2",
"monaco-editor": "^0.55.0-dev-20251008", "monaco-editor": "^0.55.0-dev-20251008",
"react": "^16.0.2", "react": "^17.0.2",
"react-bootstrap": "^2.10.10", "react-bootstrap": "^2.4.0",
"react-dom": "^16.0.2", "react-dom": "^17.0.2",
"typedoc": "^0.25.12" "typedoc": "^0.25.12"
}, },
"devDependencies": { "devDependencies": {

View file

@ -14,20 +14,13 @@ export function getMonaco(): typeof monaco | undefined {
return (window as any).monaco; return (window as any).monaco;
} }
export type IAMDMonacoSetup = { export interface IMonacoSetup {
loaderUrl: string; loaderUrl: string;
loaderConfigPaths: Record<string, string>; loaderConfigPaths: Record<string, string>;
codiconUrl: string; codiconUrl: string;
monacoTypesUrl: string | undefined; monacoTypesUrl: string | undefined;
language?: string; language?: string;
}; }
export type IESMMonacoSetup = {
esmUrl: string;
monacoTypesUrl: string | undefined;
};
export type IMonacoSetup = IAMDMonacoSetup | IESMMonacoSetup;
let loading = false; let loading = false;
let resolve: (value: typeof monaco) => void; let resolve: (value: typeof monaco) => void;
@ -54,10 +47,6 @@ export async function loadMonaco(
async function _loadMonaco(setup: IMonacoSetup): Promise<typeof monaco> { async function _loadMonaco(setup: IMonacoSetup): Promise<typeof monaco> {
const global = self as any; const global = self as any;
if ('esmUrl' in setup) {
return await import(/* webpackIgnore: true */setup.esmUrl); // CodeQL [SM01507] This is safe because the runner (that allows for dynamic paths) runs in an isolated iframe. The hosting website uses a static path configuration. // CodeQL [SM03712] This is safe because the runner (that allows for dynamic paths) runs in an isolated iframe. The hosting website uses a static path configuration.
}
if (!(global as any).require) { if (!(global as any).require) {
await loadScript(setup.loaderUrl); await loadScript(setup.loaderUrl);
} }
@ -123,7 +112,7 @@ export const prodMonacoSetup = getMonacoSetup(
export function getMonacoSetup( export function getMonacoSetup(
corePath: string, corePath: string,
language?: string language?: string
): IAMDMonacoSetup { ): IMonacoSetup {
const loaderConfigPaths = { const loaderConfigPaths = {
vs: `${corePath}`, vs: `${corePath}`,
}; };

View file

@ -8,12 +8,12 @@ import { IMessageFromRunner, IMessageToRunner, IPreviewState } from "../shared";
import "./style.scss"; import "./style.scss";
window.addEventListener("message", (event) => { window.addEventListener("message", (event) => {
/*const isInSandbox = window.origin === "null"; const isInSandbox = window.origin === "null";
if (!isInSandbox) { if (!isInSandbox) {
// To prevent someone from using this html file to run arbitrary code in non-sandboxed context // To prevent someone from using this html file to run arbitrary code in non-sandboxed context
console.error("not in sandbox"); console.error("not in sandbox");
return; return;
}*/ }
const e = event.data as IMessageToRunner | { kind: undefined }; const e = event.data as IMessageToRunner | { kind: undefined };
if (e.kind === "initialize") { if (e.kind === "initialize") {
initialize(e.state); initialize(e.state);

View file

@ -15,7 +15,7 @@ monaco.editor.defineTheme("myCustomTheme", {
rules: [ rules: [
{ {
token: "comment", token: "comment",
foreground: "a80085", foreground: "ffa500",
fontStyle: "italic underline", fontStyle: "italic underline",
}, },
{ token: "comment.js", foreground: "008800", fontStyle: "bold" }, { token: "comment.js", foreground: "008800", fontStyle: "bold" },

View file

@ -4,14 +4,14 @@
// to the system and how the compiler is told to use ES6 (target=2). // to the system and how the compiler is told to use ES6 (target=2).
// validation settings // validation settings
monaco.typescript.javascriptDefaults.setDiagnosticsOptions({ monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
noSemanticValidation: true, noSemanticValidation: true,
noSyntaxValidation: false, noSyntaxValidation: false,
}); });
// compiler options // compiler options
monaco.typescript.javascriptDefaults.setCompilerOptions({ monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
target: monaco.typescript.ScriptTarget.ES2015, target: monaco.languages.typescript.ScriptTarget.ES2015,
allowNonTsExtensions: true, allowNonTsExtensions: true,
}); });
@ -25,7 +25,7 @@ var libSource = [
"}", "}",
].join("\n"); ].join("\n");
var libUri = "ts:filename/facts.d.ts"; var libUri = "ts:filename/facts.d.ts";
monaco.typescript.javascriptDefaults.addExtraLib(libSource, libUri); monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, libUri);
// When resolving definitions and references, the editor will try to use created models. // When resolving definitions and references, the editor will try to use created models.
// Creating a model for the library allows "peek definition/references" commands to work with the library. // Creating a model for the library allows "peek definition/references" commands to work with the library.
monaco.editor.createModel(libSource, "typescript", monaco.Uri.parse(libUri)); monaco.editor.createModel(libSource, "typescript", monaco.Uri.parse(libUri));

View file

@ -5,7 +5,7 @@ var modelUri = monaco.Uri.parse("a://b/foo.json"); // a made up unique URI for o
var model = monaco.editor.createModel(jsonCode, "json", modelUri); var model = monaco.editor.createModel(jsonCode, "json", modelUri);
// configure the JSON language support with schemas and schema associations // configure the JSON language support with schemas and schema associations
monaco.json.jsonDefaults.setDiagnosticsOptions({ monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
validate: true, validate: true,
schemas: [ schemas: [
{ {

View file

@ -75,7 +75,7 @@ export class Preview extends React.Component<{
<iframe <iframe
className="full-iframe" className="full-iframe"
key={this.counter} key={this.counter}
// sandbox="allow-scripts allow-modals" sandbox="allow-scripts allow-modals"
frameBorder={0} frameBorder={0}
ref={this.handleIframe} ref={this.handleIframe}
src={`https://isolated-playground.github.io/?jsSrcBase64=${btoa( src={`https://isolated-playground.github.io/?jsSrcBase64=${btoa(

View file

@ -136,13 +136,6 @@ export function toLoaderConfig(settings: Settings): IMonacoSetup {
break; break;
} }
if (coreUrl.endsWith('?esm')) {
return {
esmUrl: coreUrl,
monacoTypesUrl: undefined,
}
}
let languagesUrl: string; let languagesUrl: string;
switch (settings.languagesSource) { switch (settings.languagesSource) {
case "latest": case "latest":

View file

@ -1,11 +1,8 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "CommonJS", "module": "CommonJS",
"skipLibCheck": true, "skipLibCheck": true
"forceConsistentCasingInFileNames": true,
"strict": true
}, },
// TODO: load from node_modules to be in sync with the latest stable monaco-editor "include": ["../../out/monaco-editor/esm/vs/editor/editor.api.d.ts"],
"include": ["../../out/monaco-editor/esm/vs/editor/editor.main.d.ts"],
"exclude": ["theme"] "exclude": ["theme"]
} }

View file

@ -1,6 +1,6 @@
{ {
"$schema": "https://typedoc.org/schema.json", "$schema": "https://typedoc.org/schema.json",
"entryPoints": ["../../out/monaco-editor/esm/vs/editor/editor.main.d.ts"], "entryPoints": ["../../out/monaco-editor/esm/vs/editor/editor.api.d.ts"],
"out": "dist", "out": "dist",
"theme": "default", "theme": "default",

View file

@ -57,7 +57,10 @@ module.exports = {
"sass-loader", "sass-loader",
], ],
}, },
{
test: /\.(jpe?g|png|gif|eot|ttf|svg|woff|woff2|md)$/i,
loader: "file-loader",
},
{ {
test: /\.tsx?$/, test: /\.tsx?$/,
loader: "ts-loader", loader: "ts-loader",