Skip to content

feat: use [email protected] #2654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -294,6 +294,7 @@ jobs:
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
WIN_CERT_PASSWORD: ${{ secrets[matrix.config.certificate-password-secret] }}
WIN_CERT_CONTAINER_NAME: ${{ secrets[matrix.config.certificate-container] }}
PUPPETEER_SKIP_DOWNLOAD: true

strategy:
matrix:
50 changes: 25 additions & 25 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
@@ -24,28 +24,29 @@
},
"dependencies": {
"@grpc/grpc-js": "^1.8.14",
"@theia/application-package": "1.41.0",
"@theia/core": "1.41.0",
"@theia/debug": "1.41.0",
"@theia/editor": "1.41.0",
"@theia/electron": "1.41.0",
"@theia/filesystem": "1.41.0",
"@theia/keymaps": "1.41.0",
"@theia/markers": "1.41.0",
"@theia/messages": "1.41.0",
"@theia/monaco": "1.41.0",
"@theia/monaco-editor-core": "1.72.3",
"@theia/navigator": "1.41.0",
"@theia/outline-view": "1.41.0",
"@theia/output": "1.41.0",
"@theia/plugin-ext": "1.41.0",
"@theia/plugin-ext-vscode": "1.41.0",
"@theia/preferences": "1.41.0",
"@theia/scm": "1.41.0",
"@theia/search-in-workspace": "1.41.0",
"@theia/terminal": "1.41.0",
"@theia/typehierarchy": "1.41.0",
"@theia/workspace": "1.41.0",
"@theia/application-package": "1.57.0",
"@theia/core": "1.57.0",
"@theia/debug": "1.57.0",
"@theia/editor": "1.57.0",
"@theia/electron": "1.57.0",
"@theia/filesystem": "1.57.0",
"@theia/keymaps": "1.57.0",
"@theia/markers": "1.57.0",
"@theia/messages": "1.57.0",
"@theia/monaco": "1.57.0",
"@theia/monaco-editor-core": "1.83.101",
"@theia/navigator": "1.57.0",
"@theia/outline-view": "1.57.0",
"@theia/output": "1.57.0",
"@theia/plugin-ext": "1.57.0",
"@theia/plugin-ext-vscode": "1.57.0",
"@theia/preferences": "1.57.0",
"@theia/scm": "1.57.0",
"@theia/search-in-workspace": "1.57.0",
"@theia/terminal": "1.57.0",
"@theia/test": "1.57.0",
"@theia/typehierarchy": "1.57.0",
"@theia/workspace": "1.57.0",
"@tippyjs/react": "^4.2.5",
"@types/auth0-js": "^9.21.3",
"@types/btoa": "^1.2.3",
@@ -57,7 +58,6 @@
"@types/node-fetch": "^2.5.7",
"@types/p-queue": "^2.3.1",
"@types/ps-tree": "^1.1.0",
"@types/react-tabs": "^2.3.2",
"@types/temp": "^0.8.34",
"arduino-serial-plotter-webapp": "0.2.0",
"async-mutex": "^0.3.0",
@@ -99,7 +99,7 @@
"react-markdown": "^8.0.0",
"react-perfect-scrollbar": "^1.5.8",
"react-select": "^5.6.0",
"react-tabs": "^3.1.2",
"react-tabs": "^6.1.0",
"react-window": "^1.8.6",
"semver": "^7.3.2",
"string-natural-compare": "^2.0.3",
@@ -126,7 +126,7 @@
"mockdate": "^3.0.5",
"moment": "^2.24.0",
"ncp": "^2.0.0",
"rimraf": "^2.6.1"
"rimraf": "^5.0.0"
},
"optionalDependencies": {
"@pingghost/protoc": "^1.0.2",
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
import { CommonMenus } from '@theia/core/lib/browser/common-frontend-contribution';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import {
TabBarToolbarContribution,
91 changes: 10 additions & 81 deletions arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import '../../src/browser/style/index.css';
import {
Container,
ContainerModule,
interfaces,
} from '@theia/core/shared/inversify';
import { Container, ContainerModule } from '@theia/core/shared/inversify';
import { WidgetFactory } from '@theia/core/lib/browser/widget-manager';
import { CommandContribution } from '@theia/core/lib/common/command';
import { bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging/ws-connection-provider';
import {
FrontendApplicationContribution,
FrontendApplication as TheiaFrontendApplication,
} from '@theia/core/lib/browser/frontend-application';
import { FrontendApplication as TheiaFrontendApplication } from '@theia/core/lib/browser/frontend-application';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
import { LibraryListWidget } from './library/library-list-widget';
import { ArduinoFrontendContribution } from './arduino-frontend-contribution';
import {
@@ -57,8 +51,6 @@ import {
DockPanelRenderer as TheiaDockPanelRenderer,
TabBarRendererFactory,
ContextMenuRenderer,
createTreeContainer,
TreeWidget,
} from '@theia/core/lib/browser';
import { MenuContribution } from '@theia/core/lib/common/menu';
import {
@@ -97,7 +89,6 @@ import {
ArduinoDaemonPath,
ArduinoDaemon,
} from '../common/protocol/arduino-daemon';
import { EditorCommandContribution as TheiaEditorCommandContribution } from '@theia/editor/lib/browser';
import {
FrontendConnectionStatusService,
ApplicationConnectionStatusContribution,
@@ -186,7 +177,6 @@ import {
import { About } from './contributions/about';
import { IconThemeService } from '@theia/core/lib/browser/icon-theme-service';
import { TabBarRenderer } from './theia/core/tab-bars';
import { EditorCommandContribution } from './theia/editor/editor-command';
import { NavigatorTabBarDecorator as TheiaNavigatorTabBarDecorator } from '@theia/navigator/lib/browser/navigator-tab-bar-decorator';
import { NavigatorTabBarDecorator } from './theia/navigator/navigator-tab-bar-decorator';
import { Debug, DebugDisabledStatusMessageSource } from './contributions/debug';
@@ -275,7 +265,7 @@ import {
IDEUpdaterDialog,
IDEUpdaterDialogProps,
} from './dialogs/ide-updater/ide-updater-dialog';
import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider';
import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-source';
import { MonitorModel } from './monitor-model';
import { MonitorManagerProxyClientImpl } from './monitor-manager-proxy-client-impl';
import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager';
@@ -295,10 +285,6 @@ import { PreferenceTreeGenerator } from './theia/preferences/preference-tree-gen
import { PreferenceTreeGenerator as TheiaPreferenceTreeGenerator } from '@theia/preferences/lib/browser/util/preference-tree-generator';
import { AboutDialog } from './theia/core/about-dialog';
import { AboutDialog as TheiaAboutDialog } from '@theia/core/lib/browser/about-dialog';
import {
SurveyNotificationService,
SurveyNotificationServicePath,
} from '../common/protocol/survey-service';
import { WindowContribution } from './theia/core/window-contribution';
import { WindowContribution as TheiaWindowContribution } from '@theia/core/lib/browser/window-contribution';
import { CoreErrorHandler } from './contributions/core-error-handler';
@@ -381,19 +367,13 @@ import { DebugSessionWidget } from '@theia/debug/lib/browser/view/debug-session-
import { DebugConfigurationWidget } from './theia/debug/debug-configuration-widget';
import { DebugConfigurationWidget as TheiaDebugConfigurationWidget } from '@theia/debug/lib/browser/view/debug-configuration-widget';
import { DebugToolBar } from '@theia/debug/lib/browser/view/debug-toolbar-widget';
import {
PluginTree,
PluginTreeModel,
TreeViewWidgetOptions,
VIEW_ITEM_CONTEXT_MENU,
} from '@theia/plugin-ext/lib/main/browser/view/tree-view-widget';
import { TreeViewDecoratorService } from '@theia/plugin-ext/lib/main/browser/view/tree-view-decorator-service';
import { PLUGIN_VIEW_DATA_FACTORY_ID } from '@theia/plugin-ext/lib/main/browser/view/plugin-view-registry';
import { TreeViewWidget } from './theia/plugin-ext/tree-view-widget';

import {
VersionWelcomeDialog,
VersionWelcomeDialogProps,
} from './dialogs/version-welcome-dialog';
import { TestViewContribution as TheiaTestViewContribution } from '@theia/test/lib/browser/view/test-view-contribution';
import { TestViewContribution } from './theia/test/test-view-contribution';

// Hack to fix copy/cut/paste issue after electron version update in Theia.
// https://github.com/eclipse-theia/theia/issues/12487
@@ -574,15 +554,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
WorkspaceVariableContribution
);

bind(SurveyNotificationService)
.toDynamicValue((context) => {
return ElectronIpcConnectionProvider.createProxy(
context.container,
SurveyNotificationServicePath
);
})
.inSingletonScope();

// Layout and shell customizations.
rebind(TheiaOutlineViewContribution)
.to(OutlineViewContribution)
@@ -856,13 +827,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
);
});

// Workaround for https://github.com/eclipse-theia/theia/issues/8722
// Do not trigger a save on IDE startup if `"editor.autoSave": "on"` was set as a preference.
// Note: `"editor.autoSave" was renamed to `"files.autoSave" and `"on"` was replaced with three
// different cases, but we treat `!== 'off'` as auto save enabled. (https://github.com/eclipse-theia/theia/issues/10812)
bind(EditorCommandContribution).toSelf().inSingletonScope();
rebind(TheiaEditorCommandContribution).toService(EditorCommandContribution);

// Silent the badge decoration in the Explorer view.
bind(NavigatorTabBarDecorator).toSelf().inSingletonScope();
rebind(TheiaNavigatorTabBarDecorator).toService(NavigatorTabBarDecorator);
@@ -1112,42 +1076,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
TerminalFrontendContribution
);

bindViewsWelcome_TheiaGH14309({ bind, widget: TreeViewWidget });
// Hides the Test Explorer from the side-bar
bind(TestViewContribution).toSelf().inSingletonScope();
rebind(TheiaTestViewContribution).toService(TestViewContribution);
});

// Align the viewsWelcome rendering with VS Code (https://github.com/eclipse-theia/theia/issues/14309)
// Copied from Theia code but with customized TreeViewWidget with the customized viewsWelcome rendering
// https://github.com/eclipse-theia/theia/blob/0c5f69455d9ee355b1a7ca510ffa63d2b20f0c77/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts#L159-L181
function bindViewsWelcome_TheiaGH14309({
bind,
widget,
}: {
bind: interfaces.Bind;
widget: interfaces.Newable<TreeWidget>;
}) {
bind(WidgetFactory)
.toDynamicValue(({ container }) => ({
id: PLUGIN_VIEW_DATA_FACTORY_ID,
createWidget: (options: TreeViewWidgetOptions) => {
const props = {
contextMenuPath: VIEW_ITEM_CONTEXT_MENU,
expandOnlyOnExpansionToggleClick: true,
expansionTogglePadding: 22,
globalSelection: true,
leftPadding: 8,
search: true,
multiSelect: options.multiSelect,
};
const child = createTreeContainer(container, {
props,
tree: PluginTree,
model: PluginTreeModel,
widget,
decoratorService: TreeViewDecoratorService,
});
child.bind(TreeViewWidgetOptions).toConstantValue(options);
return child.get(TreeWidget);
},
}))
.inSingletonScope();
}
9 changes: 0 additions & 9 deletions arduino-ide-extension/src/browser/arduino-preferences.ts
Original file line number Diff line number Diff line change
@@ -280,14 +280,6 @@ const properties: ArduinoPreferenceSchemaProperties = {
),
default: 'https://auth.arduino.cc/login#/register',
},
'arduino.survey.notification': {
type: 'boolean',
description: nls.localize(
'arduino/preferences/survey.notification',
'True if users should be notified if a survey is available. True by default.'
),
default: true,
},
'arduino.cli.daemon.debug': {
type: 'boolean',
description: nls.localize(
@@ -355,7 +347,6 @@ export interface ArduinoConfiguration {
'arduino.auth.domain': string;
'arduino.auth.audience': string;
'arduino.auth.registerUri': string;
'arduino.survey.notification': boolean;
'arduino.cli.daemon.debug': boolean;
'arduino.sketch.inoBlueprint': string;
'arduino.checkForUpdates': boolean;
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import { Emitter } from '@theia/core/lib/common/event';
import { JsonRpcProxy } from '@theia/core/lib/common/messaging/proxy-factory';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
import { DisposableCollection } from '@theia/core/lib/common/disposable';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
import {
CommandRegistry,
CommandContribution,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
import { DisposableCollection } from '@theia/core/lib/common/disposable';
import { MessageService } from '@theia/core/lib/common/message-service';
import { MessageType } from '@theia/core/lib/common/message-service-protocol';
Original file line number Diff line number Diff line change
@@ -98,6 +98,7 @@ export class BoardsConfigDialog extends ReactDialog<BoardsConfigDialogState> {
}

override async open(
disposeOnResolve = true,
params?: EditBoardsConfigActionParams
): Promise<BoardsConfig | undefined> {
this._searchSet = undefined;
@@ -119,7 +120,7 @@ export class BoardsConfigDialog extends ReactDialog<BoardsConfigDialogState> {
this._searchSet = params.searchSet.slice();
}
}
return super.open();
return super.open(disposeOnResolve);
}

protected override onAfterAttach(msg: Message): void {
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import { StorageService } from '@theia/core/lib/browser/storage-service';
import type {
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import { StorageService } from '@theia/core/lib/browser/storage-service';
import {
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import { DisposableCollection } from '@theia/core/lib/common/disposable';
import { Emitter, Event } from '@theia/core/lib/common/event';
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ export class CheckForIDEUpdates extends Contribution {
SKIP_IDE_VERSION
);
if (versionToSkip === updateInfo.version) return;
this.updaterDialog.open(updateInfo);
this.updaterDialog.open(true, updateInfo);
})
.catch((e) => {
this.messageService.error(
6 changes: 2 additions & 4 deletions arduino-ide-extension/src/browser/contributions/close.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Dialog } from '@theia/core/lib/browser/dialogs';
import type {
FrontendApplication,
OnWillStopAction,
} from '@theia/core/lib/browser/frontend-application';
import type { FrontendApplication } from '@theia/core/lib/browser/frontend-application';
import type { OnWillStopAction } from '@theia/core/lib/browser/frontend-application-contribution';
import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell';
import { nls } from '@theia/core/lib/common/nls';
import type { MaybePromise } from '@theia/core/lib/common/types';
Original file line number Diff line number Diff line change
@@ -779,7 +779,7 @@ export class CompilerErrors
return undefined;
} else {
return this.editorManager
.getByUri(new URI(uriOrWidget))
.getByUri(new URI(uriOrWidget.toString()))
.then((editor) => {
if (editor) {
return this.monacoEditor(editor);
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
import {
FrontendApplication,
FrontendApplicationContribution,
} from '@theia/core/lib/browser/frontend-application';
import { FrontendApplication } from '@theia/core/lib/browser/frontend-application';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import {
KeybindingContribution,
Loading

Unchanged files with check annotations Beta

'arduino/board/succesfullyUninstalledPlatform',
'Successfully uninstalled platform {0}:{1}',
item.name,
item.installedVersion!

Check warning on line 86 in arduino-ide-extension/src/browser/boards/boards-list-widget.ts

GitHub Actions / check

Forbidden non-null assertion

Check warning on line 86 in arduino-ide-extension/src/browser/boards/boards-list-widget.ts

GitHub Actions / check

Forbidden non-null assertion

Check warning on line 86 in arduino-ide-extension/src/browser/boards/boards-list-widget.ts

GitHub Actions / check

Forbidden non-null assertion
),
{ timeout: 3000 }
);
unregisterSubmenu(menuPath, this.menuRegistry)
),
...Array.from(commands.keys()).map((commandId, i) => {
const { label } = commands.get(commandId)!;

Check warning on line 115 in arduino-ide-extension/src/browser/contributions/boards-data-menu-updater.ts

GitHub Actions / check

Forbidden non-null assertion

Check warning on line 115 in arduino-ide-extension/src/browser/contributions/boards-data-menu-updater.ts

GitHub Actions / check

Forbidden non-null assertion

Check warning on line 115 in arduino-ide-extension/src/browser/contributions/boards-data-menu-updater.ts

GitHub Actions / check

Forbidden non-null assertion
this.menuRegistry.registerMenuAction(menuPath, {
commandId,
order: String(i).padStart(4),
fqbn,
});
if (user.length) {
(user as any).unshift(

Check warning on line 329 in arduino-ide-extension/src/browser/contributions/examples.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 329 in arduino-ide-extension/src/browser/contributions/examples.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 329 in arduino-ide-extension/src/browser/contributions/examples.ts

GitHub Actions / check

Unexpected any. Specify a different type
nls.localize(
'arduino/examples/customLibrary',
'Examples from Custom Libraries'
);
}
if (name && fqbn && current.length) {
(current as any).unshift(

Check warning on line 337 in arduino-ide-extension/src/browser/contributions/examples.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 337 in arduino-ide-extension/src/browser/contributions/examples.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 337 in arduino-ide-extension/src/browser/contributions/examples.ts

GitHub Actions / check

Unexpected any. Specify a different type
nls.localize('arduino/examples/for', 'Examples for {0}', name)
);
}
if (any.length) {
(any as any).unshift(

Check warning on line 342 in arduino-ide-extension/src/browser/contributions/examples.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 342 in arduino-ide-extension/src/browser/contributions/examples.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 342 in arduino-ide-extension/src/browser/contributions/examples.ts

GitHub Actions / check

Unexpected any. Specify a different type
nls.localize('arduino/examples/forAny', 'Examples for any board')
);
}
const userMenuPath = [...includeLibMenuPath, '3_contributed'];
const { user, rest } = LibraryPackage.groupByLocation(libraries);
if (rest.length) {
(rest as any).unshift(

Check warning on line 114 in arduino-ide-extension/src/browser/contributions/include-library.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 114 in arduino-ide-extension/src/browser/contributions/include-library.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 114 in arduino-ide-extension/src/browser/contributions/include-library.ts

GitHub Actions / check

Unexpected any. Specify a different type
nls.localize('arduino/library/arduinoLibraries', 'Arduino libraries')
);
}
if (user.length) {
(user as any).unshift(

Check warning on line 119 in arduino-ide-extension/src/browser/contributions/include-library.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 119 in arduino-ide-extension/src/browser/contributions/include-library.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 119 in arduino-ide-extension/src/browser/contributions/include-library.ts

GitHub Actions / check

Unexpected any. Specify a different type
nls.localize(
'arduino/library/contributedLibraries',
'Contributed libraries'
});
registry.registerCommand(UploadCertificate.Commands.OPEN_CERT_CONTEXT, {
execute: async (args: any) => {

Check warning on line 86 in arduino-ide-extension/src/browser/contributions/upload-certificate.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 86 in arduino-ide-extension/src/browser/contributions/upload-certificate.ts

GitHub Actions / check

Unexpected any. Specify a different type

Check warning on line 86 in arduino-ide-extension/src/browser/contributions/upload-certificate.ts

GitHub Actions / check

Unexpected any. Specify a different type
this.contextMenuRenderer.render({
menuPath: ArduinoMenus.ROOT_CERTIFICATES__CONTEXT,
anchor: {