Skip to content

Modernize dependencies and use built-ins - #618

Closed
james-pre wants to merge 12 commits into
electron:mainfrom
james-pre:modern-deps
Closed

james-pre wants to merge 12 commits into
electron:mainfrom
james-pre:modern-deps

Conversation

@james-pre

@james-pre james-pre commented Sep 16, 2026

Copy link
Copy Markdown

I got annoyed with deprecated transitive dependencies in electron-builder and figured I would fix it myself.

I got a bit carried away, so this PR has a bunch of changes (though all good ones I hope):

  • Replaced fs-extra dependency with built-in fs functions that are already available in Node.js 22
  • Removed dependency on lodash (fixes Stop Using Lodash #549)
  • Upgraded eslint from v8 to v10
  • Replaced ava dev. dependency with built-in node:test
  • Replaced ts-node dev. dependency with tsx
  • Upgraded @electron/asar from 3.x to 4.x (fixes Dependency on old version of @electron/asar #611)
  • Upgraded typedoc
  • Replaced debug with obug (this was to fix missing debug types but it doesn't hurt to reduce install size)
  • Upgraded Typescript from 5.4 to 5.7
  • Switched to ESM (shouldn't affect consumers since require(esm) is supported across all maintained versions of Node.js)
  • Bumped Node.js engine from 22.12 to 22.13

Note that this PR subsumes #599, #598, #617.

@james-pre
james-pre requested a review from a team as a code owner September 16, 2026 18:00
@socket-security

Copy link
Copy Markdown

@socket-security

Copy link
Copy Markdown

Caution

Review the following alerts detected in dependencies.

According to your organization's Security Policy, you must resolve all "Block" alerts before proceeding. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Block Medium
Recently published: npm @types/node published 21 hours ago

Location: Package overview

From: package.jsonnpm/@types/node@22.20.3

ℹ Read more on: This package | This alert | What are recently published artifacts?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should either be allowlisted to allow recently-published versions, or an older version should be used instead.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@types/node@22.20.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Medium
Recently published: npm brace-expansion published 2 days ago

Location: Package overview

From: yarn.locknpm/typedoc@0.28.20npm/@electron/asar@4.3.0npm/eslint@10.10.0npm/typescript-eslint@8.70.0npm/brace-expansion@5.0.12

ℹ Read more on: This package | This alert | What are recently published artifacts?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should either be allowlisted to allow recently-published versions, or an older version should be used instead.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/brace-expansion@5.0.12. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Medium
Recently published: npm markdown-it published 5 days ago

Location: Package overview

From: yarn.locknpm/typedoc@0.28.20npm/markdown-it@14.3.2

ℹ Read more on: This package | This alert | What are recently published artifacts?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should either be allowlisted to allow recently-published versions, or an older version should be used instead.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/markdown-it@14.3.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Medium
Recently published: npm yaml published 5 days ago

Location: Package overview

From: yarn.locknpm/typedoc@0.28.20npm/yaml@2.9.1

ℹ Read more on: This package | This alert | What are recently published artifacts?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should either be allowlisted to allow recently-published versions, or an older version should be used instead.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/yaml@2.9.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@dsanders11

Copy link
Copy Markdown
Member

Hi @james-pre, thanks for the PR! These changes are in general good, but as a general policy we don't allow external contributors to change our lockfiles this extensively, for security reasons. We also need to manage the release process here regarding breaking changes and the next major version (something that is already in-progress, albeit slowly). Some of these changes we'll likely pick up ourselves, others probably not (we're migrating to oxlint org-wide, for example). Given all of that, I'm going to close out this PR, but thank you for the effort!

@dsanders11 dsanders11 closed this Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependency on old version of @electron/asar Stop Using Lodash

2 participants