Skip to content

fix(build): exclude iOS Safari < 12 from browserslist targets (stable32) - #2827

Merged
miaulalala merged 2 commits into
stable32from
chore/stable32-browserslist-config-3.1.2
Jul 28, 2026
Merged

fix(build): exclude iOS Safari < 12 from browserslist targets (stable32)#2827
miaulalala merged 2 commits into
stable32from
chore/stable32-browserslist-config-3.1.2

Conversation

@miaulalala

@miaulalala miaulalala commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Reworked. This PR originally bumped @nextcloud/browserslist-config from ^3.0.1 to ^3.1.2. That fixed the build but raised the minimum Chrome target from 109 to 121, and Cypress runs bundled Electron with no explicit browser: — which appears to be why runner 1 went red on this PR while it passes on #2831 (same branch, no asset changes). The narrower fix below achieves the same result without moving the Chrome floor or changing a single dependency.

The problem

esbuild 0.28.x hard-errors where earlier versions warned, when it cannot downlevel a syntax feature to a configured target:

src/sidebar.ts:26:9: ERROR: Transforming destructuring to the configured target environment
("chrome109", "edge140", "firefox140", "ios11", "opera122", "safari26" + 2 overrides) is not supported yet

ios11 is in that list because stable32 is the last branch on @nextcloud/browserslist-config 3.0.1, whose config is ['>0.25%', 'not op_mini all', 'not dead', 'Firefox ESR'] — that percentage threshold still catches iOS Safari 11.

The source is ordinary: const { default: ActivityTab } = await import('./views/ActivityTab.vue'). Nothing is wrong with it; the target list is the problem.

Note this is latent, not hypothetical. esbuild arrives via vite's dependency range, so any lockfile regeneration on this branch can pull 0.28.x in — which is exactly what happened on #2778.

The fix

One line, package.json:

  "browserslist": [
    "extends @nextcloud/browserslist-config",
+   "not ios_saf < 12"
  ],

No dependency change. package-lock.json is untouched.

Testing

Verified on node 22.22.3 / npm 10.9.8, matching this branch's engines.

Sufficiency — using #2778's exact lockfile (esbuild 0.28.1, browserslist-config 3.0.1) and adding only this override, so the dependency tree is provably identical between runs:

ios11 errors build
#2778 as-is 4 fails
#2778 + this override 0 passes

No collateral change to browser support:

before after
min Chrome 109 109 (unchanged)
min iOS Safari 11 16.6

For contrast, the ^3.1.2 bump would have moved Chrome to 121 and iOS to 17.4.

Also confirmed npm ci && npm run build leaves a clean working tree, so the recompiled assets here match a fresh build, and there are no conflicts against current stable32.

Unblocks #2778.

@miaulalala miaulalala added 3. to review dependencies Pull requests that update a dependency file labels Jul 27, 2026
@miaulalala miaulalala changed the title chore(deps): update dependency @nextcloud/browserslist-config to ^3.1.2 (stable32) [stable32] chore(deps): update dependency @nextcloud/browserslist-config to ^3.1.2 Jul 27, 2026
@miaulalala
miaulalala requested a review from artonge July 27, 2026 16:53
@miaulalala miaulalala self-assigned this Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cypress

cypress Bot commented Jul 27, 2026

Copy link
Copy Markdown

Activity    Run #4095

Run Properties:  status check passed Passed #4095  •  git commit 562db8b7ed: fix(build): exclude iOS Safari < 12 from browserslist targets (stable32)
Project Activity
Branch Review chore/stable32-browserslist-config-3.1.2
Run status status check passed Passed #4095
Run duration 02m 05s
Commit git commit 562db8b7ed: fix(build): exclude iOS Safari < 12 from browserslist targets (stable32)
Committer Anna
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 1
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 9
View all changes introduced in this branch ↗︎

@miaulalala

Copy link
Copy Markdown
Collaborator Author

/compile amend

@nextcloud-command
nextcloud-command force-pushed the chore/stable32-browserslist-config-3.1.2 branch from dd9c78b to faf414e Compare July 27, 2026 18:12
@miaulalala
miaulalala force-pushed the chore/stable32-browserslist-config-3.1.2 branch from faf414e to eb2eca0 Compare July 27, 2026 18:17
@miaulalala
miaulalala force-pushed the chore/stable32-browserslist-config-3.1.2 branch from eb2eca0 to e4e3232 Compare July 27, 2026 19:19
@miaulalala miaulalala changed the title [stable32] chore(deps): update dependency @nextcloud/browserslist-config to ^3.1.2 fix(build): exclude iOS Safari < 12 from browserslist targets (stable32) Jul 27, 2026
esbuild 0.28.x hard-errors instead of warning when it cannot downlevel
destructuring to a configured target, and this branch's targets still
resolve ios_saf 11 via the '>0.25%' query in @nextcloud/browserslist-config
3.0.1. That breaks the build as soon as a lockfile regeneration pulls
esbuild 0.28.x in through vite's dependency range, as on #2778.

Excluding iOS Safari < 12 removes the offending target without touching
any dependency and without moving the Chrome floor, which stays at 109.

Signed-off-by: Anna Larch <anna@nextcloud.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala
miaulalala force-pushed the chore/stable32-browserslist-config-3.1.2 branch from e4e3232 to 6ffeac2 Compare July 28, 2026 12:12
@miaulalala
miaulalala merged commit fdd1ec8 into stable32 Jul 28, 2026
54 checks passed
@miaulalala
miaulalala deleted the chore/stable32-browserslist-config-3.1.2 branch July 28, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants