mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Compare commits
No commits in common. "main" and "v0.55.0-dev-20251018" have entirely different histories.
main
...
v0.55.0-de
46 changed files with 1162 additions and 3964 deletions
|
|
@ -62,9 +62,6 @@ extends:
|
|||
- script: npm ci
|
||||
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
|
||||
env:
|
||||
VSCODE_REF: ${{ parameters.vscodeRef }}
|
||||
|
|
|
|||
|
|
@ -50,9 +50,6 @@ extends:
|
|||
- script: npm ci
|
||||
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
|
||||
displayName: Setup, Build & Test monaco-editor-core
|
||||
|
||||
|
|
|
|||
150
.github/commands.json
vendored
150
.github/commands.json
vendored
|
|
@ -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!"
|
||||
}
|
||||
]
|
||||
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
|
|
@ -83,18 +83,14 @@ jobs:
|
|||
- name: Run smoke test
|
||||
run: npm run smoketest
|
||||
|
||||
- name: Install website node modules
|
||||
working-directory: website
|
||||
run: npm ci
|
||||
# - name: Install website node modules
|
||||
# working-directory: website
|
||||
# run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Install most recent version of monaco-editor
|
||||
working-directory: website
|
||||
run: npm install monaco-editor
|
||||
# - name: Build website
|
||||
# working-directory: website
|
||||
# run: yarn run build
|
||||
|
||||
- name: Build website
|
||||
working-directory: website
|
||||
run: npm run build
|
||||
|
||||
- name: Test website
|
||||
working-directory: website
|
||||
run: npm run test
|
||||
# - name: Test website
|
||||
# working-directory: website
|
||||
# run: yarn test
|
||||
|
|
|
|||
8
.github/workflows/website.yml
vendored
8
.github/workflows/website.yml
vendored
|
|
@ -39,10 +39,8 @@ jobs:
|
|||
- name: execute `npm ci` (1)
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: npm ci
|
||||
|
||||
# For TypeDoc
|
||||
- name: Build
|
||||
run: npm run build
|
||||
run: npm run build-monaco-editor
|
||||
|
||||
- name: Install website node modules
|
||||
working-directory: website
|
||||
|
|
@ -56,10 +54,6 @@ jobs:
|
|||
working-directory: website
|
||||
run: npm run build
|
||||
|
||||
- name: Test website
|
||||
working-directory: website
|
||||
run: npm run test
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Upload artifact
|
||||
|
|
|
|||
2
.nvmrc
2
.nvmrc
|
|
@ -1 +1 @@
|
|||
22.21.1
|
||||
22.18.0
|
||||
|
|
|
|||
15
CHANGELOG.md
15
CHANGELOG.md
|
|
@ -1,20 +1,5 @@
|
|||
# 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]
|
||||
|
||||
- Adds option `editor.mouseMiddleClickAction`
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
## 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
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -9,22 +9,45 @@ import nodeResolve from '@rollup/plugin-node-resolve';
|
|||
import { join } from 'path';
|
||||
import { defineConfig } from 'rollup';
|
||||
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({
|
||||
input: {
|
||||
types: join(import.meta.dirname, './src/types.ts')
|
||||
},
|
||||
output: {
|
||||
dir: join(import.meta.dirname, './out'),
|
||||
dir: outDir,
|
||||
format: 'es',
|
||||
preserveModules: false,
|
||||
entryFileNames: function (chunkInfo) {
|
||||
const moduleId = chunkInfo.facadeModuleId;
|
||||
if (moduleId) {
|
||||
const m = mapModuleId(moduleId, '.d.ts');
|
||||
if (m !== undefined) {
|
||||
return m;
|
||||
for (const [key, val] of Object.entries(mappedPaths)) {
|
||||
if (moduleId.startsWith(key)) {
|
||||
const relativePath = moduleId.substring(key.length);
|
||||
return changeExt(join(val, relativePath), '.d.ts');
|
||||
}
|
||||
}
|
||||
}
|
||||
return '[name].d.ts';
|
||||
|
|
@ -38,7 +61,6 @@ export default defineConfig({
|
|||
stripInternal: true
|
||||
},
|
||||
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
|
||||
}),
|
||||
dtsDeprecationWarning(),
|
||||
})
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,13 +1,23 @@
|
|||
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 { defineConfig } from 'vite';
|
||||
import { urlToEsmPlugin } from './plugin';
|
||||
import { getNlsEntryPoints } from '../shared.mjs';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
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} */
|
||||
return {
|
||||
base: './',
|
||||
|
|
@ -18,7 +28,7 @@ export default defineConfig(async (args) => {
|
|||
lib: {
|
||||
cssFileName: 'editor/editor.main',
|
||||
entry: {
|
||||
...getNlsEntryPoints(),
|
||||
...nlsEntries,
|
||||
'nls.messages-loader': resolve(__dirname, 'src/nls.messages-loader.js'),
|
||||
'editor/editor.main': resolve(__dirname, 'src/editor.main.ts'),
|
||||
'basic-languages/monaco.contribution': resolve(
|
||||
|
|
@ -8,11 +8,11 @@ import fs = require('fs');
|
|||
import { REPO_ROOT, readFiles, writeFiles } from '../build/utils';
|
||||
import { generateEsmMetadataJsAndDTs } from './releaseMetadata';
|
||||
import { buildESM } from './esm/build.script';
|
||||
import { removeDir } from './fs';
|
||||
import { buildAmdMinDev } from './amd/build.script';
|
||||
import { rm } from 'fs/promises';
|
||||
|
||||
async function run() {
|
||||
await rm(path.join(REPO_ROOT, './out/monaco-editor'), { recursive: true, force: true });
|
||||
removeDir(`out/monaco-editor`);
|
||||
|
||||
await buildESM();
|
||||
await buildAmdMinDev();
|
||||
|
|
|
|||
|
|
@ -9,25 +9,46 @@ import nodeResolve from '@rollup/plugin-node-resolve';
|
|||
import { join } from 'path';
|
||||
import { defineConfig } from 'rollup';
|
||||
import { dts } from "rollup-plugin-dts";
|
||||
import { dtsDeprecationWarning, mapModuleId } from '../shared.mjs';
|
||||
|
||||
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({
|
||||
input: {
|
||||
entry: join(root, './src/editor/editor.main.ts'),
|
||||
editorApi: join(root, './src/editor/editor.api.ts'),
|
||||
},
|
||||
output: {
|
||||
dir: join(root, './out/monaco-editor/esm'),
|
||||
dir: outDir,
|
||||
format: 'es',
|
||||
preserveModules: false,
|
||||
entryFileNames: function (chunkInfo) {
|
||||
const moduleId = chunkInfo.facadeModuleId;
|
||||
if (moduleId) {
|
||||
const m = mapModuleId(moduleId, '.d.ts');
|
||||
if (m !== undefined) {
|
||||
return m;
|
||||
for (const [key, val] of Object.entries(mappedPaths)) {
|
||||
if (moduleId.startsWith(key)) {
|
||||
const relativePath = moduleId.substring(key.length);
|
||||
return changeExt(join(val, relativePath), '.d.ts');
|
||||
}
|
||||
}
|
||||
}
|
||||
return '[name].d.ts';
|
||||
|
|
@ -42,6 +63,5 @@ export default defineConfig({
|
|||
},
|
||||
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
|
||||
}),
|
||||
dtsDeprecationWarning(f => f.endsWith('editor.api.d.ts')),
|
||||
],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,13 +13,33 @@ import del from 'rollup-plugin-delete';
|
|||
import keepCssImports from './rollup-plugin-keep-css-imports/dist/index.mjs';
|
||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||
import { urlToEsmPlugin } from './rollup-url-to-module-plugin/index.mjs';
|
||||
import { getNlsEntryPoints, mapModuleId } from '../shared.mjs';
|
||||
import { readFileSync } from 'fs';
|
||||
|
||||
import { copyFileSync, mkdirSync } from 'fs';
|
||||
import { dirname } from 'path';
|
||||
|
||||
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, 'monaco-lsp-client/')]: 'external/monaco-lsp-client/',
|
||||
[join(root, 'src/')]: 'vs/',
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
input: {
|
||||
entry: join(root, './src/editor/editor.main.ts'),
|
||||
|
|
@ -27,7 +47,6 @@ export default defineConfig({
|
|||
edcoreMain: join(root, './src/editor/edcore.main.ts'),
|
||||
editorApi: join(root, './src/editor/editor.api.ts'),
|
||||
editorWorker: join(root, './src/editor/editor.worker.ts'),
|
||||
...getNlsEntryPoints(),
|
||||
},
|
||||
|
||||
output: {
|
||||
|
|
@ -37,9 +56,11 @@ export default defineConfig({
|
|||
entryFileNames: function (chunkInfo) {
|
||||
const moduleId = chunkInfo.facadeModuleId;
|
||||
if (moduleId) {
|
||||
const r = mapModuleId(moduleId, '.js');
|
||||
if (r !== undefined) {
|
||||
return r;
|
||||
for (const [key, val] of Object.entries(mappedPaths)) {
|
||||
if (moduleId.startsWith(key)) {
|
||||
const relativePath = moduleId.substring(key.length);
|
||||
return changeExt(join(val, relativePath), '.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
return '[name].js';
|
||||
|
|
@ -53,12 +74,11 @@ export default defineConfig({
|
|||
|
||||
{
|
||||
name: 'copy-codicon-font',
|
||||
generateBundle() {
|
||||
this.emitFile({
|
||||
type: 'asset',
|
||||
fileName: 'vs/base/browser/ui/codicons/codicon/codicon.ttf',
|
||||
source: readFileSync(join(root, 'node_modules/monaco-editor-core/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf'))
|
||||
});
|
||||
buildEnd() {
|
||||
const codiconSource = join(root, 'node_modules/monaco-editor-core/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf');
|
||||
const codiconDest = join(outDir, 'vs/base/browser/ui/codicons/codicon/codicon.ttf');
|
||||
mkdirSync(dirname(codiconDest), { recursive: true });
|
||||
copyFileSync(codiconSource, codiconDest);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -70,10 +90,13 @@ export default defineConfig({
|
|||
* @param {string} assetId
|
||||
*/
|
||||
outputPath: (assetId) => {
|
||||
const r = mapModuleId(assetId, '.css');
|
||||
if (r !== undefined) {
|
||||
return join(outDir, r);
|
||||
for (const [key, val] of Object.entries(mappedPaths)) {
|
||||
if (assetId.startsWith(key)) {
|
||||
const relativePath = assetId.substring(key.length);
|
||||
return changeExt(join(outDir, val, relativePath), '.css');
|
||||
}
|
||||
}
|
||||
|
||||
const relativePath = join(outDir, relative(root, assetId));
|
||||
return relativePath.replace(/(\.s[ca]ss)$/, ".min$1")
|
||||
},
|
||||
|
|
|
|||
15
build/fs.ts
15
build/fs.ts
|
|
@ -23,12 +23,25 @@ export function ensureDir(dirname: string) {
|
|||
if (!existingDirCache.has(dir)) {
|
||||
try {
|
||||
fs.mkdirSync(dir);
|
||||
} catch (err) { }
|
||||
} catch (err) {}
|
||||
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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
107
monaco-lsp-client/package-lock.json
generated
107
monaco-lsp-client/package-lock.json
generated
|
|
@ -21,6 +21,22 @@
|
|||
"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": {
|
||||
"name": "@hediet/json-rpc-node",
|
||||
"version": "0.5.0",
|
||||
|
|
@ -39,6 +55,16 @@
|
|||
"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": {
|
||||
"extraneous": true
|
||||
},
|
||||
|
|
@ -144,30 +170,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@hediet/json-rpc": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@hediet/json-rpc/-/json-rpc-0.5.0.tgz",
|
||||
"integrity": "sha512-SApO7NbKJztClcznEqg46ZGQzO2v3Q3gVIuRVC9QE/m75J/5AipJdclxEXgT++7j4x4LI2JjEpf2xhi67Ngu9A==",
|
||||
"license": "MIT"
|
||||
"resolved": "../../../hediet/typed-json-rpc/json-rpc",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@hediet/json-rpc-browser": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@hediet/json-rpc-browser/-/json-rpc-browser-0.5.1.tgz",
|
||||
"integrity": "sha512-iR+WrTdM7WozRJ/MElfeT8CmH2f911Y8P6xfcj5RCfywp7kjnnqKPUV/VnNnzToxRZUO8WAfJtLvmhDBsSjMtA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@hediet/json-rpc": "^0.5.0"
|
||||
}
|
||||
"resolved": "../../../hediet/typed-json-rpc/json-rpc-browser",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@hediet/json-rpc-websocket": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@hediet/json-rpc-websocket/-/json-rpc-websocket-0.5.1.tgz",
|
||||
"integrity": "sha512-1H9UjKyR00ZjwcReQdzTxyEoZKaEubeOvxBVrwHGo4n9HeQt6SvQgtef+1AJ9MT7/sV2Qfe0VWarYivx6BWgIA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@hediet/json-rpc": "^0.5.0",
|
||||
"@types/ws": "^6.0.4",
|
||||
"isomorphic-ws": "^5.0.0"
|
||||
}
|
||||
"resolved": "../../../hediet/typed-json-rpc/json-rpc-websocket",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@jridgewell/gen-mapping": {
|
||||
"version": "0.3.13",
|
||||
|
|
@ -876,24 +888,6 @@
|
|||
"license": "MIT",
|
||||
"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": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansis/-/ansis-4.2.0.tgz",
|
||||
|
|
@ -1182,15 +1176,6 @@
|
|||
"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": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
|
||||
|
|
@ -1562,12 +1547,6 @@
|
|||
"license": "0BSD",
|
||||
"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": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz",
|
||||
|
|
@ -1580,28 +1559,6 @@
|
|||
"funding": {
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
125
package-lock.json
generated
125
package-lock.json
generated
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"name": "monaco-editor",
|
||||
"version": "0.55.1",
|
||||
"version": "0.54.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "monaco-editor",
|
||||
"version": "0.55.1",
|
||||
"version": "0.54.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.56.1",
|
||||
"@playwright/test": "^1.53.2",
|
||||
"@rollup/plugin-alias": "^5.1.1",
|
||||
"@rollup/plugin-node-resolve": "^16.0.2",
|
||||
"@types/mocha": "^10.0.10",
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
"jsdom": "^19.0.0",
|
||||
"jsonc-parser": "^3.0.0",
|
||||
"mocha": "^11.7.4",
|
||||
"monaco-editor-core": "^0.55.0-rc",
|
||||
"monaco-editor-core": "^0.55.0-dev-20251008",
|
||||
"parcel": "^2.7.0",
|
||||
"pin-github-action": "^1.8.0",
|
||||
"postcss-url": "^10.1.3",
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
"terser": "^5.14.2",
|
||||
"ts-node": "^10.6.0",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.1.11",
|
||||
"vite": "^7.1.5",
|
||||
"vscode-css-languageservice": "6.2.14",
|
||||
"vscode-html-languageservice": "5.2.0",
|
||||
"vscode-json-languageservice": "5.3.11",
|
||||
|
|
@ -2462,12 +2462,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@playwright/test": {
|
||||
"version": "1.56.1",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz",
|
||||
"integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==",
|
||||
"version": "1.54.2",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.54.2.tgz",
|
||||
"integrity": "sha512-A+znathYxPf+72riFd1r1ovOLqsIIB0jKIoPjyK2kqEIe30/6jF6BC7QNluHuwUmsD2tv1XZVugN8GqfTMOxsA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright": "1.56.1"
|
||||
"playwright": "1.54.2"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -4493,22 +4494,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/dompurify": {
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz",
|
||||
"integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==",
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz",
|
||||
"integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==",
|
||||
"dev": true,
|
||||
"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
|
||||
"license": "(MPL-2.0 OR Apache-2.0)"
|
||||
},
|
||||
"node_modules/domutils": {
|
||||
"version": "2.8.0",
|
||||
|
|
@ -6523,13 +6513,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/monaco-editor-core": {
|
||||
"version": "0.55.0-rc",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.55.0-rc.tgz",
|
||||
"integrity": "sha512-LZAAUGilhXX+u+JNxqBABDFyvIVjW6Gmn3EkP0ztdvNxvP6+voiRm2/ZMLokSUGrdOeCZXA2nM6w1xjKkrqNjQ==",
|
||||
"version": "0.55.0-dev-20251009",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.55.0-dev-20251009.tgz",
|
||||
"integrity": "sha512-QyipMtg/vrAXaurn2BpAehWAKsMYlX1bfMxLBjGAI2DJJ/6isZ8+jpPcrOgIPa8Lu4AKrv4vQ0qYGtgSqp0R7Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dompurify": "3.2.7",
|
||||
"dompurify": "3.1.7",
|
||||
"marked": "14.0.0"
|
||||
}
|
||||
},
|
||||
|
|
@ -7036,12 +7026,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/playwright": {
|
||||
"version": "1.56.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz",
|
||||
"integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
|
||||
"version": "1.54.2",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.54.2.tgz",
|
||||
"integrity": "sha512-Hu/BMoA1NAdRUuulyvQC0pEqZ4vQbGfn8f7wPXcnqQmM+zct9UliKxsIkLNmz/ku7LElUNqmaiv1TG/aL5ACsw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.56.1"
|
||||
"playwright-core": "1.54.2"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -7054,10 +7045,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/playwright-core": {
|
||||
"version": "1.56.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz",
|
||||
"integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
|
||||
"version": "1.54.2",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.54.2.tgz",
|
||||
"integrity": "sha512-n5r4HFbMmWsB4twG7tJLDN9gmBUeSPcsBZiWSE4DnYz9mJMAFqr2ID7+eGC9kpEnxExJ1epttwR59LEWCk8mtA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"playwright-core": "cli.js"
|
||||
},
|
||||
|
|
@ -8638,10 +8630,11 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "7.1.11",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.11.tgz",
|
||||
"integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==",
|
||||
"version": "7.1.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz",
|
||||
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.5.0",
|
||||
|
|
@ -10701,12 +10694,12 @@
|
|||
"optional": true
|
||||
},
|
||||
"@playwright/test": {
|
||||
"version": "1.56.1",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz",
|
||||
"integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==",
|
||||
"version": "1.54.2",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.54.2.tgz",
|
||||
"integrity": "sha512-A+znathYxPf+72riFd1r1ovOLqsIIB0jKIoPjyK2kqEIe30/6jF6BC7QNluHuwUmsD2tv1XZVugN8GqfTMOxsA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"playwright": "1.56.1"
|
||||
"playwright": "1.54.2"
|
||||
}
|
||||
},
|
||||
"@rolldown/binding-android-arm64": {
|
||||
|
|
@ -12102,22 +12095,10 @@
|
|||
}
|
||||
},
|
||||
"dompurify": {
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz",
|
||||
"integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==",
|
||||
"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
|
||||
}
|
||||
}
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz",
|
||||
"integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==",
|
||||
"dev": true
|
||||
},
|
||||
"domutils": {
|
||||
"version": "2.8.0",
|
||||
|
|
@ -13435,12 +13416,12 @@
|
|||
}
|
||||
},
|
||||
"monaco-editor-core": {
|
||||
"version": "0.55.0-rc",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.55.0-rc.tgz",
|
||||
"integrity": "sha512-LZAAUGilhXX+u+JNxqBABDFyvIVjW6Gmn3EkP0ztdvNxvP6+voiRm2/ZMLokSUGrdOeCZXA2nM6w1xjKkrqNjQ==",
|
||||
"version": "0.55.0-dev-20251009",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.55.0-dev-20251009.tgz",
|
||||
"integrity": "sha512-QyipMtg/vrAXaurn2BpAehWAKsMYlX1bfMxLBjGAI2DJJ/6isZ8+jpPcrOgIPa8Lu4AKrv4vQ0qYGtgSqp0R7Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"dompurify": "3.2.7",
|
||||
"dompurify": "3.1.7",
|
||||
"marked": "14.0.0"
|
||||
}
|
||||
},
|
||||
|
|
@ -13816,19 +13797,19 @@
|
|||
}
|
||||
},
|
||||
"playwright": {
|
||||
"version": "1.56.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz",
|
||||
"integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
|
||||
"version": "1.54.2",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.54.2.tgz",
|
||||
"integrity": "sha512-Hu/BMoA1NAdRUuulyvQC0pEqZ4vQbGfn8f7wPXcnqQmM+zct9UliKxsIkLNmz/ku7LElUNqmaiv1TG/aL5ACsw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fsevents": "2.3.2",
|
||||
"playwright-core": "1.56.1"
|
||||
"playwright-core": "1.54.2"
|
||||
}
|
||||
},
|
||||
"playwright-core": {
|
||||
"version": "1.56.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz",
|
||||
"integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
|
||||
"version": "1.54.2",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.54.2.tgz",
|
||||
"integrity": "sha512-n5r4HFbMmWsB4twG7tJLDN9gmBUeSPcsBZiWSE4DnYz9mJMAFqr2ID7+eGC9kpEnxExJ1epttwR59LEWCk8mtA==",
|
||||
"dev": true
|
||||
},
|
||||
"portfinder": {
|
||||
|
|
@ -14856,9 +14837,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"vite": {
|
||||
"version": "7.1.11",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.11.tgz",
|
||||
"integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==",
|
||||
"version": "7.1.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz",
|
||||
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esbuild": "^0.25.0",
|
||||
|
|
|
|||
14
package.json
14
package.json
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "monaco-editor",
|
||||
"version": "0.55.1",
|
||||
"vscodeRef": "86f5a62f058e3905f74a9fa65d04b2f3b533408e",
|
||||
"version": "0.54.0",
|
||||
"vscodeRef": "484fdf69b8509c1c9370d913b32e9f6d3a68cc99",
|
||||
"private": true,
|
||||
"description": "A browser based code editor",
|
||||
"homepage": "https://github.com/microsoft/monaco-editor",
|
||||
|
|
@ -33,12 +33,12 @@
|
|||
"build-monaco-editor": "ts-node ./build/build-monaco-editor",
|
||||
"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",
|
||||
"module": "./esm/vs/editor/editor.main.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./esm/vs/editor/editor.main.d.ts",
|
||||
"types": "./esm/vs/editor/editor.api.d.ts",
|
||||
"import": "./esm/vs/editor/editor.main.js",
|
||||
"require": "./min/vs/editor/editor.main.js"
|
||||
},
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
"url": "https://github.com/microsoft/monaco-editor"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.56.1",
|
||||
"@playwright/test": "^1.53.2",
|
||||
"@rollup/plugin-alias": "^5.1.1",
|
||||
"@rollup/plugin-node-resolve": "^16.0.2",
|
||||
"@types/mocha": "^10.0.10",
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
"jsdom": "^19.0.0",
|
||||
"jsonc-parser": "^3.0.0",
|
||||
"mocha": "^11.7.4",
|
||||
"monaco-editor-core": "^0.55.0-rc",
|
||||
"monaco-editor-core": "^0.55.0-dev-20251008",
|
||||
"parcel": "^2.7.0",
|
||||
"pin-github-action": "^1.8.0",
|
||||
"postcss-url": "^10.1.3",
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
"terser": "^5.14.2",
|
||||
"ts-node": "^10.6.0",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.1.11",
|
||||
"vite": "^7.1.5",
|
||||
"vscode-css-languageservice": "6.2.14",
|
||||
"vscode-html-languageservice": "5.2.0",
|
||||
"vscode-json-languageservice": "5.3.11",
|
||||
|
|
|
|||
14
samples/browser-esm-vite-react/package-lock.json
generated
14
samples/browser-esm-vite-react/package-lock.json
generated
|
|
@ -13,7 +13,7 @@
|
|||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.4.21"
|
||||
"vite": "^5.4.20"
|
||||
}
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
|
|
@ -1761,9 +1761,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.4.21",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz",
|
||||
"integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",
|
||||
"version": "5.4.20",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.20.tgz",
|
||||
"integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.21.3",
|
||||
|
|
@ -2923,9 +2923,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"vite": {
|
||||
"version": "5.4.21",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz",
|
||||
"integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",
|
||||
"version": "5.4.20",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.20.tgz",
|
||||
"integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esbuild": "^0.21.3",
|
||||
|
|
|
|||
|
|
@ -15,6 +15,6 @@
|
|||
"@types/react-dom": "^17.0.11",
|
||||
"@vitejs/plugin-react": "^1.1.4",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.4.21"
|
||||
"vite": "^5.4.20"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
samples/browser-esm-vite/.gitignore
vendored
2
samples/browser-esm-vite/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
dist
|
||||
src/**/*.js
|
||||
|
|
@ -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>
|
||||
|
|
@ -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',
|
||||
});
|
||||
1663
samples/browser-esm-vite/package-lock.json
generated
1663
samples/browser-esm-vite/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
html,
|
||||
body,
|
||||
#root {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"strict": true,
|
||||
"module": "ESNext",
|
||||
"jsx": "react-jsx",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["./"]
|
||||
}
|
||||
|
|
@ -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')
|
||||
}],
|
||||
}
|
||||
});
|
||||
70
samples/package-lock.json
generated
70
samples/package-lock.json
generated
|
|
@ -721,7 +721,6 @@
|
|||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
|
|
@ -748,7 +747,6 @@
|
|||
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fast-uri": "^3.0.1",
|
||||
|
|
@ -964,7 +962,6 @@
|
|||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001737",
|
||||
"electron-to-chromium": "^1.5.211",
|
||||
|
|
@ -1262,34 +1259,35 @@
|
|||
}
|
||||
},
|
||||
"node_modules/compression": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz",
|
||||
"integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==",
|
||||
"version": "1.7.4",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"compressible": "~2.0.18",
|
||||
"accepts": "~1.3.5",
|
||||
"bytes": "3.0.0",
|
||||
"compressible": "~2.0.16",
|
||||
"debug": "2.6.9",
|
||||
"negotiator": "~0.6.4",
|
||||
"on-headers": "~1.1.0",
|
||||
"safe-buffer": "5.2.1",
|
||||
"on-headers": "~1.0.2",
|
||||
"safe-buffer": "5.1.2",
|
||||
"vary": "~1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/compression/node_modules/negotiator": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
|
||||
"integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
|
||||
"node_modules/compression/node_modules/bytes": {
|
||||
"version": "3.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"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": {
|
||||
"version": "0.0.1",
|
||||
"dev": true,
|
||||
|
|
@ -2186,21 +2184,6 @@
|
|||
"dev": true,
|
||||
"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": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
|
|
@ -3177,12 +3160,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/monaco-editor": {
|
||||
"version": "0.53.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.53.0.tgz",
|
||||
"integrity": "sha512-0WNThgC6CMWNXXBxTbaYYcunj08iB5rnx4/G56UOPeL9UVIUGGHA1GR0EWIh9Ebabj7NpCRawQ5b0hfN1jQmYQ==",
|
||||
"version": "0.53.0-dev-20250905",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.53.0-dev-20250905.tgz",
|
||||
"integrity": "sha512-dz8KD6kfIkQ9vQgUlUPBf24zFiDo/tPbI6HmDoBToURc3vXSlmxnR3NccA5NAaG/k3SrYZ+m4Pd+sjGtc7SV8w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/trusted-types": "^1.0.6"
|
||||
}
|
||||
|
|
@ -3259,9 +3241,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/node-forge": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.3.tgz",
|
||||
"integrity": "sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
|
||||
"integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
|
||||
"dev": true,
|
||||
"license": "(BSD-3-Clause OR GPL-2.0)",
|
||||
"engines": {
|
||||
|
|
@ -3361,9 +3343,7 @@
|
|||
}
|
||||
},
|
||||
"node_modules/on-headers": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
|
||||
"integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
|
||||
"version": "1.0.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
|
@ -3581,7 +3561,6 @@
|
|||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.6",
|
||||
"picocolors": "^1.0.0",
|
||||
|
|
@ -4013,7 +3992,6 @@
|
|||
"version": "6.12.6",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
|
|
@ -4745,8 +4723,7 @@
|
|||
"node_modules/tslib": {
|
||||
"version": "2.4.0",
|
||||
"dev": true,
|
||||
"license": "0BSD",
|
||||
"peer": true
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
|
|
@ -4788,7 +4765,6 @@
|
|||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
|
||||
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
|
|
@ -4918,7 +4894,6 @@
|
|||
"integrity": "sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/eslint-scope": "^3.7.7",
|
||||
"@types/estree": "^1.0.8",
|
||||
|
|
@ -4966,7 +4941,6 @@
|
|||
"version": "4.10.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@discoveryjs/json-ext": "^0.5.0",
|
||||
"@webpack-cli/configtest": "^1.2.0",
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ async function buildAndTest() {
|
|||
// Run checks and compilation
|
||||
await run('npm run gulp hygiene', { 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 monaco-compile-check', { cwd: vscodePath });
|
||||
await run('npm run --max_old_space_size=4095 compile', { cwd: vscodePath });
|
||||
|
|
@ -88,8 +89,10 @@ async function buildAndTest() {
|
|||
// Build editor distribution
|
||||
await run('npm run gulp editor-distro', { cwd: vscodePath });
|
||||
|
||||
return; // To save CI time.
|
||||
|
||||
// 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
|
||||
await run('mkdir typings-test', { cwd: vscodePath });
|
||||
|
|
@ -107,4 +110,6 @@ async function buildAndTest() {
|
|||
await run('npm test', { cwd: testMonacoDir });
|
||||
}
|
||||
|
||||
//buildAndTest();
|
||||
//prepareMonacoEditorCoreRelease('0.99.0', 'main');
|
||||
prepareMonacoEditorCoreReleaseStableOrNightly();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ export async function gitShallowClone(
|
|||
await run(`git fetch --depth 1 origin ${ref}`, options);
|
||||
await run(`git checkout ${ref}`, options);
|
||||
const commitId = await gitCommitId(targetPath);
|
||||
console.log(`Cloned ${repositoryUrl} (${commitId}) to ${targetPath}`);
|
||||
return { commitId };
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import * as css from '../../language/css/monaco.contribution';
|
||||
import * as html from '../../language/html/monaco.contribution';
|
||||
import * as json from '../../language/json/monaco.contribution';
|
||||
import * as typescript from '../../language/typescript/monaco.contribution';
|
||||
import '../../basic-languages/monaco.contribution';
|
||||
import * as css from '../../language/css/monaco.contribution.js';
|
||||
import * as html from '../../language/html/monaco.contribution.js';
|
||||
import * as json from '../../language/json/monaco.contribution.js';
|
||||
import * as typescript from '../../language/typescript/monaco.contribution.js';
|
||||
import '../../basic-languages/monaco.contribution.js';
|
||||
import * as lsp from '@vscode/monaco-lsp-client';
|
||||
|
||||
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 };
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
return monaco;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ type CompilerOptionsValue =
|
|||
| null
|
||||
| undefined;
|
||||
|
||||
export interface CompilerOptions {
|
||||
interface CompilerOptions {
|
||||
allowJs?: boolean;
|
||||
allowSyntheticDefaultImports?: boolean;
|
||||
allowUmdGlobalAccess?: boolean;
|
||||
|
|
|
|||
2494
website/package-lock.json
generated
2494
website/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -17,18 +17,18 @@
|
|||
"@vscode/web-editors": "./vscode-web-editors.tgz",
|
||||
"base64-js": "^1.5.1",
|
||||
"bootstrap": "^5.2.0",
|
||||
"bootstrap-icons": "^1.13.1",
|
||||
"bootstrap-icons": "^1.9.1",
|
||||
"classnames": "^2.2.6",
|
||||
"html-inline-css-webpack-plugin": "^1.11.1",
|
||||
"lzma": "^2.3.2",
|
||||
"messagepack": "^1.1.12",
|
||||
"mini-css-extract-plugin": "^2.6.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^5.0.0",
|
||||
"mobx-react": "^6.2.2",
|
||||
"monaco-editor": "^0.55.0-dev-20251008",
|
||||
"react": "^16.0.2",
|
||||
"react-bootstrap": "^2.10.10",
|
||||
"react-dom": "^16.0.2",
|
||||
"react": "^17.0.2",
|
||||
"react-bootstrap": "^2.4.0",
|
||||
"react-dom": "^17.0.2",
|
||||
"typedoc": "^0.25.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -14,20 +14,13 @@ export function getMonaco(): typeof monaco | undefined {
|
|||
return (window as any).monaco;
|
||||
}
|
||||
|
||||
export type IAMDMonacoSetup = {
|
||||
export interface IMonacoSetup {
|
||||
loaderUrl: string;
|
||||
loaderConfigPaths: Record<string, string>;
|
||||
codiconUrl: string;
|
||||
monacoTypesUrl: string | undefined;
|
||||
language?: string;
|
||||
};
|
||||
|
||||
export type IESMMonacoSetup = {
|
||||
esmUrl: string;
|
||||
monacoTypesUrl: string | undefined;
|
||||
};
|
||||
|
||||
export type IMonacoSetup = IAMDMonacoSetup | IESMMonacoSetup;
|
||||
}
|
||||
|
||||
let loading = false;
|
||||
let resolve: (value: typeof monaco) => void;
|
||||
|
|
@ -54,10 +47,6 @@ export async function loadMonaco(
|
|||
async function _loadMonaco(setup: IMonacoSetup): Promise<typeof monaco> {
|
||||
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) {
|
||||
await loadScript(setup.loaderUrl);
|
||||
}
|
||||
|
|
@ -123,7 +112,7 @@ export const prodMonacoSetup = getMonacoSetup(
|
|||
export function getMonacoSetup(
|
||||
corePath: string,
|
||||
language?: string
|
||||
): IAMDMonacoSetup {
|
||||
): IMonacoSetup {
|
||||
const loaderConfigPaths = {
|
||||
vs: `${corePath}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ import { IMessageFromRunner, IMessageToRunner, IPreviewState } from "../shared";
|
|||
import "./style.scss";
|
||||
|
||||
window.addEventListener("message", (event) => {
|
||||
/*const isInSandbox = window.origin === "null";
|
||||
const isInSandbox = window.origin === "null";
|
||||
if (!isInSandbox) {
|
||||
// To prevent someone from using this html file to run arbitrary code in non-sandboxed context
|
||||
console.error("not in sandbox");
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
const e = event.data as IMessageToRunner | { kind: undefined };
|
||||
if (e.kind === "initialize") {
|
||||
initialize(e.state);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ monaco.editor.defineTheme("myCustomTheme", {
|
|||
rules: [
|
||||
{
|
||||
token: "comment",
|
||||
foreground: "a80085",
|
||||
foreground: "ffa500",
|
||||
fontStyle: "italic underline",
|
||||
},
|
||||
{ token: "comment.js", foreground: "008800", fontStyle: "bold" },
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
// to the system and how the compiler is told to use ES6 (target=2).
|
||||
|
||||
// validation settings
|
||||
monaco.typescript.javascriptDefaults.setDiagnosticsOptions({
|
||||
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
|
||||
noSemanticValidation: true,
|
||||
noSyntaxValidation: false,
|
||||
});
|
||||
|
||||
// compiler options
|
||||
monaco.typescript.javascriptDefaults.setCompilerOptions({
|
||||
target: monaco.typescript.ScriptTarget.ES2015,
|
||||
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
|
||||
target: monaco.languages.typescript.ScriptTarget.ES2015,
|
||||
allowNonTsExtensions: true,
|
||||
});
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ var libSource = [
|
|||
"}",
|
||||
].join("\n");
|
||||
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.
|
||||
// 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));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
// configure the JSON language support with schemas and schema associations
|
||||
monaco.json.jsonDefaults.setDiagnosticsOptions({
|
||||
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
|
||||
validate: true,
|
||||
schemas: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export class Preview extends React.Component<{
|
|||
<iframe
|
||||
className="full-iframe"
|
||||
key={this.counter}
|
||||
// sandbox="allow-scripts allow-modals"
|
||||
sandbox="allow-scripts allow-modals"
|
||||
frameBorder={0}
|
||||
ref={this.handleIframe}
|
||||
src={`https://isolated-playground.github.io/?jsSrcBase64=${btoa(
|
||||
|
|
|
|||
|
|
@ -136,13 +136,6 @@ export function toLoaderConfig(settings: Settings): IMonacoSetup {
|
|||
break;
|
||||
}
|
||||
|
||||
if (coreUrl.endsWith('?esm')) {
|
||||
return {
|
||||
esmUrl: coreUrl,
|
||||
monacoTypesUrl: undefined,
|
||||
}
|
||||
}
|
||||
|
||||
let languagesUrl: string;
|
||||
switch (settings.languagesSource) {
|
||||
case "latest":
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true
|
||||
"skipLibCheck": true
|
||||
},
|
||||
// TODO: load from node_modules to be in sync with the latest stable monaco-editor
|
||||
"include": ["../../out/monaco-editor/esm/vs/editor/editor.main.d.ts"],
|
||||
"include": ["../../out/monaco-editor/esm/vs/editor/editor.api.d.ts"],
|
||||
"exclude": ["theme"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$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",
|
||||
"theme": "default",
|
||||
|
|
|
|||
|
|
@ -57,7 +57,10 @@ module.exports = {
|
|||
"sass-loader",
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.(jpe?g|png|gif|eot|ttf|svg|woff|woff2|md)$/i,
|
||||
loader: "file-loader",
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
loader: "ts-loader",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue