@lynx-js/web-worker-runtime-canary 0.18.4 → 0.18.5-canary-20251202-d2e290b6

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 +34 -25
  2. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @lynx-js/web-worker-runtime
2
2
 
3
+ ## 0.18.5-canary-20251202114154-d2e290b67971ead5bedbcc1e34dd7f3bf4a6f5f3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`46bd5ee`](https://github.com/lynx-family/lynx-stack/commit/46bd5eea324d0c8348f44b3d0b437e745411ab5c)]:
8
+ - @lynx-js/web-mainthread-apis@0.18.5-canary-20251202114154-d2e290b67971ead5bedbcc1e34dd7f3bf4a6f5f3
9
+ - @lynx-js/web-constants@0.18.5-canary-20251202114154-d2e290b67971ead5bedbcc1e34dd7f3bf4a6f5f3
10
+ - @lynx-js/web-worker-rpc@0.18.5-canary-20251202114154-d2e290b67971ead5bedbcc1e34dd7f3bf4a6f5f3
11
+
3
12
  ## 0.18.4
4
13
 
5
14
  ### Patch Changes
@@ -226,14 +235,14 @@
226
235
  Usage:
227
236
 
228
237
  ```ts
229
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
230
- import { defineConfig } from '@rsbuild/core';
238
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
239
+ import { defineConfig } from "@rsbuild/core";
231
240
 
232
241
  export default defineConfig({
233
242
  plugins: [
234
243
  pluginWebPlatform({
235
244
  // replace with your actual napi-modules file path
236
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
245
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
237
246
  }),
238
247
  ],
239
248
  });
@@ -244,10 +253,10 @@
244
253
  ```ts
245
254
  // index.napi-modules.ts
246
255
  export default {
247
- custom_module: function(NapiModules, NapiModulesCall) {
256
+ custom_module: function (NapiModules, NapiModulesCall) {
248
257
  return {
249
258
  async test(name) {
250
- console.log('CustomModule', NapiModules, NapiModulesCall);
259
+ console.log("CustomModule", NapiModules, NapiModulesCall);
251
260
  },
252
261
  };
253
262
  },
@@ -299,25 +308,25 @@
299
308
  lynxView.initI18nResources = [
300
309
  {
301
310
  options: {
302
- locale: 'en',
303
- channel: '1',
304
- fallback_url: '',
311
+ locale: "en",
312
+ channel: "1",
313
+ fallback_url: "",
305
314
  },
306
315
  resource: {
307
- hello: 'hello',
308
- lynx: 'lynx web platform1',
316
+ hello: "hello",
317
+ lynx: "lynx web platform1",
309
318
  },
310
319
  },
311
320
  ];
312
- lynxView.addEventListener('i18nResourceMissed', (e) => {
321
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
313
322
  console.log(e);
314
323
  });
315
324
 
316
325
  // mts
317
326
  _I18nResourceTranslation({
318
- locale: 'en',
319
- channel: '1',
320
- fallback_url: '',
327
+ locale: "en",
328
+ channel: "1",
329
+ fallback_url: "",
321
330
  });
322
331
  ```
323
332
 
@@ -567,8 +576,8 @@
567
576
  }
568
577
  };`,
569
578
  ],
570
- { type: 'text/javascript' },
571
- ),
579
+ { type: "text/javascript" }
580
+ )
572
581
  ),
573
582
  };
574
583
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -658,8 +667,8 @@
658
667
  };
659
668
  };`,
660
669
  ],
661
- { type: 'text/javascript' },
662
- ),
670
+ { type: "text/javascript" }
671
+ )
663
672
  );
664
673
 
665
674
  const color_methods = URL.createObjectURL(
@@ -674,8 +683,8 @@
674
683
  };
675
684
  };`,
676
685
  ],
677
- { type: 'text/javascript' },
678
- ),
686
+ { type: "text/javascript" }
687
+ )
679
688
  );
680
689
 
681
690
  lynxView.napiModuleMap = {
@@ -692,7 +701,7 @@
692
701
 
693
702
  ```js
694
703
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
695
- if (name === 'getColor' && moduleName === 'color_methods') {
704
+ if (name === "getColor" && moduleName === "color_methods") {
696
705
  return data.color;
697
706
  }
698
707
  };
@@ -747,8 +756,8 @@
747
756
  }
748
757
  };`,
749
758
  ],
750
- { type: 'text/javascript' },
751
- ),
759
+ { type: "text/javascript" }
760
+ )
752
761
  );
753
762
  ```
754
763
 
@@ -760,7 +769,7 @@
760
769
 
761
770
  ```js
762
771
  lynxView.onNativeModulesCall = (name, data, callback) => {
763
- if (name === 'getColor') {
772
+ if (name === "getColor") {
764
773
  callback(data.color);
765
774
  }
766
775
  };
@@ -770,7 +779,7 @@
770
779
 
771
780
  ```js
772
781
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
773
- if (name === 'getColor' && moduleName === 'bridge') {
782
+ if (name === "getColor" && moduleName === "bridge") {
774
783
  return data.color;
775
784
  }
776
785
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.18.4",
3
+ "version": "0.18.5-canary-20251202-d2e290b6",
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",
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"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.5-canary-20251202-d2e290b6",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.5-canary-20251202-d2e290b6",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.5-canary-20251202-d2e290b6"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"