Skip to content

Commit

Permalink
chore(deps): Updated to Theia 1.39.0
Browse files Browse the repository at this point in the history
 - [security]: removed the app packager
 - [feat]: bundle the backend app with webpack

Signed-off-by: Akos Kitta <[email protected]>
  • Loading branch information
Akos Kitta committed Jul 19, 2023
1 parent f6a4325 commit c9dfc7e
Show file tree
Hide file tree
Showing 131 changed files with 4,528 additions and 7,791 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
1 change: 1 addition & 0 deletions .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 Down
1 change: 1 addition & 0 deletions .github/workflows/compose-full-changelog.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: Get Tag
id: tag_name
Expand Down
1 change: 1 addition & 0 deletions .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 Down
1 change: 1 addition & 0 deletions .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 Down
1 change: 1 addition & 0 deletions .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 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
15 changes: 8 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"type": "node",
"request": "launch",
"name": "App (Electron) [Dev]",
"name": "App",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
Expand All @@ -17,10 +17,8 @@
"--app-project-path=${workspaceRoot}/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": {
Expand All @@ -41,7 +39,7 @@
{
"type": "node",
"request": "launch",
"name": "App (Electron)",
"name": "App [Dev]",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
Expand All @@ -54,8 +52,10 @@
"--app-project-path=${workspaceRoot}/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": {
Expand Down Expand Up @@ -95,7 +95,8 @@
"**/${fileBasenameNoExtension}.js"
],
"env": {
"TS_NODE_PROJECT": "${workspaceRoot}/tsconfig.json"
"TS_NODE_PROJECT": "${workspaceRoot}/tsconfig.json",
"IDE2_TEST":"true"
},
"sourceMaps": true,
"smartStep": true,
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
74 changes: 37 additions & 37 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,59 @@
"description": "An extension for Theia building the Arduino IDE",
"license": "AGPL-3.0-or-later",
"scripts": {
"prepare": "yarn download-cli && yarn download-fwuploader && yarn download-ls && yarn copy-i18n && yarn clean && yarn download-examples && yarn build && yarn test",
"prepare": "yarn download-cli && yarn download-fwuploader && yarn download-ls && yarn copy-i18n && yarn download-examples",
"clean": "rimraf lib",
"compose-changelog": "node ./scripts/compose-changelog.js",
"download-cli": "node ./scripts/download-cli.js",
"download-fwuploader": "node ./scripts/download-fwuploader.js",
"copy-i18n": "ncp ../i18n ./build/i18n",
"copy-i18n": "ncp ../i18n ./src/node/resources/i18n",
"download-ls": "node ./scripts/download-ls.js",
"download-examples": "node ./scripts/download-examples.js",
"generate-protocol": "node ./scripts/generate-protocol.js",
"lint": "eslint",
"build": "tsc && ncp ./src/node/cli-protocol/ ./lib/node/cli-protocol/ && yarn lint",
"prebuild": "rimraf lib",
"build": "tsc",
"postbuild": "ncp ./src/node/cli-protocol/ ./lib/node/cli-protocol/",
"watch": "tsc -w",
"test": "mocha \"./lib/test/**/*.test.js\"",
"test:slow": "mocha \"./lib/test/**/*.slow-test.js\" --slow 5000",
"test:watch": "mocha --watch --watch-files lib \"./lib/test/**/*.test.js\""
"test": "cross-env IDE2_TEST=true mocha \"./lib/test/**/*.test.js\"",
"test:slow": "cross-env IDE2_TEST=true mocha \"./lib/test/**/*.slow-test.js\" --slow 5000"
},
"dependencies": {
"@grpc/grpc-js": "^1.8.14",
"@theia/application-package": "1.37.0",
"@theia/core": "1.37.0",
"@theia/debug": "1.37.0",
"@theia/editor": "1.37.0",
"@theia/electron": "1.37.0",
"@theia/filesystem": "1.37.0",
"@theia/keymaps": "1.37.0",
"@theia/markers": "1.37.0",
"@theia/messages": "1.37.0",
"@theia/monaco": "1.37.0",
"@theia/application-package": "1.39.0",
"@theia/core": "1.39.0",
"@theia/debug": "1.39.0",
"@theia/editor": "1.39.0",
"@theia/electron": "1.39.0",
"@theia/filesystem": "1.39.0",
"@theia/keymaps": "1.39.0",
"@theia/markers": "1.39.0",
"@theia/messages": "1.39.0",
"@theia/monaco": "1.39.0",
"@theia/monaco-editor-core": "1.72.3",
"@theia/navigator": "1.37.0",
"@theia/outline-view": "1.37.0",
"@theia/output": "1.37.0",
"@theia/plugin-ext": "1.37.0",
"@theia/preferences": "1.37.0",
"@theia/scm": "1.37.0",
"@theia/search-in-workspace": "1.37.0",
"@theia/terminal": "1.37.0",
"@theia/typehierarchy": "1.37.0",
"@theia/workspace": "1.37.0",
"@theia/navigator": "1.39.0",
"@theia/outline-view": "1.39.0",
"@theia/output": "1.39.0",
"@theia/plugin-ext": "1.39.0",
"@theia/preferences": "1.39.0",
"@theia/scm": "1.39.0",
"@theia/search-in-workspace": "1.39.0",
"@theia/terminal": "1.39.0",
"@theia/typehierarchy": "1.39.0",
"@theia/workspace": "1.39.0",
"@tippyjs/react": "^4.2.5",
"@types/auth0-js": "^9.14.0",
"@types/btoa": "^1.2.3",
"@types/dateformat": "^3.0.1",
"@types/deepmerge": "^2.2.0",
"@types/glob": "^7.2.0",
"@types/google-protobuf": "^3.7.2",
"@types/js-yaml": "^3.12.2",
"@types/jsdom": "^21.1.1",
"@types/keytar": "^4.4.0",
"@types/lodash.debounce": "^4.0.6",
"@types/node-fetch": "^2.5.7",
"@types/p-queue": "^2.3.1",
"@types/ps-tree": "^1.1.0",
"@types/react-tabs": "^2.3.2",
"@types/temp": "^0.8.34",
"@types/which": "^1.3.1",
"@vscode/debugprotocol": "^1.51.0",
"arduino-serial-plotter-webapp": "0.2.0",
"async-mutex": "^0.3.0",
"auth0-js": "^9.14.0",
Expand All @@ -70,6 +66,7 @@
"cross-fetch": "^3.1.5",
"dateformat": "^3.0.3",
"deepmerge": "^4.2.2",
"drivelist": "^9.2.4",
"electron-updater": "^4.6.5",
"fast-json-stable-stringify": "^2.1.0",
"fast-safe-stringify": "^2.1.1",
Expand All @@ -87,6 +84,7 @@
"lodash.debounce": "^4.0.8",
"minimatch": "^3.1.2",
"node-fetch": "^2.6.1",
"node-log-rotate": "^0.1.5",
"open": "^8.0.6",
"p-debounce": "^2.1.0",
"p-queue": "^2.4.2",
Expand All @@ -113,17 +111,19 @@
"@types/mocha": "^5.2.7",
"@types/react-window": "^1.8.5",
"chai": "^4.2.0",
"cross-env": "^7.0.3",
"decompress": "^4.2.0",
"decompress-tarbz2": "^4.1.1",
"decompress-targz": "^4.1.1",
"decompress-unzip": "^4.0.1",
"download": "^7.1.0",
"download": "^8.0.0",
"grpc_tools_node_protoc_ts": "^4.1.0",
"mocha": "^7.0.0",
"mockdate": "^3.0.5",
"moment": "^2.24.0",
"ncp": "^2.0.0",
"protoc": "^1.0.4",
"rimraf": "^2.6.1",
"shelljs": "^0.8.3",
"uuid": "^3.2.1",
"yargs": "^11.1.0"
Expand Down Expand Up @@ -170,17 +170,17 @@
}
],
"arduino": {
"cli": {
"arduino-cli": {
"version": "0.33.1"
},
"fwuploader": {
"arduino-fwuploader": {
"version": "2.2.2"
},
"arduino-language-server": {
"version": "0.7.4"
},
"clangd": {
"version": "14.0.0"
},
"languageServer": {
"version": "0.7.4"
}
}
}
12 changes: 9 additions & 3 deletions arduino-ide-extension/scripts/download-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
return undefined;
}

const { cli } = arduino;
const cli = arduino['arduino-cli'];
if (!cli) {
return undefined;
}
Expand All @@ -34,9 +34,15 @@
}

const { platform, arch } = process;
const buildFolder = path.join(__dirname, '..', 'build');
const resourcesFolder = path.join(
__dirname,
'..',
'src',
'node',
'resources'
);
const cliName = `arduino-cli${platform === 'win32' ? '.exe' : ''}`;
const destinationPath = path.join(buildFolder, cliName);
const destinationPath = path.join(resourcesFolder, cliName);

if (typeof version === 'string') {
const suffix = (() => {
Expand Down
Loading

0 comments on commit c9dfc7e

Please sign in to comment.