From 7459d1f567c2367867ecd48030f2f910b5b3cbcf Mon Sep 17 00:00:00 2001 From: Chirag Makkar Date: Tue, 27 Feb 2024 19:27:49 +0530 Subject: [PATCH] Removed dependencies on monaco-editor --- rollup/rollup.config.ts | 8 ++++---- rollup/rollup.default-extensions.ts | 4 ++-- rollup/rollup.rollup-plugins.config.ts | 2 +- rollup/rollup.server.config.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rollup/rollup.config.ts b/rollup/rollup.config.ts index f70df639..90787675 100644 --- a/rollup/rollup.config.ts +++ b/rollup/rollup.config.ts @@ -922,8 +922,8 @@ export default (args: Record): rollup.RollupOptions[] => { 'monaco-treemending': './monaco-treemending.js' }, dependencies: { - ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key))), - ...Object.fromEntries(Array.from(dependencies).filter(dep => dep.startsWith('@codingame/monaco-vscode-')).map(dep => [dep, pkg.version])) + ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key) && key !== 'monaco-editor')), + ...Object.fromEntries(Array.from(dependencies).filter(dep => dep.startsWith('@codingame/monaco-vscode-') && dep !== 'monaco-editor').map(dep => [dep, pkg.version])) } } this.emitFile({ @@ -953,8 +953,8 @@ export default (args: Record): rollup.RollupOptions[] => { types: 'index.d.ts', dependencies: { vscode: `npm:${pkg.name}@^${pkg.version}`, - ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key))), - ...Object.fromEntries(Array.from(dependencies).filter(dep => dep.startsWith('@codingame/monaco-vscode-')).map(dep => [dep, pkg.version])) + ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key) && key !== 'monaco-editor')), + ...Object.fromEntries(Array.from(dependencies).filter(dep => dep.startsWith('@codingame/monaco-vscode-') && dep !== 'monaco-editor').map(dep => [dep, pkg.version])) } } if (workerEntryPoint != null) { diff --git a/rollup/rollup.default-extensions.ts b/rollup/rollup.default-extensions.ts index 308921be..f6da5318 100644 --- a/rollup/rollup.default-extensions.ts +++ b/rollup/rollup.default-extensions.ts @@ -111,7 +111,7 @@ export default rollup.defineConfig([ types: 'index.d.ts', dependencies: { vscode: `npm:${pkg.name}@^${pkg.version}`, - ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key))) + ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key) && key !== 'monaco-editor')) } } @@ -178,7 +178,7 @@ ${extensions.map(name => ` whenReady${pascalCase(name)}()`).join(',\n')} main: entrypoint, module: entrypoint, types: 'index.d.ts', - dependencies: Object.fromEntries(Array.from(dependencies).map(name => [ + dependencies: Object.fromEntries(Array.from(dependencies).filter(dep => dep !== 'monaco-editor').map(name => [ name, pkg.version ])) diff --git a/rollup/rollup.rollup-plugins.config.ts b/rollup/rollup.rollup-plugins.config.ts index 39fbedcd..bc310e6e 100644 --- a/rollup/rollup.rollup-plugins.config.ts +++ b/rollup/rollup.rollup-plugins.config.ts @@ -67,7 +67,7 @@ const config: rollup.RollupOptions[] = [{ types: `${path.basename(output)}.d.ts`, dependencies: { vscode: `npm:${pkg.name}@^${pkg.version}`, - ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key))) + ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key) && key !== 'monaco-editor')) } } this.emitFile({ diff --git a/rollup/rollup.server.config.ts b/rollup/rollup.server.config.ts index 92b511c0..772b5873 100644 --- a/rollup/rollup.server.config.ts +++ b/rollup/rollup.server.config.ts @@ -99,7 +99,7 @@ export default (args: Record): rollup.RollupOptions => { }, dependencies: { vscode: `npm:${pkg.name}@^${pkg.version}`, - ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key))) + ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key) && key !== 'monaco-editor')) } } this.emitFile({