@tarojs/taro 4.0.9-beta.0 → 4.0.9-beta.1

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/taro",
3
- "version": "4.0.9-beta.0",
3
+ "version": "4.0.9-beta.1",
4
4
  "description": "Taro framework",
5
5
  "author": "O2Team",
6
6
  "license": "MIT",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@types/postcss-url": "^10.0.4",
27
- "@tarojs/api": "4.0.9-beta.0",
28
- "@tarojs/runtime": "4.0.9-beta.0"
27
+ "@tarojs/api": "4.0.9-beta.1",
28
+ "@tarojs/runtime": "4.0.9-beta.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/react": "^18.3.1",
@@ -35,9 +35,9 @@
35
35
  "webpack-chain": "^6.5.1",
36
36
  "webpack-dev-server": "^4.15.2",
37
37
  "rollup": "^3.29.4",
38
- "@tarojs/components": "4.0.9-beta.0",
39
- "@tarojs/helper": "4.0.9-beta.0",
40
- "@tarojs/shared": "4.0.9-beta.0"
38
+ "@tarojs/helper": "4.0.9-beta.1",
39
+ "@tarojs/components": "4.0.9-beta.1",
40
+ "@tarojs/shared": "4.0.9-beta.1"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@types/react": "^18",
@@ -48,9 +48,9 @@
48
48
  "webpack": "^5",
49
49
  "webpack-chain": "^6",
50
50
  "webpack-dev-server": "^4",
51
- "@tarojs/components": "4.0.9-beta.0",
52
- "@tarojs/shared": "4.0.9-beta.0",
53
- "@tarojs/helper": "4.0.9-beta.0"
51
+ "@tarojs/helper": "4.0.9-beta.1",
52
+ "@tarojs/shared": "4.0.9-beta.1",
53
+ "@tarojs/components": "4.0.9-beta.1"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@types/react": {
@@ -9,6 +9,7 @@ import type { AppConfig, PageConfig } from '../index'
9
9
 
10
10
  export interface ViteNativeCompMeta {
11
11
  name: string
12
+ exportName: string
12
13
  scriptPath: string
13
14
  configPath: string
14
15
  config: PageConfig
@@ -109,6 +110,7 @@ export interface ViteCompilerContext<T> {
109
110
  configFileList: string[]
110
111
  compilePage: (pageName: string) => VitePageMeta
111
112
  watchConfigFile: (rollupCtx: PluginContext) => void
113
+ collectedDeps: (rollupCtx: PluginContext, id: string, filter, cache: Set<string> = new Set()) => Promise<Set<string>>
112
114
  getAppScriptPath: () => string
113
115
  getApp: () => ViteAppMeta
114
116
  getPages: () => VitePageMeta[]
@@ -140,6 +142,7 @@ export interface ViteHarmonyCompilerContext extends ViteCompilerContext<ViteHarm
140
142
  getCommonChunks: () => string[]
141
143
  modifyHarmonyConfig: (config: Partial<AppConfig>) => void
142
144
  modifyHostPackage: (deps?: Record<string, string>, devDeps?: Record<string, string>) => Exclude<IHarmonyConfig['ohPackage'], void>
145
+ resolvePageImportPath: (scriptPath: string, pageName: string) => string
143
146
  collectNativeComponents: (meta: ViteAppMeta | VitePageMeta | ViteNativeCompMeta) => void
144
147
  getScriptPath: (filePath: string) => string
145
148
  getStylePath: (filePath: string) => string
@@ -151,6 +154,7 @@ export interface ViteMiniCompilerContext extends ViteCompilerContext<ViteMiniBui
151
154
  commonChunks: string[]
152
155
  nativeComponents : Map<string, ViteNativeCompMeta>
153
156
  getCommonChunks: () => string[]
157
+ resolvePageImportPath: (scriptPath: string, pageName: string) => string
154
158
  collectNativeComponents: (meta: ViteAppMeta | VitePageMeta | ViteNativeCompMeta) => void
155
159
  getScriptPath: (filePath: string) => string
156
160
  getTemplatePath: (filePath: string) => string
package/types/index.d.ts CHANGED
@@ -192,4 +192,5 @@ declare namespace Taro {
192
192
  declare global {
193
193
  const defineAppConfig: (config: Taro.AppConfig) => Taro.AppConfig
194
194
  const definePageConfig: (config: Taro.PageConfig) => Taro.Config
195
+ const importNativeComponent: <T> (path: string, name = '', exportName = 'default') => Awaited<T>
195
196
  }
@@ -193,7 +193,7 @@ declare module './index' {
193
193
  /** 页面自定义组件配置
194
194
  * @see https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/
195
195
  */
196
- usingComponents?: Record<string, string>
196
+ usingComponents?: Record<string, string | [string, string]>
197
197
  /** 指定使用升级后的 weui 样式
198
198
  * - v2: 可表明启用新版的组件样式
199
199
  * @default default