Compare commits

..

57 commits

Author SHA1 Message Date
Henning Dieterichs
ec78a33c7b
fixes browser tests (#5150) 2025-12-17 16:53:10 +01:00
Henning Dieterichs
165cfcb101
Build scripts dont need to be compiled anymore (#5149) 2025-12-17 11:21:11 +00:00
Henning Dieterichs
09eede5b26
Logs the sha of dependencies (#5146) 2025-12-16 17:52:03 +01:00
Henning Dieterichs
7649edb383
Updates node to 22.21.1 (#5147) 2025-12-16 17:51:51 +01:00
dependabot[bot]
b8fa85f6c8
Bump node-forge from 1.3.1 to 1.3.2 in /website (#5130)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.2.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-12 09:45:18 -08:00
dependabot[bot]
ebe111d469
Bump node-forge from 1.3.1 to 1.3.3 in /samples (#5138)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.3.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.1...v1.3.3)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.3.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-12 09:44:17 -08:00
Michael Lively
02a9562005
Merge pull request #5143 from microsoft/milively/add-commands-json
Add commands.json for triage bot automation
2025-12-11 16:06:53 -08:00
Michael Lively
94a5762a32 Add commands.json for triage bot automation 2025-12-11 15:55:06 -08:00
Hawk Ticehurst
c619ef9a3d
Merge pull request #5136 from microsoft/hawk/a11y-bug-fix 2025-12-05 14:03:42 -05:00
Hawk Ticehurst
bf4931bb98
Fix a11y color contrast bug with sample 2025-12-05 11:03:04 -05:00
Henning Dieterichs
516f350bda
Fixes missing language exports (#5121) 2025-11-20 09:44:34 -08:00
Henning Dieterichs
9221aa0ef8
v0.55.1 (#5122)
* v0.55.1

* Updates changelog
2025-11-20 09:44:18 -08:00
Henning Dieterichs
d678c1d32d
Merge pull request #5120 from microsoft/hediet/enormous-herring
Fixes npx playwright install --with-deps
2025-11-20 11:04:15 +01:00
Henning Dieterichs
f047a08481
Fixes npx playwright install --with-deps 2025-11-20 10:56:16 +01:00
Henning Dieterichs
220c1cab84
Fixes https://github.com/microsoft/monaco-editor/issues/5113 (#5118) 2025-11-19 18:24:48 +00:00
Henning Dieterichs
1b175c701c
v0.55.0 (#5117) 2025-11-19 19:08:30 +01:00
Henning Dieterichs
574b846ad2
Install playwright dependencies in monaco-editor-core job (#5116) 2025-11-18 10:02:22 -08:00
Henning Dieterichs
5486e82ffa
update (#5105) 2025-11-07 18:34:10 +00:00
Henning Dieterichs
e70b6618f4
fixes website & adds editor.api.d.ts (#5104) 2025-11-07 17:47:33 +00:00
Henning Dieterichs
36efbe07d9
Fixes typedoc & updates pipelines to test website (#5102)
* Fixes typedoc & updates pipelines to test website

* Fixes typedoc

* Fixes samples
2025-11-07 16:57:18 +00:00
Henning Dieterichs
422d19e3d6
Updates website dependencies (#5100) 2025-11-07 09:40:12 -05:00
Henning Dieterichs
3ebf03ad14
Merge pull request #5071 from microsoft/dependabot/npm_and_yarn/samples/browser-esm-vite-react/vite-5.4.21
Bump vite from 5.4.20 to 5.4.21 in /samples/browser-esm-vite-react
2025-11-07 15:22:39 +01:00
Henning Dieterichs
2baf3291e9
Merge pull request #4961 from microsoft/dependabot/npm_and_yarn/samples/multi-96c788614a
Bump on-headers and compression in /samples
2025-11-07 15:22:31 +01:00
Henning Dieterichs
f42be23bf6
Merge pull request #5040 from microsoft/dependabot/npm_and_yarn/website/babel/runtime-7.28.4
Bump @babel/runtime from 7.18.9 to 7.28.4 in /website
2025-11-07 15:22:19 +01:00
Henning Dieterichs
ecd2990fb9
Merge pull request #5095 from microsoft/dependabot/npm_and_yarn/samples/browser-esm-vite/vite-7.1.11
Bump vite from 7.1.9 to 7.1.11 in /samples/browser-esm-vite
2025-11-07 15:22:10 +01:00
Henning Dieterichs
d84acb4d8f
Cleans up build scripts (#5097)
* Cleans up build scripts

* Adds back removeDir
2025-11-07 13:10:14 +01:00
Henning Dieterichs
abae948dc3
Dont build the editor when building the website (#5098) 2025-11-07 13:09:48 +01:00
Henning Dieterichs
925720b094
Run tests (#5099) 2025-11-07 13:09:19 +01:00
dependabot[bot]
e7c9226d78
Bump vite from 7.1.9 to 7.1.11 in /samples/browser-esm-vite
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.9 to 7.1.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.11
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-07 10:21:02 +00:00
Henning Dieterichs
d38215cf6b
Adds vite esm example (#5094) 2025-11-07 10:19:47 +00:00
Henning Dieterichs
b62a81677f
Adds playground support for esmUrl (#5093) 2025-11-07 10:17:25 +00:00
Henning Dieterichs
81b06fd717
Updates changelog (#5092) 2025-11-07 10:16:41 +00:00
Henning Dieterichs
d89eb54d17
Fixes https://github.com/microsoft/monaco-editor/issues/4997 (#5090) 2025-11-06 09:08:36 -08:00
Henning Dieterichs
b3250fa2b9
Adds missing NLS files (#5089) 2025-11-06 17:30:39 +01:00
Henning Dieterichs
9c7b547a98
Dont use .js for typescript imports, as rollup adds them to the output (#5088) 2025-11-06 17:30:17 +01:00
dependabot[bot]
ca5dfa5092
Bump vite from 5.4.20 to 5.4.21 in /samples/browser-esm-vite-react
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.20 to 5.4.21.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.21/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.21
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-21 14:30:55 +00:00
Henning Dieterichs
e8e70b3154
Merge pull request #5070 from microsoft/dependabot/npm_and_yarn/vite-7.1.11
Bump vite from 7.1.5 to 7.1.11
2025-10-21 16:29:26 +02:00
dependabot[bot]
a2b9eb07f2
Bump vite from 7.1.5 to 7.1.11
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.5 to 7.1.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.11
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 22:56:11 +00:00
Henning Dieterichs
c0063aedfa
Merge pull request #5069 from microsoft/dependabot/npm_and_yarn/multi-a50d7f32cf
Bump playwright and @playwright/test
2025-10-20 21:43:09 +02:00
dependabot[bot]
c8b3ac9087
Bump playwright and @playwright/test
Bumps [playwright](https://github.com/microsoft/playwright) to 1.56.1 and updates ancestor dependency [@playwright/test](https://github.com/microsoft/playwright). These dependencies need to be updated together.


Updates `playwright` from 1.54.2 to 1.56.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.54.2...v1.56.1)

Updates `@playwright/test` from 1.54.2 to 1.56.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.54.2...v1.56.1)

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: 1.56.1
  dependency-type: indirect
- dependency-name: "@playwright/test"
  dependency-version: 1.56.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 19:08:04 +00:00
Henning Dieterichs
7102eff209
Add monaco-editor-core dependencies to monaco-editor after updating monaco-editor-core. (#5058) 2025-10-16 03:13:12 -07:00
dependabot[bot]
473bc634aa
Bump @babel/runtime from 7.18.9 to 7.28.4 in /website
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.18.9 to 7.28.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.4/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-version: 7.28.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-15 15:17:56 +00:00
Henning Dieterichs
3b30c6efb1
Merge pull request #5053 from microsoft/dependabot/npm_and_yarn/website/loader-utils-2.0.4
Bump loader-utils from 2.0.2 to 2.0.4 in /website
2025-10-15 17:16:23 +02:00
Henning Dieterichs
96665ee0e3
Merge pull request #5055 from microsoft/dependabot/npm_and_yarn/website/multi-8d9d650fb2
Bump postcss and css-loader in /website
2025-10-15 17:16:08 +02:00
Henning Dieterichs
93c8b62ea6
Merge pull request #5054 from microsoft/dependabot/npm_and_yarn/website/json5-2.2.3
Bump json5 from 2.2.1 to 2.2.3 in /website
2025-10-15 17:15:53 +02:00
Henning Dieterichs
3a25d8ef40
Merge pull request #4973 from flofriday/fix-kotlin-number-literals
Fix Kotlin number literals
2025-10-15 12:21:30 +02:00
dependabot[bot]
649d4c35e5
Bump postcss and css-loader in /website
Bumps [postcss](https://github.com/postcss/postcss) to 8.5.6 and updates ancestor dependency [css-loader](https://github.com/webpack-contrib/css-loader). These dependencies need to be updated together.


Updates `postcss` from 7.0.39 to 8.5.6
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.39...8.5.6)

Updates `css-loader` from 3.6.0 to 7.1.2
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack/css-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v3.6.0...v7.1.2)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.6
  dependency-type: indirect
- dependency-name: css-loader
  dependency-version: 7.1.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-15 09:51:57 +00:00
dependabot[bot]
32f1053239
Bump json5 from 2.2.1 to 2.2.3 in /website
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-version: 2.2.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-15 09:51:54 +00:00
dependabot[bot]
268d8ce6a7
Bump loader-utils from 2.0.2 to 2.0.4 in /website
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-version: 2.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-15 09:51:53 +00:00
Henning Dieterichs
1889c7e7dd
Merge pull request #4991 from microsoft/dependabot/npm_and_yarn/samples/browser-esm-vite-react/vite-5.4.20
Bump vite from 2.9.17 to 5.4.20 in /samples/browser-esm-vite-react
2025-10-15 11:51:04 +02:00
Henning Dieterichs
d3a3c45f48
Merge pull request #5039 from microsoft/dependabot/npm_and_yarn/website/webpack-5.102.1
Bump webpack from 5.90.1 to 5.102.1 in /website
2025-10-15 11:50:47 +02:00
Henning Dieterichs
04e09e38ce
Merge pull request #5037 from microsoft/dependabot/npm_and_yarn/website/multi-4df209198f
Bump ws in /website
2025-10-15 11:50:38 +02:00
flofriday
ca96114e39 Fix Kotlin number literals 2025-10-13 18:40:50 +02:00
dependabot[bot]
892ca6497e
Bump ws in /website
Bumps  and [ws](https://github.com/websockets/ws). These dependencies needed to be updated together.

Updates `ws` from 7.5.9 to 7.5.10
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10)

Updates `ws` from 8.8.1 to 8.18.3
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-version: 7.5.10
  dependency-type: indirect
- dependency-name: ws
  dependency-version: 8.18.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-09 17:42:37 +00:00
dependabot[bot]
56b58b5674
Bump webpack from 5.90.1 to 5.102.1 in /website
Bumps [webpack](https://github.com/webpack/webpack) from 5.90.1 to 5.102.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.90.1...v5.102.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.102.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-09 17:42:34 +00:00
dependabot[bot]
6194383804
Bump vite from 2.9.17 to 5.4.20 in /samples/browser-esm-vite-react
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.9.17 to 5.4.20.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.20/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.20/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.20
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-08 21:55:52 +00:00
dependabot[bot]
cdc4da5d91
Bump on-headers and compression in /samples
Bumps [on-headers](https://github.com/jshttp/on-headers) and [compression](https://github.com/expressjs/compression). These dependencies needed to be updated together.

Updates `on-headers` from 1.0.2 to 1.1.0
- [Release notes](https://github.com/jshttp/on-headers/releases)
- [Changelog](https://github.com/jshttp/on-headers/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/on-headers/compare/v1.0.2...v1.1.0)

Updates `compression` from 1.7.4 to 1.8.1
- [Release notes](https://github.com/expressjs/compression/releases)
- [Changelog](https://github.com/expressjs/compression/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/compression/compare/1.7.4...v1.8.1)

---
updated-dependencies:
- dependency-name: on-headers
  dependency-version: 1.1.0
  dependency-type: indirect
- dependency-name: compression
  dependency-version: 1.8.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-11 13:56:14 +00:00
49 changed files with 5605 additions and 2256 deletions

View file

@ -62,6 +62,9 @@ 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 }}

View file

@ -50,6 +50,9 @@ 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 Normal file
View file

@ -0,0 +1,150 @@
[
{
"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,14 +83,18 @@ jobs:
- name: Run smoke test
run: npm run smoketest
# - name: Install website node modules
# working-directory: website
# run: yarn install --frozen-lockfile
- name: Install website node modules
working-directory: website
run: npm ci
# - name: Build website
# working-directory: website
# run: yarn run build
- name: Install most recent version of monaco-editor
working-directory: website
run: npm install monaco-editor
# - name: Test website
# working-directory: website
# run: yarn test
- name: Build website
working-directory: website
run: npm run build
- name: Test website
working-directory: website
run: npm run test

View file

@ -39,8 +39,10 @@ jobs:
- name: execute `npm ci` (1)
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npm ci
# For TypeDoc
- name: Build
run: npm run build-monaco-editor
run: npm run build
- name: Install website node modules
working-directory: website
@ -54,6 +56,10 @@ 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
View file

@ -1 +1 @@
22.18.0
22.21.1

View file

@ -1,5 +1,20 @@
# 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`

View file

@ -28,6 +28,15 @@ 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.

View file

@ -9,45 +9,22 @@ import nodeResolve from '@rollup/plugin-node-resolve';
import { join } from 'path';
import { defineConfig } from 'rollup';
import { dts } from 'rollup-plugin-dts';
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/'
};
import { dtsDeprecationWarning, mapModuleId } from '../shared.mjs';
export default defineConfig({
input: {
types: join(import.meta.dirname, './src/types.ts')
},
output: {
dir: outDir,
dir: join(import.meta.dirname, './out'),
format: 'es',
preserveModules: false,
entryFileNames: function (chunkInfo) {
const moduleId = chunkInfo.facadeModuleId;
if (moduleId) {
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');
}
const m = mapModuleId(moduleId, '.d.ts');
if (m !== undefined) {
return m;
}
}
return '[name].d.ts';
@ -61,6 +38,7 @@ export default defineConfig({
stripInternal: true
},
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
})
}),
dtsDeprecationWarning(),
]
});

View file

@ -1,23 +1,13 @@
import { readFileSync } from 'node:fs';
import { glob } from 'node:fs/promises';
import { basename, dirname, join, resolve } from 'node:path';
import { dirname, 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: './',
@ -28,7 +18,7 @@ export default defineConfig(async (args) => {
lib: {
cssFileName: 'editor/editor.main',
entry: {
...nlsEntries,
...getNlsEntryPoints(),
'nls.messages-loader': resolve(__dirname, 'src/nls.messages-loader.js'),
'editor/editor.main': resolve(__dirname, 'src/editor.main.ts'),
'basic-languages/monaco.contribution': resolve(

View file

@ -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() {
removeDir(`out/monaco-editor`);
await rm(path.join(REPO_ROOT, './out/monaco-editor'), { recursive: true, force: true });
await buildESM();
await buildAmdMinDev();

View file

@ -9,46 +9,25 @@ 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: outDir,
dir: join(root, './out/monaco-editor/esm'),
format: 'es',
preserveModules: false,
entryFileNames: function (chunkInfo) {
const moduleId = chunkInfo.facadeModuleId;
if (moduleId) {
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');
}
const m = mapModuleId(moduleId, '.d.ts');
if (m !== undefined) {
return m;
}
}
return '[name].d.ts';
@ -63,5 +42,6 @@ export default defineConfig({
},
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
}),
dtsDeprecationWarning(f => f.endsWith('editor.api.d.ts')),
],
});

View file

@ -13,33 +13,13 @@ 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 { copyFileSync, mkdirSync } from 'fs';
import { dirname } from 'path';
import { getNlsEntryPoints, mapModuleId } from '../shared.mjs';
import { readFileSync } from 'fs';
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'),
@ -47,6 +27,7 @@ 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: {
@ -56,11 +37,9 @@ export default defineConfig({
entryFileNames: function (chunkInfo) {
const moduleId = chunkInfo.facadeModuleId;
if (moduleId) {
for (const [key, val] of Object.entries(mappedPaths)) {
if (moduleId.startsWith(key)) {
const relativePath = moduleId.substring(key.length);
return changeExt(join(val, relativePath), '.js');
}
const r = mapModuleId(moduleId, '.js');
if (r !== undefined) {
return r;
}
}
return '[name].js';
@ -74,11 +53,12 @@ export default defineConfig({
{
name: 'copy-codicon-font',
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);
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'))
});
}
},
@ -90,13 +70,10 @@ export default defineConfig({
* @param {string} assetId
*/
outputPath: (assetId) => {
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 r = mapModuleId(assetId, '.css');
if (r !== undefined) {
return join(outDir, r);
}
}
const relativePath = join(outDir, relative(root, assetId));
return relativePath.replace(/(\.s[ca]ss)$/, ".min$1")
},

View file

@ -29,19 +29,6 @@ export function ensureDir(dirname: string) {
});
}
/**
* 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.
*/

96
build/shared.mjs Normal file
View file

@ -0,0 +1,96 @@
/*---------------------------------------------------------------------------------------------
* 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,22 +21,6 @@
"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",
@ -55,16 +39,6 @@
"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
},
@ -170,16 +144,30 @@
}
},
"node_modules/@hediet/json-rpc": {
"resolved": "../../../hediet/typed-json-rpc/json-rpc",
"link": true
"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"
},
"node_modules/@hediet/json-rpc-browser": {
"resolved": "../../../hediet/typed-json-rpc/json-rpc-browser",
"link": true
"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"
}
},
"node_modules/@hediet/json-rpc-websocket": {
"resolved": "../../../hediet/typed-json-rpc/json-rpc-websocket",
"link": true
"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"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.13",
@ -888,6 +876,24 @@
"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",
@ -1176,6 +1182,15 @@
"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",
@ -1547,6 +1562,12 @@
"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",
@ -1559,6 +1580,28 @@
"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
View file

@ -1,16 +1,16 @@
{
"name": "monaco-editor",
"version": "0.54.0",
"version": "0.55.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "monaco-editor",
"version": "0.54.0",
"version": "0.55.1",
"hasInstallScript": true,
"license": "MIT",
"devDependencies": {
"@playwright/test": "^1.53.2",
"@playwright/test": "^1.56.1",
"@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-dev-20251008",
"monaco-editor-core": "^0.55.0-rc",
"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.5",
"vite": "^7.1.11",
"vscode-css-languageservice": "6.2.14",
"vscode-html-languageservice": "5.2.0",
"vscode-json-languageservice": "5.3.11",
@ -2462,13 +2462,12 @@
}
},
"node_modules/@playwright/test": {
"version": "1.54.2",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.54.2.tgz",
"integrity": "sha512-A+znathYxPf+72riFd1r1ovOLqsIIB0jKIoPjyK2kqEIe30/6jF6BC7QNluHuwUmsD2tv1XZVugN8GqfTMOxsA==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz",
"integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright": "1.54.2"
"playwright": "1.56.1"
},
"bin": {
"playwright": "cli.js"
@ -4494,11 +4493,22 @@
}
},
"node_modules/dompurify": {
"version": "3.1.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz",
"integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==",
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz",
"integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==",
"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": {
"version": "2.8.0",
@ -6513,13 +6523,13 @@
}
},
"node_modules/monaco-editor-core": {
"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==",
"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==",
"dev": true,
"license": "MIT",
"dependencies": {
"dompurify": "3.1.7",
"dompurify": "3.2.7",
"marked": "14.0.0"
}
},
@ -7026,13 +7036,12 @@
}
},
"node_modules/playwright": {
"version": "1.54.2",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.54.2.tgz",
"integrity": "sha512-Hu/BMoA1NAdRUuulyvQC0pEqZ4vQbGfn8f7wPXcnqQmM+zct9UliKxsIkLNmz/ku7LElUNqmaiv1TG/aL5ACsw==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz",
"integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.54.2"
"playwright-core": "1.56.1"
},
"bin": {
"playwright": "cli.js"
@ -7045,11 +7054,10 @@
}
},
"node_modules/playwright-core": {
"version": "1.54.2",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.54.2.tgz",
"integrity": "sha512-n5r4HFbMmWsB4twG7tJLDN9gmBUeSPcsBZiWSE4DnYz9mJMAFqr2ID7+eGC9kpEnxExJ1epttwR59LEWCk8mtA==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz",
"integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"playwright-core": "cli.js"
},
@ -8630,11 +8638,10 @@
"dev": true
},
"node_modules/vite": {
"version": "7.1.5",
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz",
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
"version": "7.1.11",
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.11.tgz",
"integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==",
"dev": true,
"license": "MIT",
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.5.0",
@ -10694,12 +10701,12 @@
"optional": true
},
"@playwright/test": {
"version": "1.54.2",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.54.2.tgz",
"integrity": "sha512-A+znathYxPf+72riFd1r1ovOLqsIIB0jKIoPjyK2kqEIe30/6jF6BC7QNluHuwUmsD2tv1XZVugN8GqfTMOxsA==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz",
"integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==",
"dev": true,
"requires": {
"playwright": "1.54.2"
"playwright": "1.56.1"
}
},
"@rolldown/binding-android-arm64": {
@ -12095,10 +12102,22 @@
}
},
"dompurify": {
"version": "3.1.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz",
"integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==",
"dev": true
"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
}
}
},
"domutils": {
"version": "2.8.0",
@ -13416,12 +13435,12 @@
}
},
"monaco-editor-core": {
"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==",
"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==",
"dev": true,
"requires": {
"dompurify": "3.1.7",
"dompurify": "3.2.7",
"marked": "14.0.0"
}
},
@ -13797,19 +13816,19 @@
}
},
"playwright": {
"version": "1.54.2",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.54.2.tgz",
"integrity": "sha512-Hu/BMoA1NAdRUuulyvQC0pEqZ4vQbGfn8f7wPXcnqQmM+zct9UliKxsIkLNmz/ku7LElUNqmaiv1TG/aL5ACsw==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz",
"integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
"dev": true,
"requires": {
"fsevents": "2.3.2",
"playwright-core": "1.54.2"
"playwright-core": "1.56.1"
}
},
"playwright-core": {
"version": "1.54.2",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.54.2.tgz",
"integrity": "sha512-n5r4HFbMmWsB4twG7tJLDN9gmBUeSPcsBZiWSE4DnYz9mJMAFqr2ID7+eGC9kpEnxExJ1epttwR59LEWCk8mtA==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz",
"integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
"dev": true
},
"portfinder": {
@ -14837,9 +14856,9 @@
"dev": true
},
"vite": {
"version": "7.1.5",
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz",
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
"version": "7.1.11",
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.11.tgz",
"integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==",
"dev": true,
"requires": {
"esbuild": "^0.25.0",

View file

@ -1,7 +1,7 @@
{
"name": "monaco-editor",
"version": "0.54.0",
"vscodeRef": "484fdf69b8509c1c9370d913b32e9f6d3a68cc99",
"version": "0.55.1",
"vscodeRef": "86f5a62f058e3905f74a9fa65d04b2f3b533408e",
"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.api.d.ts",
"typings": "./esm/vs/editor/editor.main.d.ts",
"main": "./min/vs/editor/editor.main.js",
"module": "./esm/vs/editor/editor.main.js",
"exports": {
".": {
"types": "./esm/vs/editor/editor.api.d.ts",
"types": "./esm/vs/editor/editor.main.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.53.2",
"@playwright/test": "^1.56.1",
"@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-dev-20251008",
"monaco-editor-core": "^0.55.0-rc",
"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.5",
"vite": "^7.1.11",
"vscode-css-languageservice": "6.2.14",
"vscode-html-languageservice": "5.2.0",
"vscode-json-languageservice": "5.3.11",

File diff suppressed because it is too large Load diff

View file

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

2
samples/browser-esm-vite/.gitignore vendored Normal file
View file

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

View file

@ -0,0 +1,12 @@
<!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

@ -0,0 +1,13 @@
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 Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,14 @@
{
"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

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

View file

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

View file

@ -0,0 +1,19 @@
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,6 +721,7 @@
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
"license": "MIT",
"peer": true,
"bin": {
"acorn": "bin/acorn"
},
@ -747,6 +748,7 @@
"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",
@ -962,6 +964,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"caniuse-lite": "^1.0.30001737",
"electron-to-chromium": "^1.5.211",
@ -1259,35 +1262,34 @@
}
},
"node_modules/compression": {
"version": "1.7.4",
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz",
"integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==",
"dev": true,
"license": "MIT",
"dependencies": {
"accepts": "~1.3.5",
"bytes": "3.0.0",
"compressible": "~2.0.16",
"bytes": "3.1.2",
"compressible": "~2.0.18",
"debug": "2.6.9",
"on-headers": "~1.0.2",
"safe-buffer": "5.1.2",
"negotiator": "~0.6.4",
"on-headers": "~1.1.0",
"safe-buffer": "5.2.1",
"vary": "~1.1.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/compression/node_modules/bytes": {
"version": "3.0.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==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.8"
"node": ">= 0.6"
}
},
"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,
@ -2184,6 +2186,21 @@
"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",
@ -3160,11 +3177,12 @@
}
},
"node_modules/monaco-editor": {
"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==",
"version": "0.53.0",
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.53.0.tgz",
"integrity": "sha512-0WNThgC6CMWNXXBxTbaYYcunj08iB5rnx4/G56UOPeL9UVIUGGHA1GR0EWIh9Ebabj7NpCRawQ5b0hfN1jQmYQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@types/trusted-types": "^1.0.6"
}
@ -3241,9 +3259,9 @@
}
},
"node_modules/node-forge": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
"integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.3.tgz",
"integrity": "sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg==",
"dev": true,
"license": "(BSD-3-Clause OR GPL-2.0)",
"engines": {
@ -3343,7 +3361,9 @@
}
},
"node_modules/on-headers": {
"version": "1.0.2",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
"integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
"dev": true,
"license": "MIT",
"engines": {
@ -3561,6 +3581,7 @@
"url": "https://github.com/sponsors/ai"
}
],
"peer": true,
"dependencies": {
"nanoid": "^3.3.6",
"picocolors": "^1.0.0",
@ -3992,6 +4013,7 @@
"version": "6.12.6",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
@ -4723,7 +4745,8 @@
"node_modules/tslib": {
"version": "2.4.0",
"dev": true,
"license": "0BSD"
"license": "0BSD",
"peer": true
},
"node_modules/tunnel": {
"version": "0.0.6",
@ -4765,6 +4788,7 @@
"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"
@ -4894,6 +4918,7 @@
"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",
@ -4941,6 +4966,7 @@
"version": "4.10.0",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@discoveryjs/json-ext": "^0.5.0",
"@webpack-cli/configtest": "^1.2.0",

View file

@ -81,7 +81,6 @@ 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 });
@ -89,10 +88,8 @@ 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 });
@ -110,6 +107,4 @@ async function buildAndTest() {
await run('npm test', { cwd: testMonacoDir });
}
//buildAndTest();
//prepareMonacoEditorCoreRelease('0.99.0', 'main');
prepareMonacoEditorCoreReleaseStableOrNightly();

View file

@ -43,36 +43,32 @@ async function prepareMonacoEditorRelease(monacoEditorCoreVersion: string) {
});
await group('Set Version & Update monaco-editor-core Version', async () => {
const packageJson = JSON.parse(
await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
) as PackageJson;
const packageJson = JSON.parse(await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })) as PackageJson;
packageJson.version = monacoEditorCoreVersion;
packageJson.devDependencies['monaco-editor-core'] = monacoEditorCoreVersion;
await writeJsonFile(monacoEditorPackageJsonPath, packageJson);
});
const monacoEditorCorePackageJson = JSON.parse(
await readFile(monacoEditorCorePackageJsonPath, { encoding: 'utf-8' })
) as PackageJson;
await group('npm install to pick up monaco-editor-core', async () => {
await run('npm install', { cwd: rootPath });
});
await group('Pick up monaco-editor-core dependencies for CVE tracking', async () => {
const packageJson = JSON.parse(await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })) as PackageJson;
const monacoEditorCorePackageJson = JSON.parse(await readFile(monacoEditorCorePackageJsonPath, { encoding: 'utf-8' })) as PackageJson;
if (monacoEditorCorePackageJson.dependencies) {
if (!packageJson.dependencies) {
packageJson.dependencies = {};
}
objectMergeThrowIfSet(
packageJson.dependencies,
monacoEditorCorePackageJson.dependencies,
'dependencies'
);
}
await writeJsonFile(monacoEditorPackageJsonPath, packageJson);
});
await group('npm install to pick up monaco-editor-core', async () => {
await run('npm install', { cwd: rootPath });
});
await group('Setting vscode commitId from monaco-editor-core', async () => {
const monacoEditorCorePackageJson = JSON.parse(
await readFile(monacoEditorCorePackageJsonPath, { encoding: 'utf-8' })

View file

@ -54,6 +54,7 @@ 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 };
}

View file

@ -277,6 +277,13 @@ testTokenization('kotlin', [
}
],
[
{
line: '.123',
tokens: [{ startIndex: 0, type: 'number.float.kt' }]
}
],
[
{
line: '0x',
@ -301,24 +308,62 @@ testTokenization('kotlin', [
}
],
[
{
line: '0Xff_81_00L',
tokens: [{ startIndex: 0, type: 'number.hex.kt' }]
}
],
[
{
line: '0x123u',
tokens: [{ startIndex: 0, type: 'number.hex.kt' }]
}
],
[
{
line: '0x123U',
tokens: [{ startIndex: 0, type: 'number.hex.kt' }]
}
],
[
{
line: '0x123uL',
tokens: [{ startIndex: 0, type: 'number.hex.kt' }]
}
],
[
{
line: '0x123UL',
tokens: [{ startIndex: 0, type: 'number.hex.kt' }]
}
],
[
{
line: '023L',
tokens: [{ startIndex: 0, type: 'number.octal.kt' }]
tokens: [{ startIndex: 0, type: 'number.kt' }]
}
],
[
{
line: '0123l',
tokens: [{ startIndex: 0, type: 'number.octal.kt' }]
tokens: [
{ startIndex: 0, type: 'number.kt' },
{ startIndex: 4, type: 'identifier.kt' }
]
}
],
[
{
line: '05_2',
tokens: [{ startIndex: 0, type: 'number.octal.kt' }]
tokens: [{ startIndex: 0, type: 'number.kt' }]
}
],
@ -336,6 +381,41 @@ testTokenization('kotlin', [
}
],
[
{
line: '0b0101L',
tokens: [{ startIndex: 0, type: 'number.binary.kt' }]
}
],
[
{
line: '0B0101u',
tokens: [{ startIndex: 0, type: 'number.binary.kt' }]
}
],
[
{
line: '0B1__0U',
tokens: [{ startIndex: 0, type: 'number.binary.kt' }]
}
],
[
{
line: '0B0101uL',
tokens: [{ startIndex: 0, type: 'number.binary.kt' }]
}
],
[
{
line: '0B1__0UL',
tokens: [{ startIndex: 0, type: 'number.binary.kt' }]
}
],
[
{
line: '10e3',
@ -401,57 +481,88 @@ testTokenization('kotlin', [
[
{
line: '23.5D',
line: '.001f',
tokens: [{ startIndex: 0, type: 'number.float.kt' }]
}
],
[
{
line: '23.5D',
tokens: [
{ startIndex: 0, type: 'number.float.kt' },
{ startIndex: 4, type: 'type.identifier.kt' }
]
}
],
[
{
line: '23.5d',
tokens: [{ startIndex: 0, type: 'number.float.kt' }]
tokens: [
{ startIndex: 0, type: 'number.float.kt' },
{ startIndex: 4, type: 'identifier.kt' }
]
}
],
[
{
line: '1.72E3D',
tokens: [{ startIndex: 0, type: 'number.float.kt' }]
tokens: [
{ startIndex: 0, type: 'number.float.kt' },
{ startIndex: 6, type: 'type.identifier.kt' }
]
}
],
[
{
line: '1.72E3d',
tokens: [{ startIndex: 0, type: 'number.float.kt' }]
tokens: [
{ startIndex: 0, type: 'number.float.kt' },
{ startIndex: 6, type: 'identifier.kt' }
]
}
],
[
{
line: '1.72E-3d',
tokens: [{ startIndex: 0, type: 'number.float.kt' }]
tokens: [
{ startIndex: 0, type: 'number.float.kt' },
{ startIndex: 7, type: 'identifier.kt' }
]
}
],
[
{
line: '1.72e3D',
tokens: [{ startIndex: 0, type: 'number.float.kt' }]
tokens: [
{ startIndex: 0, type: 'number.float.kt' },
{ startIndex: 6, type: 'type.identifier.kt' }
]
}
],
[
{
line: '1.72e3d',
tokens: [{ startIndex: 0, type: 'number.float.kt' }]
tokens: [
{ startIndex: 0, type: 'number.float.kt' },
{ startIndex: 6, type: 'identifier.kt' }
]
}
],
[
{
line: '1.72e-3d',
tokens: [{ startIndex: 0, type: 'number.float.kt' }]
tokens: [
{ startIndex: 0, type: 'number.float.kt' },
{ startIndex: 7, type: 'identifier.kt' }
]
}
],
@ -465,6 +576,37 @@ testTokenization('kotlin', [
[
{
line: '23l',
tokens: [
{ startIndex: 0, type: 'number.kt' },
{ startIndex: 2, type: 'identifier.kt' }
]
}
],
[
{
line: '23u',
tokens: [{ startIndex: 0, type: 'number.kt' }]
}
],
[
{
line: '23U',
tokens: [{ startIndex: 0, type: 'number.kt' }]
}
],
[
{
line: '23uL',
tokens: [{ startIndex: 0, type: 'number.kt' }]
}
],
[
{
line: '23UL',
tokens: [{ startIndex: 0, type: 'number.kt' }]
}
],
@ -496,8 +638,7 @@ testTokenization('kotlin', [
tokens: [
{ startIndex: 0, type: 'number.kt' },
{ startIndex: 1, type: 'identifier.kt' },
{ startIndex: 2, type: 'delimiter.kt' },
{ startIndex: 3, type: 'number.float.kt' }
{ startIndex: 2, type: 'number.float.kt' }
]
}
],
@ -567,7 +708,7 @@ testTokenization('kotlin', [
{
line: '052_',
tokens: [
{ startIndex: 0, type: 'number.octal.kt' },
{ startIndex: 0, type: 'number.kt' },
{ startIndex: 3, type: 'identifier.kt' }
]
}

View file

@ -211,13 +211,12 @@ export const language = <languages.IMonarchLanguage>{
[/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
// numbers
[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
[/0[xX](@hexdigits)[Ll]?/, 'number.hex'],
[/0(@octaldigits)[Ll]?/, 'number.octal'],
[/0[bB](@binarydigits)[Ll]?/, 'number.binary'],
[/(@digits)[fFdD]/, 'number.float'],
[/(@digits)[lL]?/, 'number'],
[/(@digits)[eE]([\-+]?(@digits))?[fF]?/, 'number.float'],
[/(@digits)?\.(@digits)([eE][\-+]?(@digits))?[fF]?/, 'number.float'],
[/0[xX](@hexdigits)[uU]?L?/, 'number.hex'],
[/0[bB](@binarydigits)[uU]?L?/, 'number.binary'],
[/(@digits)[fF]/, 'number.float'],
[/(@digits)[uU]?L?/, 'number'],
// delimiter: after number because of .\d floats
[/[;,.]/, 'delimiter'],

View file

@ -1,10 +1,10 @@
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 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 lsp from '@vscode/monaco-lsp-client';
export * from 'monaco-editor-core';
export { createWebWorker, type IWebWorkerOptions } from '../../common/workers.js';
export { createWebWorker, type IWebWorkerOptions } from '../../common/workers';
export { css, html, json, typescript, lsp };

View file

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

View file

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

3306
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",
"base64-js": "^1.5.1",
"bootstrap": "^5.2.0",
"bootstrap-icons": "^1.9.1",
"bootstrap-icons": "^1.13.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": "^6.2.2",
"mobx-react": "^5.0.0",
"monaco-editor": "^0.55.0-dev-20251008",
"react": "^17.0.2",
"react-bootstrap": "^2.4.0",
"react-dom": "^17.0.2",
"react": "^16.0.2",
"react-bootstrap": "^2.10.10",
"react-dom": "^16.0.2",
"typedoc": "^0.25.12"
},
"devDependencies": {
@ -40,7 +40,7 @@
"@types/webpack": "^4.41.10",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^3.5.1",
"css-loader": "^7.1.2",
"file-loader": "^6.0.0",
"glob": "^9.2.1",
"html-webpack-plugin": "^5.5.0",
@ -52,7 +52,7 @@
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"typescript": "^5.4.5",
"webpack": "^5.90.1",
"webpack": "^5.102.1",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.3"

View file

@ -14,13 +14,20 @@ export function getMonaco(): typeof monaco | undefined {
return (window as any).monaco;
}
export interface IMonacoSetup {
export type IAMDMonacoSetup = {
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;
@ -47,6 +54,10 @@ 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);
}
@ -112,7 +123,7 @@ export const prodMonacoSetup = getMonacoSetup(
export function getMonacoSetup(
corePath: string,
language?: string
): IMonacoSetup {
): IAMDMonacoSetup {
const loaderConfigPaths = {
vs: `${corePath}`,
};

View file

@ -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);

View file

@ -15,7 +15,7 @@ monaco.editor.defineTheme("myCustomTheme", {
rules: [
{
token: "comment",
foreground: "ffa500",
foreground: "a80085",
fontStyle: "italic underline",
},
{ 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).
// validation settings
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
monaco.typescript.javascriptDefaults.setDiagnosticsOptions({
noSemanticValidation: true,
noSyntaxValidation: false,
});
// compiler options
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
target: monaco.languages.typescript.ScriptTarget.ES2015,
monaco.typescript.javascriptDefaults.setCompilerOptions({
target: monaco.typescript.ScriptTarget.ES2015,
allowNonTsExtensions: true,
});
@ -25,7 +25,7 @@ var libSource = [
"}",
].join("\n");
var libUri = "ts:filename/facts.d.ts";
monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, libUri);
monaco.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));

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);
// configure the JSON language support with schemas and schema associations
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
monaco.json.jsonDefaults.setDiagnosticsOptions({
validate: true,
schemas: [
{

View file

@ -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(

View file

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

View file

@ -1,8 +1,11 @@
{
"compilerOptions": {
"module": "CommonJS",
"skipLibCheck": true
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"strict": true
},
"include": ["../../out/monaco-editor/esm/vs/editor/editor.api.d.ts"],
// 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"],
"exclude": ["theme"]
}

View file

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

View file

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