Skip to content

Commit e70b661

Browse files
authored
fixes website & adds editor.api.d.ts (#5104)
1 parent 36efbe0 commit e70b661

File tree

7 files changed

+26
-24
lines changed

7 files changed

+26
-24
lines changed

.github/workflows/website.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
4141
run: npm ci
4242

43+
# For TypeDoc
44+
- name: Build
45+
run: npm run build
46+
4347
- name: Install website node modules
4448
working-directory: website
4549
run: npm ci

build/esm/rollup-types.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const root = join(import.meta.dirname, '../../');
1616
export default defineConfig({
1717
input: {
1818
entry: join(root, './src/editor/editor.main.ts'),
19+
editorApi: join(root, './src/editor/editor.api.ts'),
1920
},
2021
output: {
2122
dir: join(root, './out/monaco-editor/esm'),
@@ -41,6 +42,6 @@ export default defineConfig({
4142
},
4243
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
4344
}),
44-
dtsDeprecationWarning(),
45+
dtsDeprecationWarning(f => f.endsWith('editor.api.d.ts')),
4546
],
4647
});

build/shared.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,18 @@ export function mapModuleId(moduleId, newExt) {
5858
return undefined;
5959
}
6060

61-
/** @return {import('rollup').Plugin} */
62-
export function dtsDeprecationWarning() {
61+
/**
62+
* @param {(moduleId: string) => boolean} [filter]
63+
* @return {import('rollup').Plugin}
64+
*/
65+
export function dtsDeprecationWarning(filter) {
6366
return {
6467
name: 'add-dts-deprecation-warning',
6568
generateBundle(options, bundle) {
6669
for (const fileName in bundle) {
70+
if (filter && !filter(fileName)) {
71+
continue;
72+
}
6773
const file = bundle[fileName];
6874
if (file.type === 'chunk' && fileName.endsWith('.d.ts')) {
6975
let content = file.code.toString();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"build-monaco-editor": "ts-node ./build/build-monaco-editor",
3434
"build-lsp": "cd monaco-lsp-client && npm install && npm run build"
3535
},
36-
"typings": "./esm/vs/editor/editor.api.d.ts",
36+
"typings": "./esm/vs/editor/editor.main.d.ts",
3737
"main": "./min/vs/editor/editor.main.js",
3838
"module": "./esm/vs/editor/editor.main.js",
3939
"exports": {

website/package-lock.json

Lines changed: 9 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"mini-css-extract-plugin": "^2.6.1",
2626
"mobx": "^6.15.0",
2727
"mobx-react": "^9.2.1",
28-
"monaco-editor": "^0.55.0-dev-20251008",
28+
"monaco-editor": "^0.54.0",
2929
"react": "^19.2.0",
3030
"react-bootstrap": "^2.10.10",
3131
"react-dom": "^19.2.0",

website/typedoc/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"forceConsistentCasingInFileNames": true,
66
"strict": true
77
},
8+
// TODO: load from node_modules to be in sync with the latest stable monaco-editor
89
"include": ["../../out/monaco-editor/esm/vs/editor/editor.main.d.ts"],
910
"exclude": ["theme"]
1011
}

0 commit comments

Comments
 (0)