@tarojs/extend 4.0.0-canary.9 → 4.0.0

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/LICENSE CHANGED
@@ -154,15 +154,8 @@ See `/LICENSE` for details of the license.
154
154
 
155
155
  ==================
156
156
 
157
- MIT (stencil-vue2-output-target):
158
- The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
159
- `/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
160
- See `/LICENSE` for details of the license.
161
-
162
- ==================
163
-
164
157
  MIT (weui):
165
- The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
158
+ The following files embed [weui](https://github.com/Tencent/weui) MIT:
166
159
  `/packages/taro-components/src/components/*.scss`
167
160
  See `/LICENSE.txt` for details of the license.
168
161
 
@@ -172,3 +165,10 @@ Apache-2.0 (intersection-observer):
172
165
  The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
173
166
  `/packages/taro-api/src/polyfill/intersection-observer.ts`
174
167
  See `/LICENSE.txt` for details of the license.
168
+
169
+ ==================
170
+
171
+ MIT (babel-plugin-jsx-dom-expressions):
172
+ The following files embed [babel-plugin-jsx-dom-expressions](https://github.com/ryansolid/dom-expressions/blob/main/packages/babel-plugin-jsx-dom-expressions) MIT:
173
+ `/packages/babel-plugin-transform-solid-jsx/src/*`
174
+ See `/LICENSE` for details of the license.
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@tarojs/extend",
3
- "version": "4.0.0-canary.9",
3
+ "version": "4.0.0",
4
4
  "description": "Taro extend functionality",
5
- "author": "yuche <i@yuche.me>",
6
- "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro-extend#readme",
5
+ "author": "O2Team",
7
6
  "license": "MIT",
8
7
  "main": "src/index.js",
9
8
  "files": [
@@ -16,12 +15,8 @@
16
15
  "bugs": {
17
16
  "url": "https://github.com/NervJS/taro/issues"
18
17
  },
19
- "devDependencies": {
20
- "jest": "^29.3.1",
21
- "jest-cli": "^29.3.1",
22
- "jest-environment-node": "^29.5.0",
23
- "ts-jest": "^29.0.5",
24
- "typescript": "^4.7.4"
18
+ "engines": {
19
+ "node": ">= 18"
25
20
  },
26
21
  "scripts": {
27
22
  "test": "TARO_ENV=weapp jest --coverage false",
@@ -815,9 +815,13 @@ export const Zepto = (function () {
815
815
  if (isBrowser) {
816
816
  return Promise.resolve(hasScrollTop ? this[0].scrollTop : this[0].pageYOffset)
817
817
  }
818
- return hasScrollTop ? Promise.resolve(this[0].scrollTop) : new Promise((resolve) => {
818
+ return hasScrollTop ? Promise.resolve(this[0].scrollTop) : new Promise((resolve, reject) => {
819
819
  Taro.createSelectorQuery().select('#' + this[0].uid).scrollOffset(function (res) {
820
- resolve(res.scrollTop)
820
+ if (res) {
821
+ resolve(res.scrollTop)
822
+ } else {
823
+ reject(new Error(`get scrollTop error: #${this[0].uid} query fail`))
824
+ }
821
825
  }).exec()
822
826
  })
823
827
  }