@lynx-js/web-worker-runtime-canary 0.18.1-canary-20251023-9fb4623f → 0.18.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.18.1-canary-20251023071457-9fb4623f0e4c98c97146840ffe529d95577fa628
3
+ ## 0.18.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies [[`70a18fc`](https://github.com/lynx-family/lynx-stack/commit/70a18fce0083743e4516eefc91c0392d748b855f)]:
8
- - @lynx-js/web-mainthread-apis@0.18.1-canary-20251023071457-9fb4623f0e4c98c97146840ffe529d95577fa628
9
- - @lynx-js/web-constants@0.18.1-canary-20251023071457-9fb4623f0e4c98c97146840ffe529d95577fa628
10
- - @lynx-js/web-worker-rpc@0.18.1-canary-20251023071457-9fb4623f0e4c98c97146840ffe529d95577fa628
8
+ - @lynx-js/web-mainthread-apis@0.18.1
9
+ - @lynx-js/web-constants@0.18.1
10
+ - @lynx-js/web-worker-rpc@0.18.1
11
11
 
12
12
  ## 0.18.0
13
13
 
@@ -195,14 +195,14 @@
195
195
  Usage:
196
196
 
197
197
  ```ts
198
- import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
199
- import { defineConfig } from "@rsbuild/core";
198
+ import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
199
+ import { defineConfig } from '@rsbuild/core';
200
200
 
201
201
  export default defineConfig({
202
202
  plugins: [
203
203
  pluginWebPlatform({
204
204
  // replace with your actual napi-modules file path
205
- napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
205
+ napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
206
206
  }),
207
207
  ],
208
208
  });
@@ -213,10 +213,10 @@
213
213
  ```ts
214
214
  // index.napi-modules.ts
215
215
  export default {
216
- custom_module: function (NapiModules, NapiModulesCall) {
216
+ custom_module: function(NapiModules, NapiModulesCall) {
217
217
  return {
218
218
  async test(name) {
219
- console.log("CustomModule", NapiModules, NapiModulesCall);
219
+ console.log('CustomModule', NapiModules, NapiModulesCall);
220
220
  },
221
221
  };
222
222
  },
@@ -268,25 +268,25 @@
268
268
  lynxView.initI18nResources = [
269
269
  {
270
270
  options: {
271
- locale: "en",
272
- channel: "1",
273
- fallback_url: "",
271
+ locale: 'en',
272
+ channel: '1',
273
+ fallback_url: '',
274
274
  },
275
275
  resource: {
276
- hello: "hello",
277
- lynx: "lynx web platform1",
276
+ hello: 'hello',
277
+ lynx: 'lynx web platform1',
278
278
  },
279
279
  },
280
280
  ];
281
- lynxView.addEventListener("i18nResourceMissed", (e) => {
281
+ lynxView.addEventListener('i18nResourceMissed', (e) => {
282
282
  console.log(e);
283
283
  });
284
284
 
285
285
  // mts
286
286
  _I18nResourceTranslation({
287
- locale: "en",
288
- channel: "1",
289
- fallback_url: "",
287
+ locale: 'en',
288
+ channel: '1',
289
+ fallback_url: '',
290
290
  });
291
291
  ```
292
292
 
@@ -536,8 +536,8 @@
536
536
  }
537
537
  };`,
538
538
  ],
539
- { type: "text/javascript" }
540
- )
539
+ { type: 'text/javascript' },
540
+ ),
541
541
  ),
542
542
  };
543
543
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -627,8 +627,8 @@
627
627
  };
628
628
  };`,
629
629
  ],
630
- { type: "text/javascript" }
631
- )
630
+ { type: 'text/javascript' },
631
+ ),
632
632
  );
633
633
 
634
634
  const color_methods = URL.createObjectURL(
@@ -643,8 +643,8 @@
643
643
  };
644
644
  };`,
645
645
  ],
646
- { type: "text/javascript" }
647
- )
646
+ { type: 'text/javascript' },
647
+ ),
648
648
  );
649
649
 
650
650
  lynxView.napiModuleMap = {
@@ -661,7 +661,7 @@
661
661
 
662
662
  ```js
663
663
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
664
- if (name === "getColor" && moduleName === "color_methods") {
664
+ if (name === 'getColor' && moduleName === 'color_methods') {
665
665
  return data.color;
666
666
  }
667
667
  };
@@ -716,8 +716,8 @@
716
716
  }
717
717
  };`,
718
718
  ],
719
- { type: "text/javascript" }
720
- )
719
+ { type: 'text/javascript' },
720
+ ),
721
721
  );
722
722
  ```
723
723
 
@@ -729,7 +729,7 @@
729
729
 
730
730
  ```js
731
731
  lynxView.onNativeModulesCall = (name, data, callback) => {
732
- if (name === "getColor") {
732
+ if (name === 'getColor') {
733
733
  callback(data.color);
734
734
  }
735
735
  };
@@ -739,7 +739,7 @@
739
739
 
740
740
  ```js
741
741
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
742
- if (name === "getColor" && moduleName === "bridge") {
742
+ if (name === 'getColor' && moduleName === 'bridge') {
743
743
  return data.color;
744
744
  }
745
745
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.18.1-canary-20251023-9fb4623f",
3
+ "version": "0.18.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.18.1-canary-20251023-9fb4623f",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.1-canary-20251023-9fb4623f",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.1-canary-20251023-9fb4623f"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.1",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.1",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"