mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-22 13:42:27 -05:00
update all dependencies, resolve npm audit alerts
minor code changes required for uuid, eslint-config-scratch, and uglifyjs-webpack-plugin
This commit is contained in:
parent
cd805d1cd4
commit
5a1526c1e5
6 changed files with 4113 additions and 6481 deletions
10507
package-lock.json
generated
10507
package-lock.json
generated
File diff suppressed because it is too large
Load diff
55
package.json
55
package.json
|
@ -21,46 +21,45 @@
|
|||
"url": "git+ssh://git@github.com/LLK/scratch-desktop.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"source-map-support": "^0.5.12"
|
||||
"source-map-support": "^0.5.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.5.4",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.5.4",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/plugin-transform-async-to-generator": "^7.5.0",
|
||||
"@babel/preset-env": "^7.5.4",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"async": "^2.6.2",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-loader": "^8.0.6",
|
||||
"babel-plugin-react-intl": "^2.3.1",
|
||||
"copy-webpack-plugin": "^4.6.0",
|
||||
"@babel/core": "^7.9.6",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.9.6",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-transform-async-to-generator": "^7.8.3",
|
||||
"@babel/preset-env": "^7.9.6",
|
||||
"@babel/preset-react": "^7.9.4",
|
||||
"async": "^3.2.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.1.0",
|
||||
"babel-plugin-react-intl": "^7.5.7",
|
||||
"copy-webpack-plugin": "^5.1.1",
|
||||
"electron": "^8.2.5",
|
||||
"electron-builder": "^22.2.0",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
"electron-notarize": "^0.2.1",
|
||||
"electron-store": "^3.3.0",
|
||||
"electron-webpack": "^2.7.4",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-scratch": "^5.0.0",
|
||||
"eslint-plugin-import": "^2.18.0",
|
||||
"eslint-plugin-react": "^7.14.2",
|
||||
"electron-builder": "^22.6.0",
|
||||
"electron-devtools-installer": "^3.0.0",
|
||||
"electron-notarize": "^0.3.0",
|
||||
"electron-store": "^5.1.1",
|
||||
"electron-webpack": "^2.8.2",
|
||||
"eslint": "^7.0.0",
|
||||
"eslint-config-scratch": "^6.0.0",
|
||||
"eslint-plugin-import": "^2.20.0",
|
||||
"eslint-plugin-react": "^7.20.0",
|
||||
"intl": "1.2.5",
|
||||
"lodash.bindall": "^4.4.0",
|
||||
"lodash.defaultsdeep": "^4.6.1",
|
||||
"mkdirp": "^0.5.1",
|
||||
"mkdirp": "^1.0.4",
|
||||
"nets": "^3.2.0",
|
||||
"react": "16.2.0",
|
||||
"react-dom": "16.2.1",
|
||||
"react-intl": "2.4.0",
|
||||
"react-intl": "2.8.0",
|
||||
"react-redux": "5.0.7",
|
||||
"redux": "3.7.2",
|
||||
"rimraf": "^2.7.1",
|
||||
"redux": "3.5.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"scratch-gui": "github:LLK/scratch-gui#scratch-desktop-v3.10.2",
|
||||
"source-map-loader": "^0.2.4",
|
||||
"uglifyjs-webpack-plugin": "^2.1.3",
|
||||
"uuid": "^3.3.3",
|
||||
"webpack": "^4.39.3"
|
||||
"uuid": "^8.0.0",
|
||||
"webpack": "^4.43.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"upath": "^1.0.5"
|
||||
|
|
|
@ -74,13 +74,15 @@ const makeFullUrl = (url, search = null) => {
|
|||
* Prompt in a platform-specific way for permission to access the microphone or camera, if Electron supports doing so.
|
||||
* Any application-level checks, such as whether or not a particular frame or document should be allowed to ask,
|
||||
* should be done before calling this function.
|
||||
* This function may return a Promise!
|
||||
*
|
||||
* @param {string} mediaType - one of Electron's media types, like 'microphone' or 'camera'
|
||||
* @returns {boolean} - true if permission granted, false otherwise.
|
||||
* @returns {boolean|Promise.<boolean>} - true if permission granted, false otherwise.
|
||||
*/
|
||||
const askForMediaAccess = async mediaType => {
|
||||
const askForMediaAccess = mediaType => {
|
||||
if (systemPreferences.askForMediaAccess) {
|
||||
// Electron currently only implements this on macOS
|
||||
// This returns a Promise
|
||||
return systemPreferences.askForMediaAccess(mediaType);
|
||||
}
|
||||
// For other platforms we can't reasonably do anything other than assume we have access.
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import ElectronStore from 'electron-store';
|
||||
import nets from 'nets';
|
||||
import * as os from 'os';
|
||||
import uuidv1 from 'uuid/v1'; // semi-persistent client ID
|
||||
import uuidv4 from 'uuid/v4'; // random ID
|
||||
import {
|
||||
v1 as uuidv1, // semi-persistent client ID
|
||||
v4 as uuidv4 // random ID
|
||||
} from 'uuid';
|
||||
|
||||
/**
|
||||
* Basic telemetry event data. These fields are filled automatically by the `addEvent` call.
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
const route = new URLSearchParams(window.location.search).get('route') || 'app';
|
||||
switch (route) {
|
||||
case 'app':
|
||||
import('./app.jsx');
|
||||
import('./app.jsx'); // eslint-disable-line no-unused-expressions
|
||||
break;
|
||||
case 'about':
|
||||
import('./about.jsx');
|
||||
import('./about.jsx'); // eslint-disable-line no-unused-expressions
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ const childProcess = require('child_process');
|
|||
|
||||
const electronPath = require('electron');
|
||||
const webpack = require('webpack');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
|
||||
const isProduction = (process.env.NODE_ENV === 'production');
|
||||
|
||||
|
@ -61,21 +60,6 @@ const makeConfig = function (options) {
|
|||
}
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
// Use `--env.minify=false` to disable the UglifyJsPlugin instance automatically injected by
|
||||
// electron-webpack. Otherwise it will do double-duty with this one.
|
||||
minimizer: isProduction ? [
|
||||
new UglifyJsPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
sourceMap: true, // disable this if UglifyJSPlugin takes too long and/or runs out of memory
|
||||
uglifyOptions: {
|
||||
compress: isProduction ? {} : false,
|
||||
mangle: isProduction
|
||||
}
|
||||
})
|
||||
] : []
|
||||
},
|
||||
plugins: [
|
||||
new webpack.SourceMapDevToolPlugin({
|
||||
filename: '[file].map'
|
||||
|
|
Loading…
Reference in a new issue