Commit Graph

222 Commits

Author SHA1 Message Date
Ronan Jouchet e5ba8c779f Bump default Electron to 9.0.4, bump deps (jest, electron-context-menu) 2020-06-13 10:23:15 -04:00
Luke Hamburg 6b81324531
--help: fix typo, clarify --icon helptext (PR #976)
- correct small typo (`he`→`the`)
- clarify that `--icon` accepts .icns on macOS
2020-06-13 10:05:43 -04:00
Alexander Weps 1d3bed5f09
Fix: notifications (fix #88, fix #956), processEnvs, using as git (#955)
1. Fix (broken since 2016): Notifications broken by lambda constructor
2. Fix: `--processEnvs` broken by additional processEnvs object, the result was:
`processEnvs: {processEnvs: {...}}` which caused the conversion of the inner object into string `[object Object]`, no nesting allowed there probably. Compatibility introduced.
3. Fix: package.json missing `prepare` (or even prepublish), which breaks using as git dependency.
2020-04-27 11:52:21 -04:00
Ronan Jouchet eef320a150 Bump default Electron to 8.2.3, and bump app/electron-context-menu to 1.x 2020-04-22 22:09:13 -04:00
Ronan Jouchet fafaead442 Bump default Electron to 8.2.1 2020-04-06 22:01:32 -04:00
Ronan Jouchet 0c2510f31e Bump default Electron to 8.2.0 and Prettier 2020-03-24 20:27:25 -04:00
Ronan Jouchet 86cf42844f Log a helpful error when failing to parse JSON arg (fix #928) 2020-03-20 21:03:37 -04:00
Ronan Jouchet d6e7aa6f41 Fix inferTitle test broken on Node 8 2020-03-15 17:19:19 -04:00
Ronan Jouchet c9ee6667d4
Revamp and move to TypeScript (#898)
## Breaking changes

- Require **Node >= 8.10.0 and npm 5.6.0**
- Move to **Electron 8.1.1**.
- That's it. Lots of care went into breaking CLI & programmatic behavior
  as little as possible. **Please report regressions**.
- Known issue: build may fail behind a proxy. Get in touch if you use one:
  https://github.com/jiahaog/nativefier/issues/907#issuecomment-596144768

## Changes summary

Nativefier didn't get much love recently, to the point that it's
becoming hard to run on recent Node, due to old dependencies.
Also, some past practices now seem weird, as better expressible
by modern JS/TS, discouraging contributions including mine.

Addressing this, and one thing leading to another, came a
bigger-than-expected revamp, aiming at making Nativefier more
**lean, stable, future-proof, user-friendly and dev-friendly**,
while **not changing the CLI/programmatic interfaces**. Highlights:

- **Require Node>=8**, as imposed by many of our dependencies. Node 8
  is twice LTS, and easily available even in conservative Linux distros.
  No reason not to demand it.
- **Default to Electron 8**.
- **Bump** all dependencies to latest version, including electron-packager.
- **Move to TS**. TS is great. As of today, I see no reason not to use it,
  and fight interface bugs at runtime rather than at compile time.
  With that, get rid of everything Babel/Webpack.
- **Move away from Gulp**. Gulp's selling point is perf via streaming,
  but for small builds like Nativefier, npm tasks are plenty good
  and less dependency bloat. Gulp was the driver for this PR: broken
  on Node 12, and I didn't feel like just upgrading and keeping it.
- Add tons of **verbose logs** everywhere it makes sense, to have a
  fine & clear trace of the program flow. This will be helpful to
  debug user-reported issues, and already helped me fix a few bugs.
    - With better simple logging, get rid of the quirky and buggy
      progress bar based on package `progress`. Nice logging (minimal
      by default, the verbose logging mentioned above is only used
      when passing `--verbose`) is better and one less dependency.
- **Dump `async` package**, a relic from old callback-hell early Node.
  Also dump a few other micro-packages unnecessary now.
- A first pass of code **cleanup** thanks to modern JS/TS features:
  fixes, simplifications, jsdoc type annotations to types, etc.
- **Remove GitHub integrations Hound & CodeClimate**, which are more
  exotic than good'ol'linters, and whose signal-to-noise ratio is too low.
- Quality: **Add tests** and add **Windows + macOS CI builds**.
  Also, add a **manual test script**, helping to quickly verify the
  hard-to-programatically-test stuff before releases, and limit regressions.
- **Fix a very small number of existing bugs**. The goal of this PR was
  *not* to fix bugs, but to get Nativefier in better shape to do so.
  Bugfixes will come later. Still, these got addressed:
  - Add common `Alt`+`Left`/`Right` for previous/next navigation.
  - Improve #379: fix zoom with `Ctrl` + numpad `+`/`-`
  - Fix pinch-to-zoom (see https://github.com/jiahaog/nativefier/issues/379#issuecomment-598612128 )
2020-03-15 16:50:01 -04:00
Ronan Jouchet 97f092b77b Bump default Electron to 5.0.13 2020-01-23 19:57:18 -05:00
Siddharth Srinivasan 010f88aa1b Fix weirdly platform-dependent folder naming logic (PR #850, fix #708) 2020-01-15 09:09:37 -05:00
otato.z ef13ff1e1d feat: proxy rules with `--proxy-rules` flag (#854)
See https://electronjs.org/docs/api/session?q=proxy#sessetproxyconfig-callback
2019-10-22 19:38:39 -04:00
FabulousCupcake d0a0614ba3 Add --browserwindow-options to completely expose Electron options (PR #835)
This adds a new flag `--browserwindow-options`, taking a stringified JSON object as input.  
It will be inserted directly into the options when BrowserConfig is initialized.

This allows total configurability of the electron BrowserWindow configuration via nativefier.

An example use case is added to the documentation, which modifies the default font family in the browser.

#### References

- https://github.com/electron/electron/blob/master/docs/api/browser-window.md#new-browserwindowoptions
  - See the following for electron v3.1.7
  - https://github.com/electron/electron/blob/v3.1.7/docs/api/browser-window.md#new-browserwindowoptions
2019-08-22 21:37:49 +02:00
Umair Ahmed 81c422d4e0 Support setting background color (fixes #795) (PR #819)
Adds a `--background-color` flag for the background of the window when the app isn't loaded.
2019-08-22 21:25:58 +02:00
Nate Woolls 5433569921 Support macOS 10.4+ Dark Mode, default to Electron 5.x (#796)
Introduces a `--darwin-dark-mode-support` flag. 
(I kept the same flag used by Electron Packager.)
This required bumping Electron and Electron Packager.

Addresses:

- https://github.com/jiahaog/nativefier/issues/733
- https://github.com/jiahaog/nativefier/issues/727
2019-08-22 21:05:39 +02:00
Ronan Jouchet 5cdfe96cbe Bump default electron to 3.1.7 2019-03-25 11:19:33 -04:00
Ronan Jouchet 726f44d266 Bump default Electron to 3.1.3 2019-02-09 21:46:15 -05:00
Adrian DC 5b6cc89f22 Fix #316: Add --clear-cache flag to cleanup session on start/exit ("incognito" mode) (PR #747)
- Add a new `clearCache` option and `--clear-cache` parameter
  to trigger session cleanups upon window launch and close

- Covers the feature request from issue #316 

- Use case example: Forcing authentification / login between sessions without limiting cache size
2019-02-08 10:03:29 -05:00
Dword 3588f8a85f Icon conversion: don't crash if source/destination paths have spaces (PR #736) 2019-01-09 10:08:17 -05:00
Ronan Jouchet d6b4b23f0a Bump default Electron to 3.0.13 2019-01-01 23:42:50 -05:00
Felix Eckhofer 8600c78d1a Add --start-in-tray CLI flag to let app start in background (PR #564, Fixes #522) 2018-12-01 14:04:55 -05:00
Ronan Jouchet cb7e17b8e3 Bump default Electron to 3.0.10 2018-11-30 23:42:28 -05:00
Benedikt Rötsch 3029cba01f Support global shortcuts that trigger input events (PR #698, Fixes #15)
This adds a new flag, allowing the user to define global shortcuts that trigger input events within the main window.

That way, I could easily wrap SoundCloud and Deezer to create a native app which reacts on my keyboard media buttons.
2018-11-04 21:03:52 -05:00
Hugo Locurcio 35c66b02b5 Update documentation URLs in the CLI help message (#683)
This updates URLs in the command-line help to avoid redirects.
2018-10-26 21:45:19 -04:00
Ronan Jouchet 0f88a761de Bump default electron to 3.0.3, deps (eslint-plugin-prettier) 2018-10-06 22:13:47 -04:00
Ronan Jouchet e228f0cff8 Bump default Electron to 2.0.8, upgrade dep 2018-08-22 16:01:45 -04:00
Ronan Jouchet 7aae5084d1 Bump default electron to 2.0.7 2018-08-08 19:55:32 -04:00
Ronan Jouchet d99c7bec1f Bump electron to 2.0.6 2018-07-31 21:17:59 -04:00
Ronan Jouchet 0c9ef088a5 Fix broken --version 2018-07-31 20:29:26 -04:00
Ronan Jouchet 19561e9ad6 Make eslint happy 2018-07-21 09:16:02 -04:00
Ronan Jouchet bbef14ccc6 Bump default Electron to 2.0.5, upgrade deps 2018-07-21 08:58:53 -04:00
Ronan Jouchet 1b66fcd8c8 Bump default Electron to 2.0.4 2018-07-10 15:54:26 -04:00
Goh Jia Hao 0b47999c3e Fix lint error 2018-06-10 11:07:06 -07:00
Goh Jia Hao bd89f90a3d Remove workaround for slashes in page title
This was reported in #22 and has been fixed upstream in electron-userland/electron-packager#308
2018-06-10 11:00:22 -07:00
Goh Jia Hao 49272d1a89 Add test for inferTitle 2018-06-10 11:00:16 -07:00
Kevin Schaich 04e2f64ba7 Add Unix/Mac-conventional `-v` version flag (PR#628)
Most Unix-based command line utilities respond to a _lowercase_ `-v` flag which outputs the current version. Adding that as an alias here in addition to the already present `--version` and `-V` flags :)
2018-05-31 18:15:24 -04:00
Khai Nguyen b8c1d35ba4 Add --title-bar-style flag (macOS only) (PR#627) 2018-05-31 08:05:12 -04:00
David Kramer fe6fd9d2a1 Fix `prettier` lint error (#625) 2018-05-27 17:18:33 -04:00
Goh Jia Hao 16aae0a937 Refactor tests to use async/await 2018-05-24 22:46:49 -07:00
Goh Jia Hao f0da2407f7 Separate e2e tests 2018-05-24 00:12:22 -07:00
Goh Jia Hao 95fc46d38d Integrate prettier 2018-05-24 00:02:44 -07:00
Goh Jia Hao 949dcfadd8 Migrate Mocha tests to Jest 2018-05-23 23:44:03 -07:00
Ronan Jouchet 99ee5161a1 Bump default Electron to 2.0.2 2018-05-22 16:39:44 -04:00
Ronan Jouchet fe48684ee2 Bump default Electron to 2.0.1 and deps:validator 2018-05-16 15:32:27 -04:00
Ronan Jouchet 039ad50fa6 eslint 2018-05-11 16:58:36 -04:00
Ronan Jouchet 6a8114e505 Fix deprecations: electron-packager cb->promise, mocha compilers->require 2018-05-11 16:55:50 -04:00
David Kramer be25eab45d Fix #547 - Default to Electron 2.0.0 and review deprecations (PR #587) 2018-05-01 19:29:03 -04:00
Ronan Jouchet e62b45b697 Default to electron 1.8.6, dep bump electron-packager 2018-05-01 18:56:23 -04:00
David Kramer 92bc44a712 Fix #94, #575: Fix run-time crash due to insufficient permissions (PR #581) 2018-04-22 16:55:46 -04:00
David Kramer 2d09455c17 Fix #574 - Allow build to continue if icon conversion fails (PR#585)
By unsetting `options.icon` if input cannot be converted.
2018-04-22 15:57:58 -04:00