fix: runtime JS error that crashes GetPackageJSON#48293
fix: runtime JS error that crashes GetPackageJSON#48293codebytere merged 1 commit intoelectron:mainfrom
GetPackageJSON#48293Conversation
|
FWIW, the type definition for electron/typings/internal-ambient.d.ts Lines 91 to 97 in f702327 |
|
@indutny-signal can you rebase your PR to pick up a fix for the compilation errors? |
a6c6624 to
c789b0b
Compare
|
Force pushed! Signed the commit while I was there. Thank you! |
|
@indutny-signal sorry to ask - can you rebase again to pull in #48345? I tested this fix with your branch and it fixes the build issue seen here. |
c789b0b to
14983a1
Compare
We overriden the `GetPackageJSON` in Node.js to let us read files straight from the ASAR file instead of disk. The override works by providing a JS method with the limitation that it should not throw a runtime error. However, this invariant was accidentally violated by `asar.splitPath` that sometimes contrary to its' TypeScript definition returned `false`.
14983a1 to
77bb87b
Compare
|
@jkleinsc force pushed! np! |
|
@jkleinsc no rush with reviewing it, but let me know if you want me to rebase again! |
|
@indutny-signal reran ci and will merge when green! |
|
Looks like it is still not green, but I think the test is flaky? |
|
Should we try once more? 😅 |
|
Release Notes Persisted
|
|
I have automatically backported this PR to "37-x-y", please check out #48423 |
|
I have automatically backported this PR to "38-x-y", please check out #48424 |
|
I have automatically backported this PR to "39-x-y", please check out #48425 |
|
Aww, thank you! |
We overriden the `GetPackageJSON` in Node.js to let us read files straight from the ASAR file instead of disk. The override works by providing a JS method with the limitation that it should not throw a runtime error. However, this invariant was accidentally violated by `asar.splitPath` that sometimes contrary to its' TypeScript definition returned `false`.
We overriden the `GetPackageJSON` in Node.js to let us read files straight from the ASAR file instead of disk. The override works by providing a JS method with the limitation that it should not throw a runtime error. However, this invariant was accidentally violated by `asar.splitPath` that sometimes contrary to its' TypeScript definition returned `false`.
We overriden the `GetPackageJSON` in Node.js to let us read files straight from the ASAR file instead of disk. The override works by providing a JS method with the limitation that it should not throw a runtime error. However, this invariant was accidentally violated by `asar.splitPath` that sometimes contrary to its' TypeScript definition returned `false`.
We overriden the `GetPackageJSON` in Node.js to let us read files straight from the ASAR file instead of disk. The override works by providing a JS method with the limitation that it should not throw a runtime error. However, this invariant was accidentally violated by `asar.splitPath` that sometimes contrary to its' TypeScript definition returned `false`.
Description of Change
We overriden the
GetPackageJSONin Node.js to let us read files straight from the ASAR file instead of disk. The override works by providing a JS method with the limitation that it should not throw a runtime error. However, this invariant was accidentally violated byasar.splitPaththat sometimes contrary to its' TypeScript definition returnedfalse.Checklist
npm testpassescc @zcbenz @nikwen
Example of crash stack
Release Notes
Notes: fix: runtime JS error that crashes
GetPackageJSON