@tarojs/taro 4.0.0-beta.75 → 4.0.0-beta.77

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/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@tarojs/taro",
3
- "version": "4.0.0-beta.75",
3
+ "version": "4.0.0-beta.77",
4
4
  "description": "Taro framework",
5
- "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
5
+ "author": "O2Team",
6
+ "license": "MIT",
6
7
  "main": "index.js",
7
8
  "typings": "types/index.d.ts",
8
9
  "files": [
@@ -18,45 +19,59 @@
18
19
  "keywords": [
19
20
  "taro"
20
21
  ],
21
- "author": "O2Team",
22
- "license": "MIT",
22
+ "engines": {
23
+ "node": ">= 18"
24
+ },
23
25
  "dependencies": {
24
- "@tarojs/api": "4.0.0-beta.75"
26
+ "@types/postcss-url": "^10.0.4",
27
+ "@tarojs/runtime": "4.0.0-beta.77",
28
+ "@tarojs/api": "4.0.0-beta.77"
25
29
  },
26
30
  "devDependencies": {
27
- "@tarojs/shared": "4.0.0-beta.75",
28
- "@tarojs/helper": "4.0.0-beta.75",
29
- "@tarojs/runtime": "4.0.0-beta.75"
31
+ "@types/react": "^18.3.1",
32
+ "html-webpack-plugin": "^5.6.0",
33
+ "postcss": "^8.4.38",
34
+ "webpack": "5.91.0",
35
+ "webpack-chain": "^6.5.1",
36
+ "webpack-dev-server": "^4.15.2",
37
+ "@tarojs/components": "4.0.0-beta.77",
38
+ "@tarojs/helper": "4.0.0-beta.77",
39
+ "@tarojs/shared": "4.0.0-beta.77"
30
40
  },
31
41
  "peerDependencies": {
32
- "@tarojs/helper": "~4.0.0-beta.75",
33
- "@tarojs/shared": "~4.0.0-beta.75",
34
- "@tarojs/runtime": "~4.0.0-beta.75"
42
+ "@types/react": "^18",
43
+ "html-webpack-plugin": "^5",
44
+ "rollup": "^4",
45
+ "postcss": "^8",
46
+ "vue": "^3",
47
+ "webpack": "^5",
48
+ "webpack-chain": "^6",
49
+ "webpack-dev-server": "^4",
50
+ "@tarojs/components": "4.0.0-beta.77",
51
+ "@tarojs/helper": "4.0.0-beta.77",
52
+ "@tarojs/shared": "4.0.0-beta.77"
35
53
  },
36
54
  "peerDependenciesMeta": {
37
55
  "@types/react": {
38
56
  "optional": true
39
57
  },
40
- "@types/webpack": {
58
+ "html-webpack-plugin": {
41
59
  "optional": true
42
60
  },
43
- "@types/webpack-dev-server": {
61
+ "rollup": {
44
62
  "optional": true
45
63
  },
46
- "@types/postcss-url": {
64
+ "vue": {
47
65
  "optional": true
48
66
  },
49
- "postcss": {
67
+ "webpack": {
50
68
  "optional": true
51
69
  },
52
- "vue": {
70
+ "webpack-chain": {
53
71
  "optional": true
54
72
  },
55
- "rollup": {
73
+ "webpack-dev-server": {
56
74
  "optional": true
57
75
  }
58
- },
59
- "scripts": {
60
- "test": "echo \"Error: run tests from root\" && exit 1"
61
76
  }
62
77
  }
@@ -9,7 +9,7 @@ declare module '../../index' {
9
9
  env: {
10
10
  [key: string]: string | undefined
11
11
  /** 框架 */
12
- FRAMEWORK: 'react' | 'preact' | 'solid' | 'nerv' | 'vue' | 'vue3'
12
+ FRAMEWORK: 'react' | 'preact' | 'solid' | 'vue3'
13
13
  /** Taro 环境变量 */
14
14
  TARO_ENV: 'weapp' | 'h5' | 'rn' | 'swan' | 'alipay' | 'tt' | 'qq' | 'jd' | 'quickapp'
15
15
  /** 文件系统中的用户目录路径 (本地路径) */
@@ -78,7 +78,7 @@ declare module '../../index' {
78
78
  /** 接口调用失败的回调函数 */
79
79
  fail?: (res: TaroGeneral.CallbackResult) => void
80
80
  /** 接口调用结束的回调函数(调用成功、失败都会执行) */
81
- complete?: (res: TaroGeneral.CallbackResult) => void
81
+ complete?: (res: Partial<SuccessCallbackResult> & TaroGeneral.CallbackResult) => void
82
82
  /** 设置是否使用 jsonp 方式获取数据
83
83
  * @default false
84
84
  * @supported h5
@@ -1,4 +1,4 @@
1
- import { Interface } from 'readline'
1
+ import { Interface } from 'node:readline'
2
2
  import Taro from '../../index'
3
3
 
4
4
  declare module '../../index' {
@@ -117,12 +117,12 @@ declare module '../../index' {
117
117
  }
118
118
 
119
119
  interface TaroStatic {
120
- /**
120
+ /**
121
121
  * 1)百度收银台,聚合了主流的百度钱包、微信、支付宝、网银等多种支付渠道,方便开发者一站式快速接入多种支付渠道,让百度用户能在智能小程序场景下,直接完成支付、交易闭环,提升用户支付体验的同时,提高智能小程序的订单转化率。
122
122
  * 2)上述支付渠道在 C 端收银台有两种展示方式,开发者可以选择其中一种实现。
123
123
  * 方式一:将支付渠道内嵌在小程序提单页面中,实现方式参考文档[inline-payment-panel内嵌支付组件](https://smartprogram.baidu.com/docs/develop/component/inline_payment_panel/)。
124
124
  * 方式二:在用户确认订单后,调起收银台半屏面板承载支付渠道,实现方式参考文档调起[百度收银台](https://smartprogram.baidu.com/docs/develop/function/tune_up_2.0/#%E7%99%BE%E5%BA%A6%E6%94%B6%E9%93%B6%E5%8F%B0%E6%8E%A5%E5%8F%A32-0-%E8%AF%B4%E6%98%8E)。
125
- *
125
+ *
126
126
  * Web 态说明:为了保证用户交易行为全流程闭环体验,在 Web 态下调用该方法会做打开百度 App 对应小程序页面的降级处理。
127
127
  * @supported swan
128
128
  * @see https://smartprogram.baidu.com/docs/develop/api/open/payment_swan-requestPolymerPayment/
@@ -136,4 +136,4 @@ declare module '../../index' {
136
136
  */
137
137
  getOptimalPriceInfo(option: getOptimalPriceInfo.Option): void
138
138
  }
139
- }
139
+ }
@@ -3,7 +3,7 @@ import type Webpack from 'webpack'
3
3
 
4
4
  export type CompilerTypes = CompilerWebpackTypes | 'vite'
5
5
 
6
- export type CompilerWebpackTypes = 'webpack5' | 'webpack4'
6
+ export type CompilerWebpackTypes = 'webpack5'
7
7
 
8
8
  interface IPrebundle {
9
9
  enable?: boolean
@@ -124,6 +124,6 @@ export interface IH5Config <T extends CompilerTypes = CompilerWebpackTypes> {
124
124
  /** 生成的代码是否要兼容旧版浏览器,值为 true 时,会去读取 package.json 的 browserslist 字段。只在 vite 编译模式下有效 */
125
125
  legacy?: T extends 'vite' ? boolean : undefined
126
126
 
127
- /** 使用的编译工具。可选值:webpack4、webpack5、vite */
127
+ /** 使用的编译工具。可选值:webpack5、vite */
128
128
  compiler?: Compiler<T>
129
129
  }
@@ -99,7 +99,7 @@ export interface IMiniAppConfig<T extends CompilerTypes = CompilerWebpackTypes>
99
99
  /** 插件内部使用 */
100
100
  runtime?: Runtime
101
101
 
102
- /** 使用的编译工具。可选值:webpack4、webpack5、vite */
102
+ /** 使用的编译工具。可选值:webpack5、vite */
103
103
  compiler?: Compiler<T>
104
104
 
105
105
  /** 体验式功能 */
@@ -116,7 +116,7 @@ export interface IProjectBaseConfig {
116
116
  jsMinimizer?: 'terser' | 'esbuild'
117
117
 
118
118
  /** 配置 CSS 压缩工具 (默认 csso) */
119
- cssMinimizer?: 'csso' | 'esbuild' | 'parcelCss'
119
+ cssMinimizer?: 'csso' | 'esbuild' | 'lightningcss'
120
120
 
121
121
  /** 配置 csso 工具以压缩 CSS 代码 */
122
122
  csso?: TogglableOptions
@@ -140,11 +140,11 @@ export interface IProjectBaseConfig {
140
140
  /** 模板循环次数 */
141
141
  baseLevel?: number
142
142
 
143
- /** 使用的开发框架。可选值:react、preact、nerv、vue、vue3 */
144
- framework?: 'react' | 'preact' | 'solid' | 'nerv' | 'vue' | 'vue3'
143
+ /** 使用的开发框架。可选值:react、preact、vue3 */
144
+ framework?: 'react' | 'preact' | 'solid' | 'vue3'
145
145
  frameworkExts?: string[]
146
146
 
147
- /** 使用的编译工具。可选值:webpack4、webpack5 */
147
+ /** 使用的编译工具。可选值:webpack5 */
148
148
  compiler?: Compiler
149
149
 
150
150
  /** Webpack5 持久化缓存配置。具体配置请参考 [WebpackConfig.cache](https://webpack.js.org/configuration/cache/#cache) */
@@ -277,7 +277,7 @@ export interface IProjectConfig<T extends CompilerTypes = CompilerWebpackTypes>
277
277
  jsMinimizer?: 'terser' | 'esbuild'
278
278
 
279
279
  /** 配置 CSS 压缩工具 (默认 csso) */
280
- cssMinimizer?: 'csso' | 'esbuild' | 'parcelCss'
280
+ cssMinimizer?: 'csso' | 'esbuild' | 'lightningcss'
281
281
 
282
282
  /** 配置 csso 工具以压缩 CSS 代码 */
283
283
  csso?: TogglableOptions
@@ -296,8 +296,8 @@ export interface IProjectConfig<T extends CompilerTypes = CompilerWebpackTypes>
296
296
  /** 一个 preset 是一系列 Taro 插件的集合,配置语法同 plugins */
297
297
  presets?: PluginItem[]
298
298
 
299
- /** 使用的开发框架。可选值:react、preact、nervvue、vue3 */
300
- framework?: 'react' | 'preact' | 'solid' | 'nerv' | 'vue' | 'vue3'
299
+ /** 使用的开发框架。可选值:react、preact、solid、vue3 */
300
+ framework?: 'react' | 'preact' | 'solid' | 'vue3'
301
301
 
302
302
  /** Webpack5 持久化缓存配置。具体配置请参考 [WebpackConfig.cache](https://webpack.js.org/configuration/cache/#cache) */
303
303
  cache?: ICache
@@ -305,7 +305,7 @@ export interface IProjectConfig<T extends CompilerTypes = CompilerWebpackTypes>
305
305
  /** 控制 Taro 编译日志的输出方式 */
306
306
  logger?: ILogger
307
307
 
308
- /** 使用的编译工具。可选值:webpack4、webpack5、vite */
308
+ /** 使用的编译工具。可选值:webpack5、vite */
309
309
  compiler?: Compiler<T>
310
310
 
311
311
  /** 专属于 H5 的配置 */
@@ -1,10 +1,11 @@
1
1
  import type { RecursiveTemplate, UnRecursiveTemplate } from '@tarojs/shared/dist/template'
2
- import type { AppConfig, PageConfig } from '@tarojs/taro'
2
+
3
3
  import type { PluginContext } from 'rollup'
4
4
  import type { IMiniFilesConfig, IH5Config, IHarmonyConfig, IMiniAppConfig } from './config'
5
5
  import type { IProjectConfig } from './config/project'
6
6
  import type { IComponentConfig } from './hooks'
7
7
  import type { IFileType } from './index'
8
+ import type { AppConfig, PageConfig } from '../index'
8
9
 
9
10
  export interface ViteNativeCompMeta {
10
11
  name: string
package/types/index.d.ts CHANGED
@@ -187,7 +187,6 @@ export as namespace Taro
187
187
  declare const Taro: Taro.TaroStatic
188
188
 
189
189
  declare namespace Taro {
190
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
191
190
  interface TaroStatic {}
192
191
  }
193
192
  declare global {