Skip to content

Commit 9a6a457

Browse files
authored
chore(deps): Updated to Theia 1.39.0 (#2144)
- update Theia to `1.39.0`, - remove the application packager and fix the security vulnerabilities, - bundle the backed application with `webpack`, and - enhance the developer docs. Co-authored-by: Akos Kitta <[email protected]> Co-authored-by: per1234 <[email protected]> Signed-off-by: Akos Kitta <[email protected]>
1 parent 144df89 commit 9a6a457

File tree

143 files changed

+5038
-8122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+5038
-8122
lines changed

Diff for: .eslintrc.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ module.exports = {
1515
'.browser_modules/*',
1616
'docs/*',
1717
'scripts/*',
18-
'electron-app/*',
18+
'electron-app/lib/*',
19+
'electron-app/src-gen/*',
20+
'electron-app/gen-webpack*.js',
1921
'!electron-app/webpack.config.js',
2022
'plugins/*',
2123
'arduino-ide-extension/src/node/cli-protocol',

Diff for: .github/workflows/build.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
with:
9393
node-version: '16.14'
9494
registry-url: 'https://registry.npmjs.org'
95+
cache: 'yarn'
9596

9697
- name: Install Python 3.x
9798
uses: actions/setup-python@v4
@@ -135,15 +136,24 @@ jobs:
135136
if [ "${{ runner.OS }}" = "Windows" ]; then
136137
npm config set msvs_version 2017 --global
137138
fi
139+
138140
npx node-gyp install
139-
yarn --cwd ./electron/packager/
140-
yarn --cwd ./electron/packager/ package
141+
yarn install --immutable
142+
143+
yarn --cwd arduino-ide-extension build
144+
yarn test
145+
yarn --cwd arduino-ide-extension test:slow
146+
yarn --cwd arduino-ide-extension lint
147+
148+
yarn --cwd electron-app rebuild
149+
yarn --cwd electron-app build
150+
yarn --cwd electron-app package
141151
142152
- name: Upload [GitHub Actions]
143153
uses: actions/upload-artifact@v3
144154
with:
145155
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
146-
path: electron/build/dist/build-artifacts/
156+
path: electron-app/dist/build-artifacts
147157

148158
artifacts:
149159
name: ${{ matrix.artifact.name }} artifact

Diff for: .github/workflows/check-i18n-task.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
with:
6464
node-version: '16.14'
6565
registry-url: 'https://registry.npmjs.org'
66+
cache: 'yarn'
6667

6768
- name: Install Go
6869
uses: actions/setup-go@v4
@@ -76,7 +77,7 @@ jobs:
7677
version: 3.x
7778

7879
- name: Install dependencies
79-
run: yarn
80+
run: yarn install --immutable
8081
env:
8182
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8283

Diff for: .github/workflows/i18n-nightly-push.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
node-version: '16.14'
2323
registry-url: 'https://registry.npmjs.org'
24+
cache: 'yarn'
2425

2526
- name: Install Go
2627
uses: actions/setup-go@v4
@@ -34,7 +35,7 @@ jobs:
3435
version: 3.x
3536

3637
- name: Install dependencies
37-
run: yarn
38+
run: yarn install --immutable
3839

3940
- name: Run i18n:push script
4041
run: yarn run i18n:push

Diff for: .github/workflows/i18n-weekly-pull.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
node-version: '16.14'
2323
registry-url: 'https://registry.npmjs.org'
24+
cache: 'yarn'
2425

2526
- name: Install Go
2627
uses: actions/setup-go@v4
@@ -34,7 +35,7 @@ jobs:
3435
version: 3.x
3536

3637
- name: Install dependencies
37-
run: yarn
38+
run: yarn install --immutable
3839

3940
- name: Run i18n:pull script
4041
run: yarn run i18n:pull

Diff for: .github/workflows/themes-weekly-pull.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
with:
2424
node-version: ${{ env.NODE_VERSION }}
2525
registry-url: 'https://registry.npmjs.org'
26+
cache: 'yarn'
2627

2728
- name: Install Go
2829
uses: actions/setup-go@v4
@@ -36,7 +37,7 @@ jobs:
3637
version: 3.x
3738

3839
- name: Install dependencies
39-
run: yarn
40+
run: yarn install --immutable
4041

4142
- name: Run themes:pull script
4243
run: yarn run themes:pull

Diff for: .gitignore

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
node_modules/
2-
# .node_modules is a hack for the electron builder.
3-
.node_modules/
42
lib/
53
downloads/
6-
build/
4+
resources/
75
arduino-ide-extension/Examples/
8-
!electron/build/
96
src-gen/
10-
electron/build/webpack.config.js
117
gen-webpack.config.js
8+
gen-webpack.node.config.js
129
.DS_Store
1310
# switching from `electron` to `browser` in dev mode.
1411
.browser_modules
1512
yarn*.log
1613
# For the VS Code extensions used by Theia.
17-
plugins
14+
electron-app/plugins
1815
# the tokens folder for the themes
1916
scripts/themes/tokens
20-
# environment variables
21-
.env
2217
# content trace files for electron
2318
electron-app/traces
2419
# any Arduino LS generated log files
2520
inols*.log
21+
# The electron-builder output.
22+
electron-app/dist

Diff for: .vscode/launch.json

+26-32
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,33 @@
44
{
55
"type": "node",
66
"request": "launch",
7-
"name": "App (Electron) [Dev]",
8-
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
7+
"name": "App",
8+
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
99
"windows": {
10-
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
10+
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd",
1111
},
1212
"cwd": "${workspaceFolder}/electron-app",
1313
"args": [
1414
".",
1515
"--log-level=debug",
1616
"--hostname=localhost",
17-
"--app-project-path=${workspaceRoot}/electron-app",
17+
"--app-project-path=${workspaceFolder}/electron-app",
1818
"--remote-debugging-port=9222",
1919
"--no-app-auto-install",
20-
"--plugins=local-dir:../plugins",
20+
"--plugins=local-dir:./plugins",
2121
"--hosted-plugin-inspect=9339",
22-
"--content-trace",
23-
"--open-devtools",
2422
"--no-ping-timeout",
2523
],
2624
"env": {
2725
"NODE_ENV": "development"
2826
},
2927
"sourceMaps": true,
3028
"outFiles": [
31-
"${workspaceRoot}/electron-app/src-gen/backend/*.js",
32-
"${workspaceRoot}/electron-app/src-gen/frontend/*.js",
33-
"${workspaceRoot}/electron-app/lib/**/*.js",
34-
"${workspaceRoot}/arduino-ide-extension/lib/**/*.js",
35-
"${workspaceRoot}/node_modules/@theia/**/*.js"
29+
"${workspaceFolder}/electron-app/lib/backend/electron-main.js",
30+
"${workspaceFolder}/electron-app/lib/backend/main.js",
31+
"${workspaceFolder}/electron-app/lib/**/*.js",
32+
"${workspaceFolder}/arduino-ide-extension/lib/**/*.js",
33+
"${workspaceFolder}/node_modules/@theia/**/*.js"
3634
],
3735
"smartStep": true,
3836
"internalConsoleOptions": "openOnSessionStart",
@@ -41,33 +39,35 @@
4139
{
4240
"type": "node",
4341
"request": "launch",
44-
"name": "App (Electron)",
45-
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
42+
"name": "App [Dev]",
43+
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
4644
"windows": {
47-
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
45+
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd",
4846
},
4947
"cwd": "${workspaceFolder}/electron-app",
5048
"args": [
5149
".",
5250
"--log-level=debug",
5351
"--hostname=localhost",
54-
"--app-project-path=${workspaceRoot}/electron-app",
52+
"--app-project-path=${workspaceFolder}/electron-app",
5553
"--remote-debugging-port=9222",
5654
"--no-app-auto-install",
57-
"--plugins=local-dir:../plugins",
55+
"--plugins=local-dir:./plugins",
5856
"--hosted-plugin-inspect=9339",
57+
"--content-trace",
58+
"--open-devtools",
5959
"--no-ping-timeout",
6060
],
6161
"env": {
6262
"NODE_ENV": "development"
6363
},
6464
"sourceMaps": true,
6565
"outFiles": [
66-
"${workspaceRoot}/electron-app/src-gen/backend/*.js",
67-
"${workspaceRoot}/electron-app/src-gen/frontend/*.js",
68-
"${workspaceRoot}/electron-app/lib/**/*.js",
69-
"${workspaceRoot}/arduino-ide-extension/lib/**/*.js",
70-
"${workspaceRoot}/node_modules/@theia/**/*.js"
66+
"${workspaceFolder}/electron-app/lib/backend/electron-main.js",
67+
"${workspaceFolder}/electron-app/lib/backend/main.js",
68+
"${workspaceFolder}/electron-app/lib/**/*.js",
69+
"${workspaceFolder}/arduino-ide-extension/lib/**/*.js",
70+
"${workspaceFolder}/node_modules/@theia/**/*.js"
7171
],
7272
"smartStep": true,
7373
"internalConsoleOptions": "openOnSessionStart",
@@ -84,7 +84,7 @@
8484
"type": "node",
8585
"request": "launch",
8686
"name": "Run Test [current]",
87-
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
87+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
8888
"args": [
8989
"--require",
9090
"reflect-metadata/Reflect",
@@ -95,7 +95,8 @@
9595
"**/${fileBasenameNoExtension}.js"
9696
],
9797
"env": {
98-
"TS_NODE_PROJECT": "${workspaceRoot}/tsconfig.json"
98+
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json",
99+
"IDE2_TEST": "true"
99100
},
100101
"sourceMaps": true,
101102
"smartStep": true,
@@ -108,19 +109,12 @@
108109
"name": "Attach by Process ID",
109110
"processId": "${command:PickProcess}"
110111
},
111-
{
112-
"type": "node",
113-
"request": "launch",
114-
"name": "Electron Packager",
115-
"program": "${workspaceRoot}/electron/packager/index.js",
116-
"cwd": "${workspaceFolder}/electron/packager"
117-
}
118112
],
119113
"compounds": [
120114
{
121115
"name": "Launch Electron Backend & Frontend",
122116
"configurations": [
123-
"App (Electron)",
117+
"App",
124118
"Attach to Electron Frontend"
125119
]
126120
}

Diff for: .vscode/tasks.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"label": "Arduino IDE - Rebuild Electron App",
5+
"label": "Rebuild App",
66
"type": "shell",
77
"command": "yarn rebuild:browser && yarn rebuild:electron",
88
"group": "build",
@@ -13,7 +13,7 @@
1313
}
1414
},
1515
{
16-
"label": "Arduino IDE - Watch IDE Extension",
16+
"label": "Watch Extension",
1717
"type": "shell",
1818
"command": "yarn --cwd ./arduino-ide-extension watch",
1919
"group": "build",
@@ -24,7 +24,7 @@
2424
}
2525
},
2626
{
27-
"label": "Arduino IDE - Watch Electron App",
27+
"label": "Watch App",
2828
"type": "shell",
2929
"command": "yarn --cwd ./electron-app watch",
3030
"group": "build",
@@ -35,11 +35,11 @@
3535
}
3636
},
3737
{
38-
"label": "Arduino IDE - Watch All [Electron]",
38+
"label": "Watch All",
3939
"type": "shell",
4040
"dependsOn": [
41-
"Arduino IDE - Watch IDE Extension",
42-
"Arduino IDE - Watch Electron App"
41+
"Watch Extension",
42+
"Watch App"
4343
]
4444
}
4545
]

0 commit comments

Comments
 (0)