@modern-js/plugin-v2 0.0.0-nightly-20250515160310 → 0.0.0-nightly-20250519160349

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.
@@ -102,6 +102,9 @@ function initPluginAPI({ context, pluginManager }) {
102
102
  modifyServerRoutes: hooks.modifyServerRoutes.tap,
103
103
  ...extendsPluginApi
104
104
  };
105
+ if (typeof Proxy === "undefined") {
106
+ return pluginAPI;
107
+ }
105
108
  return new Proxy(pluginAPI, {
106
109
  get(target, prop) {
107
110
  if (prop === "then") {
@@ -72,6 +72,9 @@ function initPluginAPI({ context, plugins }) {
72
72
  pickContext: hooks.pickContext.tap,
73
73
  ...extendsPluginApi
74
74
  };
75
+ if (typeof Proxy === "undefined") {
76
+ return pluginAPI;
77
+ }
75
78
  return new Proxy(pluginAPI, {
76
79
  get(target, prop) {
77
80
  if (prop === "then") {
@@ -73,6 +73,9 @@ function initPluginAPI({ context, pluginManager }) {
73
73
  onReset: hooks.onReset.tap,
74
74
  ...extendsPluginApi
75
75
  };
76
+ if (typeof Proxy === "undefined") {
77
+ return pluginAPI;
78
+ }
76
79
  return new Proxy(pluginAPI, {
77
80
  get(target, prop) {
78
81
  if (prop === "then") {
@@ -87,6 +87,9 @@ function initPluginAPI(param) {
87
87
  _internalServerPlugins: hooks._internalServerPlugins.tap,
88
88
  modifyServerRoutes: hooks.modifyServerRoutes.tap
89
89
  }, extendsPluginApi);
90
+ if (typeof Proxy === "undefined") {
91
+ return pluginAPI;
92
+ }
90
93
  return new Proxy(pluginAPI, {
91
94
  get: function get(target, prop) {
92
95
  if (prop === "then") {
@@ -53,6 +53,9 @@ function initPluginAPI(param) {
53
53
  wrapRoot: hooks.wrapRoot.tap,
54
54
  pickContext: hooks.pickContext.tap
55
55
  }, extendsPluginApi);
56
+ if (typeof Proxy === "undefined") {
57
+ return pluginAPI;
58
+ }
56
59
  return new Proxy(pluginAPI, {
57
60
  get: function get(target, prop) {
58
61
  if (prop === "then") {
@@ -56,6 +56,9 @@ function initPluginAPI(param) {
56
56
  onPrepare: hooks.onPrepare.tap,
57
57
  onReset: hooks.onReset.tap
58
58
  }, extendsPluginApi);
59
+ if (typeof Proxy === "undefined") {
60
+ return pluginAPI;
61
+ }
59
62
  return new Proxy(pluginAPI, {
60
63
  get: function get(target, prop) {
61
64
  if (prop === "then") {
@@ -79,6 +79,9 @@ function initPluginAPI({ context, pluginManager }) {
79
79
  modifyServerRoutes: hooks.modifyServerRoutes.tap,
80
80
  ...extendsPluginApi
81
81
  };
82
+ if (typeof Proxy === "undefined") {
83
+ return pluginAPI;
84
+ }
82
85
  return new Proxy(pluginAPI, {
83
86
  get(target, prop) {
84
87
  if (prop === "then") {
@@ -49,6 +49,9 @@ function initPluginAPI({ context, plugins }) {
49
49
  pickContext: hooks.pickContext.tap,
50
50
  ...extendsPluginApi
51
51
  };
52
+ if (typeof Proxy === "undefined") {
53
+ return pluginAPI;
54
+ }
52
55
  return new Proxy(pluginAPI, {
53
56
  get(target, prop) {
54
57
  if (prop === "then") {
@@ -49,6 +49,9 @@ function initPluginAPI({ context, pluginManager }) {
49
49
  onReset: hooks.onReset.tap,
50
50
  ...extendsPluginApi
51
51
  };
52
+ if (typeof Proxy === "undefined") {
53
+ return pluginAPI;
54
+ }
52
55
  return new Proxy(pluginAPI, {
53
56
  get(target, prop) {
54
57
  if (prop === "then") {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-nightly-20250515160310",
18
+ "version": "0.0.0-nightly-20250519160349",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -81,8 +81,8 @@
81
81
  "dependencies": {
82
82
  "@swc/helpers": "^0.5.17",
83
83
  "jiti": "1.21.7",
84
- "@modern-js/runtime-utils": "0.0.0-nightly-20250515160310",
85
- "@modern-js/utils": "0.0.0-nightly-20250515160310"
84
+ "@modern-js/runtime-utils": "0.0.0-nightly-20250519160349",
85
+ "@modern-js/utils": "0.0.0-nightly-20250519160349"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@rsbuild/core": "1.3.20",
@@ -91,10 +91,10 @@
91
91
  "@types/react": "^18.3.11",
92
92
  "jest": "^29",
93
93
  "typescript": "^5",
94
- "@modern-js/types": "0.0.0-nightly-20250515160310",
95
- "@modern-js/uni-builder": "0.0.0-nightly-20250515160310",
96
- "@scripts/build": "0.0.0-nightly-20250515160310",
97
- "@scripts/jest-config": "0.0.0-nightly-20250515160310"
94
+ "@modern-js/types": "0.0.0-nightly-20250519160349",
95
+ "@modern-js/uni-builder": "0.0.0-nightly-20250519160349",
96
+ "@scripts/build": "0.0.0-nightly-20250519160349",
97
+ "@scripts/jest-config": "0.0.0-nightly-20250519160349"
98
98
  },
99
99
  "sideEffects": false,
100
100
  "publishConfig": {