2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-06-01 12:20:48 +00:00
Commit Graph

1271 Commits

Author SHA1 Message Date
Ronan Jouchet
0d78978d9e Update changelog for v45.0.1 2021-09-20 11:45:36 -04:00
Ronan Jouchet
e222e99b56 Bump default Electron to 13.4.0 2021-09-20 11:38:15 -04:00
Ronan Jouchet
7ab2c14f4f Deps bumps: @types/jest, eslint-plugin-prettier 2021-09-20 11:32:47 -04:00
Ronan Jouchet
0fbe7d39cb Build: re-introduce a package-lock.json file
They were used a long time ago, then I scrapped them for simplicity to
new contributors. I'm re-considering this and re-introducing one, for
two (maybe three) reasons:

1. Reading on supply chain attacks
2. Build broken because of a dep change (see previous commit broken
   because of a change in yargs @ 17.1.0)
(3.) Performance
2021-09-20 11:25:43 -04:00
Ronan Jouchet
fcc3906f52 build:watch script: make it watch project folders 2021-09-20 10:32:32 -04:00
Ronan Jouchet
1a54d286d8 Internal login pages: add (id|auth).atlassian.com (fix #1265) 2021-07-28 23:22:02 -04:00
Ronan Jouchet
33f293120d API.md: document need to use CSS "!important" keyword (fix #1264) 2021-07-28 08:10:31 -04:00
Ronan Jouchet
167f1e3be8 Update changelog for v45.0.0 2021-07-19 13:36:19 -04:00
Adam Weeden
bf4be860cf
Upgrade to Electron 13 (#1230)
* Catch promise errors better

* Move subFunctions to bottom of createNewWindow

* Use parents when creating child BrowserWindow instances

* Some about:blank pages have an anchor (for some reason)

* Inject browserWindowOptions better

* Interim refactor to MainWindow object

* Split up the window functions/helpers/events some

* Further separate out window functions + tests

* Add a mock for unit testing functions that access electron

* Add unit tests for onWillPreventUnload

* Improve windowEvents tests

* Add the first test for windowHelpers

* Move WebRequest event handling to node

* insertCSS completely under test

* clearAppData completely under test

* Fix contextMenu require bug

* More tests + fixes

* Fix + add to createNewTab tests

* Convert createMainWindow back to func + work out gremlins

* Move setupWindow away from main since its shared

* Make sure contextMenu is handling promises

* v13.1.2

* v13.1.4

* Update Webkit version for Safari

* 13.1.6 -> NO CRASH!

* Fix types/debug build error on Ubuntu

* 13 -> 13.1.7

* Bump default Firefox version

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-07-19 13:03:46 -04:00
Ronan Jouchet
5d9cb91739 Fix 'npm install'-time warning about outdated companion DT types
```
npm WARN deprecated @types/loglevel@1.6.3: This is a stub types definition. loglevel provides its own type definitions, so you do not need this installed.
npm WARN deprecated @types/electron-packager@15.0.1: This is a stub types definition. electron-packager provides its own type definitions, so you do not need this installed.
```

Also, add `@types/debug` necessary to fix build, as already done by
@TheCleric in https://github.com/nativefier/nativefier/pull/1230/files

Also, for all deps, bump minimum version to current version
2021-07-16 18:55:10 -04:00
Ronan Jouchet
c4327e97a7 Update changelog for v44.0.7 2021-07-10 16:06:47 -04:00
Ronan Jouchet
97b33b369f Bump default Electron from 12.0.12 to 12.0.14
- https://github.com/electron/electron/releases/tag/v12.0.13
- https://github.com/electron/electron/releases/tag/v12.0.14
2021-07-10 15:59:38 -04:00
Omoeba
95e2ff9a3f
App context menu: Add electron-context-menu image entries - Save, Copy, Copy Address (PR #1256) 2021-07-10 10:55:00 -04:00
Sam Potts
5e526fb000
Fix badge/counter icon not being removed correctly (fixes #1251) (PR #1252)
The current check for `count` means the value to reset/remove the badge (`''`) is treated as `false` and therefore the badge does not get removed. This PR changes the check for `undefined` instead which resolves the issue. 

Related issue: 
https://github.com/nativefier/nativefier/issues/1251

Testing performed:
- I ran `npm t` as per the docs. All tests passed. 
- I created a new app build for Twitter (`https://twitter.com`) and Messenger (`https://messenger.com`) to verify the correct behaviour. Both were showed the issue as resolved. 

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-07-05 18:35:50 -04:00
Ronan Jouchet
629369d885 API.md: help users not be confused by platform vs. architecture (fix #1254) 2021-07-05 17:22:44 -04:00
Ronan Jouchet
a9bab01858
HACKING.md: document a few maintainer deps things (#1248) 2021-06-29 00:57:58 -04:00
Ronan Jouchet
9943d7f3cc HACKING.md: formatting & nits 2021-06-28 23:04:49 -04:00
Ronan Jouchet
d0849ce794 generate-changelog: integrate running "npm out" for a reminder of outdated dependencies 2021-06-28 22:56:53 -04:00
Ronan Jouchet
af80acf7e9 Update changelog for v44.0.6 2021-06-26 10:55:11 -04:00
Adam Weeden
b74c0bf959
Make app strict TypeScript + linting (and add a shared project) (#1231)
* Convert app to strict typing + shared library

* Fix new code post-merge

* Remove extraneous lint ignores

* Apply suggestions from code review

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>

* Fix prettier complaint

* Dedupe eslint files

* Fix some refs after merge

* Fix clean:full command

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-06-26 09:59:28 -04:00
Ronan Jouchet
f8f48d2f09 Update changelog for v44.0.5 2021-06-25 16:17:59 -04:00
Ronan Jouchet
9893d19085 Bump default Electron to 12.0.12 2021-06-25 16:10:12 -04:00
Adam Weeden
a6c1dcf952
Fix "Reset Zoom" menu item (fix #1241) (PR #1243) 2021-06-25 16:05:23 -04:00
Adam Weeden
dc0e6cb68f
Fix app keeping running in the background after closed (--tray false regression) (PR #1242)
By tightening up typing and logic around tray options.
2021-06-25 16:03:23 -04:00
Adam Weeden
d69d4b253a
Fix tray icon always on (regression from #1235) 2021-06-22 19:09:11 -04:00
Adam Weeden
a491e34966
Fix --tray start-in-tray (fix #1225) (#1235) 2021-06-22 01:22:46 -04:00
Adam Weeden
8b34c6d12d
Resolves #1228; Don't treat 'about:blank#blocked' as new tabs (#1229) 2021-06-16 23:03:49 -04:00
Ronan Jouchet
37769e463c HACKING.md: mention app pkgjson/devDeps/electron 2021-06-16 19:16:55 -04:00
Ronan Jouchet
b2af6f5435 HACKING.md: clarification 2021-06-16 19:15:05 -04:00
Ronan Jouchet
564c616d12 HACKING.md: formatting 2021-06-16 19:13:11 -04:00
Ronan Jouchet
05c3cbfb76 HACKING.md: document major-updating Electron 2021-06-16 19:12:31 -04:00
Ronan Jouchet
996183b949 Update changelog for v44.0.4 2021-06-15 22:36:01 -04:00
Adam Weeden
7a08a2d676
Enable TypeScript strict:true, and more typescript-eslint rules (#1223)
* Catch promise errors better

* Move subFunctions to bottom of createNewWindow

* Use parents when creating child BrowserWindow instances

* Some about:blank pages have an anchor (for some reason)

* Inject browserWindowOptions better

* Interim refactor to MainWindow object

* Split up the window functions/helpers/events some

* Further separate out window functions + tests

* Add a mock for unit testing functions that access electron

* Add unit tests for onWillPreventUnload

* Improve windowEvents tests

* Add the first test for windowHelpers

* Move WebRequest event handling to node

* insertCSS completely under test

* clearAppData completely under test

* Fix contextMenu require bug

* More tests + fixes

* Fix + add to createNewTab tests

* Convert createMainWindow back to func + work out gremlins

* Move setupWindow away from main since its shared

* Make sure contextMenu is handling promises

* Fix issues with fullscreen not working + menu refactor

* Run jest against app/dist so that we can hit app unit tests as well

* Requested PR changes

* Add strict typing; tests currently failing

* Fix failing unit tests

* Add some more eslint warnings and fixes

* More eslint fixes

* Strict typing on (still issues with the lib dir)

* Fix the package.json import/require

* Fix some funky test errors

* Warn -> Error for eslint rules

* @ts-ignore -> @ts-expect-error

* Add back the ext code I removed
2021-06-15 22:20:49 -04:00
Ronan Jouchet
7807bbb327 Update changelog for v44.0.3 2021-06-15 09:06:44 -04:00
Adam Weeden
113d8448c1
Fix CSS injection (#1227)
This fixes https://github.com/nativefier/nativefier/pull/1222#issuecomment-860913698 , where:

1. When it works (e.g. initial page load), CSS is slower to inject (you can see pages without injected CSS)
2. CSS isn't injected when navigating to a page

On both Windows & Linux, a `git revert 9a6c6f870d && npm run build` fixes the issue.

--

I'm still not 100% sure what went wrong, but I suspect that the new version of Electron may not be firing onHeadersReceived for the actual navigation events, and only its child requests. To counteract it, I'm now injecting at the navigation event as well. I was able to reproduce the issue and this does seem to fix it. Please let me know if it does for you as well..

Also I noticed some funkiness in your logs where we're trying to inject on font files. So I realized the method is probably not nearly as important as the content-type, so I've switched blacklist methods to blacklist content-types.
2021-06-15 09:02:57 -04:00
Ronan Jouchet
9d0a2f5b44 Bump default Electron to 12.0.11 2021-06-14 14:39:51 -04:00
Ronan Jouchet
ea24a0fdeb Fix gitcloud 0.2.3 import 2021-06-14 14:39:43 -04:00
Adam Weeden
9a6c6f870d
Selective css injection (#1222)
* Don't inject CSS for unneeded responses

* Remove some non-injectable methods

* Actually check for CSS to inject + unit tests

* Update app/src/helpers/windowHelpers.ts

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-06-09 09:49:35 -04:00
Peter Lewis
d67f533fa5
README: Update node & npm requirements (#1224)
Update required `node` and `npm` versions to match what's in package.json
2021-06-09 08:14:46 -04:00
Ronan Jouchet
437ae55d2e Update changelog for v44.0.2 2021-06-07 17:28:34 -04:00
Ronan Jouchet
4badf3dc70 manual-test: fix shellcheck nits, make tests structure more distinct 2021-06-07 17:27:23 -04:00
Adam Weeden
826625f4a4
Fix HTTP basic auth (fix #1219) (#1220)
Should resolve #1219, as well adds a manual test for basic auth as suggested.

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-06-07 17:09:24 -04:00
Adam Weeden
363fa966ee
Fix tabs opening twice (fix #1209) (#1221)
* Only add a new window handler to the main window

* Update app/src/components/mainWindow.ts

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-06-07 16:49:06 -04:00
Ronan Jouchet
460d70f915 Update changelog for v44.0.1 2021-06-07 09:38:53 -04:00
Ronan Jouchet
709557c7ab
macOS: fix crash on activating main window (fix #1212) (PR #1213)
```
Uncaught Exception:
TypeError: Cannot read property 'show' of undefined
at App.<anonymous> (/src/main.ts:177:18)
```

Seems like an oversight of the recent refactor.

* macOS: fix crash on activating main window (fix #1210)
* Eliminate need for global mainWindow, refactor widevine / non-widevine events (#1218)

Co-authored-by: Adam Weeden <adamweeden@gmail.com>
2021-06-07 09:35:27 -04:00
Adam Weeden
cdc6fa79c2
Fix fullscreen not working + menu refactor (fix #1206) (#1210)
* Catch promise errors better

* Move subFunctions to bottom of createNewWindow

* Use parents when creating child BrowserWindow instances

* Some about:blank pages have an anchor (for some reason)

* Inject browserWindowOptions better

* Interim refactor to MainWindow object

* Split up the window functions/helpers/events some

* Further separate out window functions + tests

* Add a mock for unit testing functions that access electron

* Add unit tests for onWillPreventUnload

* Improve windowEvents tests

* Add the first test for windowHelpers

* Move WebRequest event handling to node

* insertCSS completely under test

* clearAppData completely under test

* Fix contextMenu require bug

* More tests + fixes

* Fix + add to createNewTab tests

* Convert createMainWindow back to func + work out gremlins

* Move setupWindow away from main since its shared

* Make sure contextMenu is handling promises

* Fix issues with fullscreen not working + menu refactor

* Run jest against app/dist so that we can hit app unit tests as well

* Requested PR changes
2021-06-07 08:55:17 -04:00
Ronan Jouchet
16cacb0915 CATALOG.md: Spotify: mention faking user agent may not be necessary 2021-06-04 18:53:38 -04:00
Ronan Jouchet
69bc3306f9 Update changelog for v44.0.0 2021-06-04 17:03:35 -04:00
Ronan Jouchet
5d67156deb API.md: cleanup 2021-06-04 16:53:35 -04:00
Ronan Jouchet
c6b50e8d0a API.md: add "New in x.y.z" info for (most) flags 2021-06-04 16:45:05 -04:00