Skip to content

Commit

Permalink
Bumped electron to 13.6.1 (#2318)
Browse files Browse the repository at this point in the history
* Bumped electron to 13.6.1

* Added changelog entry

* Fixed broken test.

* Updated electron-builder, electron-rebuild, and keytar

* Added missing npmlog dependency

* Bumped electron-builder to 22.11.4

* Downgraded electron-builder back to 22.9.1

* Downgraded electron-rebuild and keytar to previous versions

* Updated package-lock

* WIP of new electron download script

* Fixed download script

* Pulled electron-builder config out into a function that generates plat-specific config
  • Loading branch information
tonyanziano authored Nov 11, 2021
1 parent ed0b611 commit 3226464
Show file tree
Hide file tree
Showing 14 changed files with 2,758 additions and 1,934 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## Added
- [main] Bumped `electron` to v13.6.1 in PR [2318](/~https://github.com/microsoft/BotFramework-Emulator/pull/2318)

## v4.14.0 - 2021 - 7 - 15
## Added
Expand Down
4,301 changes: 2,504 additions & 1,797 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ export const stepContent: string;
export const spacing: string;
export const marginFix: string;
export const botInspectorHeaderContainer: string;
export const flexRow: string;
export const flexColumn: string;
3 changes: 2 additions & 1 deletion packages/app/main/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/app
/installer
/dist
/dist
/customElectron
136 changes: 6 additions & 130 deletions packages/app/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"rebuild:keytar:electron": "electron-rebuild",
"build:electron": "babel ./src --out-dir app/server --extensions \".ts,.tsx\" --ignore \"**/*.spec.ts\" && npm run copy:extension:stubs",
"copy:extension:stubs": "ncp src/extensions app/extensions",
"dist": "electron-builder",
"dist": "electron-builder --config scripts/config/getElectronBuilderConfig.js",
"lint": "eslint --color --quiet --ext .js,.jsx,.ts,.tsx ./src",
"lint:fix": "npm run lint -- --fix",
"pack": "electron-builder --dir",
"pack": "electron-builder --config scripts/config/getElectronBuilderConfig.js --dir",
"start": "concurrently --kill-others --names \"electron,react-app\" --success first \"npm run start:electron:dev\" \"npm run start:react-app\"",
"start:electron": "./node_modules/.bin/electron --inspect=7777 --remote-debugging-port=7778 .",
"start:electron:dev": "cross-env ELECTRON_TARGET_URL=http://localhost:3000/ npm run start:electron",
Expand Down Expand Up @@ -81,6 +81,7 @@
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.11.0",
"@babel/preset-typescript": "^7.1.0",
"@electron/get": "^1.13.1",
"@types/async": "^2.0.47",
"@types/chokidar": "^1.7.5",
"@types/formidable": "^1.0.30",
Expand All @@ -102,14 +103,15 @@
"concurrently": "^3.5.1",
"cross-env": "^5.1.3",
"del": "^3.0.0",
"electron": "11.0.1",
"electron": "13.6.1",
"electron-builder": "22.9.1",
"electron-rebuild": "2.3.4",
"eslint": "7.19.0",
"eslint-config-prettier": "^3.5.0",
"eslint-plugin-import": "2.20.0",
"eslint-plugin-notice": "^0.7.7",
"eslint-plugin-prettier": "^3.0.1",
"extract-zip": "^2.0.1",
"fancy-log": "^1.3.2",
"jest": "24.8.0",
"license-list": "^0.1.3",
Expand Down Expand Up @@ -151,6 +153,7 @@
"moment": "^2.22.1",
"node-fetch": "^2.3.0",
"node-uuid": "^1.4.8",
"npmlog": "^5.0.1",
"read-text-file": "^1.1.0",
"redux": "^3.7.2",
"redux-saga": "^0.16.0",
Expand All @@ -162,132 +165,5 @@
"tslib": "^1.9.0",
"ws": "^5.0.0",
"xmldom": "^0.1.27"
},
"build": {
"asar": true,
"appId": "F3C061A6-FE81-4548-82ED-C1171D9856BB",
"productName": "Bot Framework Emulator",
"copyright": "Copyright © 2018 Microsoft Corporation",
"electronDownload": {
"version": "11.0.1"
},
"protocols": [
{
"name": "Bot Framework Emulator",
"role": "Viewer",
"schemes": [
"bfemulator"
]
}
],
"fileAssociations": [
{
"name": "Bot",
"ext": "bot"
},
{
"name": "Transcript",
"ext": "transcript"
}
],
"asarUnpack": [
"app/extensions/**",
"node_modules/@bfemulator/extension-*/**"
],
"directories": {
"buildResources": "./scripts/config/resources"
},
"files": [
"**/*",
"!**/node_modules/*/{README.md,README,readme.md,readme,test}",
"!**/node_modules/.bin",
"!**/*.{o,hprof,orig,pyc,pyo,rbc}",
"!**/._*",
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,thumbs.db,.gitignore,.gitattributes,.editorconfig,.idea,appveyor.yml,.travis.yml,circle.yml,.babelrc,.eslintignore,.eslintrc.js,.prettierrc,.eslintrc.react.js,.node-version}",
"!.vscode${/*}",
"!doc${/*}",
"!**/{tsconfig.json,README.md,getlicenses.cmd}",
"!**/node_modules/@types",
"!./scripts",
"!**/cache",
"!./installer"
],
"win": {
"artifactName": "BotFramework-Emulator-${version}-windows-setup.${ext}",
"icon": "./scripts/config/resources/icon.ico",
"target": [
{
"target": "nsis",
"arch": [
"ia32"
]
}
]
},
"nsis": {
"include": "./scripts/config/resources/nsis/installer.nsh",
"perMachine": false,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"packElevateHelper": true,
"unicode": true,
"runAfterFinish": true,
"installerHeader": "./scripts/config/resources/nsis/installerHeader.bmp",
"installerIcon": "./scripts/config/resources/icon.ico",
"installerSidebar": "./scripts/config/resources/nsis/installerSidebar.bmp",
"uninstallerIcon": "./scripts/config/resources/icon.ico",
"uninstallerSidebar": "./scripts/config/resources/nsis/installerSidebar.bmp",
"createDesktopShortcut": true,
"createStartMenuShortcut": true,
"shortcutName": "Bot Framework Emulator (V4)",
"oneClick": false
},
"mac": {
"artifactName": "BotFramework-Emulator-${version}-mac.${ext}",
"category": "public.app-category.developer-tools",
"target": [
{
"target": "dmg",
"arch": [
"x64"
]
}
],
"extendInfo": {
"NSMicrophoneUsageDescription": "This app requires microphone access to record audio."
},
"entitlements": "./scripts/config/resources/entitlements.plist"
},
"dmg": {
"background": "./scripts/config/resources/background.tiff",
"icon": "./scripts/config/resources/emulator_dmg.icns",
"title": "Bot Framework Emulator Installer",
"contents": [
{
"x": 140,
"y": 244
},
{
"x": 380,
"y": 244,
"type": "link",
"path": "/Applications"
}
]
},
"linux": {
"artifactName": "BotFramework-Emulator-${version}-${platform}-${arch}.${ext}",
"category": "Development",
"target": [
{
"target": "AppImage",
"arch": [
"x64"
]
}
]
},
"publish": null,
"remoteBuild": false
}
}
169 changes: 169 additions & 0 deletions packages/app/main/scripts/config/getElectronBuilderConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Framework Emulator Github:
// /~https://github.com/Microsoft/BotFramwork-Emulator
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

const packageJson = require('../../package.json');
const electronVersion = packageJson.devDependencies.electron;

const baseConfig = {
asar: true,
appId: 'F3C061A6-FE81-4548-82ED-C1171D9856BB',
productName: 'Bot Framework Emulator',
copyright: 'Copyright © 2018 Microsoft Corporation',
protocols: [
{
name: 'Bot Framework Emulator',
role: 'Viewer',
schemes: ['bfemulator'],
},
],
fileAssociations: [
{
name: 'Bot',
ext: 'bot',
},
{
name: 'Transcript',
ext: 'transcript',
},
],
asarUnpack: ['app/extensions/**', 'node_modules/@bfemulator/extension-*/**'],
directories: {
buildResources: './scripts/config/resources',
},
files: [
'**/*',
'!**/node_modules/*/{README.md,README,readme.md,readme,test}',
'!**/node_modules/.bin',
'!**/*.{o,hprof,orig,pyc,pyo,rbc}',
'!**/._*',
'!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,thumbs.db,.gitignore,.gitattributes,.editorconfig,.idea,appveyor.yml,.travis.yml,circle.yml,.babelrc,.eslintignore,.eslintrc.js,.prettierrc,.eslintrc.react.js,.node-version}',
'!.vscode${/*}',
'!doc${/*}',
'!**/{tsconfig.json,README.md,getlicenses.cmd}',
'!**/node_modules/@types',
'!./scripts',
'!**/cache',
'!./installer',
],
win: {
artifactName: 'BotFramework-Emulator-${version}-windows-setup.${ext}',
icon: './scripts/config/resources/icon.ico',
target: [
{
target: 'nsis',
arch: ['ia32'],
},
],
},
nsis: {
include: './scripts/config/resources/nsis/installer.nsh',
perMachine: false,
allowElevation: true,
allowToChangeInstallationDirectory: true,
packElevateHelper: true,
unicode: true,
runAfterFinish: true,
installerHeader: './scripts/config/resources/nsis/installerHeader.bmp',
installerIcon: './scripts/config/resources/icon.ico',
installerSidebar: './scripts/config/resources/nsis/installerSidebar.bmp',
uninstallerIcon: './scripts/config/resources/icon.ico',
uninstallerSidebar: './scripts/config/resources/nsis/installerSidebar.bmp',
createDesktopShortcut: true,
createStartMenuShortcut: true,
shortcutName: 'Bot Framework Emulator (V4)',
oneClick: false,
},
mac: {
artifactName: 'BotFramework-Emulator-${version}-mac.${ext}',
category: 'public.app-category.developer-tools',
target: [
{
target: 'dmg',
arch: ['x64'],
},
],
extendInfo: {
NSMicrophoneUsageDescription: 'This app requires microphone access to record audio.',
},
entitlements: './scripts/config/resources/entitlements.plist',
},
dmg: {
background: './scripts/config/resources/background.tiff',
icon: './scripts/config/resources/emulator_dmg.icns',
title: 'Bot Framework Emulator Installer',
contents: [
{
x: 140,
y: 244,
},
{
x: 380,
y: 244,
type: 'link',
path: '/Applications',
},
],
},
linux: {
artifactName: 'BotFramework-Emulator-${version}-${platform}-${arch}.${ext}',
category: 'Development',
target: [
{
target: 'AppImage',
arch: ['x64'],
},
],
},
publish: null,
remoteBuild: false,
};

module.exports = () => {
if (process.platform === 'win32') {
// on Windows we need to manually download the internal Electron binary
// and then unsign it before packing it up to be signed
return {
...baseConfig,
electronDist: 'customElectron',
};
} else {
// on Mac and Linux we will download the internal Electron binary as-is
// during the electron-builder pack call
return {
...baseConfig,
electronDownload: {
version: electronVersion,
},
};
}
};
Loading

0 comments on commit 3226464

Please sign in to comment.