mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
Compare commits
2 commits
422d19e3d6
...
e70b6618f4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e70b6618f4 | ||
|
|
36efbe07d9 |
11 changed files with 53 additions and 41 deletions
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
8
.github/workflows/website.yml
vendored
8
.github/workflows/website.yml
vendored
|
|
@ -40,6 +40,10 @@ jobs:
|
|||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: npm ci
|
||||
|
||||
# For TypeDoc
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Install website node modules
|
||||
working-directory: website
|
||||
run: npm ci
|
||||
|
|
@ -52,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
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ const root = join(import.meta.dirname, '../../');
|
|||
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'),
|
||||
|
|
@ -41,6 +42,6 @@ export default defineConfig({
|
|||
},
|
||||
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
|
||||
}),
|
||||
dtsDeprecationWarning(),
|
||||
dtsDeprecationWarning(f => f.endsWith('editor.api.d.ts')),
|
||||
],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -58,12 +58,18 @@ export function mapModuleId(moduleId, newExt) {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
/** @return {import('rollup').Plugin} */
|
||||
export function dtsDeprecationWarning() {
|
||||
/**
|
||||
* @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();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
"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": {
|
||||
|
|
|
|||
28
website/package-lock.json
generated
28
website/package-lock.json
generated
|
|
@ -23,7 +23,7 @@
|
|||
"mini-css-extract-plugin": "^2.6.1",
|
||||
"mobx": "^6.15.0",
|
||||
"mobx-react": "^9.2.1",
|
||||
"monaco-editor": "^0.55.0-dev-20251008",
|
||||
"monaco-editor": "^0.54.0",
|
||||
"react": "^19.2.0",
|
||||
"react-bootstrap": "^2.10.10",
|
||||
"react-dom": "^19.2.0",
|
||||
|
|
@ -1000,13 +1000,6 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"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==",
|
||||
"license": "MIT",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/@types/uglify-js": {
|
||||
"version": "3.17.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.5.tgz",
|
||||
|
|
@ -2393,13 +2386,10 @@
|
|||
}
|
||||
},
|
||||
"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==",
|
||||
"license": "(MPL-2.0 OR Apache-2.0)",
|
||||
"optionalDependencies": {
|
||||
"@types/trusted-types": "^2.0.7"
|
||||
}
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz",
|
||||
"integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==",
|
||||
"license": "(MPL-2.0 OR Apache-2.0)"
|
||||
},
|
||||
"node_modules/domutils": {
|
||||
"version": "2.8.0",
|
||||
|
|
@ -4211,12 +4201,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/monaco-editor": {
|
||||
"version": "0.55.0-dev-20251107",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.55.0-dev-20251107.tgz",
|
||||
"integrity": "sha512-+Xu2pWe4ypNQX7/ZMFF4M7VE8FP178LLVHYu7OO3ajoC80RsoI3sCj5tPlnumOua0DzTwEyk/PMNeiSl7VyAYw==",
|
||||
"version": "0.54.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.54.0.tgz",
|
||||
"integrity": "sha512-hx45SEUoLatgWxHKCmlLJH81xBo0uXP4sRkESUpmDQevfi+e7K1VuiSprK6UpQ8u4zOcKNiH0pMvHvlMWA/4cw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dompurify": "3.2.7",
|
||||
"dompurify": "3.1.7",
|
||||
"marked": "14.0.0"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
"mini-css-extract-plugin": "^2.6.1",
|
||||
"mobx": "^6.15.0",
|
||||
"mobx-react": "^9.2.1",
|
||||
"monaco-editor": "^0.55.0-dev-20251008",
|
||||
"monaco-editor": "^0.54.0",
|
||||
"react": "^19.2.0",
|
||||
"react-bootstrap": "^2.10.10",
|
||||
"react-dom": "^19.2.0",
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue