diff --git a/__tests__/createProject.helper.js b/__tests__/createProject.helper.js index 0c638625..05e47ac2 100644 --- a/__tests__/createProject.helper.js +++ b/__tests__/createProject.helper.js @@ -24,7 +24,7 @@ const createProject = async (projectName, useTS, customPlugins = {}) => { preset.plugins['vue-cli-plugin-electron-builder'] = { // electron-builder requires that an exact version of electron is provided, // unless electron is already installed - electronBuilder: { electronVersion: '11.0.0' } + electronBuilder: { electronVersion: '12.0.0' } } preset.plugins = { ...preset.plugins, ...customPlugins } const projectPath = (p) => diff --git a/docs/guide/guide.md b/docs/guide/guide.md index c88ab99b..d4f79eb0 100644 --- a/docs/guide/guide.md +++ b/docs/guide/guide.md @@ -45,7 +45,7 @@ Available only in Electron, the global variable `__static` is added to the main ::: :::tip Videos -By default, videos will fail to load from the public folder. There are two solutions to this problem. If you are using Electron 11, simply add `stream: true` to the privileges config on line 10 of your main process file (`background.(js|ts)` by default): `{ scheme: 'app', privileges: { secure: true, standard: true, stream: true } }`. If you do not want to use Electron 11, you will have to configure and use the `local-resource` protocol, see [these docs](./security.html#loading-local-images-resources) for instructions, and [this GitHub issue](https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/872) for more details. +By default, videos will fail to load from the public folder. There are two solutions to this problem. If you are using Electron 11+, simply add `stream: true` to the privileges config on line 10 of your main process file (`background.(js|ts)` by default): `{ scheme: 'app', privileges: { secure: true, standard: true, stream: true } }`. If you do not want to use Electron 11+, you will have to configure and use the `local-resource` protocol, see [these docs](./security.html#loading-local-images-resources) for instructions, and [this GitHub issue](https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/872) for more details. ::: ### Examples: diff --git a/package.json b/package.json index ddf41f54..a8725ac6 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@vuepress/plugin-google-analytics": "^1.8.0", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", - "electron": "^11.2.1", + "electron": "^12.0.0", "electron-devtools-installer": "^3.1.0", "eslint": "^7.2.0", "eslint-config-standard": "^16.0.2", @@ -74,7 +74,7 @@ "jest": "^24.8.0", "lnk": "^1.1.0", "rimraf": "^3.0.0", - "spectron": "^13.0.0", + "spectron": "^14.0.0", "terminal-tasks": "^0.0.5", "typescript": "^3.9.5", "vue": "^2.5.20", diff --git a/prompts.js b/prompts.js index 49bf7da9..9de0a43f 100644 --- a/prompts.js +++ b/prompts.js @@ -5,13 +5,8 @@ module.exports = [ name: 'electronBuilder.electronVersion', type: 'list', message: 'Choose Electron Version', - default: '^11.0.0', + default: '^12.0.0', choices: [ - { - name: '^9.0.0', - value: '^9.0.0', - short: '^9.0.0' - }, { name: '^10.0.0', value: '^10.0.0', @@ -21,6 +16,11 @@ module.exports = [ name: '^11.0.0', value: '^11.0.0', short: '^11.0.0' + }, + { + name: '^12.0.0', + value: '^12.0.0', + short: '^12.0.0' } ], when: () => { diff --git a/yarn.lock b/yarn.lock index 4a7feb06..b43ad191 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1028,7 +1028,7 @@ ajv "^6.12.0" ajv-keywords "^3.4.1" -"@electron/get@^1.0.1", "@electron/get@^1.12.2": +"@electron/get@^1.0.1": version "1.12.2" resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.12.2.tgz#6442066afb99be08cefb9a281e4b4692b33764f3" integrity sha512-vAuHUbfvBQpYTJ5wB7uVIDq5c/Ry0fiTBMs7lnEYAo/qXXppIVcWdfBr57u6eRnKdVso7KSiH6p/LbQAG6Izrg== @@ -1044,6 +1044,27 @@ global-agent "^2.0.2" global-tunnel-ng "^2.7.1" +"@electron/get@^1.12.4": + version "1.12.4" + resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.12.4.tgz#a5971113fc1bf8fa12a8789dc20152a7359f06ab" + integrity sha512-6nr9DbJPUR9Xujw6zD3y+rS95TyItEVM0NVjt1EehY2vUWfIgPiIPVHxCvaTS0xr2B+DRxovYVKbuOWqC35kjg== + dependencies: + debug "^4.1.1" + env-paths "^2.2.0" + fs-extra "^8.1.0" + got "^9.6.0" + progress "^2.0.3" + semver "^6.2.0" + sumchecker "^3.0.1" + optionalDependencies: + global-agent "^2.0.2" + global-tunnel-ng "^2.7.1" + +"@electron/remote@^1.0.4": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@electron/remote/-/remote-1.1.0.tgz#167d119c7c03c7778b556fdc4f1f38a44b23f1c2" + integrity sha512-yr8gZTkIgJYKbFqExI4QZqMSjn1kL/us9Dl46+TH1EZdhgRtsJ6HDfdsIxu0QEc6Hv+DMAXs69rgquH+8FDk4w== + "@electron/universal@1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.0.4.tgz#231ac246c39d45b80e159bd21c3f9027dcaa10f5" @@ -1727,10 +1748,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.55.tgz#a147f282edec679b894d4694edb5abeb595fecbd" integrity sha512-koZJ89uLZufDvToeWO5BrC4CR4OUfHnUz2qoPs/daQH6qq3IN62QFxCTZ+bKaCE0xaoCAJYE4AXre8AbghCrhg== -"@types/node@^12.0.12": - version "12.19.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.14.tgz#59e5029a3c2aea34f68b717955381692fd47cafb" - integrity sha512-2U9uLN46+7dv9PiS8VQJcHhuoOjiDPZOLAt0WuA1EanEknIMae+2QbMhayF7cgGqjvRVIfNpt+6jLPczJZFiRw== +"@types/node@^14.6.2": + version "14.14.44" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.44.tgz#df7503e6002847b834371c004b372529f3f85215" + integrity sha512-+gaugz6Oce6ZInfI/tK4Pq5wIIkJMEJUu92RB3Eu93mtj4wjjjz9EB5mLp5s1pSsLXdC/CPut/xF20ZzAQJbTA== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -6074,12 +6095,12 @@ electron-builder@^22.2.0: update-notifier "^5.1.0" yargs "^16.2.0" -electron-chromedriver@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/electron-chromedriver/-/electron-chromedriver-11.0.0.tgz#49b034ed0ad12c12e3522862c7bb46875a0d85e1" - integrity sha512-ayMJPBbB4puU0SqYbcD9XvF3/7GWIhqKE1n5lG2/GQPRnrZkNoPIilsrS0rQcD50Xhl69KowatDqLhUznZWtbA== +electron-chromedriver@^12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/electron-chromedriver/-/electron-chromedriver-12.0.0.tgz#55bdc451b938b384642d613a05eadacb1fe476ee" + integrity sha512-zOs98o9+20Er8Q44z06h90VldwrJaoRCieW3Q8WkdDjA3cMRU5mlmm1kGDhPLMeYNuhq6e39aGMVH/IBFD97HQ== dependencies: - "@electron/get" "^1.12.2" + "@electron/get" "^1.12.4" extract-zip "^2.0.0" electron-devtools-installer@^3.1.0: @@ -6111,13 +6132,13 @@ electron-to-chromium@^1.3.649: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.693.tgz#5089c506a925c31f93fcb173a003a22e341115dd" integrity sha512-vUdsE8yyeu30RecppQtI+XTz2++LWLVEIYmzeCaCRLSdtKZ2eXqdJcrs85KwLiPOPVc6PELgWyXBsfqIvzGZag== -electron@^11.2.1: - version "11.3.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-11.3.0.tgz#87e8528fd23ae53b0eeb3a738f1fe0a3ad27c2db" - integrity sha512-MhdS0gok3wZBTscLBbYrOhLaQybCSAfkupazbK1dMP5c+84eVMxJE/QGohiWQkzs0tVFIJsAHyN19YKPbelNrQ== +electron@^12.0.0: + version "12.0.7" + resolved "https://registry.yarnpkg.com/electron/-/electron-12.0.7.tgz#e0fca2c8be34cb7da48c4d15cfb1d2ad666d2718" + integrity sha512-722TZNKDuLpEmj96AzTYFKHaJEH98xgOBH0aldStaPXI1xDFfb9SJQQuirvwFlkwG5OqQdz6Ne3OwwJ7Dbs5nQ== dependencies: "@electron/get" "^1.0.1" - "@types/node" "^12.0.12" + "@types/node" "^14.6.2" extract-zip "^1.0.3" elliptic@^6.5.3: @@ -7758,6 +7779,23 @@ got@^11.0.2: p-cancelable "^2.0.0" responselike "^2.0.0" +got@^11.8.0: + version "11.8.2" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.2.tgz#7abb3959ea28c31f3576f1576c1effce23f33599" + integrity sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.1" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + got@^8.3.1: version "8.3.2" resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" @@ -13707,14 +13745,15 @@ spdy@^4.0.2: select-hose "^2.0.0" spdy-transport "^3.0.0" -spectron@^13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/spectron/-/spectron-13.0.0.tgz#16bdfcf9a2b26cb5ee6c3e29b4f08101e339aa4d" - integrity sha512-7RPa6Fp8gqL4V0DubobnqIRFHIijkpjg6MFHcJlxoerWyvLJd+cQvOh756XpB1Z/U3DyA9jPcS+HE2PvYRP5+A== +spectron@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/spectron/-/spectron-14.0.0.tgz#c8160e38c30dcda39734f3e8e809162dc0805d14" + integrity sha512-88GM7D1eLiTxjByjtY7lxU7CJcQ92kX1x0WfnADaIXqqYRLbI1KlIWxXz1Xm5UxuMJh5N847K0NONG49mvZtuw== dependencies: + "@electron/remote" "^1.0.4" dev-null "^0.1.1" - electron-chromedriver "^11.0.0" - request "^2.88.2" + electron-chromedriver "^12.0.0" + got "^11.8.0" split "^1.0.1" webdriverio "^6.9.1"