diff --git a/.renovaterc.json5 b/.renovaterc.json5 index 0040e8401d..1d85b1d8b3 100644 --- a/.renovaterc.json5 +++ b/.renovaterc.json5 @@ -104,7 +104,9 @@ "org.openapitools:openapi-generator" ], "groupName": "Open API updates", - "groupSlug": "openapi" + "groupSlug": "openapi", + // TODO wait for https://github.com/OpenAPITools/openapi-generator/issues/20135 to be fixed before upgrading to 7.10.0 + "enabled": false }, { // We don't want to update this dep as we are still targeting a fork diff --git a/apps/vscode-extension/package.json b/apps/vscode-extension/package.json index 0a3c074d57..cbb1087a23 100644 --- a/apps/vscode-extension/package.json +++ b/apps/vscode-extension/package.json @@ -372,6 +372,7 @@ "@types/node": "^20.0.0", "@types/vscode": "^1.67.0", "@typescript-eslint/parser": "~8.19.0", + "@typescript-eslint/utils": "~8.19.0", "@vscode/vsce": "^2.16.0", "angular-eslint": "~18.4.0", "cpy-cli": "^5.0.0", diff --git a/apps/vscode-extension/src/extension.ts b/apps/vscode-extension/src/extension.ts index ea363dee0e..85f643ca9d 100644 --- a/apps/vscode-extension/src/extension.ts +++ b/apps/vscode-extension/src/extension.ts @@ -2,6 +2,7 @@ import { commands, ExtensionContext, languages, + window, } from 'vscode'; import { extractAllToVariable, @@ -60,10 +61,11 @@ import { * @param context */ export function activate(context: ExtensionContext) { + const channel = window.createOutputChannel('Otter'); const designTokenProviders = designTokenCompletionItemAndHoverProviders(); context.subscriptions.push( - languages.registerCompletionItemProvider(['javascript', 'typescript'], configurationCompletionItemProvider(), configurationCompletionTriggerChar), + languages.registerCompletionItemProvider(['javascript', 'typescript'], configurationCompletionItemProvider({ channel }), configurationCompletionTriggerChar), languages.registerCompletionItemProvider(['scss'], stylingCompletionItemProvider(), stylingCompletionTriggerChar), languages.registerCompletionItemProvider(['scss', 'css'], designTokenProviders), languages.registerHoverProvider(['scss', 'css'], designTokenProviders), diff --git a/apps/vscode-extension/src/intellisense/configuration.ts b/apps/vscode-extension/src/intellisense/configuration.ts index 568206c2f8..7dcaa379ac 100644 --- a/apps/vscode-extension/src/intellisense/configuration.ts +++ b/apps/vscode-extension/src/intellisense/configuration.ts @@ -2,6 +2,7 @@ import { CompletionItem, CompletionItemKind, CompletionItemProvider, + type OutputChannel, SnippetString, } from 'vscode'; import type { @@ -11,9 +12,6 @@ import type { import type { TSESLint, } from '@typescript-eslint/utils'; -import { - ESLint, -} from 'eslint'; interface ConfigurationTags { /** @see CompletionItem.documentation */ @@ -115,8 +113,15 @@ const getConfigurationTagsFromEslintConfig = (eslintConfig: TSESLint.FlatConfig. }; }; -export const configurationCompletionItemProvider = (): CompletionItemProvider => { - const eslint = new ESLint(); +export const configurationCompletionItemProvider = (options: { channel: OutputChannel }): CompletionItemProvider => { + const eslint = import('eslint') + // eslint-disable-next-line @typescript-eslint/naming-convention -- External package defined name + .then(({ ESLint }) => new ESLint()) + .catch((err) => { + options.channel.appendLine('Error during ESLint loading:'); + options.channel.appendLine(JSON.stringify(err)); + return undefined; + }); return { provideCompletionItems: async (doc, pos) => { @@ -150,7 +155,7 @@ export const configurationCompletionItemProvider = (): CompletionItemProvider=22.0.0" } diff --git a/packages/@ama-sdk/schematics/schematics/typescript/core/openapi-codegen-typescript/pom.xml b/packages/@ama-sdk/schematics/schematics/typescript/core/openapi-codegen-typescript/pom.xml index 0c0cc4c74e..6ef8006faa 100644 --- a/packages/@ama-sdk/schematics/schematics/typescript/core/openapi-codegen-typescript/pom.xml +++ b/packages/@ama-sdk/schematics/schematics/typescript/core/openapi-codegen-typescript/pom.xml @@ -95,7 +95,9 @@ org.openapitools openapi-generator - 7.10.0 + + + 7.9.0 provided diff --git a/yarn.lock b/yarn.lock index c70792fbae..22015cc49a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30019,6 +30019,7 @@ __metadata: "@types/node": "npm:^20.0.0" "@types/vscode": "npm:^1.67.0" "@typescript-eslint/parser": "npm:~8.19.0" + "@typescript-eslint/utils": "npm:~8.19.0" "@vscode/vsce": "npm:^2.16.0" angular-eslint: "npm:~18.4.0" cpy-cli: "npm:^5.0.0"