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
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: use [email protected]
  • Loading branch information
giacomocusinato committed Mar 28, 2025
commit 9510822aa0ab42b972fcfeb8dfa6bdcd7cb37e97
44 changes: 22 additions & 22 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@
},
"dependencies": {
"@grpc/grpc-js": "^1.8.14",
"@theia/application-package": "1.51.0",
"@theia/core": "1.51.0",
"@theia/debug": "1.51.0",
"@theia/editor": "1.51.0",
"@theia/electron": "1.51.0",
"@theia/filesystem": "1.51.0",
"@theia/keymaps": "1.51.0",
"@theia/markers": "1.51.0",
"@theia/messages": "1.51.0",
"@theia/monaco": "1.51.0",
"@theia/application-package": "1.53.2",
"@theia/core": "1.53.2",
"@theia/debug": "1.53.2",
"@theia/editor": "1.53.2",
"@theia/electron": "1.53.2",
"@theia/filesystem": "1.53.2",
"@theia/keymaps": "1.53.2",
"@theia/markers": "1.53.2",
"@theia/messages": "1.53.2",
"@theia/monaco": "1.53.2",
"@theia/monaco-editor-core": "1.83.101",
"@theia/navigator": "1.51.0",
"@theia/outline-view": "1.51.0",
"@theia/output": "1.51.0",
"@theia/plugin-ext": "1.51.0",
"@theia/plugin-ext-vscode": "1.51.0",
"@theia/preferences": "1.51.0",
"@theia/scm": "1.51.0",
"@theia/search-in-workspace": "1.51.0",
"@theia/terminal": "1.51.0",
"@theia/test": "1.51.0",
"@theia/typehierarchy": "1.51.0",
"@theia/workspace": "1.51.0",
"@theia/navigator": "1.53.2",
"@theia/outline-view": "1.53.2",
"@theia/output": "1.53.2",
"@theia/plugin-ext": "1.53.2",
"@theia/plugin-ext-vscode": "1.53.2",
"@theia/preferences": "1.53.2",
"@theia/scm": "1.53.2",
"@theia/search-in-workspace": "1.53.2",
"@theia/terminal": "1.53.2",
"@theia/test": "1.53.2",
"@theia/typehierarchy": "1.53.2",
"@theia/workspace": "1.53.2",
"@tippyjs/react": "^4.2.5",
"@types/auth0-js": "^9.21.3",
"@types/btoa": "^1.2.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { injectable } from '@theia/core/shared/inversify';
import { DebugSessionConnection } from '@theia/debug/lib/browser/debug-session-connection';
import { DefaultDebugSessionFactory as TheiaDefaultDebugSessionFactory } from '@theia/debug/lib/browser/debug-session-contribution';
import { DebugSessionManager } from '@theia/debug/lib/browser/debug-session-manager';
import { DebugConfigurationSessionOptions } from '@theia/debug/lib/browser/debug-session-options';
import {
DebugAdapterPath,
Expand All @@ -12,6 +13,7 @@ import { DebugSession } from './debug-session';
@injectable()
export class DefaultDebugSessionFactory extends TheiaDefaultDebugSessionFactory {
override get(
manager: DebugSessionManager,
sessionId: string,
options: DebugConfigurationSessionOptions,
parentSession?: DebugSession
Expand All @@ -35,6 +37,9 @@ export class DefaultDebugSessionFactory extends TheiaDefaultDebugSessionFactory
sessionId,
options,
parentSession,
this.testService,
options.testRun,
manager,
connection,
this.terminalService,
this.editorManager,
Expand Down
23 changes: 11 additions & 12 deletions arduino-ide-extension/src/browser/toolbar/arduino-toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
TabBarToolbarRegistry,
TabBarToolbarItem,
ReactTabBarToolbarItem,
RenderedToolbarItem,
} from '@theia/core/lib/browser/shell/tab-bar-toolbar';
import { CommandRegistry } from '@theia/core/lib/common/command';
import { ReactWidget } from '@theia/core/lib/browser';
Expand All @@ -14,7 +15,7 @@ export const ARDUINO_TOOLBAR_ITEM_CLASS = 'arduino-tool-item';
export namespace ArduinoToolbarComponent {
export interface Props {
side: 'left' | 'right';
items: (TabBarToolbarItem | ReactTabBarToolbarItem)[];
items: TabBarToolbarItem[];
commands: CommandRegistry;
labelParser: LabelParser;
commandIsEnabled: (id: string) => boolean;
Expand All @@ -34,7 +35,7 @@ export class ArduinoToolbarComponent extends React.Component<
this.state = { tooltip: '' };
}

protected renderItem = (item: TabBarToolbarItem) => {
protected renderItem = (item: RenderedToolbarItem) => {
let innerText = '';
let className = `arduino-tool-icon ${item.id}-icon`;
if (item.text) {
Expand All @@ -46,7 +47,8 @@ export class ArduinoToolbarComponent extends React.Component<
}
}
}
const command = this.props.commands.getCommand(item.command);
const command =
item.command && this.props.commands.getCommand(item.command);
const cls = `${ARDUINO_TOOLBAR_ITEM_CLASS} ${
TabBarToolbar.Styles.TAB_BAR_TOOLBAR_ITEM
} ${command && this.props.commandIsEnabled(command.id) ? 'enabled' : ''} ${
Expand Down Expand Up @@ -80,7 +82,9 @@ export class ArduinoToolbarComponent extends React.Component<
const items = [
<React.Fragment key={this.props.side + '-arduino-toolbar-tooltip'}>
{[...this.props.items].map((item) =>
TabBarToolbarItem.is(item) ? this.renderItem(item) : item.render()
ReactTabBarToolbarItem.is(item)
? item.render()
: this.renderItem(item)
)}
</React.Fragment>,
];
Expand All @@ -94,10 +98,7 @@ export class ArduinoToolbarComponent extends React.Component<
}

export class ArduinoToolbar extends ReactWidget {
protected items = new Map<
string,
TabBarToolbarItem | ReactTabBarToolbarItem
>();
protected items = new Map<string, TabBarToolbarItem>();

constructor(
protected readonly tabBarToolbarRegistry: TabBarToolbarRegistry,
Expand All @@ -112,9 +113,7 @@ export class ArduinoToolbar extends ReactWidget {
this.tabBarToolbarRegistry.onDidChange(() => this.updateToolbar());
}

protected updateItems(
items: Array<TabBarToolbarItem | ReactTabBarToolbarItem>
): void {
protected updateItems(items: Array<TabBarToolbarItem>): void {
this.items.clear();
const revItems = items
.sort(TabBarToolbarItem.PRIORITY_COMPARATOR)
Expand Down Expand Up @@ -163,7 +162,7 @@ export class ArduinoToolbar extends ReactWidget {

protected executeCommand = (e: React.MouseEvent<HTMLElement>) => {
const item = this.items.get(e.currentTarget.id);
if (TabBarToolbarItem.is(item)) {
if (item && item.command) {
this.commands.executeCommand(item.command, this, e.target);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
);
this._appInfo = updateAppInfo(this._appInfo, this._config);
this.hookApplicationEvents();
this.showInitialWindow();
this.showInitialWindow(undefined);
const [port] = await Promise.all([
this.startBackend(),
app.whenReady(),
Expand Down Expand Up @@ -889,7 +889,7 @@ const fallbackFrontendAppConfig: FrontendApplicationConfig = {
defaultIconTheme: 'none',
validatePreferencesSchema: false,
defaultLocale: '',
electron: { showWindowEarly: true },
electron: { showWindowEarly: true, uriScheme: 'custom://arduino-ide' },
reloadOnReconnect: true,
};

Expand Down
32 changes: 16 additions & 16 deletions electron-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@
"license": "AGPL-3.0-or-later",
"main": "./src-gen/backend/electron-main.js",
"dependencies": {
"@theia/core": "1.51.0",
"@theia/debug": "1.51.0",
"@theia/editor": "1.51.0",
"@theia/electron": "1.51.0",
"@theia/filesystem": "1.51.0",
"@theia/keymaps": "1.51.0",
"@theia/messages": "1.51.0",
"@theia/monaco": "1.51.0",
"@theia/navigator": "1.51.0",
"@theia/plugin-ext": "1.51.0",
"@theia/plugin-ext-vscode": "1.51.0",
"@theia/preferences": "1.51.0",
"@theia/terminal": "1.51.0",
"@theia/workspace": "1.51.0",
"@theia/core": "1.53.2",
"@theia/debug": "1.53.2",
"@theia/editor": "1.53.2",
"@theia/electron": "1.53.2",
"@theia/filesystem": "1.53.2",
"@theia/keymaps": "1.53.2",
"@theia/messages": "1.53.2",
"@theia/monaco": "1.53.2",
"@theia/navigator": "1.53.2",
"@theia/plugin-ext": "1.53.2",
"@theia/plugin-ext-vscode": "1.53.2",
"@theia/preferences": "1.53.2",
"@theia/terminal": "1.53.2",
"@theia/workspace": "1.53.2",
"arduino-ide-extension": "2.3.5"
},
"devDependencies": {
"@theia/cli": "1.51.0",
"@theia/cli": "1.53.2",
"7zip-min": "^1.4.4",
"chmodr": "^1.2.0",
"compression-webpack-plugin": "^9.0.0",
"copy-webpack-plugin": "^8.1.1",
"dateformat": "^5.0.3",
"electron": "^28.2.8",
"electron": "^30.5.1",
"electron-builder": "^24.6.4",
"electron-notarize": "^1.1.1",
"execa": "^7.1.1",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"**/ip": "^2.0.1"
},
"devDependencies": {
"@theia/cli": "1.51.0",
"@theia/cli": "1.53.2",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@xhmikosr/downloader": "^13.0.1",
Expand Down
Loading