@lynx-js/runtime-wrapper-webpack-plugin-canary 0.2.2 → 0.2.3-canary-20260721-f0f4ac15

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lynx-js/runtime-wrapper-webpack-plugin
2
2
 
3
+ ## 0.2.3-canary-20260721041701-f0f4ac15a9f8c2d9a879ac6d46c2c885724b7c7f
4
+
5
+ ### Patch Changes
6
+
7
+ - Prefer `globalThis` when resolving the global object in runtime wrappers. ([#3003](https://github.com/lynx-family/lynx-stack/pull/3003))
8
+
3
9
  ## 0.2.2
4
10
 
5
11
  ### Patch Changes
@@ -170,15 +170,14 @@ if (!${RuntimeGlobals.lynxChunkEntries}[${chunkId}]) {
170
170
  // For example, the Promise object is replaced with a call to "getPromise" when `overrideRuntimePromise` is true.
171
171
  const loadScriptBanner = (strictMode = true) => `(function(){
172
172
  ${strictMode ? '\'use strict\';' : ';'}
173
- var g = (new Function('return this;'))();
173
+ var g = globalThis;
174
174
  function __init_card_bundle__(lynxCoreInject) {
175
175
  g.__bundle__holder = undefined;
176
176
  var globDynamicComponentEntry = g.globDynamicComponentEntry || '__Card__';
177
177
  var tt = lynxCoreInject.tt;`;
178
178
  const loadBundleBanner = (strictMode = true) => `(function(){
179
179
  ${strictMode ? '\'use strict\';' : ';'}
180
- var eval2 = eval;
181
- var g = eval2("this");
180
+ var g = globalThis;
182
181
  function initBundle(lynxCoreInject) {
183
182
  var tt = lynxCoreInject.tt;
184
183
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/runtime-wrapper-webpack-plugin-canary",
3
- "version": "0.2.2",
3
+ "version": "0.2.3-canary-20260721-f0f4ac15",
4
4
  "description": "Use runtime wrapper which allow JavaScript to be load by Lynx.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -38,6 +38,7 @@
38
38
  "@microsoft/api-extractor": "7.58.2",
39
39
  "@rspack/core": "2.1.3",
40
40
  "@rstest/core": "0.11.0",
41
+ "@types/node": "^24.10.13",
41
42
  "@lynx-js/test-tools": "0.0.0"
42
43
  },
43
44
  "engines": {