-
Notifications
You must be signed in to change notification settings - Fork 257
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
Convert electron-builder config file to TS #1591
Conversation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
…into t3chguy/config-file-ts Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> # Conflicts: # yarn.lock
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@@ -17,17 +17,17 @@ limitations under the License. | |||
import path from "path"; | |||
import os from "os"; | |||
import nodePreGypVersioning from "node-pre-gyp/lib/util/versioning"; | |||
import { getElectronVersion } from "app-builder-lib/out/electron/electronVersion"; | |||
import { getElectronVersionFromInstalled } from "app-builder-lib/out/electron/electronVersion"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain how getElectronVersionFromInstalled
differs from getElectronVersion
, and why we need to change it as part of the TS translation? I couldn't find any documentation for them,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getElectronVersion
evaluates the config and sees whether the electron version is overridden there, which requires evaluating electron-builder.ts
which errors in the hak scripts like in https://github.com/element-hq/element-desktop/actions/runs/8480242660/job/23235652340?pr=1591
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... whereas getElectronVersionFromInstalled
inspects what was actually used in the build, or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks at the version we dictate via package.json/yarn.lock, which is what getElectronVersion
fell back to if it did not find an electron version specified in the builder config file (so no change for us)
@@ -123,6 +124,7 @@ | |||
"keytar": "^7.9.0" | |||
}, | |||
"resolutions": { | |||
"@types/node": "18.19.28" | |||
"@types/node": "18.19.28", | |||
"config-file-ts": "0.2.8-rc1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aaaaaaaaargh my kingdom for a config file format that lets you write COMMENTS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the benefit of anyone who gets here via PR spelunking: this is a workaround for electron-userland/electron-builder#7775.
Fixes #1462