Index: head/devel/electron7/Makefile =================================================================== --- head/devel/electron7/Makefile (revision 531914) +++ head/devel/electron7/Makefile (revision 531915) @@ -1,322 +1,321 @@ # $FreeBSD$ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} -PORTREVISION= 2 CATEGORIES= devel java MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v7.1.5/:chromium \ https://commondatastorage.googleapis.com/chromium-browser-official/:chromium_official \ https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \ https://commondatastorage.googleapis.com/chromium-fonts/:chromium_testfonts PKGNAMESUFFIX= ${ELECTRON_VER_MAJOR} DISTFILES= chromium-${CHROMIUM_VER}${EXTRACT_SUFX}:chromium \ chromium-${CHROMIUM_OFFICIAL_VER}${EXTRACT_SUFX}:chromium_official \ ${CHROMIUM_NODE_MODULES_HASH}:chromium_node \ ${CHROMIUM_TEST_FONTS_HASH}:chromium_testfonts \ electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX}:prefetch DIST_SUBDIR= ${PORTNAME} MAINTAINER= tagattie@FreeBSD.org COMMENT= Build cross-platform desktop apps with JavaScript, HTML, and CSS LICENSE= MIT LICENSE_FILE= ${WRKSRC}/electron/LICENSE -FETCH_DEPENDS= yarn:www/yarn-node12 -EXTRACT_DEPENDS= yarn:www/yarn-node12 +FETCH_DEPENDS= yarn-node12>0:www/yarn-node12 +EXTRACT_DEPENDS= yarn-node12>0:www/yarn-node12 PATCH_DEPENDS= git:devel/git BUILD_DEPENDS= ${LOCALBASE}/bin/ar:devel/binutils \ gperf:devel/gperf \ yasm:devel/yasm \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ - node:www/node12 \ - npm:www/npm-node12 + node12>0:www/node12 \ + npm-node12>0:www/npm-node12 LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ libatspi.so:accessibility/at-spi2-core \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libdbus-1.so:devel/dbus \ libnotify.so:devel/libnotify \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libdrm.so:graphics/libdrm \ libwebp.so:graphics/webp \ libavcodec.so:multimedia/ffmpeg \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig RUN_DEPENDS= xdg-open:devel/xdg-utils TEST_DEPENDS= git:devel/git \ ${PYTHON_PKGNAMEPREFIX}python-dbusmock>0:devel/py-python-dbusmock@${PY_FLAVOR} \ - npm:www/npm-node12 + npm-node12>0:www/npm-node12 USES= bison dos2unix gettext-tools gl gnome jpeg localbase:ldflags \ ninja pkgconfig python:2.7,build,test tar:xz xorg USE_GITHUB= yes GH_TAGNAME= ${DISTVERSIONPREFIX}${ELECTRON_VER} GH_TUPLE= nodejs:node:v${NODE_VER}:node \ nodejs:nan:${NAN_VER}:nan # boto:boto:f7574aa6cc2c819430c1f05e9a1a1a666ef8169b:boto \ # yaml:pyyaml:3.12:pyyaml \ # kennethreitz:requests:e4d59bedfd3c7f4f254f4f5d036587bcd8152458:requests # Official chromium version containing "gn" which is known to work CHROMIUM_OFFICIAL_VER= 78.0.3904.108 # See ${WRKSRC}/electron/DEPS for CHROMIUM_VER CHROMIUM_VER= 78.0.3904.130 # See ${WRKSRC}/third_party/node/node_modules.tar.gz.sha1 for CHROMIUM_NODE_MODULES_HASH CHROMIUM_NODE_MODULES_HASH= ab7f28fee456b5af5fbd3fcb5bcc7c61420788c9 # See ${WRKSRC}/third_party/test_fonts/test_fonts.tar.gz.sha1 for CHROMIUM_TEST_FONTS_HASH CHROMIUM_TEST_FONTS_HASH= a22de844e32a3f720d219e3911c3da3478039f89 # See ${WRKSRC}/electron/DEPS for NODE_VER NODE_VER= 12.8.1 # See ${WRKSRC}/electron/DEPS for NAN_VER NAN_VER= 2ee313aaca52e2b478965ac50eb5082520380d1b NO_WRKSUBDIR= yes WRKSRC_SUBDIR= src DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX} DOS2UNIX_FILES= third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h BINARY_ALIAS= python=${PYTHON_CMD} USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xrandr \ xrender xscrnsaver xtst USE_GL= gl glesv2 USE_GNOME= atk cairo pango gdkpixbuf2 gtk30 libxml2 libxslt USE_JAVA= yes JAVA_VERSION= 1.8 JAVA_BUILD= yes USE_LDCONFIG= ${DATADIR} GN_ARGS+= clang_use_chrome_plugins=false \ enable_hangout_services_extension=true \ enable_nacl=false \ enable_one_click_signin=true \ enable_remoting=false \ fieldtrial_testing_like_official_build=true \ is_clang=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator="none" \ use_allocator_shim=false \ use_aura=true \ use_bundled_fontconfig=false \ use_custom_libcxx=false \ use_gnome_keyring=false \ use_jumbo_build=true \ use_lld=true \ use_sysroot=false \ use_system_freetype=true \ use_system_harfbuzz=true \ use_system_libjpeg=true \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles ALL_TARGET= electron third_party/electron_node:headers MAKE_ARGS= -C out/${BUILDTYPE} MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include OPTIONS_DEFINE= CUPS DEBUG DIST DRIVER KERBEROS DIST_DESC= Build distribution zip files DRIVER_DESC= Install chromedriver OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO OPTIONS_DEFAULT= CUPS DRIVER KERBEROS ALSA OPTIONS_SUB= yes ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_component_build=false DEBUG_VARS_OFF= BUILDTYPE=Release DIST_IMPLIES= DRIVER DRIVER_ALL_TARGET= chromedriver KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false POST_BUILD_TARGETS= licenses version POST_BUILD_DIST_TARGETS= electron_dist_zip electron_chromedriver_zip electron_mksnapshot_zip -YARN_TIMESTAMP= 1583472449 +YARN_TIMESTAMP= 1586951847 PLIST_SUB= ELECTRON_VER=${ELECTRON_VER} \ ELECTRON_VER_MAJOR=${ELECTRON_VER_MAJOR} .include "Makefile.version" .include .if ${ARCH} == "amd64" PLIST_SUB+= AMD64="" .else PLIST_SUB+= AMD64="@comment " .endif .if ${ARCH} == "i386" PLIST_SUB+= I386="" .else PLIST_SUB+= I386="@comment " .endif pre-fetch: @${MKDIR} ${DISTDIR}/${DIST_SUBDIR} if [ ! -f ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} ]; \ then ${MKDIR} ${WRKDIR}; \ ${ECHO_CMD} 'yarn-offline-mirror "./yarn-offline-cache"' >> \ ${WRKDIR}/.yarnrc; \ ${CP} ${FILESDIR}/package.json ${FILESDIR}/yarn.lock ${WRKDIR}; \ cd ${WRKDIR} && ${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.cache \ yarn --frozen-lockfile --ignore-scripts; \ ${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \ -e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \ -e 's:\([gu]id\)=[0-9]*:\1=0:g' \ -e 's:flags=.*:flags=none:' \ -e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \ ${TAR} cJf ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} \ @yarn-offline-cache.mtree; \ ${RM} -r ${WRKDIR}; \ fi post-extract: ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/chromium-${CHROMIUM_VER} ${WRKSRC} ${RM} -r ${WRKSRC}/tools/gn ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/chromium-${CHROMIUM_OFFICIAL_VER}/tools/gn \ ${WRKSRC}/tools/gn ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${PORTNAME}-${ELECTRON_VER} ${WRKSRC}/electron ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_nan}-${NAN_VER} \ ${WRKSRC}/third_party/nan ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_node}-${NODE_VER} \ ${WRKSRC}/third_party/electron_node ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/yarn-offline-cache ${WRKDIR} ${ECHO_CMD} 'yarn-offline-mirror "../../../yarn-offline-cache"' >> ${WRKSRC}/electron/.yarnrc cd ${WRKSRC}/electron && \ ${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.cache yarn --frozen-lockfile --offline # ${RMDIR} ${WRKSRC}/electron/vendor/${GH_PROJECT_boto} # ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_boto}-${GH_TAGNAME_boto} \ # ${WRKSRC}/electron/vendor/${GH_PROJECT_boto} # ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_pyyaml}-${GH_TAGNAME_pyyaml} \ # ${WRKSRC}/electron/vendor/${GH_PROJECT_pyyaml} # ${RMDIR} ${WRKSRC}/electron/vendor/${GH_PROJECT_requests} # ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_requests}-${GH_TAGNAME_requests} \ # ${WRKSRC}/electron/vendor/${GH_PROJECT_requests} ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/node_modules ${WRKSRC}/third_party/node ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/test_fonts ${WRKSRC}/third_party/test_fonts pre-patch: ${SH} ${FILESDIR}/apply-electron-patches.sh ${WRKSRC} # ${FIND} ${WRKSRC} -type f -name '*.orig' -print -delete # ${FIND} ${WRKSRC} -type f -name '*~' -print -delete pre-configure: # cd ${WRKSRC}/electron/vendor/${GH_PROJECT_boto} && \ # ${PYTHON_CMD} setup.py build # cd ${WRKSRC}/electron/vendor/${GH_PROJECT_requests} && \ # ${PYTHON_CMD} setup.py build # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ ffmpeg flac freetype harfbuzz-ng libdrm libusb libwebp libxml \ libxslt openh264 opus snappy yasm || ${FALSE} do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn gen out/${BUILDTYPE} \ --args='import("//electron/build/args/${BUILDTYPE:tl}.gn") ${GN_ARGS}' # Setup nodejs dependency ${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin/node # Setup java dependency ${MKDIR} ${WRKDIR}/bin ${LN} -sf ${LOCALBASE}/openjdk8/bin/java ${WRKDIR}/bin/java # do-build: # cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ninja -C out/${BUILDTYPE} ${ALL_TARGET} post-build: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ ${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_TARGETS} post-build-DIST-on: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ ${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_DIST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && \ ${CP} chromedriver.zip chromedriver-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \ ${CP} dist.zip electron-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \ ${CP} mksnapshot.zip mksnapshot-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \ ${SHA256} -r *-v${ELECTRON_VER}-freebsd-*.zip | ${SED} -e 's/ / */' > SHASUMS256.txt do-install: ${MKDIR} ${STAGEDIR}${DATADIR} .for f in electron mksnapshot v8_context_snapshot_generator ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor .for f in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader .for f in libEGL.so libGLESv2.so libvk_swiftshader.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${f} ${STAGEDIR}${DATADIR}/swiftshader .endfor .for f in LICENSE LICENSES.chromium.html icudtl.dat natives_blob.bin snapshot_blob.bin v8_context_snapshot.bin version ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor .for f in chrome_100_percent.pak chrome_200_percent.pak resources.pak ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${MKDIR} ${STAGEDIR}${DATADIR}/locales ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/locales/*.pak ${STAGEDIR}${DATADIR}/locales ${MKDIR} ${STAGEDIR}${DATADIR}/resources .for f in default_app.asar ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/resources/${f} ${STAGEDIR}${DATADIR}/resources .endfor cd ${WRKSRC}/out/${BUILDTYPE}/gen && ${COPYTREE_SHARE} node_headers ${STAGEDIR}${DATADIR} ${RLN} ${STAGEDIR}${DATADIR}/electron ${STAGEDIR}${PREFIX}/bin/electron${PKGNAMESUFFIX} post-install-DIST-on: ${MKDIR} ${STAGEDIR}${DATADIR}/releases ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/SHASUMS256.txt ${STAGEDIR}${DATADIR}/releases ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*-v${ELECTRON_VER}-freebsd-*.zip ${STAGEDIR}${DATADIR}/releases post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver ${STAGEDIR}${DATADIR} do-test: # Note 1: "npm install" will run before actual tests are executed # Note 2: Xvfb or something similar is necessary for headless testing cd ${WRKSRC}/electron && \ ${SETENV} ${TEST_ENV} ELECTRON_OUT_DIR=${BUILDTYPE} LOCAL_GIT_DIRECTORY=${LOCALBASE} \ npm run test -- --ci .include Index: head/devel/electron7/Makefile.version =================================================================== --- head/devel/electron7/Makefile.version (revision 531914) +++ head/devel/electron7/Makefile.version (revision 531915) @@ -1,4 +1,4 @@ # $FreeBSD$ -ELECTRON_VER= 7.1.14 +ELECTRON_VER= 7.2.2 ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//} Index: head/devel/electron7/distinfo =================================================================== --- head/devel/electron7/distinfo (revision 531914) +++ head/devel/electron7/distinfo (revision 531915) @@ -1,17 +1,17 @@ -TIMESTAMP = 1583473295 +TIMESTAMP = 1586954429 SHA256 (electron/chromium-78.0.3904.130.tar.xz) = 6f9656a345e8cd4938520a70d1979672190f386ac710421be8d32cb542008fc2 SIZE (electron/chromium-78.0.3904.130.tar.xz) = 1405077664 SHA256 (electron/chromium-78.0.3904.108.tar.xz) = f9c53839f306d2973de27723360024f7904101d426b9e7e9cdb56e8bcc775b0e SIZE (electron/chromium-78.0.3904.108.tar.xz) = 742906260 SHA256 (electron/ab7f28fee456b5af5fbd3fcb5bcc7c61420788c9) = a45b953ebd15f4f13f1e0c675ccf59e9ed0352049497c4bea0111dbc2c9a5997 SIZE (electron/ab7f28fee456b5af5fbd3fcb5bcc7c61420788c9) = 4593699 SHA256 (electron/a22de844e32a3f720d219e3911c3da3478039f89) = 6e331676d098a57c53c1250821dc47ed84c47f823901bf30c4704df90d8a34be SIZE (electron/a22de844e32a3f720d219e3911c3da3478039f89) = 17469927 -SHA256 (electron/electron-yarn-cache-7.1.14.tar.xz) = e644591cc785c3a9f3057e7b05028371881de3fb8a354c4cb85fa30f4cbd8ac1 -SIZE (electron/electron-yarn-cache-7.1.14.tar.xz) = 24834332 -SHA256 (electron/electron-electron-v7.1.14_GH0.tar.gz) = 19cfa14b74f8180731334dfb2efe5725f4d9f7d35b708051352ecbee9de499cd -SIZE (electron/electron-electron-v7.1.14_GH0.tar.gz) = 5391932 +SHA256 (electron/electron-yarn-cache-7.2.2.tar.xz) = 8e37911c8d309c21923e04ef46ae2d5634072bfb8ccfe5dccbe12d387cae5435 +SIZE (electron/electron-yarn-cache-7.2.2.tar.xz) = 24834312 +SHA256 (electron/electron-electron-v7.2.2_GH0.tar.gz) = 9051cca3a1f422a7c81d83ef66e4d67dfd89b4aa948185d73a02c9f941e40bdb +SIZE (electron/electron-electron-v7.2.2_GH0.tar.gz) = 5420867 SHA256 (electron/nodejs-node-v12.8.1_GH0.tar.gz) = 11648d586f68ee5fc38e4cadf3974541aac4a67709fa028e9075aff42e28d9b9 SIZE (electron/nodejs-node-v12.8.1_GH0.tar.gz) = 72104419 SHA256 (electron/nodejs-nan-2ee313aaca52e2b478965ac50eb5082520380d1b_GH0.tar.gz) = e6d0727f2f33d6c0fdbee3182543cb23679551dc15318cc8a2489901eabe9915 SIZE (electron/nodejs-nan-2ee313aaca52e2b478965ac50eb5082520380d1b_GH0.tar.gz) = 173099 Index: head/devel/electron7/files/package.json =================================================================== --- head/devel/electron7/files/package.json (revision 531914) +++ head/devel/electron7/files/package.json (revision 531915) @@ -1,129 +1,129 @@ { "name": "electron", - "version": "7.1.14", + "version": "7.2.2", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { "@electron/docs-parser": "^0.4.2", "@electron/typescript-definitions": "^8.6.4", "@octokit/rest": "^16.3.2", "@primer/octicons": "^9.1.1", "@types/chai": "^4.1.7", "@types/chai-as-promised": "^7.1.0", "@types/express": "^4.16.1", "@types/fs-extra": "^5.0.5", "@types/mocha": "^5.2.6", "@types/node": "^12.0.10", "@types/semver": "^6.0.1", "@types/split": "^1.0.0", "@types/webpack": "^4.4.32", "@types/webpack-env": "^1.13.9", "@typescript-eslint/eslint-plugin": "^1.4.2", "@typescript-eslint/parser": "^1.4.2", "asar": "^1.0.0", "check-for-leaks": "^1.2.1", "colors": "^1.1.2", "dotenv-safe": "^4.0.4", "dugite": "^1.45.0", "eslint": "^5.13.0", "eslint-config-standard": "^12.0.0", "eslint-plugin-import": "^2.17.2", "eslint-plugin-mocha": "^5.2.0", "eslint-plugin-node": "^8.0.1", "eslint-plugin-standard": "^4.0.0", "eslint-plugin-typescript": "^0.14.0", "express": "^4.16.4", "folder-hash": "^2.1.1", "fs-extra": "^7.0.1", "husky": "^2.2.0", "klaw": "^3.0.0", "lint": "^1.1.2", "lint-staged": "^8.1.0", "minimist": "^1.2.0", "nugget": "^2.0.1", "pre-flight": "^1.1.0", "remark-cli": "^4.0.0", "remark-preset-lint-markdown-style-guide": "^2.1.1", "request": "^2.88.0", "semver": "^5.6.0", "shx": "^0.3.2", "standard-markdown": "^5.0.0", "sumchecker": "^2.0.2", "tap-xunit": "^2.4.1", "temp": "^0.8.3", "timers-browserify": "1.4.2", "ts-loader": "^6.0.2", "ts-node": "^6.0.3", "typescript": "^3.5.2", "webpack": "^4.32.2", "webpack-cli": "^3.3.2" }, "private": true, "scripts": { "asar": "asar", "generate-version-json": "node script/generate-version-json.js", "lint": "node ./script/lint.js && npm run lint:clang-format && npm run lint:docs", "lint:js": "node ./script/lint.js --js", "lint:clang-format": "python script/run-clang-format.py -r -c atom/ chromium_src/ || (echo \"\\nCode not formatted correctly.\" && exit 1)", "lint:cpp": "node ./script/lint.js --cc", "lint:objc": "node ./script/lint.js --objc", "lint:py": "node ./script/lint.js --py", "lint:gn": "node ./script/lint.js --gn", "lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-relative-links && npm run lint:check-trailing-whitespace", "lint:docs-relative-links": "python ./script/check-relative-doc-links.py", "lint:check-trailing-whitespace": "python ./script/check-trailing-whitespace.py", "lint:js-in-markdown": "standard-markdown docs", "create-api-json": "electron-docs-parser --dir=./", "create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js", "gn-typescript-definitions": "npm run create-typescript-definitions && shx cp electron.d.ts", "pre-flight": "pre-flight", "preinstall": "node -e 'process.exit(0)'", "prepack": "check-for-leaks", "repl": "node ./script/start.js --interactive", "start": "node ./script/start.js", "test": "node ./script/spec-runner.js", "tsc": "tsc", "webpack": "node build/webpack/run-compiler" }, "license": "MIT", "author": "Electron Community", "keywords": [ "electron" ], "husky": { "hooks": { "pre-commit": "lint-staged", "pre-push": "check-for-leaks" } }, "lint-staged": { "*.{js,ts}": [ "node script/lint.js --js --fix --only --", "git add" ], "*.{js,ts,d.ts}": [ "node script/gen-filenames.js", "git add" ], "*.{cc,mm,c,h}": [ "python script/run-clang-format.py -r -c --fix", "git add" ], "*.md": [ "remark -qf" ], "*.{gn,gni}": [ "python script/run-gn-format.py", "git add" ], "*.py": [ "node script/lint.js --py --fix --only --", "git add" ], "docs/api/**/*.md": [ "node script/gen-filenames.js", "python script/check-trailing-whitespace.py --fix", "git add filenames.auto.gni" ] } } Index: head/devel/electron7/files/patch-electron_default__app_default__app.ts =================================================================== --- head/devel/electron7/files/patch-electron_default__app_default__app.ts (revision 531914) +++ head/devel/electron7/files/patch-electron_default__app_default__app.ts (revision 531915) @@ -1,11 +1,11 @@ ---- electron/default_app/default_app.ts.orig 2019-12-13 19:48:14 UTC +--- electron/default_app/default_app.ts.orig 2020-03-24 05:00:48 UTC +++ electron/default_app/default_app.ts @@ -59,7 +59,7 @@ async function createWindow () { show: false - } + }; - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { - options.icon = path.join(__dirname, 'icon.png') + options.icon = path.join(__dirname, 'icon.png'); } Index: head/devel/electron7/files/patch-electron_lib_browser_api_app.ts =================================================================== --- head/devel/electron7/files/patch-electron_lib_browser_api_app.ts (revision 531914) +++ head/devel/electron7/files/patch-electron_lib_browser_api_app.ts (revision 531915) @@ -1,11 +1,11 @@ ---- electron/lib/browser/api/app.ts.orig 2019-12-13 19:48:14 UTC +--- electron/lib/browser/api/app.ts.orig 2020-03-24 05:00:48 UTC +++ electron/lib/browser/api/app.ts @@ -67,7 +67,7 @@ if (process.platform === 'darwin') { - app.dock!.getMenu = () => dockMenu + app.dock!.getMenu = () => dockMenu; } -if (process.platform === 'linux') { +if (process.platform === 'linux' || process.platform === 'freebsd') { - const patternVmRSS = /^VmRSS:\s*(\d+) kB$/m - const patternVmHWM = /^VmHWM:\s*(\d+) kB$/m + const patternVmRSS = /^VmRSS:\s*(\d+) kB$/m; + const patternVmHWM = /^VmHWM:\s*(\d+) kB$/m; Index: head/devel/electron7/files/patch-electron_lib_browser_api_dialog.js =================================================================== --- head/devel/electron7/files/patch-electron_lib_browser_api_dialog.js (revision 531914) +++ head/devel/electron7/files/patch-electron_lib_browser_api_dialog.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/lib/browser/api/dialog.js.orig 2019-12-13 19:48:14 UTC +--- electron/lib/browser/api/dialog.js.orig 2020-03-24 05:00:48 UTC +++ electron/lib/browser/api/dialog.js @@ -28,7 +28,7 @@ const normalizeAccessKey = (text) => { // existing single underscores with a second underscore, replace double // ampersands with a single ampersand, and replace a single ampersand with // a single underscore - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { return text.replace(/_/g, '__').replace(/&(.?)/g, (match, after) => { - if (after === '&') return after - return `_${after}` + if (after === '&') return after; + return `_${after}`; Index: head/devel/electron7/files/patch-electron_lib_browser_api_menu-item-roles.js =================================================================== --- head/devel/electron7/files/patch-electron_lib_browser_api_menu-item-roles.js (revision 531914) +++ head/devel/electron7/files/patch-electron_lib_browser_api_menu-item-roles.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/lib/browser/api/menu-item-roles.js.orig 2019-12-13 19:48:14 UTC +--- electron/lib/browser/api/menu-item-roles.js.orig 2020-03-24 05:00:48 UTC +++ electron/lib/browser/api/menu-item-roles.js -@@ -4,7 +4,7 @@ const { app } = require('electron') +@@ -4,7 +4,7 @@ const { app } = require('electron'); - const isMac = process.platform === 'darwin' - const isWindows = process.platform === 'win32' --const isLinux = process.platform === 'linux' -+const isLinux = (process.platform === 'linux' || process.platform === 'freebsd') + const isMac = process.platform === 'darwin'; + const isWindows = process.platform === 'win32'; +-const isLinux = process.platform === 'linux'; ++const isLinux = (process.platform === 'linux' || process.platform === 'freebsd'); const roles = { about: { Index: head/devel/electron7/files/patch-electron_lib_browser_init.ts =================================================================== --- head/devel/electron7/files/patch-electron_lib_browser_init.ts (revision 531914) +++ head/devel/electron7/files/patch-electron_lib_browser_init.ts (revision 531915) @@ -1,11 +1,11 @@ ---- electron/lib/browser/init.ts.orig 2020-02-20 17:38:02 UTC +--- electron/lib/browser/init.ts.orig 2020-03-24 05:00:48 UTC +++ electron/lib/browser/init.ts @@ -165,7 +165,7 @@ const mainStartupScript = packageJson.main || 'index.j - const KNOWN_XDG_DESKTOP_VALUES = ['Pantheon', 'Unity:Unity7', 'pop:GNOME'] + const KNOWN_XDG_DESKTOP_VALUES = ['Pantheon', 'Unity:Unity7', 'pop:GNOME']; function currentPlatformSupportsAppIndicator () { -- if (process.platform !== 'linux') return false -+ if (process.platform !== 'linux' && process.platform !== 'freebsd') return false - const currentDesktop = process.env.XDG_CURRENT_DESKTOP +- if (process.platform !== 'linux') return false; ++ if (process.platform !== 'linux' && process.platform !== 'freebsd') return false; + const currentDesktop = process.env.XDG_CURRENT_DESKTOP; - if (!currentDesktop) return false + if (!currentDesktop) return false; Index: head/devel/electron7/files/patch-electron_lib_browser_rpc-server.js =================================================================== --- head/devel/electron7/files/patch-electron_lib_browser_rpc-server.js (revision 531914) +++ head/devel/electron7/files/patch-electron_lib_browser_rpc-server.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/lib/browser/rpc-server.js.orig 2019-12-13 19:48:14 UTC +--- electron/lib/browser/rpc-server.js.orig 2020-03-24 05:00:48 UTC +++ electron/lib/browser/rpc-server.js @@ -484,7 +484,7 @@ const allowedClipboardMethods = (() => { switch (process.platform) { case 'darwin': - return new Set(['readFindText', 'writeFindText']) + return new Set(['readFindText', 'writeFindText']); - case 'linux': + case 'linux': case 'freebsd': - return new Set(Object.keys(clipboard)) + return new Set(Object.keys(clipboard)); default: - return new Set() + return new Set(); Index: head/devel/electron7/files/patch-electron_lib_common_api_clipboard.js =================================================================== --- head/devel/electron7/files/patch-electron_lib_common_api_clipboard.js (revision 531914) +++ head/devel/electron7/files/patch-electron_lib_common_api_clipboard.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/lib/common/api/clipboard.js.orig 2019-12-13 19:48:14 UTC +--- electron/lib/common/api/clipboard.js.orig 2020-03-24 05:00:48 UTC +++ electron/lib/common/api/clipboard.js @@ -14,7 +14,7 @@ if (process.type === 'renderer') { - } - } + }; + }; - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // On Linux we could not access clipboard in renderer process. for (const method of Object.keys(clipboard)) { - clipboard[method] = makeRemoteMethod(method) + clipboard[method] = makeRemoteMethod(method); Index: head/devel/electron7/files/patch-electron_script_lib_utils.js =================================================================== --- head/devel/electron7/files/patch-electron_script_lib_utils.js (revision 531914) +++ head/devel/electron7/files/patch-electron_script_lib_utils.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/script/lib/utils.js.orig 2019-12-13 19:48:14 UTC +--- electron/script/lib/utils.js.orig 2020-03-24 05:00:48 UTC +++ electron/script/lib/utils.js @@ -16,7 +16,7 @@ function getElectronExec () { - return `out/${OUT_DIR}/Electron.app/Contents/MacOS/Electron` + return `out/${OUT_DIR}/Electron.app/Contents/MacOS/Electron`; case 'win32': - return `out/${OUT_DIR}/electron.exe` + return `out/${OUT_DIR}/electron.exe`; - case 'linux': + case 'linux': case 'freebsd': - return `out/${OUT_DIR}/electron` + return `out/${OUT_DIR}/electron`; default: - throw new Error('Unknown platform') + throw new Error('Unknown platform'); Index: head/devel/electron7/files/patch-electron_script_spec-runner.js =================================================================== --- head/devel/electron7/files/patch-electron_script_spec-runner.js (revision 531914) +++ head/devel/electron7/files/patch-electron_script_spec-runner.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/script/spec-runner.js.orig 2020-02-20 17:38:02 UTC +--- electron/script/spec-runner.js.orig 2020-03-24 05:00:48 UTC +++ electron/script/spec-runner.js @@ -115,7 +115,7 @@ async function runElectronTests () { async function runRemoteBasedElectronTests () { - let exe = path.resolve(BASE, utils.getElectronExec()) - const runnerArgs = ['electron/spec', ...unknownArgs.slice(2)] + let exe = path.resolve(BASE, utils.getElectronExec()); + const runnerArgs = ['electron/spec', ...unknownArgs.slice(2)]; - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { - runnerArgs.unshift(path.resolve(__dirname, 'dbus_mock.py'), exe) - exe = 'python' + runnerArgs.unshift(path.resolve(__dirname, 'dbus_mock.py'), exe); + exe = 'python'; } Index: head/devel/electron7/files/patch-electron_shell_browser_api_atom__api__web__contents.cc =================================================================== --- head/devel/electron7/files/patch-electron_shell_browser_api_atom__api__web__contents.cc (revision 531914) +++ head/devel/electron7/files/patch-electron_shell_browser_api_atom__api__web__contents.cc (revision 531915) @@ -1,34 +1,34 @@ ---- electron/shell/browser/api/atom_api_web_contents.cc.orig 2020-02-20 17:38:02 UTC +--- electron/shell/browser/api/atom_api_web_contents.cc.orig 2020-04-14 14:59:21 UTC +++ electron/shell/browser/api/atom_api_web_contents.cc -@@ -104,11 +104,11 @@ +@@ -105,11 +105,11 @@ #include "ui/base/cocoa/defaults_utils.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "ui/views/linux_ui/linux_ui.h" #endif -#if defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) #include "third_party/blink/public/mojom/renderer_preferences.mojom.h" #include "ui/gfx/font_render_params.h" #endif -@@ -482,7 +482,7 @@ void WebContents::InitWithSessionAndOptions( +@@ -483,7 +483,7 @@ void WebContents::InitWithSessionAndOptions( auto* prefs = web_contents()->GetMutableRendererPrefs(); prefs->accept_languages = g_browser_process->GetApplicationLocale(); -#if defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) // Update font settings. static const base::NoDestructor params( gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr)); -@@ -499,7 +499,7 @@ void WebContents::InitWithSessionAndOptions( +@@ -500,7 +500,7 @@ void WebContents::InitWithSessionAndOptions( base::TimeDelta interval; if (ui::TextInsertionCaretBlinkPeriod(&interval)) prefs->caret_blink_interval = interval; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) views::LinuxUI* linux_ui = views::LinuxUI::instance(); if (linux_ui) prefs->caret_blink_interval = linux_ui->GetCursorBlinkInterval(); Index: head/devel/electron7/files/patch-electron_spec-main_api-browser-window-spec.ts =================================================================== --- head/devel/electron7/files/patch-electron_spec-main_api-browser-window-spec.ts (revision 531914) +++ head/devel/electron7/files/patch-electron_spec-main_api-browser-window-spec.ts (revision 531915) @@ -1,74 +1,74 @@ ---- electron/spec-main/api-browser-window-spec.ts.orig 2020-02-28 00:07:16 UTC +--- electron/spec-main/api-browser-window-spec.ts.orig 2020-03-24 05:00:48 UTC +++ electron/spec-main/api-browser-window-spec.ts @@ -881,7 +881,7 @@ describe('BrowserWindow module', () => { w.setPosition(pos[0], pos[1]) }) }) - ifdescribe(process.platform !== 'linux')(`Maximized state`, () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')(`Maximized state`, () => { it(`checks normal bounds when maximized`, (done) => { const bounds = w.getBounds() w.once('maximize', () => { @@ -904,7 +904,7 @@ describe('BrowserWindow module', () => { w.maximize() }) }) - ifdescribe(process.platform !== 'linux')(`Minimized state`, () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')(`Minimized state`, () => { it(`checks normal bounds when minimized`, (done) => { const bounds = w.getBounds() w.once('minimize', () => { @@ -1371,7 +1371,7 @@ describe('BrowserWindow module', () => { describe('BrowserWindow.setOpacity(opacity)', () => { afterEach(closeAllWindows) - ifdescribe(process.platform !== 'linux')(('Windows and Mac'), () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')(('Windows and Mac'), () => { it('make window with initial opacity', () => { const w = new BrowserWindow({ show: false, opacity: 0.5 }) expect(w.getOpacity()).to.equal(0.5) @@ -1397,7 +1397,7 @@ describe('BrowserWindow module', () => { }) }) - ifdescribe(process.platform === 'linux')(('Linux'), () => { + ifdescribe(process.platform === 'linux' || process.platform === 'freebsd')(('Linux'), () => { it('sets 1 regardless of parameter', () => { const w = new BrowserWindow({ show: false }) w.setOpacity(0) @@ -2192,7 +2192,7 @@ describe('BrowserWindow module', () => { expect(test.version).to.equal(process.version) expect(test.versions).to.deep.equal(process.versions) - if (process.platform === 'linux' && test.osSandbox) { + if ((process.platform === 'linux' || process.platform === 'freebsd') && test.osSandbox) { expect(test.creationTime).to.be.null('creation time') expect(test.systemMemoryInfo).to.be.null('system memory info') } else { @@ -2595,7 +2595,7 @@ describe('BrowserWindow module', () => { expect(visibilityState).to.equal('visible') }) - ifit(!(isCI && process.platform === 'linux'))('visibilityState changes when window is minimized', async () => { + ifit(!(isCI && (process.platform === 'linux' || process.platform === 'freebsd')))('visibilityState changes when window is minimized', async () => { const w = new BrowserWindow({ width: 100, height: 100, @@ -2695,7 +2695,7 @@ describe('BrowserWindow module', () => { }) }) - ifdescribe(process.platform !== 'linux')('max/minimize events', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('max/minimize events', () => { afterEach(closeAllWindows) it('emits an event when window is maximized', (done) => { const w = new BrowserWindow({show: false}) -@@ -3195,7 +3195,7 @@ describe('BrowserWindow module', () => { +@@ -3235,7 +3235,7 @@ describe('BrowserWindow module', () => { }) }) - ifdescribe(process.platform !== 'linux')('window states (excluding Linux)', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('window states (excluding Linux)', () => { // Not implemented on Linux. afterEach(closeAllWindows) Index: head/devel/electron7/files/patch-electron_spec_api-clipboard-spec.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_api-clipboard-spec.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_api-clipboard-spec.js (revision 531915) @@ -1,38 +1,38 @@ ---- electron/spec/api-clipboard-spec.js.orig 2020-02-28 00:07:16 UTC +--- electron/spec/api-clipboard-spec.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/api-clipboard-spec.js @@ -34,7 +34,7 @@ describe('clipboard module', () => { describe('clipboard.readHTML()', () => { it('returns markup correctly', () => { - const text = 'Hi' -- const markup = process.platform === 'darwin' ? "Hi" : process.platform === 'linux' ? 'Hi' : 'Hi' -+ const markup = process.platform === 'darwin' ? "Hi" : (process.platform === 'linux' || process.platform === 'freebsd') ? 'Hi' : 'Hi' - clipboard.writeHTML(text) - expect(clipboard.readHTML()).to.equal(markup) - }) + const text = 'Hi'; +- const markup = process.platform === 'darwin' ? "Hi" : process.platform === 'linux' ? 'Hi' : 'Hi'; ++ const markup = process.platform === 'darwin' ? "Hi" : (process.platform === 'linux' || process.platform === 'freebsd') ? 'Hi' : 'Hi'; + clipboard.writeHTML(text); + expect(clipboard.readHTML()).to.equal(markup); + }); @@ -50,7 +50,7 @@ describe('clipboard module', () => { describe('clipboard.readBookmark', () => { before(function () { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { - this.skip() + this.skip(); } - }) + }); @@ -76,7 +76,7 @@ describe('clipboard module', () => { - const rtf = '{\\rtf1\\utf8 text}' - const p = path.join(fixtures, 'assets', 'logo.png') - const i = nativeImage.createFromPath(p) -- const markup = process.platform === 'darwin' ? "Hi" : process.platform === 'linux' ? 'Hi' : 'Hi' -+ const markup = process.platform === 'darwin' ? "Hi" : (process.platform === 'linux' || process.platform === 'freebsd') ? 'Hi' : 'Hi' - const bookmark = { title: 'a title', url: 'test' } + const rtf = '{\\rtf1\\utf8 text}'; + const p = path.join(fixtures, 'assets', 'logo.png'); + const i = nativeImage.createFromPath(p); +- const markup = process.platform === 'darwin' ? "Hi" : process.platform === 'linux' ? 'Hi' : 'Hi'; ++ const markup = process.platform === 'darwin' ? "Hi" : (process.platform === 'linux' || process.platform === 'freebsd') ? 'Hi' : 'Hi'; + const bookmark = { title: 'a title', url: 'test' }; clipboard.write({ text: 'test', @@ -91,7 +91,7 @@ describe('clipboard module', () => { - expect(clipboard.readRTF()).to.equal(rtf) - expect(clipboard.readImage().toDataURL()).to.equal(i.toDataURL()) + expect(clipboard.readRTF()).to.equal(rtf); + expect(clipboard.readImage().toDataURL()).to.equal(i.toDataURL()); - if (process.platform !== 'linux') { + if (process.platform !== 'linux' && process.platform !== 'freebsd') { - expect(clipboard.readBookmark()).to.deep.equal(bookmark) + expect(clipboard.readBookmark()).to.deep.equal(bookmark); } - }) + }); Index: head/devel/electron7/files/patch-electron_spec_api-crash-reporter-spec.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_api-crash-reporter-spec.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_api-crash-reporter-spec.js (revision 531915) @@ -1,101 +1,101 @@ ---- electron/spec/api-crash-reporter-spec.js.orig 2019-12-13 19:48:14 UTC +--- electron/spec/api-crash-reporter-spec.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/api-crash-reporter-spec.js @@ -19,7 +19,7 @@ describe('crashReporter module', () => { - if (process.mas || process.env.DISABLE_CRASH_REPORTER_TESTS) return + if (process.mas || process.env.DISABLE_CRASH_REPORTER_TESTS) return; // TODO(alexeykuzmin): [Ch66] Fails. Fix it and enable back. -- if (process.platform === 'linux') return -+ if (process.platform === 'linux' || process.platform === 'freebsd') return +- if (process.platform === 'linux') return; ++ if (process.platform === 'linux' || process.platform === 'freebsd') return; - let originalTempDirectory = null - let tempDirectory = null + let originalTempDirectory = null; + let tempDirectory = null; @@ -90,7 +90,7 @@ describe('crashReporter module', () => { - let dumpFile - let crashesDir = crashReporter.getCrashesDirectory() - const existingDumpFiles = new Set() + let dumpFile; + let crashesDir = crashReporter.getCrashesDirectory(); + const existingDumpFiles = new Set(); - if (process.platform !== 'linux') { + if (process.platform !== 'linux' && process.platform !== 'freebsd') { // crashpad puts the dump files in the "completed" subdirectory if (process.platform === 'darwin') { - crashesDir = path.join(crashesDir, 'completed') + crashesDir = path.join(crashesDir, 'completed'); @@ -101,7 +101,7 @@ describe('crashReporter module', () => { } const testDone = (uploaded) => { - if (uploaded) return done(new Error('Uploaded crash report')) -- if (process.platform !== 'linux') crashReporter.setUploadToServer(true) -+ if (process.platform !== 'linux' && process.platform !== 'freebsd') crashReporter.setUploadToServer(true) - expect(fs.existsSync(dumpFile)).to.be.true() - done() - } + if (uploaded) return done(new Error('Uploaded crash report')); +- if (process.platform !== 'linux') crashReporter.setUploadToServer(true); ++ if (process.platform !== 'linux' && process.platform !== 'freebsd') crashReporter.setUploadToServer(true); + expect(fs.existsSync(dumpFile)).to.be.true(); + done(); + }; @@ -151,7 +151,7 @@ describe('crashReporter module', () => { - }) + }); it('should send minidump with updated extra parameters when node processes crash', function (done) { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // FIXME(alexeykuzmin): Skip the test. // this.skip() - return + return; @@ -305,7 +305,7 @@ describe('crashReporter module', () => { - expect(() => require('electron').crashReporter.getUploadToServer()).to.throw() - }) + expect(() => require('electron').crashReporter.getUploadToServer()).to.throw(); + }); it('returns true when uploadToServer is set to true', function () { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // FIXME(alexeykuzmin): Skip the test. // this.skip() - return + return; @@ -319,7 +319,7 @@ describe('crashReporter module', () => { - expect(crashReporter.getUploadToServer()).to.be.true() - }) + expect(crashReporter.getUploadToServer()).to.be.true(); + }); it('returns false when uploadToServer is set to false', function () { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // FIXME(alexeykuzmin): Skip the test. // this.skip() - return + return; @@ -340,7 +340,7 @@ describe('crashReporter module', () => { - expect(() => require('electron').crashReporter.setUploadToServer('arg')).to.throw() - }) + expect(() => require('electron').crashReporter.setUploadToServer('arg')).to.throw(); + }); it('sets uploadToServer false when called with false', function () { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // FIXME(alexeykuzmin): Skip the test. // this.skip() - return + return; @@ -355,7 +355,7 @@ describe('crashReporter module', () => { - expect(crashReporter.getUploadToServer()).to.be.false() - }) + expect(crashReporter.getUploadToServer()).to.be.false(); + }); it('sets uploadToServer true when called with true', function () { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // FIXME(alexeykuzmin): Skip the test. // this.skip() - return + return; @@ -382,7 +382,7 @@ describe('crashReporter module', () => { - expect(parameters).to.be.an('object') - }) + expect(parameters).to.be.an('object'); + }); it('adds a parameter to current parameters', function () { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // FIXME(alexeykuzmin): Skip the test. // this.skip() - return + return; @@ -397,7 +397,7 @@ describe('crashReporter module', () => { - expect(crashReporter.getParameters()).to.have.a.property('hello') - }) + expect(crashReporter.getParameters()).to.have.a.property('hello'); + }); it('removes a parameter from current parameters', function () { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // FIXME(alexeykuzmin): Skip the test. // this.skip() - return + return; @@ -490,7 +490,7 @@ const startServer = ({ callback, processType, done, pr server.listen(port, '127.0.0.1', () => { - port = server.address().port - remote.process.port = port + port = server.address().port; + remote.process.port = port; - if (process.platform !== 'linux') { + if (process.platform !== 'linux' && process.platform !== 'freebsd') { crashReporter.start({ companyName: 'Umbrella Corporation', submitURL: 'http://127.0.0.1:' + port Index: head/devel/electron7/files/patch-electron_spec_api-notification-dbus-spec.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_api-notification-dbus-spec.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_api-notification-dbus-spec.js (revision 531915) @@ -1,10 +1,10 @@ ---- electron/spec/api-notification-dbus-spec.js.orig 2019-12-13 19:48:14 UTC +--- electron/spec/api-notification-dbus-spec.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/api-notification-dbus-spec.js -@@ -14,6 +14,7 @@ const { remote } = require('electron') - const { app } = remote +@@ -14,6 +14,7 @@ const { remote } = require('electron'); + const { app } = remote; const skip = process.platform !== 'linux' || + process.platform !== 'freebsd' || process.arch === 'ia32' || process.arch.indexOf('arm') === 0 || !process.env.DBUS_SESSION_BUS_ADDRESS; Index: head/devel/electron7/files/patch-electron_spec_api-power-monitor-spec.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_api-power-monitor-spec.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_api-power-monitor-spec.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/spec/api-power-monitor-spec.js.orig 2019-12-13 19:48:14 UTC +--- electron/spec/api-power-monitor-spec.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/api-power-monitor-spec.js -@@ -14,7 +14,7 @@ const Promise = require('bluebird') - const { expect } = chai - chai.use(dirtyChai) +@@ -14,7 +14,7 @@ const Promise = require('bluebird'); + const { expect } = chai; + chai.use(dirtyChai); --const skip = process.platform !== 'linux' || !process.env.DBUS_SYSTEM_BUS_ADDRESS -+const skip = (process.platform !== 'linux' && process.platform !== 'freebsd') || !process.env.DBUS_SYSTEM_BUS_ADDRESS +-const skip = process.platform !== 'linux' || !process.env.DBUS_SYSTEM_BUS_ADDRESS; ++const skip = (process.platform !== 'linux' && process.platform !== 'freebsd') || !process.env.DBUS_SYSTEM_BUS_ADDRESS; describe('powerMonitor', () => { - let logindMock, dbusMockPowerMonitor, getCalls, emitSignal, reset + let logindMock, dbusMockPowerMonitor, getCalls, emitSignal, reset; Index: head/devel/electron7/files/patch-electron_spec_api-process-spec.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_api-process-spec.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_api-process-spec.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/spec/api-process-spec.js.orig 2019-12-13 19:48:14 UTC +--- electron/spec/api-process-spec.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/api-process-spec.js @@ -50,7 +50,7 @@ describe('process module', () => { it('resolves promise successfully with valid data', async () => { - const memoryInfo = await process.getProcessMemoryInfo() - expect(memoryInfo).to.be.an('object') + const memoryInfo = await process.getProcessMemoryInfo(); + expect(memoryInfo).to.be.an('object'); - if (process.platform === 'linux' || process.platform === 'windows') { + if (process.platform === 'linux' || process.platform === 'freebsd' || process.platform === 'windows') { - expect(memoryInfo.residentSet).to.be.a('number').greaterThan(0) + expect(memoryInfo.residentSet).to.be.a('number').greaterThan(0); } - expect(memoryInfo.private).to.be.a('number').greaterThan(0) + expect(memoryInfo.private).to.be.a('number').greaterThan(0); Index: head/devel/electron7/files/patch-electron_spec_api-shell-spec.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_api-shell-spec.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_api-shell-spec.js (revision 531915) @@ -1,23 +1,23 @@ ---- electron/spec/api-shell-spec.js.orig 2019-12-13 19:48:14 UTC +--- electron/spec/api-shell-spec.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/api-shell-spec.js @@ -42,7 +42,7 @@ describe('shell module', () => { - await closeWindow(w) - w = null + await closeWindow(w); + w = null; // reset env vars to prevent side effects - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { - process.env.DE = envVars.de - process.env.BROWSER = envVars.browser - process.env.DISPLAY = envVars.display + process.env.DE = envVars.de; + process.env.BROWSER = envVars.browser; + process.env.DISPLAY = envVars.display; @@ -54,6 +54,11 @@ describe('shell module', () => { - let requestReceived + let requestReceived; if (process.platform === 'linux') { - process.env.BROWSER = '/bin/true' -+ process.env.DE = 'generic' -+ process.env.DISPLAY = '' -+ requestReceived = Promise.resolve() + process.env.BROWSER = '/bin/true'; ++ process.env.DE = 'generic'; ++ process.env.DISPLAY = ''; ++ requestReceived = Promise.resolve(); + } else if (process.platform === 'freebsd') { -+ process.env.BROWSER = '/usr/bin/true' - process.env.DE = 'generic' - process.env.DISPLAY = '' - requestReceived = Promise.resolve() ++ process.env.BROWSER = '/usr/bin/true'; + process.env.DE = 'generic'; + process.env.DISPLAY = ''; + requestReceived = Promise.resolve(); Index: head/devel/electron7/files/patch-electron_spec_api-subframe-spec.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_api-subframe-spec.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_api-subframe-spec.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/spec/api-subframe-spec.js.orig 2019-12-13 19:48:14 UTC +--- electron/spec/api-subframe-spec.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/api-subframe-spec.js @@ -188,7 +188,7 @@ describe('cross-site frame sandboxing', () => { - let server = null + let server = null; beforeEach(function () { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { - this.skip() + this.skip(); } - }) + }); Index: head/devel/electron7/files/patch-electron_spec_chromium-spec.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_chromium-spec.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_chromium-spec.js (revision 531915) @@ -1,27 +1,27 @@ ---- electron/spec/chromium-spec.js.orig 2019-12-13 19:48:14 UTC +--- electron/spec/chromium-spec.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/chromium-spec.js @@ -831,7 +831,7 @@ describe('chromium feature', () => { - }) + }); it('can be get as context in canvas', () => { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { // FIXME(alexeykuzmin): Skip the test. // this.skip() - return + return; @@ -1416,12 +1416,13 @@ describe('font fallback', () => { expect(fonts[0].familyName).to.equal({ 'win32': 'Arial', 'darwin': 'Helvetica', - 'linux': 'DejaVu Sans' // I think this depends on the distro? We don't specify a default. + 'linux': 'DejaVu Sans', // I think this depends on the distro? We don't specify a default. + 'freebsd': 'DejaVu Sans' - }[process.platform]) - }) + }[process.platform]); + }); it('should fall back to Japanese font for sans-serif Japanese script', async function () { - if (process.platform === 'linux') { + if (process.platform === 'linux' || process.platform === 'freebsd') { - return this.skip() + return this.skip(); } const html = ` Index: head/devel/electron7/files/patch-electron_spec_fixtures_module_crash.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_fixtures_module_crash.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_fixtures_module_crash.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/spec/fixtures/module/crash.js.orig 2019-12-13 19:48:14 UTC +--- electron/spec/fixtures/module/crash.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/fixtures/module/crash.js @@ -10,7 +10,7 @@ process.crashReporter.start({ } - }) + }); -if (process.platform !== 'linux') { +if (process.platform !== 'linux' && process.platform !== 'freebsd') { - process.crashReporter.addExtraParameter('newExtra', 'newExtra') - process.crashReporter.addExtraParameter('removeExtra', 'removeExtra') - process.crashReporter.removeExtraParameter('removeExtra') + process.crashReporter.addExtraParameter('newExtra', 'newExtra'); + process.crashReporter.addExtraParameter('removeExtra', 'removeExtra'); + process.crashReporter.removeExtraParameter('removeExtra'); Index: head/devel/electron7/files/patch-electron_spec_node-spec.js =================================================================== --- head/devel/electron7/files/patch-electron_spec_node-spec.js (revision 531914) +++ head/devel/electron7/files/patch-electron_spec_node-spec.js (revision 531915) @@ -1,11 +1,11 @@ ---- electron/spec/node-spec.js.orig 2020-02-10 19:08:32 UTC +--- electron/spec/node-spec.js.orig 2020-03-24 05:00:48 UTC +++ electron/spec/node-spec.js @@ -193,7 +193,7 @@ describe('node feature', () => { - }) + }); describe('child_process.exec', () => { - (process.platform === 'linux' ? it : it.skip)('allows executing a setuid binary from non-sandboxed renderer', () => { + (process.platform === 'linux' || process.platform === 'freebsd' ? it : it.skip)('allows executing a setuid binary from non-sandboxed renderer', () => { // Chrome uses prctl(2) to set the NO_NEW_PRIVILEGES flag on Linux (see // https://github.com/torvalds/linux/blob/40fde647cc/Documentation/userspace-api/no_new_privs.rst). // We disable this for unsandboxed processes, which the remote tests