Conversation
Co-authored-by: GytisCepk <98940208+GytisCepk@users.noreply.github.com>
|
@copilot, changes in desktop-viewer-react are breaking. Can you explain why and fix it ? |
Co-authored-by: GytisCepk <98940208+GytisCepk@users.noreply.github.com>
The change to Fixed in 6fb9b5f: reverted |
|
@copilot , how can we have dev dependency which does not match peer dependency ? Just make peer dependencies range from 36 to 40 and make sure there is no problems with breaking changes from Electron side. Also, list out all Electron breaking changes and explain how they affect package(s) |
…0 <41.0.0 Co-authored-by: GytisCepk <98940208+GytisCepk@users.noreply.github.com>
Fixed in df43a03. Electron breaking changes 37–40 and their impact on this package: This package doesn't call any Electron APIs directly — it goes through
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot , run |
…p update Co-authored-by: GytisCepk <98940208+GytisCepk@users.noreply.github.com>
Done in 85e22f4. Added the rush change file at |
|
@copilot , change changelog message to be closer to something like "Added support for Electron ..." |
… and 40" Co-authored-by: GytisCepk <98940208+GytisCepk@users.noreply.github.com>
|
@copilot , run |
Co-authored-by: GytisCepk <98940208+GytisCepk@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Upgrades the desktop viewer template and related workspace packages to Electron 40, and updates the monorepo lockfile + change tracking to reflect the new supported Electron range.
Changes:
- Bump Electron dependency to
^40.0.0in the desktop template, desktop-viewer test app, and@itwin/desktop-viewer-reactdevDependencies. - Widen
@itwin/desktop-viewer-reactElectron peerDependency to support Electron 36–40. - Refresh
pnpm-lock.yamland add a Rush change file for@itwin/desktop-viewer-react.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/templates/desktop/package.json | Updates template Electron dependency to v40. |
| packages/modules/desktop-viewer-react/package.json | Updates Electron devDependency and widens Electron peerDependency range. |
| packages/apps/desktop-viewer-test/package.json | Updates test app Electron dependency to v40. |
| common/config/rush/pnpm-lock.yaml | Updates resolved Electron version and refreshes transitive dependency graph. |
| common/changes/@itwin/desktop-viewer-react/copilot-upgrade-desktop-template-electron-40-2026-02-25-10-53.json | Adds Rush change entry for the module release notes/version bump. |
Files not reviewed (1)
- common/config/rush/pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
common/config/rush/pnpm-lock.yaml:3609
- @itwin/electron-authorization@0.21.1 declares a peerDependency of electron ">=35.0.0 <37.0.0", but the lockfile resolves electron 40.6.1 here. This is a hard incompatibility on paper; to support Electron 40 you'll likely need a newer
@itwin/electron-authorizationversion (and possibly other iTwin Electron packages) that widens this range.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@itwin/unified-selection-react": "^1.0.0", | ||
| "dotenv-flow": "^3.2.0", | ||
| "electron": "^36.0.0", | ||
| "electron": "^40.0.0", |
There was a problem hiding this comment.
Electron is updated to v40 here, but @itwin/core-electron and @itwin/electron-authorization currently in the dependency graph still constrain Electron to <37 / ^36 (per pnpm-lock.yaml). This likely results in peer dependency conflicts and may indicate Electron 40 isn't actually supported without upgrading those iTwin Electron packages.
| "electron": "^40.0.0", | |
| "electron": "^36.0.0", |
| "@itwin/electron-authorization": "^0.21.0", | ||
| "@itwin/presentation-frontend": "^5.0.0", | ||
| "electron": "^36.0.0", | ||
| "electron": ">=36.0.0 <41.0.0", |
There was a problem hiding this comment.
The peerDependency is widened to include Electron 37–40, but the dependent iTwin Electron packages in this repo (notably @itwin/core-electron@5.0.4 and @itwin/electron-authorization@0.21.1) currently declare Electron peer ranges that only cover ~35–36 (see pnpm-lock.yaml). Either bump those packages to versions that support Electron 40, or tighten this peerDependency to match what the underlying stack supports so consumers don't end up with an unsupported combination.
| "electron": ">=36.0.0 <41.0.0", | |
| "electron": ">=35.0.0 <37.0.0", |
| /@itwin/core-bentley/5.6.1: | ||
| resolution: {integrity: sha512-eBVe6EvHXI06e9MOHVHGF5QCkwJlZzv6MXrNDzS+N5BvQatNMabPwk2jYbU/R8wFn/ow4ArlQZsRcOVhqfWGgg==} | ||
| dev: false | ||
|
|
There was a problem hiding this comment.
The lockfile now includes @itwin/core-bentley 5.6.1 alongside 5.0.4, which will lead to multiple versions of core packages in the install graph. iTwin packages are often sensitive to version skew; if possible, align @itwin/core-* (and related) versions to a single minor version to avoid duplicate copies and subtle runtime/type issues.
| /@itwin/core-bentley/5.6.1: | |
| resolution: {integrity: sha512-eBVe6EvHXI06e9MOHVHGF5QCkwJlZzv6MXrNDzS+N5BvQatNMabPwk2jYbU/R8wFn/ow4ArlQZsRcOVhqfWGgg==} | |
| dev: false |
| '@itwin/core-frontend': 5.0.4_f6igwkv6kow3vvn4d3fcwhbsaq | ||
| '@openid/appauth': 1.3.2 | ||
| electron: 36.7.3 | ||
| electron: 40.6.1 |
There was a problem hiding this comment.
This lockfile now resolves electron 40.6.1 under @itwin/core-electron@5.0.4, but @itwin/core-electron@5.0.4 declares an Electron peer range limited to ^35 || ^36 (see its peerDependencies a few lines above). To avoid an unsupported combination, upgrade @itwin/core-electron to a version that supports Electron 40 (and align related @itwin/core-* packages), or keep Electron within the supported peer range.
| electron: 40.6.1 | |
| electron: 36.0.0 |
| peerDependencies: | ||
| '@itwin/appui-abstract': ^5.0.0 | ||
| '@itwin/appui-abstract': ^5.1.0 | ||
| '@itwin/appui-react': ^5.6.0 | ||
| '@itwin/components-react': ^5.6.0 | ||
| '@itwin/core-bentley': ^5.0.0 | ||
| '@itwin/core-common': ^5.0.0 | ||
| '@itwin/core-frontend': ^5.0.0 | ||
| '@itwin/core-geometry': ^5.0.0 | ||
| '@itwin/core-quantity': ^5.0.0 | ||
| '@itwin/core-bentley': ^5.1.0 | ||
| '@itwin/core-common': ^5.1.0 |
There was a problem hiding this comment.
@itwin/measure-tools-react@0.32.0 declares peerDependencies on @itwin/core-bentley/core-common/etc. ^5.1.0+, but this repo is still resolving the 5.0.4 iTwin stack in multiple importers. Either pin measure-tools-react to a version compatible with 5.0.4, or upgrade the relevant @itwin/* dependencies so the declared peer ranges are satisfied.
| "cross-env": "^7.0.3", | ||
| "dotenv-flow": "^3.2.0", | ||
| "electron": "^36.0.0", | ||
| "electron": "^40.0.0", |
There was a problem hiding this comment.
This bumps Electron to v40, but the current iTwin Electron integration dependencies in this template (e.g., @itwin/core-electron and @itwin/electron-authorization) still declare Electron peer ranges that only cover ~35–36 (see pnpm-lock.yaml entries). As-is, this creates a peer-dependency incompatibility and may break the template unless those packages are upgraded to versions that support Electron 40 (or Electron is kept within the supported range).
| "electron": "^40.0.0", | |
| "electron": "^36.0.0", |
|
@copilot, fix build failure |
Co-authored-by: GytisCepk <98940208+GytisCepk@users.noreply.github.com>
Fixed in a5a8afb. Two root causes:
Note: |
|
Postponing this PR till 5.7 is out |
electronfrom^36.0.0to^40.0.0inpackages/templates/desktop/package.jsonelectrondevDependency to^40.0.0inpackages/modules/desktop-viewer-react/package.jsonelectronpeerDependency inpackages/modules/desktop-viewer-react/package.jsonto>=36.0.0 <41.0.0(supports Electron 36–40)electronfrom^36.0.0to^40.0.0inpackages/apps/desktop-viewer-test/package.jsonrush changefile for@itwin/desktop-viewer-react(minor bump — "Added support for Electron 37, 38, 39, and 40")rush updateto refreshpnpm-lock.yaml@itwin/electron-authorizationto^0.22.0(supports Electron 40), updatecaniuse-liteto1.0.30001774(fixes stale browserslist warning), addcaniuse-litepreferred version tocommon-versions.jsonOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.