time1043

#55312: docs: remove redundant shell requires in application menu tutorial

Merged
Created: Oct 24, 2026, 12:30:28 PM
Merged: Oct 26, 2026, 10:35:41 AM
6 comments
Target: main

Description of Change

In the docs, const { shell } = require('electron') duplicates the top-level const { shell } = require('electron/common').

The inner require('electron') was migrated from ‎docs/api/menu.md‎, where the top-level import did not include shell, so the local require was necessary there.

This PR keeps the top-level electron/common import and removes the redundant inner require('electron'). The @ts-expect-error line annotations on the two code fences are updated for the shifted line numbers (verified with npm run lint:docs).

Xnip2026-10-25_00-18-48

Checklist

Release Notes

Notes: none

Backports

45-x-y
Merged
PR Number
#55363
Merged At
Oct 26, 2026, 2:27:40 PM
Released In
Not yet
Release Date
Not yet
46-x-y
Merged
PR Number
#55364
Merged At
Oct 26, 2026, 2:27:44 PM
Released In
v46.0.0-alpha.2
Release Date
Oct 26, 2026, 3:00:25 PM

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron