mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 09:20:10 +01:00
fixes website & adds editor.api.d.ts
This commit is contained in:
parent
1394deb1c2
commit
84ffab7832
7 changed files with 26 additions and 24 deletions
4
.github/workflows/website.yml
vendored
4
.github/workflows/website.yml
vendored
|
|
@ -40,6 +40,10 @@ jobs:
|
||||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
|
# For TypeDoc
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
- name: Install website node modules
|
- name: Install website node modules
|
||||||
working-directory: website
|
working-directory: website
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ const root = join(import.meta.dirname, '../../');
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
input: {
|
input: {
|
||||||
entry: join(root, './src/editor/editor.main.ts'),
|
entry: join(root, './src/editor/editor.main.ts'),
|
||||||
|
editorApi: join(root, './src/editor/editor.api.ts'),
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
dir: join(root, './out/monaco-editor/esm'),
|
dir: join(root, './out/monaco-editor/esm'),
|
||||||
|
|
@ -41,6 +42,6 @@ export default defineConfig({
|
||||||
},
|
},
|
||||||
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
|
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 undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {import('rollup').Plugin} */
|
/**
|
||||||
export function dtsDeprecationWarning() {
|
* @param {(moduleId: string) => boolean} [filter]
|
||||||
|
* @return {import('rollup').Plugin}
|
||||||
|
*/
|
||||||
|
export function dtsDeprecationWarning(filter) {
|
||||||
return {
|
return {
|
||||||
name: 'add-dts-deprecation-warning',
|
name: 'add-dts-deprecation-warning',
|
||||||
generateBundle(options, bundle) {
|
generateBundle(options, bundle) {
|
||||||
for (const fileName in bundle) {
|
for (const fileName in bundle) {
|
||||||
|
if (filter && !filter(fileName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const file = bundle[fileName];
|
const file = bundle[fileName];
|
||||||
if (file.type === 'chunk' && fileName.endsWith('.d.ts')) {
|
if (file.type === 'chunk' && fileName.endsWith('.d.ts')) {
|
||||||
let content = file.code.toString();
|
let content = file.code.toString();
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
"build-monaco-editor": "ts-node ./build/build-monaco-editor",
|
"build-monaco-editor": "ts-node ./build/build-monaco-editor",
|
||||||
"build-lsp": "cd monaco-lsp-client && npm install && npm run build"
|
"build-lsp": "cd monaco-lsp-client && npm install && npm run build"
|
||||||
},
|
},
|
||||||
"typings": "./esm/vs/editor/editor.api.d.ts",
|
"typings": "./esm/vs/editor/editor.main.d.ts",
|
||||||
"main": "./min/vs/editor/editor.main.js",
|
"main": "./min/vs/editor/editor.main.js",
|
||||||
"module": "./esm/vs/editor/editor.main.js",
|
"module": "./esm/vs/editor/editor.main.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|
|
||||||
28
website/package-lock.json
generated
28
website/package-lock.json
generated
|
|
@ -23,7 +23,7 @@
|
||||||
"mini-css-extract-plugin": "^2.6.1",
|
"mini-css-extract-plugin": "^2.6.1",
|
||||||
"mobx": "^6.15.0",
|
"mobx": "^6.15.0",
|
||||||
"mobx-react": "^9.2.1",
|
"mobx-react": "^9.2.1",
|
||||||
"monaco-editor": "^0.55.0-dev-20251008",
|
"monaco-editor": "^0.54.0",
|
||||||
"react": "^19.2.0",
|
"react": "^19.2.0",
|
||||||
"react-bootstrap": "^2.10.10",
|
"react-bootstrap": "^2.10.10",
|
||||||
"react-dom": "^19.2.0",
|
"react-dom": "^19.2.0",
|
||||||
|
|
@ -1000,13 +1000,6 @@
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"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": {
|
"node_modules/@types/uglify-js": {
|
||||||
"version": "3.17.5",
|
"version": "3.17.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.5.tgz",
|
||||||
|
|
@ -2393,13 +2386,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/dompurify": {
|
"node_modules/dompurify": {
|
||||||
"version": "3.2.7",
|
"version": "3.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz",
|
||||||
"integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==",
|
"integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==",
|
||||||
"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/domutils": {
|
"node_modules/domutils": {
|
||||||
"version": "2.8.0",
|
"version": "2.8.0",
|
||||||
|
|
@ -4211,12 +4201,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/monaco-editor": {
|
"node_modules/monaco-editor": {
|
||||||
"version": "0.55.0-dev-20251107",
|
"version": "0.54.0",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.55.0-dev-20251107.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.54.0.tgz",
|
||||||
"integrity": "sha512-+Xu2pWe4ypNQX7/ZMFF4M7VE8FP178LLVHYu7OO3ajoC80RsoI3sCj5tPlnumOua0DzTwEyk/PMNeiSl7VyAYw==",
|
"integrity": "sha512-hx45SEUoLatgWxHKCmlLJH81xBo0uXP4sRkESUpmDQevfi+e7K1VuiSprK6UpQ8u4zOcKNiH0pMvHvlMWA/4cw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dompurify": "3.2.7",
|
"dompurify": "3.1.7",
|
||||||
"marked": "14.0.0"
|
"marked": "14.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
"mini-css-extract-plugin": "^2.6.1",
|
"mini-css-extract-plugin": "^2.6.1",
|
||||||
"mobx": "^6.15.0",
|
"mobx": "^6.15.0",
|
||||||
"mobx-react": "^9.2.1",
|
"mobx-react": "^9.2.1",
|
||||||
"monaco-editor": "^0.55.0-dev-20251008",
|
"monaco-editor": "^0.54.0",
|
||||||
"react": "^19.2.0",
|
"react": "^19.2.0",
|
||||||
"react-bootstrap": "^2.10.10",
|
"react-bootstrap": "^2.10.10",
|
||||||
"react-dom": "^19.2.0",
|
"react-dom": "^19.2.0",
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true
|
"strict": true
|
||||||
},
|
},
|
||||||
|
// TODO: load from node_modules to be in sync with the latest stable monaco-editor
|
||||||
"include": ["../../out/monaco-editor/esm/vs/editor/editor.main.d.ts"],
|
"include": ["../../out/monaco-editor/esm/vs/editor/editor.main.d.ts"],
|
||||||
"exclude": ["theme"]
|
"exclude": ["theme"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue