@lynx-js/web-worker-runtime-canary 0.17.1-canary-20250925-6180e11d → 0.17.1

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.17.1-canary-20250925132904-6180e11dc18587b00e2a8c02a52a7de190b953ed
3
+ ## 0.17.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies []:
8
- - @lynx-js/web-constants@0.17.1-canary-20250925132904-6180e11dc18587b00e2a8c02a52a7de190b953ed
9
- - @lynx-js/web-mainthread-apis@0.17.1-canary-20250925132904-6180e11dc18587b00e2a8c02a52a7de190b953ed
10
- - @lynx-js/web-worker-rpc@0.17.1-canary-20250925132904-6180e11dc18587b00e2a8c02a52a7de190b953ed
8
+ - @lynx-js/web-constants@0.17.1
9
+ - @lynx-js/web-mainthread-apis@0.17.1
10
+ - @lynx-js/web-worker-rpc@0.17.1
11
11
 
12
12
  ## 0.17.0
13
13
 
@@ -151,14 +151,14 @@
151
151
  Usage:
152
152
 
153
153
  ```ts
154
- import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
155
- import { defineConfig } from "@rsbuild/core";
154
+ import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
155
+ import { defineConfig } from '@rsbuild/core';
156
156
 
157
157
  export default defineConfig({
158
158
  plugins: [
159
159
  pluginWebPlatform({
160
160
  // replace with your actual napi-modules file path
161
- napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
161
+ napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
162
162
  }),
163
163
  ],
164
164
  });
@@ -169,10 +169,10 @@
169
169
  ```ts
170
170
  // index.napi-modules.ts
171
171
  export default {
172
- custom_module: function (NapiModules, NapiModulesCall) {
172
+ custom_module: function(NapiModules, NapiModulesCall) {
173
173
  return {
174
174
  async test(name) {
175
- console.log("CustomModule", NapiModules, NapiModulesCall);
175
+ console.log('CustomModule', NapiModules, NapiModulesCall);
176
176
  },
177
177
  };
178
178
  },
@@ -224,25 +224,25 @@
224
224
  lynxView.initI18nResources = [
225
225
  {
226
226
  options: {
227
- locale: "en",
228
- channel: "1",
229
- fallback_url: "",
227
+ locale: 'en',
228
+ channel: '1',
229
+ fallback_url: '',
230
230
  },
231
231
  resource: {
232
- hello: "hello",
233
- lynx: "lynx web platform1",
232
+ hello: 'hello',
233
+ lynx: 'lynx web platform1',
234
234
  },
235
235
  },
236
236
  ];
237
- lynxView.addEventListener("i18nResourceMissed", (e) => {
237
+ lynxView.addEventListener('i18nResourceMissed', (e) => {
238
238
  console.log(e);
239
239
  });
240
240
 
241
241
  // mts
242
242
  _I18nResourceTranslation({
243
- locale: "en",
244
- channel: "1",
245
- fallback_url: "",
243
+ locale: 'en',
244
+ channel: '1',
245
+ fallback_url: '',
246
246
  });
247
247
  ```
248
248
 
@@ -492,8 +492,8 @@
492
492
  }
493
493
  };`,
494
494
  ],
495
- { type: "text/javascript" }
496
- )
495
+ { type: 'text/javascript' },
496
+ ),
497
497
  ),
498
498
  };
499
499
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -583,8 +583,8 @@
583
583
  };
584
584
  };`,
585
585
  ],
586
- { type: "text/javascript" }
587
- )
586
+ { type: 'text/javascript' },
587
+ ),
588
588
  );
589
589
 
590
590
  const color_methods = URL.createObjectURL(
@@ -599,8 +599,8 @@
599
599
  };
600
600
  };`,
601
601
  ],
602
- { type: "text/javascript" }
603
- )
602
+ { type: 'text/javascript' },
603
+ ),
604
604
  );
605
605
 
606
606
  lynxView.napiModuleMap = {
@@ -617,7 +617,7 @@
617
617
 
618
618
  ```js
619
619
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
620
- if (name === "getColor" && moduleName === "color_methods") {
620
+ if (name === 'getColor' && moduleName === 'color_methods') {
621
621
  return data.color;
622
622
  }
623
623
  };
@@ -672,8 +672,8 @@
672
672
  }
673
673
  };`,
674
674
  ],
675
- { type: "text/javascript" }
676
- )
675
+ { type: 'text/javascript' },
676
+ ),
677
677
  );
678
678
  ```
679
679
 
@@ -685,7 +685,7 @@
685
685
 
686
686
  ```js
687
687
  lynxView.onNativeModulesCall = (name, data, callback) => {
688
- if (name === "getColor") {
688
+ if (name === 'getColor') {
689
689
  callback(data.color);
690
690
  }
691
691
  };
@@ -695,7 +695,7 @@
695
695
 
696
696
  ```js
697
697
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
698
- if (name === "getColor" && moduleName === "bridge") {
698
+ if (name === 'getColor' && moduleName === 'bridge') {
699
699
  return data.color;
700
700
  }
701
701
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.17.1-canary-20250925-6180e11d",
3
+ "version": "0.17.1",
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.17.1-canary-20250925-6180e11d",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.17.1-canary-20250925-6180e11d",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.17.1-canary-20250925-6180e11d"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.17.1",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.17.1",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.17.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"