[PR #7254] [MERGED] [AI] Stop using .browser extension; removing "resolve.extensions" - prefer conditions via package.json #25652

Closed
opened 2026-04-16 18:45:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7254
Author: @MatissJanis
Created: 3/21/2026
Status: Merged
Merged: 4/10/2026
Merged by: @MatissJanis

Base: masterHead: matiss/remove-browser-connection-extension


📝 Commits (10+)

  • b04097c [AI] Consolidate loot-core connection: default web path, electron split, drop .browser
  • 94e91ee [autofix.ci] apply automated fixes
  • 5240d76 Merge branch 'master' into matiss/remove-browser-connection-extension
  • d059a3f [AI] Replace browser-preload .browser extension with package.json subpath imports
  • be8e059 Refactor connection imports to use @actual-app/core
  • 78c4441 Implement connection mock for desktop-client tests and update import path
  • db6b4da Merge branch 'master' into matiss/remove-browser-connection-extension
  • 52fa209 Merge branch 'master' into matiss/remove-browser-connection-extension
  • c63ef23 Merge branch 'matiss/remove-browser-connection-extension' of github.com:actualbudget/actual into matiss/remove-browser-connection-extension
  • b5ad2f9 [AI] Fix formatting and update imports after master merge

📊 Changes

24 files changed (+869 additions, -915 deletions)

View changed files

📝 .oxlintrc.json (+1 -1)
📝 AGENTS.md (+2 -2)
📝 packages/api/vite.config.ts (+0 -1)
📝 packages/component-library/vitest.web.config.ts (+0 -17)
📝 packages/desktop-client/package.json (+2 -2)
packages/desktop-client/src/browser-preload.browser.js (+0 -457)
packages/desktop-client/src/browser-preload.electron.ts (+1 -0)
📝 packages/desktop-client/src/browser-preload.js (+457 -1)
📝 packages/desktop-client/src/components/transactions/TransactionsTable.test.tsx (+4 -1)
📝 packages/desktop-client/src/index.tsx (+1 -1)
packages/desktop-client/src/mocks/connection.ts (+82 -0)
📝 packages/desktop-client/vite.config.ts (+0 -21)
📝 packages/loot-core/package.json (+4 -4)
packages/loot-core/src/platform/client/connection/__mocks__/index.ts (+0 -67)
packages/loot-core/src/platform/client/connection/index.api.ts (+2 -0)
packages/loot-core/src/platform/client/connection/index.browser.ts (+0 -213)
packages/loot-core/src/platform/client/connection/index.electron.ts (+155 -0)
📝 packages/loot-core/src/platform/client/connection/index.ts (+152 -94)
📝 packages/loot-core/vite.config.ts (+0 -3)
📝 packages/loot-core/vite.desktop.config.ts (+0 -1)

...and 4 more files

📄 Description

Description

Simplifying build: removing "*.browser" extension. Also removing "resolve.extensions" in favour of conditions in package.json.

A bunch of: renaming the "index.browser.ts" file to "index.ts" and the previous "index.ts" to "index.electron.ts" and "index.api.ts". Technically this should be exactly the same.. except one less file extension to worry about.

And cleanups.

https://github.com/actualbudget/actual/issues/7252

Depends on: https://github.com/actualbudget/actual/pull/7383, https://github.com/actualbudget/actual/pull/7429

Testing

n/a

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 28 12.9 MB → 12.9 MB (-6 B) -0.00%
loot-core 1 4.84 MB 0%
api 1 3.84 MB → 3.88 MB (+42.27 kB) +1.08%
cli 1 7.89 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
28 12.9 MB → 12.9 MB (-6 B) -0.00%
Changeset
File Δ Size
src/browser-preload.js 🆕 +8.09 kB 0 B → 8.09 kB
home/runner/work/actual/actual/packages/loot-core/src/platform/client/connection/index.ts 🆕 +3.33 kB 0 B → 3.33 kB
package.json 📈 +10 B (+0.13%) 7.79 kB → 7.8 kB
src/browser-preload.browser.js 🔥 -8.09 kB (-100%) 8.09 kB → 0 B
home/runner/work/actual/actual/packages/loot-core/src/platform/client/connection/index.browser.ts 🔥 -3.34 kB (-100%) 3.34 kB → 0 B
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 3.32 MB → 3.32 MB (+2 B) +0.00%

Smaller

Asset File Size % Changed
static/js/extends.js 485.18 kB → 485.17 kB (-8 B) -0.00%

Unchanged

Asset File Size % Changed
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 852.77 kB 0%
static/js/ReportRouter.js 1.17 MB 0%
static/js/TransactionList.js 82.49 kB 0%
static/js/Value.js 4.33 MB 0%
static/js/ca.js 191.98 kB 0%
static/js/da.js 104.66 kB 0%
static/js/de.js 174.38 kB 0%
static/js/en-GB.js 8.2 kB 0%
static/js/en.js 175.89 kB 0%
static/js/es.js 181.8 kB 0%
static/js/fr.js 177.08 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 165.87 kB 0%
static/js/narrow.js 363.02 kB 0%
static/js/nb-NO.js 151.85 kB 0%
static/js/nl.js 108.93 kB 0%
static/js/pl.js 88.34 kB 0%
static/js/pt-BR.js 177.44 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 179.3 kB 0%
static/js/theme.js 30.79 kB 0%
static/js/uk.js 212.6 kB 0%
static/js/wide.js 295 B 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 109.61 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.84 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.2cr-I6dh.js 4.84 MB 0%

api

Total

Files count Total bundle size % Changed
1 3.84 MB → 3.88 MB (+42.27 kB) +1.08%
Changeset
File Δ Size
node_modules/ua-parser-js/src/main/ua-parser.mjs 🆕 +41.87 kB 0 B → 41.87 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts 🆕 +388 B 0 B → 388 B
home/runner/work/actual/actual/packages/loot-core/src/shared/months.ts 📈 +21 B (+0.44%) 4.62 kB → 4.64 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.84 MB → 3.88 MB (+42.27 kB) +1.08%

Smaller
No assets were smaller

Unchanged
No assets were unchanged


cli

Total

Files count Total bundle size % Changed
1 7.89 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
cli.js 7.89 MB 0%

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/7254 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 3/21/2026 **Status:** ✅ Merged **Merged:** 4/10/2026 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/remove-browser-connection-extension` --- ### 📝 Commits (10+) - [`b04097c`](https://github.com/actualbudget/actual/commit/b04097c6d14e929930b9cc3f78e205d47ab35478) [AI] Consolidate loot-core connection: default web path, electron split, drop .browser - [`94e91ee`](https://github.com/actualbudget/actual/commit/94e91eea6c18826d912f4f0a827050a6246ae081) [autofix.ci] apply automated fixes - [`5240d76`](https://github.com/actualbudget/actual/commit/5240d7620311843f74185e38d33b6e8abae3774d) Merge branch 'master' into matiss/remove-browser-connection-extension - [`d059a3f`](https://github.com/actualbudget/actual/commit/d059a3f50d3c1db379a7929753ccfc8c9fcca263) [AI] Replace browser-preload .browser extension with package.json subpath imports - [`be8e059`](https://github.com/actualbudget/actual/commit/be8e05984bf3afc0eb663d0c30a8639197d9f0dc) Refactor connection imports to use @actual-app/core - [`78c4441`](https://github.com/actualbudget/actual/commit/78c44410ab2fa585a612fdacd3f64e9fbd597c14) Implement connection mock for desktop-client tests and update import path - [`db6b4da`](https://github.com/actualbudget/actual/commit/db6b4da3b9e0b57b2662a1b04769ee691f164959) Merge branch 'master' into matiss/remove-browser-connection-extension - [`52fa209`](https://github.com/actualbudget/actual/commit/52fa209bba3a5164dafdfb0b80a671ffecaf9b11) Merge branch 'master' into matiss/remove-browser-connection-extension - [`c63ef23`](https://github.com/actualbudget/actual/commit/c63ef23407e099962206f91fff5635e5de698a83) Merge branch 'matiss/remove-browser-connection-extension' of github.com:actualbudget/actual into matiss/remove-browser-connection-extension - [`b5ad2f9`](https://github.com/actualbudget/actual/commit/b5ad2f9f2d6b8ac6e6b03bdf78b86d203b16b297) [AI] Fix formatting and update imports after master merge ### 📊 Changes **24 files changed** (+869 additions, -915 deletions) <details> <summary>View changed files</summary> 📝 `.oxlintrc.json` (+1 -1) 📝 `AGENTS.md` (+2 -2) 📝 `packages/api/vite.config.ts` (+0 -1) 📝 `packages/component-library/vitest.web.config.ts` (+0 -17) 📝 `packages/desktop-client/package.json` (+2 -2) ➖ `packages/desktop-client/src/browser-preload.browser.js` (+0 -457) ➕ `packages/desktop-client/src/browser-preload.electron.ts` (+1 -0) 📝 `packages/desktop-client/src/browser-preload.js` (+457 -1) 📝 `packages/desktop-client/src/components/transactions/TransactionsTable.test.tsx` (+4 -1) 📝 `packages/desktop-client/src/index.tsx` (+1 -1) ➕ `packages/desktop-client/src/mocks/connection.ts` (+82 -0) 📝 `packages/desktop-client/vite.config.ts` (+0 -21) 📝 `packages/loot-core/package.json` (+4 -4) ➖ `packages/loot-core/src/platform/client/connection/__mocks__/index.ts` (+0 -67) ➕ `packages/loot-core/src/platform/client/connection/index.api.ts` (+2 -0) ➖ `packages/loot-core/src/platform/client/connection/index.browser.ts` (+0 -213) ➕ `packages/loot-core/src/platform/client/connection/index.electron.ts` (+155 -0) 📝 `packages/loot-core/src/platform/client/connection/index.ts` (+152 -94) 📝 `packages/loot-core/vite.config.ts` (+0 -3) 📝 `packages/loot-core/vite.desktop.config.ts` (+0 -1) _...and 4 more files_ </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> ## Description Simplifying build: removing "*.browser" extension. Also removing "resolve.extensions" in favour of conditions in package.json. A bunch of: renaming the "index.browser.ts" file to "index.ts" and the previous "index.ts" to "index.electron.ts" and "index.api.ts". Technically this should be exactly the same.. except one less file extension to worry about. And cleanups. ## Related issue(s) https://github.com/actualbudget/actual/issues/7252 Depends on: https://github.com/actualbudget/actual/pull/7383, https://github.com/actualbudget/actual/pull/7429 ## Testing n/a ## Checklist - [x] Release notes added (see link above) - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 28 | 12.9 MB → 12.9 MB (-6 B) | -0.00% loot-core | 1 | 4.84 MB | 0% api | 1 | 3.84 MB → 3.88 MB (+42.27 kB) | +1.08% cli | 1 | 7.89 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 28 | 12.9 MB → 12.9 MB (-6 B) | -0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/browser-preload.js` | 🆕 +8.09 kB | 0 B → 8.09 kB `home/runner/work/actual/actual/packages/loot-core/src/platform/client/connection/index.ts` | 🆕 +3.33 kB | 0 B → 3.33 kB `package.json` | 📈 +10 B (+0.13%) | 7.79 kB → 7.8 kB `src/browser-preload.browser.js` | 🔥 -8.09 kB (-100%) | 8.09 kB → 0 B `home/runner/work/actual/actual/packages/loot-core/src/platform/client/connection/index.browser.ts` | 🔥 -3.34 kB (-100%) | 3.34 kB → 0 B </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 3.32 MB → 3.32 MB (+2 B) | +0.00% **Smaller** Asset | File Size | % Changed ----- | --------- | --------- static/js/extends.js | 485.18 kB → 485.17 kB (-8 B) | -0.00% **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 852.77 kB | 0% static/js/ReportRouter.js | 1.17 MB | 0% static/js/TransactionList.js | 82.49 kB | 0% static/js/Value.js | 4.33 MB | 0% static/js/ca.js | 191.98 kB | 0% static/js/da.js | 104.66 kB | 0% static/js/de.js | 174.38 kB | 0% static/js/en-GB.js | 8.2 kB | 0% static/js/en.js | 175.89 kB | 0% static/js/es.js | 181.8 kB | 0% static/js/fr.js | 177.08 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 165.87 kB | 0% static/js/narrow.js | 363.02 kB | 0% static/js/nb-NO.js | 151.85 kB | 0% static/js/nl.js | 108.93 kB | 0% static/js/pl.js | 88.34 kB | 0% static/js/pt-BR.js | 177.44 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 179.3 kB | 0% static/js/theme.js | 30.79 kB | 0% static/js/uk.js | 212.6 kB | 0% static/js/wide.js | 295 B | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 109.61 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.84 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.2cr-I6dh.js | 4.84 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 3.84 MB → 3.88 MB (+42.27 kB) | +1.08% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `node_modules/ua-parser-js/src/main/ua-parser.mjs` | 🆕 +41.87 kB | 0 B → 41.87 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts` | 🆕 +388 B | 0 B → 388 B `home/runner/work/actual/actual/packages/loot-core/src/shared/months.ts` | 📈 +21 B (+0.44%) | 4.62 kB → 4.64 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- index.js | 3.84 MB → 3.88 MB (+42.27 kB) | +1.08% **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.89 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- cli.js | 7.89 MB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 18:45:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#25652