@lynx-js/web-mainthread-apis-canary 0.15.4 → 0.15.5-canary-20250806-5b6cdc37

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,5 +1,17 @@
1
1
  # @lynx-js/web-mainthread-apis
2
2
 
3
+ ## 0.15.5-canary-20250806045727-5b6cdc3757ede85a59e44917ae3fe02f6de9a6da
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: load main-thread chunk in ESM format ([#1437](https://github.com/lynx-family/lynx-stack/pull/1437))
8
+
9
+ See [nodejs/node#59362](https://github.com/nodejs/node/issues/59362) for more details.
10
+
11
+ - Updated dependencies [[`29434ae`](https://github.com/lynx-family/lynx-stack/commit/29434aec853f14242f521316429cf07a93b8c371)]:
12
+ - @lynx-js/web-constants@0.15.5-canary-20250806045727-5b6cdc3757ede85a59e44917ae3fe02f6de9a6da
13
+ - @lynx-js/web-style-transformer@0.15.5-canary-20250806045727-5b6cdc3757ede85a59e44917ae3fe02f6de9a6da
14
+
3
15
  ## 0.15.4
4
16
 
5
17
  ### Patch Changes
@@ -134,25 +146,25 @@
134
146
  lynxView.initI18nResources = [
135
147
  {
136
148
  options: {
137
- locale: 'en',
138
- channel: '1',
139
- fallback_url: '',
149
+ locale: "en",
150
+ channel: "1",
151
+ fallback_url: "",
140
152
  },
141
153
  resource: {
142
- hello: 'hello',
143
- lynx: 'lynx web platform1',
154
+ hello: "hello",
155
+ lynx: "lynx web platform1",
144
156
  },
145
157
  },
146
158
  ];
147
- lynxView.addEventListener('i18nResourceMissed', (e) => {
159
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
148
160
  console.log(e);
149
161
  });
150
162
 
151
163
  // mts
152
164
  _I18nResourceTranslation({
153
- locale: 'en',
154
- channel: '1',
155
- fallback_url: '',
165
+ locale: "en",
166
+ channel: "1",
167
+ fallback_url: "",
156
168
  });
157
169
  ```
158
170
 
@@ -29,10 +29,11 @@ export function prepareMainThreadAPIs(backgroundThreadRpc, rootDom, createElemen
29
29
  return [name, cachedModule];
30
30
  }
31
31
  else {
32
- Object.assign(globalThis, { module: {} });
33
- await import(/* webpackIgnore: true */ url);
34
- const module = globalThis.module;
35
- Object.assign(globalThis, { module: {} });
32
+ const { default: evaluateModule } = await import(
33
+ /* webpackIgnore: true */ url);
34
+ const module = {
35
+ exports: evaluateModule,
36
+ };
36
37
  moduleCache[url] = module;
37
38
  return [name, module];
38
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-mainthread-apis-canary",
3
- "version": "0.15.4",
3
+ "version": "0.15.5-canary-20250806-5b6cdc37",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -24,8 +24,8 @@
24
24
  "**/*.css"
25
25
  ],
26
26
  "dependencies": {
27
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.4",
28
- "@lynx-js/web-style-transformer": "npm:@lynx-js/web-style-transformer-canary@0.15.4",
27
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.5-canary-20250806-5b6cdc37",
28
+ "@lynx-js/web-style-transformer": "npm:@lynx-js/web-style-transformer-canary@0.15.5-canary-20250806-5b6cdc37",
29
29
  "hyphenate-style-name": "^1.1.0"
30
30
  }
31
31
  }