@rsmax/runtime 1.3.13 → 1.3.14

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
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.3.14](https://github.com/remaxjs/remax/compare/v1.3.13...v1.3.14) (2025-09-10)
7
+
8
+ ### Bug Fixes
9
+
10
+ - 修复 this.wrapperRef.current 丢失问题 ([#35](https://github.com/remaxjs/remax/issues/35)) ([41cfea6](https://github.com/remaxjs/remax/commit/41cfea657e714eab3587f1455cef75b37bc9ca7b))
11
+
6
12
  ## [1.3.13](https://github.com/remaxjs/remax/compare/v1.3.12...v1.3.13) (2025-06-16)
7
13
 
8
14
  **Note:** Version bump only for package @rsmax/runtime
@@ -98,7 +98,7 @@ function createPageConfig(Page, name) {
98
98
  };
99
99
  },
100
100
  callLifecycle(lifecycle, ...args) {
101
- var _a;
101
+ var _a, _b;
102
102
  const callbacks = this.lifecycleCallback[lifecycle] || [];
103
103
  let result;
104
104
  // 生命周期中可能改变 state 导致 callbacks 发生变化
@@ -111,7 +111,7 @@ function createPageConfig(Page, name) {
111
111
  return result;
112
112
  }
113
113
  const callback = (0, framework_shared_1.callbackName)(lifecycle);
114
- if ((_a = this.wrapperRef.current) === null || _a === void 0 ? void 0 : _a[callback]) {
114
+ if ((_b = (_a = this.wrapperRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b[callback]) {
115
115
  return this.wrapperRef.current[callback](...args);
116
116
  }
117
117
  },
@@ -91,7 +91,7 @@ export default function createPageConfig(Page, name) {
91
91
  };
92
92
  },
93
93
  callLifecycle(lifecycle, ...args) {
94
- var _a;
94
+ var _a, _b;
95
95
  const callbacks = this.lifecycleCallback[lifecycle] || [];
96
96
  let result;
97
97
  // 生命周期中可能改变 state 导致 callbacks 发生变化
@@ -104,7 +104,7 @@ export default function createPageConfig(Page, name) {
104
104
  return result;
105
105
  }
106
106
  const callback = callbackName(lifecycle);
107
- if ((_a = this.wrapperRef.current) === null || _a === void 0 ? void 0 : _a[callback]) {
107
+ if ((_b = (_a = this.wrapperRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b[callback]) {
108
108
  return this.wrapperRef.current[callback](...args);
109
109
  }
110
110
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsmax/runtime",
3
- "version": "1.3.13",
3
+ "version": "1.3.14",
4
4
  "description": "Rsmax 是一个全新的基于 React 的小程序开发框架",
5
5
  "keywords": [
6
6
  "react",
@@ -25,19 +25,19 @@
25
25
  "build": "tsc",
26
26
  "build:cjs": "tsc --module CommonJS --outDir cjs",
27
27
  "clean": "rimraf esm cjs tsconfig.tsbuildinfo",
28
- "test": "vitest run"
28
+ "test": "rstest run"
29
29
  },
30
30
  "dependencies": {
31
- "@rsmax/framework-shared": "1.3.13",
32
- "@rsmax/shared": "1.3.13",
33
- "@rsmax/web": "1.3.13",
31
+ "@rsmax/framework-shared": "1.3.14",
32
+ "@rsmax/shared": "1.3.14",
33
+ "@rsmax/web": "1.3.14",
34
34
  "qs": "^6.9.3",
35
35
  "react-is": "^18.3.0",
36
36
  "react-reconciler": "0.29.0",
37
37
  "scheduler": "0.23.2"
38
38
  },
39
39
  "devDependencies": {
40
- "@rsmax/types": "1.3.13",
40
+ "@rsmax/types": "1.3.14",
41
41
  "@types/lodash.merge": "^4.6.6",
42
42
  "@types/node": "^18",
43
43
  "@types/qs": "^6.9.3",
@@ -52,5 +52,5 @@
52
52
  "access": "public"
53
53
  },
54
54
  "esnext": "./esm/index.js",
55
- "gitHead": "ff3656307036567c5b9d9b62dcaa599f539d56b7"
55
+ "gitHead": "a542ee33a167f862ec9db0f7466a33f1cef31106"
56
56
  }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from '@rstest/core';
2
+
3
+ export default defineConfig({
4
+ globals: true,
5
+ exclude: ['cjs/**/*', 'esm/**/*', 'node_modules/**/*'],
6
+ });
package/vitest.config.js DELETED
@@ -1,8 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
-
3
- export default defineConfig({
4
- test: {
5
- globals: true,
6
- exclude: ['cjs/**/*', 'esm/**/*', 'node_modules/**/*'],
7
- },
8
- });