Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 92a1352

Browse files
author
Akos Kitta
committed
chore(deps): update to theia@1.41.0
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent ce02e26 commit 92a1352

File tree

9 files changed

+1401
-1317
lines changed

9 files changed

+1401
-1317
lines changed

‎arduino-ide-extension/package.json‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@
2424
},
2525
"dependencies": {
2626
"@grpc/grpc-js": "^1.8.14",
27-
"@theia/application-package": "1.39.0",
28-
"@theia/core": "1.39.0",
29-
"@theia/debug": "1.39.0",
30-
"@theia/editor": "1.39.0",
31-
"@theia/electron": "1.39.0",
32-
"@theia/filesystem": "1.39.0",
33-
"@theia/keymaps": "1.39.0",
34-
"@theia/markers": "1.39.0",
35-
"@theia/messages": "1.39.0",
36-
"@theia/monaco": "1.39.0",
27+
"@theia/application-package": "1.41.0",
28+
"@theia/core": "1.41.0",
29+
"@theia/debug": "1.41.0",
30+
"@theia/editor": "1.41.0",
31+
"@theia/electron": "1.41.0",
32+
"@theia/filesystem": "1.41.0",
33+
"@theia/keymaps": "1.41.0",
34+
"@theia/markers": "1.41.0",
35+
"@theia/messages": "1.41.0",
36+
"@theia/monaco": "1.41.0",
3737
"@theia/monaco-editor-core": "1.72.3",
38-
"@theia/navigator": "1.39.0",
39-
"@theia/outline-view": "1.39.0",
40-
"@theia/output": "1.39.0",
41-
"@theia/plugin-ext": "1.39.0",
42-
"@theia/preferences": "1.39.0",
43-
"@theia/scm": "1.39.0",
44-
"@theia/search-in-workspace": "1.39.0",
45-
"@theia/terminal": "1.39.0",
46-
"@theia/typehierarchy": "1.39.0",
47-
"@theia/workspace": "1.39.0",
38+
"@theia/navigator": "1.41.0",
39+
"@theia/outline-view": "1.41.0",
40+
"@theia/output": "1.41.0",
41+
"@theia/plugin-ext": "1.41.0",
42+
"@theia/preferences": "1.41.0",
43+
"@theia/scm": "1.41.0",
44+
"@theia/search-in-workspace": "1.41.0",
45+
"@theia/terminal": "1.41.0",
46+
"@theia/typehierarchy": "1.41.0",
47+
"@theia/workspace": "1.41.0",
4848
"@tippyjs/react": "^4.2.5",
4949
"@types/auth0-js": "^9.14.0",
5050
"@types/btoa": "^1.2.3",

‎arduino-ide-extension/src/node/auth/authentication-server.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function createServer(
2929
}
3030

3131
export async function startServer(server: http.Server): Promise<string> {
32-
let portTimer: NodeJS.Timer;
32+
let portTimer: NodeJS.Timeout;
3333

3434
function cancelPortTimer() {
3535
clearTimeout(portTimer);

‎arduino-ide-extension/src/node/theia/plugin-ext/plugin-reader.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ import { HostedPluginReader as TheiaHostedPluginReader } from '@theia/plugin-ext
77

88
@injectable()
99
export class HostedPluginReader extends TheiaHostedPluginReader {
10-
override readContribution(
10+
override asyncreadContribution(
1111
plugin: PluginPackage
12-
): PluginContribution | undefined {
12+
): Promise<PluginContribution | undefined> {
1313
const scanner = this.scanner.getScanner(plugin);
14-
const contributions = scanner.getContribution(plugin);
14+
const contributions = awaitscanner.getContribution(plugin);
1515
return this.filterContribution(plugin.name, contributions);
1616
}
17+
1718
private filterContribution(
1819
pluginName: string,
1920
contributions: PluginContribution | undefined

‎arduino-ide-extension/src/node/theia/workspace/default-workspace-server.ts‎

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { promisesasfs,constants} from 'node:fs';
2-
import { injectable,inject } from '@theia/core/shared/inversify';
1+
import { FileUri} from '@theia/core/lib/node';
2+
import { inject,injectable } from '@theia/core/shared/inversify';
33
import { DefaultWorkspaceServer as TheiaDefaultWorkspaceServer } from '@theia/workspace/lib/node/default-workspace-server';
44
import { SketchesService } from '../../../common/protocol';
5-
import { FileUri } from '@theia/core/lib/node';
65
import { IsTempSketch } from '../../is-temp-sketch';
76

87
@injectable()
@@ -21,26 +20,6 @@ export class DefaultWorkspaceServer extends TheiaDefaultWorkspaceServer {
2120
return uri;
2221
}
2322

24-
/**
25-
* This is the async re-implementation of the default Theia behavior.
26-
*/
27-
override async getRecentWorkspaces(): Promise<string[]> {
28-
const listUri: string[] = [];
29-
const data = await this.readRecentWorkspacePathsFromUserHome();
30-
if (data && data.recentRoots) {
31-
await Promise.all(
32-
data.recentRoots
33-
.filter((element) => Boolean(element))
34-
.map(async (element) => {
35-
if (await this.exists(element)) {
36-
listUri.push(element);
37-
}
38-
})
39-
);
40-
}
41-
return listUri;
42-
}
43-
4423
protected override async writeToUserHome(
4524
data: RecentWorkspacePathsData
4625
): Promise<void> {
@@ -69,15 +48,6 @@ export class DefaultWorkspaceServer extends TheiaDefaultWorkspaceServer {
6948
recentRoots,
7049
};
7150
}
72-
73-
private async exists(uri: string): Promise<boolean> {
74-
try {
75-
await fs.access(FileUri.fsPath(uri), constants.R_OK | constants.W_OK);
76-
return true;
77-
} catch {
78-
return false;
79-
}
80-
}
8151
}
8252

8353
// Remove after https://github.com/eclipse-theia/theia/pull/11603

‎electron-app/package.json‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@
55
"license": "AGPL-3.0-or-later",
66
"main": "./src-gen/backend/electron-main.js",
77
"dependencies": {
8-
"@theia/core": "1.39.0",
9-
"@theia/debug": "1.39.0",
10-
"@theia/editor": "1.39.0",
11-
"@theia/electron": "1.39.0",
12-
"@theia/filesystem": "1.39.0",
13-
"@theia/keymaps": "1.39.0",
14-
"@theia/messages": "1.39.0",
15-
"@theia/monaco": "1.39.0",
16-
"@theia/navigator": "1.39.0",
17-
"@theia/plugin-ext": "1.39.0",
18-
"@theia/plugin-ext-vscode": "1.39.0",
19-
"@theia/preferences": "1.39.0",
20-
"@theia/terminal": "1.39.0",
21-
"@theia/workspace": "1.39.0",
8+
"@theia/core": "1.41.0",
9+
"@theia/debug": "1.41.0",
10+
"@theia/editor": "1.41.0",
11+
"@theia/electron": "1.41.0",
12+
"@theia/filesystem": "1.41.0",
13+
"@theia/keymaps": "1.41.0",
14+
"@theia/messages": "1.41.0",
15+
"@theia/monaco": "1.41.0",
16+
"@theia/navigator": "1.41.0",
17+
"@theia/plugin-ext": "1.41.0",
18+
"@theia/plugin-ext-vscode": "1.41.0",
19+
"@theia/preferences": "1.41.0",
20+
"@theia/terminal": "1.41.0",
21+
"@theia/workspace": "1.41.0",
2222
"arduino-ide-extension": "2.2.2"
2323
},
2424
"devDependencies": {
25-
"@theia/cli": "1.39.0",
25+
"@theia/cli": "1.41.0",
2626
"7zip-min": "^1.4.4",
2727
"chmodr": "^1.2.0",
2828
"compression-webpack-plugin": "^9.0.0",

‎electron-app/webpack.base.js‎

Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
const chmodr = require('chmodr');
55
const CopyWebpackPlugin = require('copy-webpack-plugin');
66
const path = require('node:path');
7-
const fs = require('node:fs/promises');
8-
9-
const isWindows = process.platform === 'win32';
10-
const isMacOS = process.platform === 'darwin';
117

8+
/**
9+
* @param {string} target the name of the `npm` package to resolve.
10+
*/
1211
function resolvePackagePath(target, baseDir = __dirname) {
1312
const resolvePackageJsonPath = require('resolve-package-path');
1413
const packageJsonPath = resolvePackageJsonPath(target, baseDir);
@@ -23,9 +22,11 @@ function resolvePackagePath(target, baseDir = __dirname) {
2322
// restore file permissions after webpack copy
2423
// https://github.com/webpack-contrib/copy-webpack-plugin/issues/35#issuecomment-1407280257
2524
class PermissionsPlugin {
26-
constructor(targetPath, patchTheia12780 = false) {
25+
/**
26+
* @param {string} targetPath
27+
*/
28+
constructor(targetPath) {
2729
this.targetPath = targetPath;
28-
this.patchTheia12780 = patchTheia12780;
2930
}
3031

3132
/**
@@ -34,20 +35,6 @@ class PermissionsPlugin {
3435
apply(compiler) {
3536
compiler.hooks.afterEmit.tap('PermissionsPlugin', () => {
3637
return new Promise(async (resolve, reject) => {
37-
if (this.patchTheia12780) {
38-
let trashBinaryFilename = undefined;
39-
if (isWindows) {
40-
trashBinaryFilename = 'windows-trash.exe';
41-
} else if (isMacOS) {
42-
trashBinaryFilename = 'macos-trash';
43-
}
44-
if (trashBinaryFilename) {
45-
await fs.chmod(
46-
path.join(__dirname, 'lib', 'backend', trashBinaryFilename),
47-
0o755
48-
);
49-
}
50-
}
5138
chmodr(this.targetPath, 0o755, (err) =>
5239
err ? reject(err) : resolve(undefined)
5340
);
@@ -59,18 +46,9 @@ class PermissionsPlugin {
5946
/**
6047
* Creates webpack plugins to copy all required resources (binaries, plotter app, translation files, etc.) to the appropriate location.
6148
* @param {string} targetPath where to copy the resources
62-
* @param {boolean|undefined} [patchTheia12780=true] to apply patch for https://github.com/eclipse-theia/theia/issues/12780. Only required in the production app.
6349
* @param {string|undefined} [baseDir=__dirname] to calculate the modules from. Defaults to `__dirname`
6450
*/
65-
function createCopyArduinoResourcesPlugins(
66-
targetPath,
67-
patchTheia12780 = false,
68-
baseDir = __dirname
69-
) {
70-
const trashBinariesPath = path.join(
71-
resolvePackagePath('trash', baseDir),
72-
'lib'
73-
);
51+
function createCopyArduinoResourcesPlugins(targetPath, baseDir = __dirname) {
7452
const copyOptions = {
7553
patterns: [
7654
// binaries
@@ -96,25 +74,9 @@ function createCopyArduinoResourcesPlugins(
9674
},
9775
],
9876
};
99-
100-
if (patchTheia12780) {
101-
// workaround for https://github.com/eclipse-theia/theia/issues/12780
102-
// copy the Windows (`windows-trash.exe`) and macOS (`macos-trash`) executables for `trash`
103-
if (isWindows) {
104-
copyOptions.patterns.push({
105-
from: path.join(trashBinariesPath, 'windows-trash.exe'),
106-
to: path.resolve(__dirname, 'lib', 'backend'),
107-
});
108-
} else if (isMacOS) {
109-
copyOptions.patterns.push({
110-
from: path.join(trashBinariesPath, 'macos-trash'),
111-
to: path.resolve(__dirname, 'lib', 'backend'),
112-
});
113-
}
114-
}
11577
return [
11678
new CopyWebpackPlugin(copyOptions),
117-
new PermissionsPlugin(targetPath,patchTheia12780),
79+
new PermissionsPlugin(targetPath),
11880
];
11981
}
12082

‎electron-app/webpack.config.js‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,11 @@ mainWindowConfig.plugins?.push(
2121
);
2222
const preloadConfig = frontend[2];
2323

24-
// Taken from https://github.com/eclipse-theia/theia-blueprint/blob/022878d5488c47650fb17b5fdf49a28be88465fe/applications/electron/webpack.config.js#L18-L21
25-
if (process.platform !== 'win32') {
26-
// For some reason, blueprint wants to bundle the `.node` files directly without going through `@vscode/windows-ca-certs`
27-
backend.ignoredResources.add(
28-
'@vscode/windows-ca-certs/build/Release/crypt32.node'
29-
);
30-
}
31-
3224
// Copy all the IDE2 binaries and the plotter web app.
3325
// XXX: For whatever reason it is important to use `unshift` instead of `push`, and execute the additional webpack plugins before the Theia contributed ones kick in. Otherwise ours do not work.
3426
backend.config.plugins.unshift(
3527
...createCopyArduinoResourcesPlugins(
36-
path.resolve(__dirname, 'lib', 'backend', 'resources'),
37-
true
28+
path.resolve(__dirname, 'lib', 'backend', 'resources')
3829
)
3930
);
4031

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"node": ">=18.17.0 <21"
1111
},
1212
"devDependencies": {
13-
"@theia/cli": "1.39.0",
13+
"@theia/cli": "1.41.0",
1414
"@typescript-eslint/eslint-plugin": "^5.59.0",
1515
"@typescript-eslint/parser": "^5.59.0",
1616
"@xhmikosr/downloader": "^13.0.1",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /