@lynx-js/web-worker-runtime-canary 0.18.4-canary-20251120-e2c78043 → 0.18.4

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +29 -29
  2. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # @lynx-js/web-worker-runtime
2
2
 
3
- ## 0.18.4-canary-20251120164658-e2c780434772d9abd8f92c67ce87e3935f495429
3
+ ## 0.18.4
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies []:
8
- - @lynx-js/web-constants@0.18.4-canary-20251120164658-e2c780434772d9abd8f92c67ce87e3935f495429
9
- - @lynx-js/web-mainthread-apis@0.18.4-canary-20251120164658-e2c780434772d9abd8f92c67ce87e3935f495429
10
- - @lynx-js/web-worker-rpc@0.18.4-canary-20251120164658-e2c780434772d9abd8f92c67ce87e3935f495429
8
+ - @lynx-js/web-constants@0.18.4
9
+ - @lynx-js/web-mainthread-apis@0.18.4
10
+ - @lynx-js/web-worker-rpc@0.18.4
11
11
 
12
12
  ## 0.18.3
13
13
 
@@ -226,14 +226,14 @@
226
226
  Usage:
227
227
 
228
228
  ```ts
229
- import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
230
- import { defineConfig } from "@rsbuild/core";
229
+ import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
230
+ import { defineConfig } from '@rsbuild/core';
231
231
 
232
232
  export default defineConfig({
233
233
  plugins: [
234
234
  pluginWebPlatform({
235
235
  // replace with your actual napi-modules file path
236
- napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
236
+ napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
237
237
  }),
238
238
  ],
239
239
  });
@@ -244,10 +244,10 @@
244
244
  ```ts
245
245
  // index.napi-modules.ts
246
246
  export default {
247
- custom_module: function (NapiModules, NapiModulesCall) {
247
+ custom_module: function(NapiModules, NapiModulesCall) {
248
248
  return {
249
249
  async test(name) {
250
- console.log("CustomModule", NapiModules, NapiModulesCall);
250
+ console.log('CustomModule', NapiModules, NapiModulesCall);
251
251
  },
252
252
  };
253
253
  },
@@ -299,25 +299,25 @@
299
299
  lynxView.initI18nResources = [
300
300
  {
301
301
  options: {
302
- locale: "en",
303
- channel: "1",
304
- fallback_url: "",
302
+ locale: 'en',
303
+ channel: '1',
304
+ fallback_url: '',
305
305
  },
306
306
  resource: {
307
- hello: "hello",
308
- lynx: "lynx web platform1",
307
+ hello: 'hello',
308
+ lynx: 'lynx web platform1',
309
309
  },
310
310
  },
311
311
  ];
312
- lynxView.addEventListener("i18nResourceMissed", (e) => {
312
+ lynxView.addEventListener('i18nResourceMissed', (e) => {
313
313
  console.log(e);
314
314
  });
315
315
 
316
316
  // mts
317
317
  _I18nResourceTranslation({
318
- locale: "en",
319
- channel: "1",
320
- fallback_url: "",
318
+ locale: 'en',
319
+ channel: '1',
320
+ fallback_url: '',
321
321
  });
322
322
  ```
323
323
 
@@ -567,8 +567,8 @@
567
567
  }
568
568
  };`,
569
569
  ],
570
- { type: "text/javascript" }
571
- )
570
+ { type: 'text/javascript' },
571
+ ),
572
572
  ),
573
573
  };
574
574
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -658,8 +658,8 @@
658
658
  };
659
659
  };`,
660
660
  ],
661
- { type: "text/javascript" }
662
- )
661
+ { type: 'text/javascript' },
662
+ ),
663
663
  );
664
664
 
665
665
  const color_methods = URL.createObjectURL(
@@ -674,8 +674,8 @@
674
674
  };
675
675
  };`,
676
676
  ],
677
- { type: "text/javascript" }
678
- )
677
+ { type: 'text/javascript' },
678
+ ),
679
679
  );
680
680
 
681
681
  lynxView.napiModuleMap = {
@@ -692,7 +692,7 @@
692
692
 
693
693
  ```js
694
694
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
695
- if (name === "getColor" && moduleName === "color_methods") {
695
+ if (name === 'getColor' && moduleName === 'color_methods') {
696
696
  return data.color;
697
697
  }
698
698
  };
@@ -747,8 +747,8 @@
747
747
  }
748
748
  };`,
749
749
  ],
750
- { type: "text/javascript" }
751
- )
750
+ { type: 'text/javascript' },
751
+ ),
752
752
  );
753
753
  ```
754
754
 
@@ -760,7 +760,7 @@
760
760
 
761
761
  ```js
762
762
  lynxView.onNativeModulesCall = (name, data, callback) => {
763
- if (name === "getColor") {
763
+ if (name === 'getColor') {
764
764
  callback(data.color);
765
765
  }
766
766
  };
@@ -770,7 +770,7 @@
770
770
 
771
771
  ```js
772
772
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
773
- if (name === "getColor" && moduleName === "bridge") {
773
+ if (name === 'getColor' && moduleName === 'bridge') {
774
774
  return data.color;
775
775
  }
776
776
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.18.4-canary-20251120-e2c78043",
3
+ "version": "0.18.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -23,9 +23,9 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4",
26
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.4-canary-20251120-e2c78043",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.4-canary-20251120-e2c78043",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.4-canary-20251120-e2c78043"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.4",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.4",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.4"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"