Skip to content

shinyelectron 0.3.0

Latest

Choose a tag to compare

@coatless coatless released this 03 Dec 04:31
a2f57da

Release post: shinyelectron v0.3.0 Released - Package Source Checks and Local Update Testing

Breaking changes

  • shinyelectron now requires R 4.5.0 or newer, though system apps still run with R 4.4.0 or newer on users' machines (#22, #26).
  • Installer file names now come from the app slug and always include the architecture, as in my-app-1.0.0-arm64.dmg, my-app-Setup-1.0.0-x64.exe, and my-app-1.0.0-x86_64.AppImage. Update release scripts that look for the old names (#33).
  • The installed app now takes its name from app_name, or from app.name when app_name is not given, instead of from the slug. Existing installs still update, but on macOS delete the old <slug>.app by hand (#33).
  • export() now builds for build.platforms and build.architectures, which were ignored before, for single apps and suites alike. The platform and arch arguments each override their own list. Remove platforms from a bundled configuration copied from the guides, and the platforms: mac that earlier versions of wizard() wrote on Windows or Linux (#46).
  • export() now stops early when a target is mac on a machine that is not a Mac, when a target platform or architecture is invalid, or when a bundled or auto-download build has more than one target. app_check() reports the same problems (#46).
  • The logging section now takes effect, and wins with a shinyelectron_logging_conflict warning when app.log_dir or app.log_level sets a different value. Remove any log_dir: "/var/log/my-app" copied from an older Configuration Guide, since the app usually cannot write there (#27).
  • Node.js 22.12.0 or newer is required to build. export() and run_electron_app() now stop with a message on an older Node.js (#52, #58).
  • Links to other sites now open in the user's default browser instead of replacing the app in its window (#53).
  • Links to schemes other than http, https and mailto are now blocked, so tel: and custom app links no longer reach the operating system (#53).
  • End users of a macOS app now need macOS 13 or newer, since Electron 44 (#52).
  • Launching an app that is already running now focuses its window instead of starting a second copy (#54).
  • The default R is no longer a fixed version. Exports now use the newest portable R unless dependencies.r.version is set, and fall back to the built-in version when offline (#62).

New features

  • New app.description, app.author, app.homepage, and app.copyright settings fill the installer metadata and Help > About. app.homepage must start with http:// or https://, and a $ in the app name, description, author, or copyright stops a Windows build (#33).
  • Help > About offers Check for Updates on Windows and Linux when auto-updates are on (#33).
  • New installer.allow_to_change_installation_directory lets Windows users choose the installation folder. It needs installer.one_click: false, or the build stops (#30).
  • New installer.per_machine installs the Windows app for all users, which needs administrator rights (#30).
  • New dependencies.r.local_packages installs R packages from source directories or .tar.gz files into a bundled build, and stops the build if one fails to load (#32).
  • New dependencies.r.prune, on by default, leaves package test suites and R's own tests, manuals, and news files out of bundled R builds (#31).
  • New lifecycle.startup_timeout sets how many milliseconds an app waits for its server to start. The default is three minutes, up from one minute for R and Python apps and two for containers (#29).
  • Help > Resource Usage opens a window with the app's uptime and the CPU and memory used by its window and by its R or Python server or container (#63).
  • run_electron_app() gains update_version, which runs the app against a local update feed offering that version, so the update check can be tried without publishing a release (#64).
  • enable_auto_updates() now accepts provider = "generic" with a url, so an app can update from any static HTTP server. An http:// address warns unless it is localhost or 127.0.0.1 (#64).

Minor improvements and fixes

  • export() and app_check() now warn when the Electron version an app will use is out of support, which means more than two major versions behind the newest. The check is skipped when the registry cannot be reached (#57).
  • Packaged apps can no longer be run as Node.js with ELECTRON_RUN_AS_NODE, take options from NODE_OPTIONS, or accept a debugger with --inspect (#56).
  • The control actions of the startup and launcher pages are now accepted only from those pages, not from the app (#53).
  • Browser permissions such as camera, microphone and location are now granted only while the window shows the app (#53).
  • A crashed app window now shows an error screen instead of staying blank, and Retry brings the app back without restarting a server that still answers (#55).
  • An unexpected error in the app shell now stops the app's process or container before the shell exits, instead of leaving it running (#55).
  • Apps now build with Electron 45.5.0, electron-builder 26.18.0, electron-updater 6.8.11, and electron-log 5.4.4, and bundle R 4.6.2 and Python 3.14.10 (#52).
  • dependencies.python.version: "latest" now gives the newest Python in the release (#52).
  • The update notice logs a warning when the system cannot show it, which on macOS happens when the app is not signed (#52).
  • read_config() and build_electron_app() now stop when updates are enabled with provider: s3, which is not supported yet, instead of failing later in the build (#64).
  • export() now stops early, and app_check() fails, when an R app uses a package that is not on dependencies.r.repos, such as one installed from GitHub. Add the package's repository, such as an r-universe, to dependencies.r.repos, or for a bundled build list the package under dependencies.r.local_packages. shinylive apps are not checked, and a repository that cannot be reached warns about the packages it left unchecked (#49).
  • container images now install R packages from the non-CRAN repositories in dependencies.r.repos, such as an r-universe, as well as from CRAN (#49).
  • Bundled R builds now install packages with the portable R's own startup files. R_ENVIRON and R_PROFILE, which could make binary packages crash on macOS, are ignored, as is a project .Rprofile or .Renviron such as renv's. ~/.Rprofile and ~/.Renviron still apply (#35).
  • Python apps now install the versions their requirements give, with their environment markers, so pandas==2.2.3 no longer installs the newest pandas. At launch, system and auto-download apps keep a package that is already installed at its version (#49).
  • requirements.txt files from pip-compile or uv export --no-emit-project are now read, with their hashes dropped. uv.lock is not read, so convert it with uv export --no-hashes --no-dev --no-emit-project -o requirements.txt (#49).
  • export() now stops, and app_check() fails, when a Python requirement, an -e line, or a [tool.uv.sources] entry takes a package from a URL, a git repository, a path, or a uv workspace. Before, the app installed the PyPI package of the same name, or nothing. shinylive apps are not checked, nor is an app that sets dependencies.auto_detect to false (#49).
  • export() now stops when the apps of a bundled Python suite pin one package to different versions, since they share one Python library (#49).
  • export() now warns that it does not read pip options in requirements.txt or [tool.uv.sources] entries that point at a uv index (#49).
  • dependencies.python.index_urls now uses every URL, the first as the main index and the rest as extra ones, and container images use it instead of PyPI (#49).
  • pyproject.toml dependencies after an entry with extras, such as "uvicorn[standard]>=0.30", are no longer dropped, and single-quoted entries are now read (#41).
  • Versions in parentheses, such as "shiny (>=1.0)" as Poetry 2 writes them, are now read in pyproject.toml and requirements.txt. Before, none of the app's Python packages were installed (#41).
  • Only the dependencies of the [project] table in pyproject.toml are now read, and an empty list gives a warning (#41).
  • Unknown keys in _shinyelectron.yml, such as window.widht, now give a shinyelectron_unknown_config_key warning. nodejs.auto_install, which has no effect yet, is one of them, and init_config() no longer suggests it (#27).
  • installer.one_click, installer.allow_to_change_installation_directory, installer.per_machine, and dependencies.r.prune now take only true or false. A quoted "true", "false", "yes", or "no" is read with a warning, and anything else stops the build (#30, #31).
  • read_config() now stops when any other true/false setting, such as updates.enabled, holds anything else. Before, a quoted "yes" could turn on only part of a feature, and a quoted "false" could turn one on (#66).
  • lifecycle.startup_timeout and lifecycle.shutdown_timeout now fall back to the default with a warning unless they are whole numbers from 1000 to 2147483647 (#29).
  • Paths in _shinyelectron.yml now resolve against the app directory, or the suite root, instead of the working directory. A suite's launcher now shows each app's icon (#38).
  • A missing app icon now stops export() and fails app_check(), and other missing files, such as splash.image, give a warning (#38).
  • export() now shows the app's slug and stops early when app.slug is invalid or no slug can be made. When app_name has no ASCII letters or digits, the slug comes from the directory name. show_config() no longer fails on a non-ASCII app.name (#33).
  • init_config() and wizard() now write app.slug, and init_config() warns when the file it replaces gave a different slug (#33).
  • wizard() now asks for a single platform for bundled and auto-download apps, and writes build.platforms only when you name platforms (#46).
  • export(), build_electron_app(), init_config(), and show_config() now use the directory's name for the app when the app directory is "." or "..". When it is a symbolic link, app_check(), init_config(), and wizard() take the slug from the link's name, as export() does (#45).
  • The app icon now reaches every platform that can use it, where before a PNG icon reached only Linux. A platform gets the default icon and a warning when the icon is an .ico (outside Windows) or is under 512x512 pixels for macOS or 256x256 for Windows. A tray.icon named icon.png no longer replaces a PNG app icon (#47).
  • export() and app_check() now warn about unused icons entries. A single export uses its first target's entry for every platform, so export each platform separately to give it its own icon (#47).
  • The system tray now falls back to the app icon, then to a built-in icon, instead of showing a blank icon. export() gives a shinyelectron_tray_icon_unsupported warning when a target platform cannot read the tray icon. Set tray.icon to a PNG to avoid it (#42).
  • installer.license_file now shows as the Windows installer's license page instead of failing every build, and app_check() reports a missing one (#30).
  • app_check() now fails on the configuration errors that stop export() instead of listing them as warnings (#30).
  • signing.win.certificate_file no longer makes signed builds fail on every platform with electron-builder 26 (#37).
  • The Windows signing checks now follow electron-builder's lookup order, so setting only the WIN_CSC_* variables no longer gives a warning, and setting one to an empty value does (#37).
  • signing.mac.team_id is now passed to electron-builder, so notarizing with an Apple ID works when the team ID is set only in _shinyelectron.yml. An APPLE_TEAM_ID that is already set still takes precedence (#44).
  • export(sign = TRUE) and app_check(sign = TRUE) now check credentials even when signing.sign is off, and accept an App Store Connect API key or APPLE_KEYCHAIN_PROFILE (#44).
  • R and Python apps with a slow UI no longer fail to start, and an app that crashes or exits while starting shows its error at once (#29).
  • An app that does not start in time now stops only its own process or container, and going back to the launcher cancels a start in progress (#29).
  • Restarting to install an update now waits for the app's process or container to exit, and a dialog asks the user to restart the app if the install fails. Esc in the Update Ready dialog now means Later (#29).
  • Restart in the update notice no longer freezes a Windows app that runs R or Python on the user's machine (#68).
  • With updates.auto_download on, the update notification now says the update is downloading (#33).
  • Settings with quotes or backslashes, such as "Children's Dashboard", no longer break the generated app, and dialogs and the tray tooltip show & instead of &amp; (#28).
  • A suite's launcher no longer breaks when an app name or description contains <!-- followed by <script> (#28).
  • Closing a suite from its launcher no longer asks to confirm after an app has been opened and left (#66).
  • Help > Documentation now appears only when menu.help_url is set, and opens URLs with query strings correctly (#28).
  • shinyelectron now imports rlang, so its errors and warnings no longer turn into "there is no package called 'rlang'" (#26).
  • sitrep_shinyelectron() and the other sitrep_*() functions no longer report Node.js, npm, or Python as missing when withr is not installed (#34).
  • The Security Considerations guide gains a section on secrets and per-user credentials (#36).
  • Diagrams in the installed vignettes no longer show as broken images in dark mode, and the vignettes gain an Auto, Light, and Dark theme switch. The dark GitHub Actions and multi-app suite diagrams now show their labels (#50).