Skip to content

Commit 9eff4af

Browse files
authored
Merge pull request #614 from Shopify/changeset-release/main
Publish packages πŸš€
2 parents d356702 + e73cfb6 commit 9eff4af

12 files changed

Lines changed: 60 additions & 21 deletions

File tree

β€Ž.changeset/guard-receivers-against-detached-nodes.mdβ€Ž

Lines changed: 0 additions & 14 deletions
This file was deleted.

β€Žexamples/custom-element/CHANGELOG.mdβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# example-custom-element
22

3+
## 0.0.26
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d)]:
8+
- @remote-dom/core@1.11.1
9+
310
## 0.0.25
411

512
### Patch Changes

β€Žexamples/custom-element/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "example-custom-element",
3-
"version": "0.0.25",
3+
"version": "0.0.26",
44
"type": "module",
55
"private": true,
66
"scripts": {

β€Žexamples/getting-started/CHANGELOG.mdβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# example-getting-started
22

3+
## 0.0.26
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d)]:
8+
- @remote-dom/core@1.11.1
9+
310
## 0.0.25
411

512
### Patch Changes

β€Žexamples/getting-started/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "example-getting-started",
3-
"version": "0.0.25",
3+
"version": "0.0.26",
44
"type": "module",
55
"private": true,
66
"scripts": {

β€Žexamples/kitchen-sink/CHANGELOG.mdβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# example-kitchen-sink
22

3+
## 0.0.33
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d)]:
8+
- @remote-dom/signals@2.1.1
9+
- @remote-dom/core@1.11.1
10+
311
## 0.0.32
412

513
### Patch Changes

β€Žexamples/kitchen-sink/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "example-kitchen-sink",
33
"type": "module",
44
"private": true,
5-
"version": "0.0.32",
5+
"version": "0.0.33",
66
"scripts": {
77
"start": "vite"
88
},

β€Žpackages/core/CHANGELOG.mdβ€Ž

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# @remote-dom/core
22

3+
## 1.11.1
4+
5+
### Patch Changes
6+
7+
- [#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
8+
9+
`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.
10+
11+
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).
12+
13+
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)`.
14+
15+
Late mutations targeting a detached subtree are by definition no-ops β€” there is nothing left to mutate.
16+
317
## 1.11.0
418

519
### Minor Changes

β€Žpackages/core/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"access": "public",
88
"@remote-dom/registry": "https://registry.npmjs.org"
99
},
10-
"version": "1.11.0",
10+
"version": "1.11.1",
1111
"engines": {
1212
"node": ">=14.0.0"
1313
},

β€Žpackages/signals/CHANGELOG.mdβ€Ž

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# @remote-dom/signals
22

3+
## 2.1.1
4+
5+
### Patch Changes
6+
7+
- [#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
8+
9+
`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.
10+
11+
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).
12+
13+
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)`.
14+
15+
Late mutations targeting a detached subtree are by definition no-ops β€” there is nothing left to mutate.
16+
17+
- Updated dependencies [[`f20f6e7`](https://github.com/Shopify/remote-dom/commit/f20f6e75cbd20d673cb32b76f582e0199055d27d)]:
18+
- @remote-dom/core@1.11.1
19+
320
## 2.1.0
421

522
### Minor Changes

0 commit comments

Comments
Β (0)