Commit graph

137 commits

Author SHA1 Message Date
Jeremy Rose
451086d7f2
chore: tsify extensions shim (#24355) 2020-06-30 12:49:08 -07:00
Shelley Vohr
659e79fc08
refactor: prevent consistent early exception (#24191)
* refactor: prevent consistent early exception

* Use _linkedBinding where possible

* Remove dead electronBinding
2020-06-22 20:32:45 -07:00
Milan Burda
673169a7ba
chore: remove unused deprecate.fnToProperty() (#24069) 2020-06-15 18:59:04 -07:00
Samuel Attard
9bc5e98238
chore: tsify more of lib (#23721)
* chore: tsify more of lib

* Update lib/browser/api/session.ts

Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>

Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
2020-05-22 12:46:22 -07:00
Electron Bot
3e8d77d564
chore: bump chromium to 98ebf6c3f0b7bd96bdb1a4b42208f (master) (#22999)
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Electron Bot <anonymous@electronjs.org>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
2020-04-13 16:39:26 -07:00
Samuel Attard
5d657dece4
build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
Shelley Vohr
674e4a9fdd
chore: more modules to dual prop/fn support (#22688) 2020-03-17 18:06:52 -07:00
Samuel Attard
12c1d4411d
chore: add deprecation warning on setting app.allowRendererProcessReuse to false (#22337)
* chore: add deprecation warning on setting app.allowRendererProcessReuse to false

* fix: no deprecation warnings in process reuse spec

* chore: add test for new deprecate removeProperty behavior
2020-02-26 14:03:52 -08:00
Shelley Vohr
af1e8a347e chore: remove unused promisify code (#21114) 2019-11-14 14:50:50 +09:00
Milan Burda
1d596f616d fix: NativeImage serialization of <webview>.capturePage() result (#20825) 2019-11-12 21:56:17 +01:00
Samuel Attard
660e566201
fix: don't expose nativeTheme in the renderer process (#20139)
Exposing these in the renderer didn't make sense as they weren't backed
by the same instance / value store.  This API should be browser only
especially now that we have nativeTheme.themeSource.  Exposing in
//common was a mistake from the beginning.
2019-09-16 14:23:13 -07:00
Milan Burda
7825d043f2 refactor: unify module-list format and exports/electron (#19697) 2019-08-23 11:18:58 +02:00
Samuel Attard
efa1818cb4
feat: add new nativeTheme API (#19656)
* feat: add new nativeTheme API

* chore: deprecate and clean up old systemPreferences theme APIs in favor of new nativeTheme module

* chore: clean up and deprecate things per feedback

* chore: add tests for deprecate and clean up invert impl

* build: when is a boolean not a boolean???
2019-08-14 13:42:55 -07:00
Micha Hanselmann
d79e6bbffe refactor: improve function deprecation module (#19012)
* add removeFunction to deprecation module

* clarify deprecate api

* throw error

* change error msg
2019-07-09 10:01:35 +09:00
Milan Burda
69369cf365 refactor: don't expose isPromise as an internal module (#19139) 2019-07-08 15:17:50 +09:00
Milan Burda
370e9522b4 refactor: re-implement desktop-capturer in TypeScript (#18580) 2019-06-15 19:44:18 +09:00
Shelley Vohr
a0b1f4fe0b
refactor: convert browser window state fns to props (#18618) 2019-06-04 22:44:16 -07:00
Samuel Attard
bc527f6b51
refactor: bundle the browser and renderer process electron code (#18553)
* refactor: bundle the browser and renderer process electron code

* Bundles browser/init and renderer/init
  * Improves load performance of main process by ~40%
  * Improves load performance of renderer process by ~30%
* Prevents users from importing our "requiring" our internal logic such
as ipc-main-internal.  This makes those message buses safer as they are
less accessible, there is still some more work to be done though to lock
down those buses completely.
* The electron.asar file now only contains 2 files, as a future
improvement maybe we can use atom_natives to ship these two files
embedded in the binary
* This also removes our dependency on browserify which had some strange
edge cases that caused us to have to hack around require-order and
stopped us using certain ES6/7 features we should have been able to use
(async / await in some files in the sandboxed renderer init script)

TLDR: Things are faster and better :)

* fix: I really do not want to talk about it

* chore: add performance improvements from debugging

* fix: resolve the provided path so webpack thinks it is absolute

* chore: fixup per PR review

* fix: use webpacks ProvidePlugin to keep global, process and Buffer alive after deletion from global scope for use in internal code

* fix: bundle worker/init as well to make node-in-workers work

* chore: update wording as per feedback

* chore: make the timers hack work when yarn is not used
2019-06-02 13:03:03 -07:00
Jeremy Apthorp
646f572b77
refactor: netLog directly uses network service (#18289) 2019-05-23 15:31:38 -07:00
Milan Burda
c1cccfc082 chore: remove duplicate internal deprecations module (just use deprecate) (#18352) 2019-05-21 00:40:49 +02:00
Shelley Vohr
02710ef574 refactor: make templateImage a property on nativeImage (#18124)
* refactor: make templateImage a property on nativeImage

* Update docs/api/native-image.md

Co-Authored-By: codebytere <codebytere@github.com>

* fix nativeImage prototype deprecation

* update for new property name

* Update docs/api/native-image.md

Co-Authored-By: codebytere <codebytere@github.com>
2019-05-07 06:52:07 -07:00
Shelley Vohr
9c3cb55ef2
refactor: make accessibilitySupportEnabled a property on app (#17362)
* refactor: make accessibilitySupport a prop on app

* fix docs

* update spec
2019-04-04 19:49:04 -07:00
Shelley Vohr
38d75010c7
chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
Milan Burda
3a091cdea4 refactor: implement clipboard APIs without the remote module (#17200) 2019-03-15 17:32:04 -07:00
Shelley Vohr
cb4ede453f
chore: add deprecation helper for fnToProperty (#17377)
* chore: add deprecation helper for fnToProperty

* add a test
2019-03-14 15:19:19 -07:00
Milan Burda
2e89348541 feat: promisify executeJavaScript (#17312) 2019-03-14 12:08:54 -07:00
Felix Rieseberg
5581990d78 build: Update TypeScript, use @typescript-eslint (#17251)
* build: Update TypeScript to v3.3

* build: Update TypeScript, use @typescript-eslint
2019-03-07 12:56:02 -08:00
Shelley Vohr
d9c7735a04 chore: augment promisifyMultiArg deprecation (#17066) 2019-02-25 18:25:25 -08:00
Samuel Attard
5790869a3f
chore: refactor browser IPC into TS and app API into TS (#16921)
* chore: refactor browser IPC into typescript

* chore: refactor app.ts into Typescript

* Refactors app.dock into cpp
* Removes app.launcher which has not existed for 3 years
* Removes 2 deprecated APIs (that have been deprecated for more than one
major)
* Refactors deprecate.ts as well
2019-02-14 14:29:20 -08:00
Shelley Vohr
fed5b99a9f
feat: promisify contentTracing.getTraceBufferUsage() (#16600)
* feat: promsify contentTracing.getTraceBufferUsage()

* deprecate getTraceBufferUsage

* address feedback from review

* properly deprecate
2019-02-13 13:24:57 -08:00
Shelley Vohr
e790dbd737
chore: add standalone function deprecation helper (#16782) 2019-02-08 09:50:11 -08:00
Shelley Vohr
9ebba76c03
chore: improve existing error preservation in promisify (#16815)
This PR better preserves existing behavior in `deprecate.promisify()` in the cases where the promise fails. Previously, if a callback was only called with `data` instead of `err, data` and the promise was rejected, `data` would be populated with `err`, which could be confusing to users. This makes it such that `err` is called back on promise rejection if a callback is called with `err, data` a la Node.js.
2019-02-07 10:25:20 -08:00
Milan Burda
4211a9c69f refactor: use ipcRendererUtils.invokeSync / ipcMainUtils.handleSync (#16759) 2019-02-06 09:53:28 -08:00
Shelley Vohr
5a35c3a279
chore: fix promisify helper (#16544)
* chore: fix promise deprecation helper

* fix deprecations

* update deprecation tests
2019-01-25 14:23:24 -08:00
Shelley Vohr
4b18a38e9f
chore: simplify promisify helper (#15952)
chore: simplify promisify helper
2018-12-10 08:13:09 -08:00
Milan Burda
ab2a061b59 refactor: use helpers when using the remote module in sandboxed renderers (#15960) 2018-12-05 10:07:32 -08:00
Milan Burda
d561c5531b feat: deprecate modules internally using remote.require in sandboxed renderer context (#15145) 2018-12-05 10:34:09 +01:00
Shelley Vohr
41c2685204
feat: promisify win.capturePage() (#15743)
* feat: promisify win.capturePage

* mark optional arg correctly

* Add to breaking changes doc

* properly deprecate win.capturePage

* remove change from api-contract

* document both callback and promise versions

* address docs feedback

* update promisification progress doc
2018-11-27 23:50:53 -05:00
Shelley Vohr
0a5f8611e8
chore: add promise api runtime flag (#15841)
* chore: add promise api runtime flag

* add promisification plan document

* fix process.md typo
2018-11-26 16:00:46 -05:00
Shelley Vohr
a45d5960d7
chore: allow for callback => promise deprecation (#15758)
* chore: allow for callback => promise deprecation

* cb type check is sufficient

* migrate warn to always trigger
2018-11-19 12:56:26 -05:00
Milan Burda
d3efc52745 feat: add webPreferences.enableRemoteModule option (#13028) 2018-10-13 20:50:07 +03:00
Milan Burda
b50f86ef43 refactor: use separate ipc-renderer-internal / ipc-main-internal APIs for Electron internals (#13940) 2018-10-07 00:48:00 +13:00
Milan Burda
3ad3ade828 refactor: add prefer-const to .eslintrc + fix errors (#14880) 2018-10-02 11:56:31 +10:00
Milan Burda
3df739fa89 refactor: implement crashReporter.start() without the remote module (#14434) 2018-09-26 15:43:34 +10:00
Samuel Attard
176a76217c
chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
Samuel Attard
54ef906832
[RFC] perf: use an internal module resolver to improve require performance (#14633)
* perf: use an internal module resolver instead of relative requires

* perf: memoize the results of getting exported Electron properties

* perf: make internal module changes consistent across sandboxed / bundled files
2018-09-20 13:43:26 +10:00
Samuel Attard
558fff69e7
chore: update to standard 12 2018-09-14 14:57:01 +10:00
Charles Kerr
a3f7e298cf
refactor: remove unused, duplicated code in deprecate module (#14579)
* remove obsolete tests

 * remove unused deprecate API

 * make a warnOnce helper for the deprecate methods

 * misc. copyediting, e.g. variable names, whitespace

 * test that any deprecation warns once at most

 * use strict
2018-09-12 17:13:22 -05:00
Shelley Vohr
a8a610cb34
chore: remove only on deprecations api spec (#14564)
* chore: remove only

* add option to ignore missing properties
2018-09-11 23:00:41 -07:00
Shelley Vohr
2157d09956
chore: refactor deprecation apis (#14495) 2018-09-11 11:16:49 -07:00