Update Theia to 1.22.1 (#791)

This commit is contained in:
Mark Sujew 2022-02-11 15:25:35 +01:00 committed by GitHub
parent 69ac1f4779
commit 112153fb96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 709 additions and 1393 deletions

View File

@ -33,16 +33,16 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install Node.js 12.x - name: Install Node.js 14.x
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: '12.14.1' node-version: '14.x'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: Install Python 2.7 - name: Install Python 3.x
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: '2.7' python-version: '3.x'
- name: Package - name: Package
shell: bash shell: bash

View File

@ -25,10 +25,10 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install Node.js 12.x - name: Install Node.js 14.x
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: '12.14.1' node-version: '14.x'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: Install dependencies - name: Install dependencies

View File

@ -12,10 +12,10 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install Node.js 12.x - name: Install Node.js 14.x
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: '12.14.1' node-version: '14.x'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: Install dependencies - name: Install dependencies

View File

@ -12,10 +12,10 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install Node.js 12.x - name: Install Node.js 14.x
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: '12.14.1' node-version: '14.x'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: Install dependencies - name: Install dependencies

16
.vscode/launch.json vendored
View File

@ -37,6 +37,13 @@
"internalConsoleOptions": "openOnSessionStart", "internalConsoleOptions": "openOnSessionStart",
"outputCapture": "std" "outputCapture": "std"
}, },
{
"type": "chrome",
"request": "attach",
"name": "Attach to Electron Frontend",
"port": 9222,
"webRoot": "${workspaceFolder}/electron-app"
},
{ {
"type": "node", "type": "node",
"request": "launch", "request": "launch",
@ -104,5 +111,14 @@
"program": "${workspaceRoot}/electron/packager/index.js", "program": "${workspaceRoot}/electron/packager/index.js",
"cwd": "${workspaceFolder}/electron/packager" "cwd": "${workspaceFolder}/electron/packager"
} }
],
"compounds": [
{
"name": "Launch Electron Backend & Frontend",
"configurations": [
"App (Electron)",
"Attach to Electron Frontend"
]
}
] ]
} }

View File

@ -42,6 +42,7 @@ The _frontend_ is running as an Electron renderer process and can invoke service
If youre familiar with TypeScript, the [Theia IDE](https://theia-ide.org/), and if you want to contribute to the If youre familiar with TypeScript, the [Theia IDE](https://theia-ide.org/), and if you want to contribute to the
project, you should be able to build the Arduino IDE locally. project, you should be able to build the Arduino IDE locally.
Please refer to the [Theia IDE prerequisites](https://github.com/theia-ide/theia/blob/master/doc/) documentation for the setup instructions. Please refer to the [Theia IDE prerequisites](https://github.com/theia-ide/theia/blob/master/doc/) documentation for the setup instructions.
> **Note**: Node.js 14 must be used instead of the version 12 recommended at the link above.
Once you have all the tools installed, you can build the editor following these steps Once you have all the tools installed, you can build the editor following these steps
@ -57,9 +58,7 @@ Once you have all the tools installed, you can build the editor following these
3. Rebuild the electron dependencies 3. Rebuild the electron dependencies
```sh ```sh
cd electron-app yarn rebuild:electron
yarn theia rebuild:electron
cd ..
``` ```
4. Start the application 4. Start the application

View File

@ -21,22 +21,23 @@
}, },
"dependencies": { "dependencies": {
"@grpc/grpc-js": "^1.3.7", "@grpc/grpc-js": "^1.3.7",
"@theia/application-package": "1.19.0", "@theia/application-package": "1.22.1",
"@theia/core": "1.19.0", "@theia/core": "1.22.1",
"@theia/editor": "1.19.0", "@theia/editor": "1.22.1",
"@theia/editor-preview": "1.19.0", "@theia/editor-preview": "1.22.1",
"@theia/filesystem": "1.19.0", "@theia/electron": "1.22.1",
"@theia/git": "1.19.0", "@theia/filesystem": "1.22.1",
"@theia/keymaps": "1.19.0", "@theia/git": "1.22.1",
"@theia/markers": "1.19.0", "@theia/keymaps": "1.22.1",
"@theia/monaco": "1.19.0", "@theia/markers": "1.22.1",
"@theia/navigator": "1.19.0", "@theia/monaco": "1.22.1",
"@theia/outline-view": "1.19.0", "@theia/navigator": "1.22.1",
"@theia/output": "1.19.0", "@theia/outline-view": "1.22.1",
"@theia/preferences": "1.19.0", "@theia/output": "1.22.1",
"@theia/search-in-workspace": "1.19.0", "@theia/preferences": "1.22.1",
"@theia/terminal": "1.19.0", "@theia/search-in-workspace": "1.22.1",
"@theia/workspace": "1.19.0", "@theia/terminal": "1.22.1",
"@theia/workspace": "1.22.1",
"@tippyjs/react": "^4.2.5", "@tippyjs/react": "^4.2.5",
"@types/atob": "^2.1.2", "@types/atob": "^2.1.2",
"@types/auth0-js": "^9.14.0", "@types/auth0-js": "^9.14.0",

View File

@ -1,6 +1,6 @@
import { inject, injectable, postConstruct } from 'inversify'; import { inject, injectable, postConstruct } from 'inversify';
import * as React from 'react'; import * as React from 'react';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { import {
BoardsService, BoardsService,
SketchesService, SketchesService,

View File

@ -1,6 +1,6 @@
import { inject, injectable } from 'inversify'; import { inject, injectable } from 'inversify';
import * as moment from 'moment'; import * as moment from 'moment';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { isOSX, isWindows } from '@theia/core/lib/common/os'; import { isOSX, isWindows } from '@theia/core/lib/common/os';
import { ClipboardService } from '@theia/core/lib/browser/clipboard-service'; import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider'; import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';

View File

@ -1,5 +1,5 @@
import { inject, injectable } from 'inversify'; import { inject, injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { ArduinoMenus } from '../menu/arduino-menus'; import { ArduinoMenus } from '../menu/arduino-menus';
import { import {
SketchContribution, SketchContribution,

View File

@ -1,5 +1,5 @@
import { inject, injectable } from 'inversify'; import { inject, injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import URI from '@theia/core/lib/common/uri'; import URI from '@theia/core/lib/common/uri';
import { ConfirmDialog } from '@theia/core/lib/browser/dialogs'; import { ConfirmDialog } from '@theia/core/lib/browser/dialogs';
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';

View File

@ -1,5 +1,5 @@
import { injectable } from 'inversify'; import { injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import * as dateFormat from 'dateformat'; import * as dateFormat from 'dateformat';
import URI from '@theia/core/lib/common/uri'; import URI from '@theia/core/lib/common/uri';
import { ArduinoMenus } from '../menu/arduino-menus'; import { ArduinoMenus } from '../menu/arduino-menus';

View File

@ -1,5 +1,5 @@
import { inject, injectable } from 'inversify'; import { inject, injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { MenuModelRegistry } from '@theia/core/lib/common/menu'; import { MenuModelRegistry } from '@theia/core/lib/common/menu';
import { import {
DisposableCollection, DisposableCollection,

View File

@ -1,6 +1,6 @@
import { inject, injectable } from 'inversify'; import { inject, injectable } from 'inversify';
import { toArray } from '@phosphor/algorithm'; import { toArray } from '@phosphor/algorithm';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor'; import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor';
import { EditorManager } from '@theia/editor/lib/browser/editor-manager'; import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell'; import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell';

View File

@ -1,5 +1,5 @@
import { injectable } from 'inversify'; import { injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import URI from '@theia/core/lib/common/uri'; import URI from '@theia/core/lib/common/uri';
import { ArduinoMenus } from '../menu/arduino-menus'; import { ArduinoMenus } from '../menu/arduino-menus';
import { import {

View File

@ -1,5 +1,5 @@
import { inject, injectable } from 'inversify'; import { inject, injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { MaybePromise } from '@theia/core/lib/common/types'; import { MaybePromise } from '@theia/core/lib/common/types';
import { Widget, ContextMenuRenderer } from '@theia/core/lib/browser'; import { Widget, ContextMenuRenderer } from '@theia/core/lib/browser';
import { import {

View File

@ -1,5 +1,5 @@
import { injectable } from 'inversify'; import { injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { isOSX } from '@theia/core/lib/common/os'; import { isOSX } from '@theia/core/lib/common/os';
import { import {
Contribution, Contribution,

View File

@ -1,5 +1,5 @@
import { injectable } from 'inversify'; import { injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import * as dateFormat from 'dateformat'; import * as dateFormat from 'dateformat';
import { ArduinoMenus } from '../menu/arduino-menus'; import { ArduinoMenus } from '../menu/arduino-menus';
import { import {

View File

@ -10,7 +10,7 @@ import { SerialModel } from '../serial-model';
import { ArduinoMenus } from '../../menu/arduino-menus'; import { ArduinoMenus } from '../../menu/arduino-menus';
import { Contribution } from '../../contributions/contribution'; import { Contribution } from '../../contributions/contribution';
import { Endpoint, FrontendApplication } from '@theia/core/lib/browser'; import { Endpoint, FrontendApplication } from '@theia/core/lib/browser';
import { ipcRenderer } from '@theia/core/shared/electron'; import { ipcRenderer } from '@theia/electron/shared/electron';
import { SerialConfig } from '../../../common/protocol'; import { SerialConfig } from '../../../common/protocol';
import { SerialConnectionManager } from '../serial-connection-manager'; import { SerialConnectionManager } from '../serial-connection-manager';
import { SerialPlotter } from './protocol'; import { SerialPlotter } from './protocol';

View File

@ -62,9 +62,15 @@ export class DebugSessionManager extends TheiaDebugSessionManager {
} }
); );
} }
// TODO: remove as https://github.com/eclipse-theia/theia/issues/10164 is fixed async terminateSession(session?: DebugSession): Promise<void> {
async terminateSessions(): Promise<void> { if (!session) {
await super.terminateSessions(); this.updateCurrentSession(this._currentSession);
this.destroy(this.currentSession?.id); session = this._currentSession;
}
// The cortex-debug extension does not respond to close requests
// So we simply terminate the debug session immediately
// Alternatively the `super.terminateSession` call will terminate it after 5 seconds without a response
await this.debug.terminateDebugSession(session!.id);
await super.terminateSession(session);
} }
} }

View File

@ -1,5 +1,5 @@
import { inject, injectable } from 'inversify'; import { inject, injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import URI from '@theia/core/lib/common/uri'; import URI from '@theia/core/lib/common/uri';
import { WorkspaceDeleteHandler as TheiaWorkspaceDeleteHandler } from '@theia/workspace/lib/browser/workspace-delete-handler'; import { WorkspaceDeleteHandler as TheiaWorkspaceDeleteHandler } from '@theia/workspace/lib/browser/workspace-delete-handler';
import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-service-client-impl'; import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-service-client-impl';

View File

@ -18,6 +18,7 @@ import { ArduinoWorkspaceRootResolver } from '../../arduino-workspace-resolver';
import { BoardsServiceProvider } from '../../boards/boards-service-provider'; import { BoardsServiceProvider } from '../../boards/boards-service-provider';
import { BoardsConfig } from '../../boards/boards-config'; import { BoardsConfig } from '../../boards/boards-config';
import { nls } from '@theia/core/lib/common'; import { nls } from '@theia/core/lib/common';
import { URI as VSCodeUri } from '@theia/core/shared/vscode-uri';
@injectable() @injectable()
export class WorkspaceService extends TheiaWorkspaceService { export class WorkspaceService extends TheiaWorkspaceService {
@ -67,7 +68,7 @@ export class WorkspaceService extends TheiaWorkspaceService {
this.workspaceUri = (async () => { this.workspaceUri = (async () => {
try { try {
const hash = window.location.hash; const hash = window.location.hash;
const [recentWorkspaces, recentSketches] = await Promise.all([ const [recentWorkspacesPaths, recentSketches] = await Promise.all([
this.server.getRecentWorkspaces(), this.server.getRecentWorkspaces(),
this.sketchService this.sketchService
.getSketches({}) .getSketches({})
@ -75,6 +76,8 @@ export class WorkspaceService extends TheiaWorkspaceService {
SketchContainer.toArray(container).map((s) => s.uri) SketchContainer.toArray(container).map((s) => s.uri)
), ),
]); ]);
// On Dindows, `getRecentWorkspaces` returns only file paths, not URIs as expected by the `isValid` method.
const recentWorkspaces = recentWorkspacesPaths.map(e => VSCodeUri.file(e).toString());
const toOpen = await new ArduinoWorkspaceRootResolver({ const toOpen = await new ArduinoWorkspaceRootResolver({
isValid: this.isValid.bind(this), isValid: this.isValid.bind(this),
}).resolve({ hash, recentWorkspaces, recentSketches }); }).resolve({ hash, recentWorkspaces, recentSketches });

View File

@ -1,4 +1,4 @@
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { inject, injectable } from 'inversify'; import { inject, injectable } from 'inversify';
import { CommandRegistry } from '@theia/core/lib/common/command'; import { CommandRegistry } from '@theia/core/lib/common/command';
import { MenuModelRegistry } from '@theia/core/lib/common/menu'; import { MenuModelRegistry } from '@theia/core/lib/common/menu';
@ -80,7 +80,7 @@ export class SketchbookWidgetContribution
} }
onStart(): void { onStart(): void {
this.shell.currentChanged.connect(() => this.shell.onDidChangeCurrentWidget(() =>
this.onCurrentWidgetChangedHandler() this.onCurrentWidgetChangedHandler()
); );

View File

@ -1,5 +1,5 @@
import { inject, injectable, postConstruct } from 'inversify'; import { inject, injectable, postConstruct } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state'; import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import { import {
ConnectionStatus, ConnectionStatus,

View File

@ -1,5 +1,5 @@
import { injectable } from 'inversify'; import { injectable } from 'inversify';
import { remote } from 'electron'; import * as remote from '@theia/core/electron-shared/@electron/remote';
import { isOSX } from '@theia/core/lib/common/os'; import { isOSX } from '@theia/core/lib/common/os';
import { Keybinding } from '@theia/core/lib/common/keybinding'; import { Keybinding } from '@theia/core/lib/common/keybinding';
import { import {
@ -15,7 +15,6 @@ import {
ArduinoMenus, ArduinoMenus,
PlaceholderMenuNode, PlaceholderMenuNode,
} from '../../../browser/menu/arduino-menus'; } from '../../../browser/menu/arduino-menus';
import electron = require('@theia/core/shared/electron');
@injectable() @injectable()
export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory { export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory {
@ -35,9 +34,9 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory {
await this.preferencesService.ready; await this.preferencesService.ready;
const createdMenuBar = this.createElectronMenuBar(); const createdMenuBar = this.createElectronMenuBar();
if (isOSX) { if (isOSX) {
electron.remote.Menu.setApplicationMenu(createdMenuBar); remote.Menu.setApplicationMenu(createdMenuBar);
} else { } else {
electron.remote.getCurrentWindow().setMenu(createdMenuBar); remote.getCurrentWindow().setMenu(createdMenuBar);
} }
} }
@ -81,7 +80,7 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory {
protected createOSXMenu(): Electron.MenuItemConstructorOptions { protected createOSXMenu(): Electron.MenuItemConstructorOptions {
const { submenu } = super.createOSXMenu(); const { submenu } = super.createOSXMenu();
const label = 'Arduino IDE'; const label = 'Arduino IDE';
if (!!submenu && !(submenu instanceof remote.Menu)) { if (!!submenu && Array.isArray(submenu)) {
const [, , /* about */ /* preferences */ ...rest] = submenu; const [, , /* about */ /* preferences */ ...rest] = submenu;
const about = this.fillMenuTemplate( const about = this.fillMenuTemplate(
[], [],

View File

@ -1,10 +1,5 @@
import { inject, injectable } from 'inversify'; import { inject, injectable } from 'inversify';
import { import { app, BrowserWindow, BrowserWindowConstructorOptions, ipcMain, screen } from '@theia/core/electron-shared/electron';
app,
BrowserWindow,
BrowserWindowConstructorOptions,
screen,
} from 'electron';
import { fork } from 'child_process'; import { fork } from 'child_process';
import { AddressInfo } from 'net'; import { AddressInfo } from 'net';
import { join } from 'path'; import { join } from 'path';
@ -19,8 +14,8 @@ import {
TheiaBrowserWindowOptions, TheiaBrowserWindowOptions,
} from '@theia/core/lib/electron-main/electron-main-application'; } from '@theia/core/lib/electron-main/electron-main-application';
import { SplashServiceImpl } from '../splash/splash-service-impl'; import { SplashServiceImpl } from '../splash/splash-service-impl';
import { ipcMain } from '@theia/core/shared/electron';
import { URI } from '@theia/core/shared/vscode-uri'; import { URI } from '@theia/core/shared/vscode-uri';
import * as electronRemoteMain from '@theia/core/electron-shared/@electron/remote/main';
app.commandLine.appendSwitch('disable-http-cache'); app.commandLine.appendSwitch('disable-http-cache');
@ -209,6 +204,7 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
this.attachSaveWindowState(electronWindow); this.attachSaveWindowState(electronWindow);
this.attachGlobalShortcuts(electronWindow); this.attachGlobalShortcuts(electronWindow);
this.restoreMaximizedState(electronWindow, options); this.restoreMaximizedState(electronWindow, options);
electronRemoteMain.enable(electronWindow.webContents);
return electronWindow; return electronWindow;
} }

View File

@ -4,26 +4,26 @@
"version": "2.0.0-rc3", "version": "2.0.0-rc3",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@theia/core": "1.19.0", "@theia/core": "1.22.1",
"@theia/debug": "1.19.0", "@theia/debug": "1.22.1",
"@theia/editor": "1.19.0", "@theia/editor": "1.22.1",
"@theia/editor-preview": "1.19.0", "@theia/editor-preview": "1.22.1",
"@theia/file-search": "1.19.0", "@theia/file-search": "1.22.1",
"@theia/filesystem": "1.19.0", "@theia/filesystem": "1.22.1",
"@theia/keymaps": "1.19.0", "@theia/keymaps": "1.22.1",
"@theia/messages": "1.19.0", "@theia/messages": "1.22.1",
"@theia/monaco": "1.19.0", "@theia/monaco": "1.22.1",
"@theia/navigator": "1.19.0", "@theia/navigator": "1.22.1",
"@theia/plugin-ext": "1.19.0", "@theia/plugin-ext": "1.22.1",
"@theia/plugin-ext-vscode": "1.19.0", "@theia/plugin-ext-vscode": "1.22.1",
"@theia/preferences": "1.19.0", "@theia/preferences": "1.22.1",
"@theia/process": "1.19.0", "@theia/process": "1.22.1",
"@theia/terminal": "1.19.0", "@theia/terminal": "1.22.1",
"@theia/workspace": "1.19.0", "@theia/workspace": "1.22.1",
"arduino-ide-extension": "2.0.0-rc3" "arduino-ide-extension": "2.0.0-rc3"
}, },
"devDependencies": { "devDependencies": {
"@theia/cli": "1.19.0" "@theia/cli": "1.22.1"
}, },
"scripts": { "scripts": {
"prepare": "theia build --mode development", "prepare": "theia build --mode development",

View File

@ -2,19 +2,18 @@
Building the Pro IDE on Linux `armv7l` (aka `armhf`) and `aarch64` (aka `arm64`): Building the Pro IDE on Linux `armv7l` (aka `armhf`) and `aarch64` (aka `arm64`):
1. Install Node.js 12.x with [nvm](https://github.com/nvm-sh/nvm#install--update-script): 1. Install Node.js 14.x with [nvm](https://github.com/nvm-sh/nvm#install--update-script):
``` ```
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
``` ```
Restart your shell then: Restart your shell then:
``` ```
nvm install 12.14.1 nvm install 14
nvm use 12.14.1 nvm use 14
``` ```
Verify: Verify:
``` ```
node -v node -v
v12.14.1
``` ```
2. Install [Yarn](https://classic.yarnpkg.com/en/docs/install/#debian-stable): 2. Install [Yarn](https://classic.yarnpkg.com/en/docs/install/#debian-stable):

View File

@ -18,9 +18,9 @@ sudo apt update \
build-essential \ build-essential \
&& wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \ && wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
&& source ~/.bashrc \ && source ~/.bashrc \
&& nvm install 12.14.1 \ && nvm install 14 \
&& nvm use 12.14.1 \ && nvm use 14 \
&& nvm alias default 12.14.1 \ && nvm alias default 14 \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \ && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \
&& sudo apt update && sudo apt install --no-install-recommends yarn \ && sudo apt update && sudo apt install --no-install-recommends yarn \

View File

@ -5,27 +5,28 @@
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"main": "src-gen/frontend/electron-main.js", "main": "src-gen/frontend/electron-main.js",
"dependencies": { "dependencies": {
"@theia/core": "1.19.0", "@theia/core": "1.22.1",
"@theia/debug": "1.19.0", "@theia/debug": "1.22.1",
"@theia/editor": "1.19.0", "@theia/editor": "1.22.1",
"@theia/editor-preview": "1.19.0", "@theia/editor-preview": "1.22.1",
"@theia/electron": "1.19.0", "@theia/electron": "1.22.1",
"@theia/file-search": "1.19.0", "@theia/file-search": "1.22.1",
"@theia/filesystem": "1.19.0", "@theia/filesystem": "1.22.1",
"@theia/keymaps": "1.19.0", "@theia/keymaps": "1.22.1",
"@theia/messages": "1.19.0", "@theia/messages": "1.22.1",
"@theia/monaco": "1.19.0", "@theia/monaco": "1.22.1",
"@theia/navigator": "1.19.0", "@theia/navigator": "1.22.1",
"@theia/plugin-ext": "1.19.0", "@theia/plugin-ext": "1.22.1",
"@theia/plugin-ext-vscode": "1.19.0", "@theia/plugin-ext-vscode": "1.22.1",
"@theia/preferences": "1.19.0", "@theia/preferences": "1.22.1",
"@theia/process": "1.19.0", "@theia/process": "1.22.1",
"@theia/terminal": "1.19.0", "@theia/terminal": "1.22.1",
"@theia/workspace": "1.19.0", "@theia/workspace": "1.22.1",
"arduino-ide-extension": "2.0.0-rc3" "arduino-ide-extension": "2.0.0-rc3"
}, },
"devDependencies": { "devDependencies": {
"@theia/cli": "1.19.0" "@theia/cli": "1.22.1",
"electron": "^15.3.5"
}, },
"scripts": { "scripts": {
"prepare": "theia build --mode development", "prepare": "theia build --mode development",

View File

@ -3,15 +3,17 @@
"author": "Arduino SA", "author": "Arduino SA",
"resolutions": { "resolutions": {
"**/fs-extra": "^4.0.3", "**/fs-extra": "^4.0.3",
"electron-builder": "22.7.0" "electron-builder": "22.10.5",
"find-git-exec": "0.0.4",
"dugite-extra": "0.1.15"
}, },
"dependencies": { "dependencies": {
"node-log-rotate": "^0.1.5" "node-log-rotate": "^0.1.5"
}, },
"devDependencies": { "devDependencies": {
"@theia/cli": "1.19.0", "@theia/cli": "1.22.1",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"electron-builder": "22.7.0", "electron-builder": "22.10.5",
"electron-notarize": "^0.3.0", "electron-notarize": "^0.3.0",
"is-ci": "^2.0.0", "is-ci": "^2.0.0",
"ncp": "^2.0.0", "ncp": "^2.0.0",
@ -20,13 +22,14 @@
"scripts": { "scripts": {
"build": "yarn download:plugins && theia build --mode development && yarn patch", "build": "yarn download:plugins && theia build --mode development && yarn patch",
"build:publish": "yarn download:plugins && theia build --mode production && yarn patch", "build:publish": "yarn download:plugins && theia build --mode production && yarn patch",
"rebuild": "yarn theia rebuild:electron",
"package": "cross-env DEBUG=* && electron-builder --publish=never", "package": "cross-env DEBUG=* && electron-builder --publish=never",
"package:publish": "cross-env DEBUG=* && electron-builder --publish=always", "package:publish": "cross-env DEBUG=* && electron-builder --publish=always",
"download:plugins": "theia download:plugins", "download:plugins": "theia download:plugins",
"patch": "ncp ./patch/main.js ./src-gen/backend/main.js" "patch": "ncp ./patch/main.js ./src-gen/backend/main.js"
}, },
"engines": { "engines": {
"node": ">=12.14.1 <13" "node": ">=14.0.0 <15"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -51,6 +54,7 @@
"build": { "build": {
"productName": "Arduino IDE", "productName": "Arduino IDE",
"asar": false, "asar": false,
"npmRebuild": false,
"directories": { "directories": {
"buildResources": "resources" "buildResources": "resources"
}, },
@ -65,8 +69,7 @@
"!node_modules/@theia/**/lib/*browser/*", "!node_modules/@theia/**/lib/*browser/*",
"node_modules/@theia/core/lib/browser/*", "node_modules/@theia/core/lib/browser/*",
"!node_modules/@typefox/monaco-editor-core/*", "!node_modules/@typefox/monaco-editor-core/*",
"!node_modules/oniguruma/*", "!node_modules/electron/**"
"!node_modules/onigasm/*"
], ],
"extraResources": [ "extraResources": [
{ {

View File

@ -72,9 +72,9 @@ function getVersion() {
} }
if (!isRelease) { if (!isRelease) {
if (isNightly) { if (isNightly) {
version = `${version}-nightly.${timestamp()}`; version = `${version}-nightly-${timestamp()}`;
} else { } else {
version = `${version}-snapshot.${currentCommitish()}`; version = `${version}-snapshot-${currentCommitish()}`;
} }
if (!semver.valid(version)) { if (!semver.valid(version)) {
throw new Error(`Invalid patched version: '${version}'.`); throw new Error(`Invalid patched version: '${version}'.`);

View File

@ -178,6 +178,7 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()}
//-------------------------------------------------------------------------------------------+ //-------------------------------------------------------------------------------------------+
exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')}`, 'Installing dependencies'); exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')}`, 'Installing dependencies');
exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} build${isElectronPublish ? ':publish' : ''}`, `Building the ${productName} application`); exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} build${isElectronPublish ? ':publish' : ''}`, `Building the ${productName} application`);
exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} rebuild`, 'Rebuild native dependencies');
//------------------------------------------------------------------------------+ //------------------------------------------------------------------------------+
// Create a throw away dotenv file which we use to feed the builder with input. | // Create a throw away dotenv file which we use to feed the builder with input. |

View File

@ -31,7 +31,7 @@
"yargs": "^12.0.5" "yargs": "^12.0.5"
}, },
"engines": { "engines": {
"node": ">=12.14.1 <13" "node": ">=14.0.0 <15"
}, },
"mocha": { "mocha": {
"reporter": "spec", "reporter": "spec",

View File

@ -7,10 +7,10 @@
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"private": true, "private": true,
"engines": { "engines": {
"node": ">=12.14.1 <13" "node": ">=14.0.0 <15"
}, },
"devDependencies": { "devDependencies": {
"@theia/cli": "1.19.0", "@theia/cli": "1.22.1",
"@types/sinon": "^2.3.5", "@types/sinon": "^2.3.5",
"@types/jsdom": "^11.0.4", "@types/jsdom": "^11.0.4",
"@typescript-eslint/eslint-plugin": "^4.27.0", "@typescript-eslint/eslint-plugin": "^4.27.0",
@ -33,6 +33,10 @@
"typescript": "^3.9.2", "typescript": "^3.9.2",
"jsdom": "^11.5.1" "jsdom": "^11.5.1"
}, },
"resolutions": {
"find-git-exec": "0.0.4",
"dugite-extra": "0.1.15"
},
"scripts": { "scripts": {
"prepare": "cross-env THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1 lerna run prepare && yarn download:plugins", "prepare": "cross-env THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1 lerna run prepare && yarn download:plugins",
"cleanup": "npx rimraf ./**/node_modules && rm -rf ./node_modules ./.browser_modules ./arduino-ide-extension/build ./arduino-ide-extension/downloads ./arduino-ide-extension/Examples ./arduino-ide-extension/lib ./browser-app/lib ./browser-app/src-gen ./browser-app/gen-webpack.config.js ./electron-app/lib ./electron-app/src-gen ./electron-app/gen-webpack.config.js", "cleanup": "npx rimraf ./**/node_modules && rm -rf ./node_modules ./.browser_modules ./arduino-ide-extension/build ./arduino-ide-extension/downloads ./arduino-ide-extension/Examples ./arduino-ide-extension/lib ./browser-app/lib ./browser-app/src-gen ./browser-app/gen-webpack.config.js ./electron-app/lib ./electron-app/src-gen ./electron-app/gen-webpack.config.js",

1844
yarn.lock

File diff suppressed because it is too large Load Diff