-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: only override valid electron module names #35915
Conversation
Release Notes Persisted
|
@MarshallOfSound thanks for the PR! While this does fix the issue for arbitrary suffixes after electron/lib/common/reset-search-paths.ts Line 40 in e1494dd
It also feels a little unexpected that we can do require('electron/renderer') in the main process given that we have - electron/lib/common/reset-search-paths.ts Lines 47 to 52 in e1494dd
|
@RaisinTen those module aliases are for typescript purposes. The types for electron/main consist of only main process modules, etc. It is intentional they work everywhere, they're superficial for TS only. |
electron#35915 landed without any tests, so this change adds some. This also documents why these variations exist. Signed-off-by: Darshan Sen <raisinten@gmail.com>
* test: add tests for valid electron module names #35915 landed without any tests, so this change adds some. This also documents why these variations exist. Signed-off-by: Darshan Sen <raisinten@gmail.com> * fixup! doc: rephrase comment Signed-off-by: Darshan Sen <raisinten@gmail.com> * fixup! test: remove "Uncaught Error:" from error regex Signed-off-by: Darshan Sen <raisinten@gmail.com> Signed-off-by: Darshan Sen <raisinten@gmail.com>
* test: add tests for valid electron module names electron#35915 landed without any tests, so this change adds some. This also documents why these variations exist. Signed-off-by: Darshan Sen <raisinten@gmail.com> * fixup! doc: rephrase comment Signed-off-by: Darshan Sen <raisinten@gmail.com> * fixup! test: remove "Uncaught Error:" from error regex Signed-off-by: Darshan Sen <raisinten@gmail.com> Signed-off-by: Darshan Sen <raisinten@gmail.com>
Fixes #33014
Notes: Doing
require('electron/*')
where*
is not one ofmain
,common
orrenderer
no longer resolves with the built-inelectron
module