Skip to content

Commit

Permalink
chore(deps): Updated to Theia 1.39.0 (#2144)
Browse files Browse the repository at this point in the history
 - 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 <a.kitta@arduino.cc>
Co-authored-by: per1234 <accounts@perglass.com>

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
kittaakos authored Aug 14, 2023
1 parent 144df89 commit 9a6a457
Show file tree
Hide file tree
Showing 143 changed files with 5,038 additions and 8,122 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ module.exports = {
'.browser_modules/*',
'docs/*',
'scripts/*',
'electron-app/*',
'electron-app/lib/*',
'electron-app/src-gen/*',
'electron-app/gen-webpack*.js',
'!electron-app/webpack.config.js',
'plugins/*',
'arduino-ide-extension/src/node/cli-protocol',
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
with:
node-version: '16.14'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install Python 3.x
uses: actions/setup-python@v4
Expand Down Expand Up @@ -135,15 +136,24 @@ jobs:
if [ "${{ runner.OS }}" = "Windows" ]; then
npm config set msvs_version 2017 --global
fi
npx node-gyp install
yarn --cwd ./electron/packager/
yarn --cwd ./electron/packager/ package
yarn install --immutable
yarn --cwd arduino-ide-extension build
yarn test
yarn --cwd arduino-ide-extension test:slow
yarn --cwd arduino-ide-extension lint
yarn --cwd electron-app rebuild
yarn --cwd electron-app build
yarn --cwd electron-app package
- name: Upload [GitHub Actions]
uses: actions/upload-artifact@v3
with:
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
path: electron/build/dist/build-artifacts/
path: electron-app/dist/build-artifacts

artifacts:
name: ${{ matrix.artifact.name }} artifact
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-i18n-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
with:
node-version: '16.14'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install Go
uses: actions/setup-go@v4
Expand All @@ -76,7 +77,7 @@ jobs:
version: 3.x

- name: Install dependencies
run: yarn
run: yarn install --immutable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/i18n-nightly-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
with:
node-version: '16.14'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install Go
uses: actions/setup-go@v4
Expand All @@ -34,7 +35,7 @@ jobs:
version: 3.x

- name: Install dependencies
run: yarn
run: yarn install --immutable

- name: Run i18n:push script
run: yarn run i18n:push
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/i18n-weekly-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
with:
node-version: '16.14'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install Go
uses: actions/setup-go@v4
Expand All @@ -34,7 +35,7 @@ jobs:
version: 3.x

- name: Install dependencies
run: yarn
run: yarn install --immutable

- name: Run i18n:pull script
run: yarn run i18n:pull
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/themes-weekly-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install Go
uses: actions/setup-go@v4
Expand All @@ -36,7 +37,7 @@ jobs:
version: 3.x

- name: Install dependencies
run: yarn
run: yarn install --immutable

- name: Run themes:pull script
run: yarn run themes:pull
Expand Down
13 changes: 5 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
node_modules/
# .node_modules is a hack for the electron builder.
.node_modules/
lib/
downloads/
build/
resources/
arduino-ide-extension/Examples/
!electron/build/
src-gen/
electron/build/webpack.config.js
gen-webpack.config.js
gen-webpack.node.config.js
.DS_Store
# switching from `electron` to `browser` in dev mode.
.browser_modules
yarn*.log
# For the VS Code extensions used by Theia.
plugins
electron-app/plugins
# the tokens folder for the themes
scripts/themes/tokens
# environment variables
.env
# content trace files for electron
electron-app/traces
# any Arduino LS generated log files
inols*.log
# The electron-builder output.
electron-app/dist
58 changes: 26 additions & 32 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,33 @@
{
"type": "node",
"request": "launch",
"name": "App (Electron) [Dev]",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"name": "App",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd",
},
"cwd": "${workspaceFolder}/electron-app",
"args": [
".",
"--log-level=debug",
"--hostname=localhost",
"--app-project-path=${workspaceRoot}/electron-app",
"--app-project-path=${workspaceFolder}/electron-app",
"--remote-debugging-port=9222",
"--no-app-auto-install",
"--plugins=local-dir:../plugins",
"--plugins=local-dir:./plugins",
"--hosted-plugin-inspect=9339",
"--content-trace",
"--open-devtools",
"--no-ping-timeout",
],
"env": {
"NODE_ENV": "development"
},
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/electron-app/src-gen/backend/*.js",
"${workspaceRoot}/electron-app/src-gen/frontend/*.js",
"${workspaceRoot}/electron-app/lib/**/*.js",
"${workspaceRoot}/arduino-ide-extension/lib/**/*.js",
"${workspaceRoot}/node_modules/@theia/**/*.js"
"${workspaceFolder}/electron-app/lib/backend/electron-main.js",
"${workspaceFolder}/electron-app/lib/backend/main.js",
"${workspaceFolder}/electron-app/lib/**/*.js",
"${workspaceFolder}/arduino-ide-extension/lib/**/*.js",
"${workspaceFolder}/node_modules/@theia/**/*.js"
],
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart",
Expand All @@ -41,33 +39,35 @@
{
"type": "node",
"request": "launch",
"name": "App (Electron)",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"name": "App [Dev]",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd",
},
"cwd": "${workspaceFolder}/electron-app",
"args": [
".",
"--log-level=debug",
"--hostname=localhost",
"--app-project-path=${workspaceRoot}/electron-app",
"--app-project-path=${workspaceFolder}/electron-app",
"--remote-debugging-port=9222",
"--no-app-auto-install",
"--plugins=local-dir:../plugins",
"--plugins=local-dir:./plugins",
"--hosted-plugin-inspect=9339",
"--content-trace",
"--open-devtools",
"--no-ping-timeout",
],
"env": {
"NODE_ENV": "development"
},
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/electron-app/src-gen/backend/*.js",
"${workspaceRoot}/electron-app/src-gen/frontend/*.js",
"${workspaceRoot}/electron-app/lib/**/*.js",
"${workspaceRoot}/arduino-ide-extension/lib/**/*.js",
"${workspaceRoot}/node_modules/@theia/**/*.js"
"${workspaceFolder}/electron-app/lib/backend/electron-main.js",
"${workspaceFolder}/electron-app/lib/backend/main.js",
"${workspaceFolder}/electron-app/lib/**/*.js",
"${workspaceFolder}/arduino-ide-extension/lib/**/*.js",
"${workspaceFolder}/node_modules/@theia/**/*.js"
],
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart",
Expand All @@ -84,7 +84,7 @@
"type": "node",
"request": "launch",
"name": "Run Test [current]",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--require",
"reflect-metadata/Reflect",
Expand All @@ -95,7 +95,8 @@
"**/${fileBasenameNoExtension}.js"
],
"env": {
"TS_NODE_PROJECT": "${workspaceRoot}/tsconfig.json"
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json",
"IDE2_TEST": "true"
},
"sourceMaps": true,
"smartStep": true,
Expand All @@ -108,19 +109,12 @@
"name": "Attach by Process ID",
"processId": "${command:PickProcess}"
},
{
"type": "node",
"request": "launch",
"name": "Electron Packager",
"program": "${workspaceRoot}/electron/packager/index.js",
"cwd": "${workspaceFolder}/electron/packager"
}
],
"compounds": [
{
"name": "Launch Electron Backend & Frontend",
"configurations": [
"App (Electron)",
"App",
"Attach to Electron Frontend"
]
}
Expand Down
12 changes: 6 additions & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "2.0.0",
"tasks": [
{
"label": "Arduino IDE - Rebuild Electron App",
"label": "Rebuild App",
"type": "shell",
"command": "yarn rebuild:browser && yarn rebuild:electron",
"group": "build",
Expand All @@ -13,7 +13,7 @@
}
},
{
"label": "Arduino IDE - Watch IDE Extension",
"label": "Watch Extension",
"type": "shell",
"command": "yarn --cwd ./arduino-ide-extension watch",
"group": "build",
Expand All @@ -24,7 +24,7 @@
}
},
{
"label": "Arduino IDE - Watch Electron App",
"label": "Watch App",
"type": "shell",
"command": "yarn --cwd ./electron-app watch",
"group": "build",
Expand All @@ -35,11 +35,11 @@
}
},
{
"label": "Arduino IDE - Watch All [Electron]",
"label": "Watch All",
"type": "shell",
"dependsOn": [
"Arduino IDE - Watch IDE Extension",
"Arduino IDE - Watch Electron App"
"Watch Extension",
"Watch App"
]
}
]
Expand Down
Loading

0 comments on commit 9a6a457

Please sign in to comment.