@lynx-js/web-core-canary 0.15.6-canary-20250813-ab8cee4b → 0.15.6-canary-20250813-cb6d23c3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,14 +1,16 @@
1
1
  # @lynx-js/web-core
2
2
 
3
- ## 0.15.6-canary-20250813064930-ab8cee4bab384fa905c045c4b4b93e5d4a95d57f
3
+ ## 0.15.6-canary-20250813090336-cb6d23c3dc99c7dda584b1b81bfe08c8822cc7b6
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Fix mtsGlobalThis race condition in createRenderAllOnUI ([#1506](https://github.com/lynx-family/lynx-stack/pull/1506))
8
+
7
9
  - Updated dependencies [[`f76aae9`](https://github.com/lynx-family/lynx-stack/commit/f76aae9ea06abdc7022ba508d22f9f4eb00864e8), [`b8b060b`](https://github.com/lynx-family/lynx-stack/commit/b8b060b9bef722bb47bd90c33fab3922160c711d), [`d8381a5`](https://github.com/lynx-family/lynx-stack/commit/d8381a58d12af6424cab4955617251e798bdc9f1), [`214898b`](https://github.com/lynx-family/lynx-stack/commit/214898bb9c74fc9b44e68cb220a4c02485102ce2), [`ab8cee4`](https://github.com/lynx-family/lynx-stack/commit/ab8cee4bab384fa905c045c4b4b93e5d4a95d57f)]:
8
- - @lynx-js/web-mainthread-apis@0.15.6-canary-20250813064930-ab8cee4bab384fa905c045c4b4b93e5d4a95d57f
9
- - @lynx-js/web-constants@0.15.6-canary-20250813064930-ab8cee4bab384fa905c045c4b4b93e5d4a95d57f
10
- - @lynx-js/web-worker-runtime@0.15.6-canary-20250813064930-ab8cee4bab384fa905c045c4b4b93e5d4a95d57f
11
- - @lynx-js/web-worker-rpc@0.15.6-canary-20250813064930-ab8cee4bab384fa905c045c4b4b93e5d4a95d57f
10
+ - @lynx-js/web-mainthread-apis@0.15.6-canary-20250813090336-cb6d23c3dc99c7dda584b1b81bfe08c8822cc7b6
11
+ - @lynx-js/web-constants@0.15.6-canary-20250813090336-cb6d23c3dc99c7dda584b1b81bfe08c8822cc7b6
12
+ - @lynx-js/web-worker-runtime@0.15.6-canary-20250813090336-cb6d23c3dc99c7dda584b1b81bfe08c8822cc7b6
13
+ - @lynx-js/web-worker-rpc@0.15.6-canary-20250813090336-cb6d23c3dc99c7dda584b1b81bfe08c8822cc7b6
12
14
 
13
15
  ## 0.15.5
14
16
 
@@ -22,6 +22,7 @@ export function createRenderAllOnUI(mainToBackgroundRpc, shadowRoot, markTimingI
22
22
  return i18nResources;
23
23
  });
24
24
  let mtsGlobalThis;
25
+ const pendingUpdateCalls = [];
25
26
  const start = async (configs) => {
26
27
  if (ssrDumpInfo) {
27
28
  const lynxUniqueIdToElement = [];
@@ -56,9 +57,20 @@ export function createRenderAllOnUI(mainToBackgroundRpc, shadowRoot, markTimingI
56
57
  else {
57
58
  mtsGlobalThis = await startMainThread(configs);
58
59
  }
60
+ // Process any pending update calls that were queued while mtsGlobalThis was undefined
61
+ for (const args of pendingUpdateCalls) {
62
+ mtsGlobalThis.updatePage?.(...args);
63
+ }
64
+ pendingUpdateCalls.length = 0;
59
65
  };
60
66
  const updateDataMainThread = async (...args) => {
61
- mtsGlobalThis.updatePage?.(...args);
67
+ if (mtsGlobalThis) {
68
+ mtsGlobalThis.updatePage?.(...args);
69
+ }
70
+ else {
71
+ // Cache the call if mtsGlobalThis is not yet initialized
72
+ pendingUpdateCalls.push(args);
73
+ }
62
74
  };
63
75
  const updateI18nResourcesMainThread = (data) => {
64
76
  i18nResources.setData(data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-core-canary",
3
- "version": "0.15.6-canary-20250813-ab8cee4b",
3
+ "version": "0.15.6-canary-20250813-cb6d23c3",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -25,10 +25,10 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.3",
28
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.6-canary-20250813-ab8cee4b",
29
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.6-canary-20250813-ab8cee4b",
30
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.6-canary-20250813-ab8cee4b",
31
- "@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.15.6-canary-20250813-ab8cee4b"
28
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.6-canary-20250813-cb6d23c3",
29
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.6-canary-20250813-cb6d23c3",
30
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.6-canary-20250813-cb6d23c3",
31
+ "@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.15.6-canary-20250813-cb6d23c3"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@lynx-js/lynx-core": "0.1.2",