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]: bunld the backend app with webpack

Signed-off-by: Akos Kitta <[email protected]>
  • Loading branch information
Akos Kitta committed Jul 18, 2023
1 parent f6a4325 commit cb9dce5
Show file tree
Hide file tree
Showing 125 changed files with 4,371 additions and 7,697 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
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,18 @@ 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
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
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
11 changes: 6 additions & 5 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 [Dev]",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
Expand All @@ -17,7 +17,7 @@
"--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",
Expand All @@ -41,7 +41,7 @@
{
"type": "node",
"request": "launch",
"name": "App (Electron)",
"name": "App",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
Expand All @@ -54,7 +54,7 @@
"--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",
"--no-ping-timeout",
],
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
72 changes: 36 additions & 36 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,6 +111,7 @@
"@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",
Expand All @@ -124,6 +123,7 @@
"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
18 changes: 16 additions & 2 deletions arduino-ide-extension/scripts/download-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,27 @@ const version = '1.10.0';

(async () => {
const os = require('node:os');
const { promises: fs } = require('node:fs');
const { existsSync, promises: fs } = require('node:fs');
const path = require('node:path');
const shell = require('shelljs');
const { v4 } = require('uuid');
const { exec } = require('./utils');

const destination = path.join(
__dirname,
'..',
'src',
'node',
'resources',
'Examples'
);
if (existsSync(destination)) {
shell.echo(
`Skipping Git checkout of the examples because the repository already exists: ${destination}`
);
return;
}

const repository = path.join(os.tmpdir(), `${v4()}-arduino-examples`);
if (shell.mkdir('-p', repository).code !== 0) {
shell.exit(1);
Expand All @@ -28,7 +43,6 @@ const version = '1.10.0';
shell
);

const destination = path.join(__dirname, '..', 'Examples');
shell.mkdir('-p', destination);
shell.cp('-fR', path.join(repository, 'examples', '*'), destination);

Expand Down
12 changes: 9 additions & 3 deletions arduino-ide-extension/scripts/download-fwuploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
return undefined;
}

const { fwuploader } = arduino;
const fwuploader = arduino['arduino-fwuploader'];
if (!fwuploader) {
return undefined;
}
Expand All @@ -35,11 +35,17 @@
}

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

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

0 comments on commit cb9dce5

Please sign in to comment.