Update Dependencies (Electron 12.0, TypeScript 4.2.2, ProseMirror) #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After a several-month-long development hiatus, several of the packages Noteworthy depends on received new major versions. After getting #5 is out of the way, I was able to start upgrading to the new versions.
Upgrading to TypeScript 4.2.2 only required the removal of a few
delete
operations. Upgrading to Electron 12.0.0 took more effort, as I decided to use this as an opportunity to finally setnodeIntegration: false
andcontextIsolation: true
in the render process. This paves the way for user plugins that can safely query the web later.Now that the render process has no access to Node APIs, it is necessary to use a Node-enabled preload script, which acts as a barrier between the Node APIs and the possibly-unsafe render process. This necessitated a new webpack entry point with the
electron-preload
target, and all the necessary webpack boilerplate to go along with it.Helpful Resources:
require()
is not definednodeIntegration
webpack
andelectron-builder
instead of usingelectron-webpack
#5