Skip to content

Commit

Permalink
deps: update ccs-loader and @electron/get (eclipse-theia#9819)
Browse files Browse the repository at this point in the history
The commit updates the following dependencies:
- `@electron/get`: updates the outdated `electron-download` dependency
  to the newer `@electron/get` dependency, and adjust the code to
perform the `ffmpeg` replacement.
- `css-loader`: updated to newest version which supports webpack 5, and
  includes security updates.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto authored Aug 10, 2021
1 parent 7d80be9 commit 1dba014
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 155 deletions.
2 changes: 1 addition & 1 deletion dev-packages/application-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"buffer": "^6.0.3",
"circular-dependency-plugin": "^5.2.2",
"copy-webpack-plugin": "^8.1.1",
"css-loader": "^0.28.1",
"css-loader": "^6.2.0",
"electron-rebuild": "^1.8.6",
"font-awesome-webpack": "0.0.5-beta.2",
"fs-extra": "^4.0.2",
Expand Down
14 changes: 4 additions & 10 deletions dev-packages/electron/electron-replace-ffmpeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// @ts-check

const downloadElectron = require('electron-download');
const electronGet = require('@electron/get');
const unzipper = require('unzipper');
const yargs = require('yargs');
const path = require('path');
Expand Down Expand Up @@ -92,15 +92,9 @@ async function main() {
}).trim();
}

const libffmpegZipPath = await new Promise((resolve, reject) => {
downloadElectron({
// `version` usually starts with a `v`, which already gets added by `electron-download`.
version: electronVersion.replace(/^v/i, ''),
ffmpeg: true,
}, (error, path) => {
if (error) reject(error);
else resolve(path);
});
const libffmpegZipPath = await electronGet.downloadArtifact({
version: electronVersion,
artifactName: 'ffmpeg'
});

const libffmpegZip = await unzipper.Open.file(libffmpegZipPath);
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"electron": "^9.0.2",
"electron-download": "^4.1.1",
"@electron/get": "^1.12.4",
"electron-store": "^5.1.1",
"fix-path": "^3.0.0",
"native-keymap": "^2.1.2",
Expand Down
Loading

0 comments on commit 1dba014

Please sign in to comment.