Skip to content

fix(client-map): restore IShareMap.forEach accuracy - #28193

Draft
Jason Hartman (jason-ha) wants to merge 5 commits into
mainfrom
map/restore-compat-via-forEach-override
Draft

Jason Hartman (jason-ha) wants to merge 5 commits into
mainfrom
map/restore-compat-via-forEach-override

Conversation

@jason-ha

Copy link
Copy Markdown
Contributor

FluidMap does not provide clear and the lack of that bubbles through to appear as Map incompatibility even when ISharedMap and ISharedDirectory do provide them as forEach declarations type callback's map argument as FluidMap.

Override forEach to restore the Map compatiblity right now easing customer transition to 3.x.

See issue #27459.

`FluidMap` does not provide `clear` and the lack of that bubbles through to appear as `Map` incompatibility even when `ISharedMap` and `ISharedDirectory` do provide them as `forEach` declarations type callback's `map` argument as `FluidMap`.

Override `forEach` to restore the `Map` compatiblity right now easing customer transition to 3.x.

See issue #27459.
@github-actions github-actions Bot added area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: tools area: dds Issues related to distributed data structures area: repo Repo related work area: website public api change Changes to a public API base: main PRs targeted against main branch labels Sep 10, 2026
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (55 lines, 5 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

as it does call with `FluidMap`. Internally clarify that.
Since `FluidMap` is not intended to always be a subset of `Map` remove the cases where they are mixed.
- `FluidMapLegacy.forEach` cannot support both. Only support `Map`.
- `IShareMap` drops implementing `FluidMap.forEach`.

Also update test comments.
@jason-ha Jason Hartman (jason-ha) changed the title fix: restore "map" interfaces Map compatibility fix(client-map): restore IShareMap.forEach accuracy Sep 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output

$ start-server-and-test "npm run serve -- --host 127.0.0.1 --no-open" http://127.0.0.1:3000 check-links
1: starting server using command "npm run serve -- --host 127.0.0.1 --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-website@0.0.0 serve
> docusaurus serve --host 127.0.0.1 --no-open

[SUCCESS] Serving "build" directory at: http://127.0.0.1:3000/

> fluid-framework-website@0.0.0 check-links
> linkcheck http://127.0.0.1:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  351523 links
    2064 destination URLs
    2323 URLs ignored
       0 warnings
       0 errors


@github-actions

Copy link
Copy Markdown
Contributor

Bundle size comparison

Base commit: 499278f9446da955c7fddb3f8380fe0c46fe8054
Head commit: bbec02487dc75716ae2b015fd320f61260d0e585

Notable changes

No bundles changed by ≥ 500 bytes parsed.

Per-bundle deltas

@fluid-example/bundle-size-tests

  • fluidFrameworkAllAlpha.js: parsed 804364 → 804420 (+56), gzip 220823 → 220881 (+58)
  • azureClient.js: parsed 634204 → 634199 (-5), gzip 169924 → 170012 (+88)
  • odspClient.js: parsed 606468 → 606579 (+111), gzip 162990 → 163133 (+143)
  • aqueduct.js: parsed 538081 → 538092 (+11), gzip 144406 → 144453 (+47)
  • fluidFramework.js: parsed 413678 → 413711 (+33), gzip 117282 → 117286 (+4)
  • sharedTree.js: parsed 403057 → 403083 (+26), gzip 114718 → 114725 (+7)
  • containerRuntime.js: parsed 314896 → 314878 (-18), gzip 86384 → 86384 (0)
  • sharedString.js: parsed 175191 → 175198 (+7), gzip 49636 → 49643 (+7)
  • experimentalSharedTree.js: parsed 161846 → 161846 (0), gzip 46722 → 46722 (0)
  • matrix.js: parsed 153720 → 153727 (+7), gzip 44381 → 44388 (+7)
  • loader.js: parsed 147327 → 147343 (+16), gzip 40038 → 40048 (+10)
  • odspDriver.js: parsed 106694 → 106752 (+58), gzip 33224 → 33293 (+69)
  • directory.js: parsed 65669 → 65676 (+7), gzip 18493 → 18502 (+9)
  • 578.js: parsed 58686 → 58686 (0), gzip 17657 → 17657 (0)
  • odspPrefetchSnapshot.js: parsed 46463 → 46444 (-19), gzip 15511 → 15522 (+11)
  • map.js: parsed 45820 → 45827 (+7), gzip 14119 → 14127 (+8)
  • 252.js: parsed 44384 → 44384 (0), gzip 13741 → 13741 (0)
  • summarizerDelayLoadedModule.js: parsed 31287 → 31287 (0), gzip 7929 → 7929 (0)
  • socketModule.js: parsed 27108 → 27078 (-30), gzip 8067 → 8103 (+36)
  • createNewModule.js: parsed 12464 → 12464 (0), gzip 4792 → 4805 (+13)
  • summaryModule.js: parsed 3888 → 3888 (0), gzip 1874 → 1874 (0)
  • connectionState.js: parsed 909 → 909 (0), gzip 500 → 500 (0)
  • sharedTreeAttributes.js: parsed 845 → 852 (+7), gzip 496 → 505 (+9)
  • debugAssert.js: parsed 429 → 429 (0), gzip 299 → 299 (0)
  • FluidFramework-HashFallback.js: parsed 419 → 419 (0), gzip 313 → 313 (0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dds Issues related to distributed data structures area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: repo Repo related work area: tools area: website base: main PRs targeted against main branch public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant