Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .changeset/guard-receivers-against-detached-nodes.md

This file was deleted.

7 changes: 7 additions & 0 deletions examples/custom-element/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# example-custom-element

## 0.0.26

### Patch Changes

- Updated dependencies [[`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d)]:
- @remote-dom/core@1.11.1

## 0.0.25

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-element/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example-custom-element",
"version": "0.0.25",
"version": "0.0.26",
"type": "module",
"private": true,
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions examples/getting-started/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# example-getting-started

## 0.0.26

### Patch Changes

- Updated dependencies [[`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d)]:
- @remote-dom/core@1.11.1

## 0.0.25

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/getting-started/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example-getting-started",
"version": "0.0.25",
"version": "0.0.26",
"type": "module",
"private": true,
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions examples/kitchen-sink/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# example-kitchen-sink

## 0.0.33

### Patch Changes

- Updated dependencies [[`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d)]:
- @remote-dom/signals@2.1.1
- @remote-dom/core@1.11.1

## 0.0.32

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/kitchen-sink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "example-kitchen-sink",
"type": "module",
"private": true,
"version": "0.0.32",
"version": "0.0.33",
"scripts": {
"start": "vite"
},
Expand Down
14 changes: 14 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @remote-dom/core

## 1.11.1

### Patch Changes

- [#611](https://github.com/Shopify/remote-dom/pull/611) [`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d) Thanks [@eddiechan](https://github.com/eddiechan)! - Guard receivers against late mutations on detached nodes

`RemoteReceiver` and `SignalRemoteReceiver` now drop `insertChild`, `removeChild`, `updateProperty`, and `updateText` mutations whose target node is no longer in the receiver's `attached` map, instead of throwing a `TypeError` while dereferencing the missing node.

This race surfaces in production as unhandled promise rejections such as `TypeError: undefined is not an object (evaluating 'x.properties')` (Safari) / `TypeError: Cannot read properties of undefined (reading 'properties')` (V8) when a remote sender dispatches a mutation for a node whose host-side state has just been removed (for example, a `removeChild` for an ancestor was processed earlier in the same batch, or arrived first from a separate batched payload).

PR #533 previously added a similar guard to `removeChild` for the case where the _child slot_ at a given index was empty, but did not handle the case where the _parent itself_ was missing, and did not touch `updateProperty` or `updateText`. This change applies the same defensive pattern uniformly to every connection callback that dereferences `attached.get(id)`.

Late mutations targeting a detached subtree are by definition no-ops — there is nothing left to mutate.

## 1.11.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"access": "public",
"@remote-dom/registry": "https://registry.npmjs.org"
},
"version": "1.11.0",
"version": "1.11.1",
"engines": {
"node": ">=14.0.0"
},
Expand Down
17 changes: 17 additions & 0 deletions packages/signals/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @remote-dom/signals

## 2.1.1

### Patch Changes

- [#611](https://github.com/Shopify/remote-dom/pull/611) [`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d) Thanks [@eddiechan](https://github.com/eddiechan)! - Guard receivers against late mutations on detached nodes

`RemoteReceiver` and `SignalRemoteReceiver` now drop `insertChild`, `removeChild`, `updateProperty`, and `updateText` mutations whose target node is no longer in the receiver's `attached` map, instead of throwing a `TypeError` while dereferencing the missing node.

This race surfaces in production as unhandled promise rejections such as `TypeError: undefined is not an object (evaluating 'x.properties')` (Safari) / `TypeError: Cannot read properties of undefined (reading 'properties')` (V8) when a remote sender dispatches a mutation for a node whose host-side state has just been removed (for example, a `removeChild` for an ancestor was processed earlier in the same batch, or arrived first from a separate batched payload).

PR #533 previously added a similar guard to `removeChild` for the case where the _child slot_ at a given index was empty, but did not handle the case where the _parent itself_ was missing, and did not touch `updateProperty` or `updateText`. This change applies the same defensive pattern uniformly to every connection callback that dereferences `attached.get(id)`.

Late mutations targeting a detached subtree are by definition no-ops — there is nothing left to mutate.

- Updated dependencies [[`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d)]:
- @remote-dom/core@1.11.1

## 2.1.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/signals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"access": "public",
"@remote-dom/registry": "https://registry.npmjs.org"
},
"version": "2.1.0",
"version": "2.1.1",
"engines": {
"node": ">=14.0.0"
},
Expand Down Expand Up @@ -43,6 +43,6 @@
"defaults and not dead"
],
"dependencies": {
"@remote-dom/core": "workspace:^1.7.0"
"@remote-dom/core": "workspace:^1.11.1"
}
}
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading