@lynx-js/web-worker-runtime-canary 0.15.5 → 0.15.6-canary-20250812-214898bb

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.15.6-canary-20250812043229-214898bb9c74fc9b44e68cb220a4c02485102ce2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`214898b`](https://github.com/lynx-family/lynx-stack/commit/214898bb9c74fc9b44e68cb220a4c02485102ce2)]:
8
+ - @lynx-js/web-mainthread-apis@0.15.6-canary-20250812043229-214898bb9c74fc9b44e68cb220a4c02485102ce2
9
+ - @lynx-js/web-constants@0.15.6-canary-20250812043229-214898bb9c74fc9b44e68cb220a4c02485102ce2
10
+ - @lynx-js/web-worker-rpc@0.15.6-canary-20250812043229-214898bb9c74fc9b44e68cb220a4c02485102ce2
11
+
3
12
  ## 0.15.5
4
13
 
5
14
  ### Patch Changes
@@ -78,14 +87,14 @@
78
87
  Usage:
79
88
 
80
89
  ```ts
81
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
82
- import { defineConfig } from '@rsbuild/core';
90
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
91
+ import { defineConfig } from "@rsbuild/core";
83
92
 
84
93
  export default defineConfig({
85
94
  plugins: [
86
95
  pluginWebPlatform({
87
96
  // replace with your actual napi-modules file path
88
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
97
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
89
98
  }),
90
99
  ],
91
100
  });
@@ -96,10 +105,10 @@
96
105
  ```ts
97
106
  // index.napi-modules.ts
98
107
  export default {
99
- custom_module: function(NapiModules, NapiModulesCall) {
108
+ custom_module: function (NapiModules, NapiModulesCall) {
100
109
  return {
101
110
  async test(name) {
102
- console.log('CustomModule', NapiModules, NapiModulesCall);
111
+ console.log("CustomModule", NapiModules, NapiModulesCall);
103
112
  },
104
113
  };
105
114
  },
@@ -151,25 +160,25 @@
151
160
  lynxView.initI18nResources = [
152
161
  {
153
162
  options: {
154
- locale: 'en',
155
- channel: '1',
156
- fallback_url: '',
163
+ locale: "en",
164
+ channel: "1",
165
+ fallback_url: "",
157
166
  },
158
167
  resource: {
159
- hello: 'hello',
160
- lynx: 'lynx web platform1',
168
+ hello: "hello",
169
+ lynx: "lynx web platform1",
161
170
  },
162
171
  },
163
172
  ];
164
- lynxView.addEventListener('i18nResourceMissed', (e) => {
173
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
165
174
  console.log(e);
166
175
  });
167
176
 
168
177
  // mts
169
178
  _I18nResourceTranslation({
170
- locale: 'en',
171
- channel: '1',
172
- fallback_url: '',
179
+ locale: "en",
180
+ channel: "1",
181
+ fallback_url: "",
173
182
  });
174
183
  ```
175
184
 
@@ -419,8 +428,8 @@
419
428
  }
420
429
  };`,
421
430
  ],
422
- { type: 'text/javascript' },
423
- ),
431
+ { type: "text/javascript" }
432
+ )
424
433
  ),
425
434
  };
426
435
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -510,8 +519,8 @@
510
519
  };
511
520
  };`,
512
521
  ],
513
- { type: 'text/javascript' },
514
- ),
522
+ { type: "text/javascript" }
523
+ )
515
524
  );
516
525
 
517
526
  const color_methods = URL.createObjectURL(
@@ -526,8 +535,8 @@
526
535
  };
527
536
  };`,
528
537
  ],
529
- { type: 'text/javascript' },
530
- ),
538
+ { type: "text/javascript" }
539
+ )
531
540
  );
532
541
 
533
542
  lynxView.napiModuleMap = {
@@ -544,7 +553,7 @@
544
553
 
545
554
  ```js
546
555
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
547
- if (name === 'getColor' && moduleName === 'color_methods') {
556
+ if (name === "getColor" && moduleName === "color_methods") {
548
557
  return data.color;
549
558
  }
550
559
  };
@@ -599,8 +608,8 @@
599
608
  }
600
609
  };`,
601
610
  ],
602
- { type: 'text/javascript' },
603
- ),
611
+ { type: "text/javascript" }
612
+ )
604
613
  );
605
614
  ```
606
615
 
@@ -612,7 +621,7 @@
612
621
 
613
622
  ```js
614
623
  lynxView.onNativeModulesCall = (name, data, callback) => {
615
- if (name === 'getColor') {
624
+ if (name === "getColor") {
616
625
  callback(data.color);
617
626
  }
618
627
  };
@@ -622,7 +631,7 @@
622
631
 
623
632
  ```js
624
633
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
625
- if (name === 'getColor' && moduleName === 'bridge') {
634
+ if (name === "getColor" && moduleName === "bridge") {
626
635
  return data.color;
627
636
  }
628
637
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.15.5",
3
+ "version": "0.15.6-canary-20250812-214898bb",
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.3",
26
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.5",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.5",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.5"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.6-canary-20250812-214898bb",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.6-canary-20250812-214898bb",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.6-canary-20250812-214898bb"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.2"