Skip to content

Conversation

@z0gSh1u
Copy link
Member

@z0gSh1u z0gSh1u commented Jan 12, 2026

In this library, electron is accidentally added as dependency, causing those Electron apps using this library to have an Electron copy packed into the artifact by default. This PR moves it into devDependencies, as other Electron utility libraries do.

* Initial plan

* Move electron from dependencies to devDependencies and bump version to 34.1.0

Co-authored-by: z0gSh1u <30524126+z0gSh1u@users.noreply.github.com>

* Remove package-lock.json as per project conventions

Co-authored-by: z0gSh1u <30524126+z0gSh1u@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: z0gSh1u <30524126+z0gSh1u@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 12, 2026 12:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves the electron package from dependencies to devDependencies and bumps the package version from 34.0.0 to 34.1.0. The purpose is to prevent Electron from being bundled into consuming applications, which is a common issue when utility libraries incorrectly declare Electron as a regular dependency.

Changes:

  • Version bumped from 34.0.0 to 34.1.0
  • electron package moved from dependencies to devDependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@babel/eslint-parser": "^7.27.1",
"@playwright/test": "^1.52.0",
"@types/node": "^22.15.17",
"electron": "34",
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The electron package should be specified as a peerDependency rather than a devDependency. The library code requires electron at runtime (see lib/electron-windows.js line 4: require('electron')). This is a utility library for Electron apps, so electron should be provided by the consuming application. Consider adding it to peerDependencies instead and keeping it in devDependencies for development/testing purposes.

Copilot uses AI. Check for mistakes.
"@babel/eslint-parser": "^7.27.1",
"@playwright/test": "^1.52.0",
"@types/node": "^22.15.17",
"electron": "34",
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The electron version specification "34" is too loose and non-standard. It should use a proper semver range like "^34.0.0" or ">=34.0.0 <35.0.0" to ensure compatibility and follow npm best practices. The shorthand "34" is equivalent to ">=34.0.0 <35.0.0" but is less clear and not commonly used in modern npm packages.

Suggested change
"electron": "34",
"electron": ">=34.0.0 <35.0.0",

Copilot uses AI. Check for mistakes.
* Initial plan

* Remove unstable loadingView test case and exclude package-lock.json

Co-authored-by: z0gSh1u <30524126+z0gSh1u@users.noreply.github.com>

* Update .gitignore

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: z0gSh1u <30524126+z0gSh1u@users.noreply.github.com>
Co-authored-by: ZHUO Xu <zx.cs@qq.com>
@z0gSh1u z0gSh1u changed the title chore: move electron to devDependencies and bump to 34.1.0 chore: move electron to devDependencies and bump to 34.1.0, remove unstable loadingView test case Jan 13, 2026
@WynterDing
Copy link
Member

LGTM

@WynterDing WynterDing merged commit 14504f6 into electron-modules:master Jan 13, 2026
2 checks passed
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.

2 participants