Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
02b0c20e
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
750
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
02b0c20e
编写于
4月 11, 2024
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: lint
上级
067e1a7e
变更
53
隐藏空白更改
内联
并排
Showing
53 changed file
with
177 addition
and
174 deletion
+177
-174
package.json
package.json
+1
-1
packages/uni-app-plus/__tests__/service/amd.spec.bak
packages/uni-app-plus/__tests__/service/amd.spec.bak
+0
-0
packages/uni-app-plus/__tests__/service/dom/dom.spec.ts
packages/uni-app-plus/__tests__/service/dom/dom.spec.ts
+6
-7
packages/uni-app-plus/__tests__/service/index.spec.ts
packages/uni-app-plus/__tests__/service/index.spec.ts
+5
-5
packages/uni-app-plus/__tests__/uts.spec.ts
packages/uni-app-plus/__tests__/uts.spec.ts
+2
-2
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineEmits.spec.ts
...s/__tests__/android/sfc/compileScript/defineEmits.spec.ts
+1
-1
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineExpose.spec.ts
.../__tests__/android/sfc/compileScript/defineExpose.spec.ts
+1
-1
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineModel.spec.ts
...s/__tests__/android/sfc/compileScript/defineModel.spec.ts
+1
-1
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineOptions.spec.ts
...__tests__/android/sfc/compileScript/defineOptions.spec.ts
+1
-1
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineProps.spec.ts
...s/__tests__/android/sfc/compileScript/defineProps.spec.ts
+1
-1
packages/uni-app-uts/__tests__/android/sfc/compileTemplate.spec.ts
...uni-app-uts/__tests__/android/sfc/compileTemplate.spec.ts
+1
-1
packages/uni-app-uts/__tests__/android/sfc/utils.ts
packages/uni-app-uts/__tests__/android/sfc/utils.ts
+1
-1
packages/uni-app-uts/__tests__/android/testUtils.ts
packages/uni-app-uts/__tests__/android/testUtils.ts
+4
-4
packages/uni-app-uts/__tests__/android/transforms/transformElement.spec.ts
...uts/__tests__/android/transforms/transformElement.spec.ts
+16
-16
packages/uni-app-uts/__tests__/android/transforms/transformExpressions.spec.ts
...__tests__/android/transforms/transformExpressions.spec.ts
+4
-4
packages/uni-app-uts/__tests__/android/transforms/vBind.spec.ts
...es/uni-app-uts/__tests__/android/transforms/vBind.spec.ts
+9
-9
packages/uni-app-uts/__tests__/android/transforms/vFor.spec.ts
...ges/uni-app-uts/__tests__/android/transforms/vFor.spec.ts
+10
-10
packages/uni-app-uts/__tests__/android/transforms/vHtml.spec.ts
...es/uni-app-uts/__tests__/android/transforms/vHtml.spec.ts
+1
-1
packages/uni-app-uts/__tests__/android/transforms/vIf.spec.ts
...ages/uni-app-uts/__tests__/android/transforms/vIf.spec.ts
+17
-17
packages/uni-app-uts/__tests__/android/transforms/vModel.spec.ts
...s/uni-app-uts/__tests__/android/transforms/vModel.spec.ts
+13
-13
packages/uni-app-uts/__tests__/android/transforms/vOn.spec.ts
...ages/uni-app-uts/__tests__/android/transforms/vOn.spec.ts
+8
-8
packages/uni-app-uts/__tests__/android/transforms/vOnWithModifier.spec.ts
...-uts/__tests__/android/transforms/vOnWithModifier.spec.ts
+5
-5
packages/uni-app-uts/__tests__/android/transforms/vOnce.spec.ts
...es/uni-app-uts/__tests__/android/transforms/vOnce.spec.ts
+1
-1
packages/uni-app-uts/__tests__/android/transforms/vSlot.spec.ts
...es/uni-app-uts/__tests__/android/transforms/vSlot.spec.ts
+17
-17
packages/uni-app-vite/__tests__/nvue/compiler.spec.ts
packages/uni-app-vite/__tests__/nvue/compiler.spec.ts
+2
-2
packages/uni-cli-shared/__tests__/inject.spec.ts
packages/uni-cli-shared/__tests__/inject.spec.ts
+1
-1
packages/uni-cli-shared/__tests__/stylePluginScoped.spec.ts
packages/uni-cli-shared/__tests__/stylePluginScoped.spec.ts
+1
-1
packages/uni-cli-shared/__tests__/usingComponents.spec.ts
packages/uni-cli-shared/__tests__/usingComponents.spec.ts
+1
-1
packages/uni-i18n/__tests__/i18n.spec.ts
packages/uni-i18n/__tests__/i18n.spec.ts
+1
-1
packages/uni-i18n/__tests__/json.spec.ts
packages/uni-i18n/__tests__/json.spec.ts
+1
-1
packages/uni-i18n/__tests__/locale.spec.ts
packages/uni-i18n/__tests__/locale.spec.ts
+2
-2
packages/uni-mp-alipay/__tests__/testUtils.ts
packages/uni-mp-alipay/__tests__/testUtils.ts
+2
-2
packages/uni-mp-baidu/__tests__/testUtils.ts
packages/uni-mp-baidu/__tests__/testUtils.ts
+2
-2
packages/uni-mp-compiler/__tests__/component.spec.ts
packages/uni-mp-compiler/__tests__/component.spec.ts
+1
-1
packages/uni-mp-compiler/__tests__/test.ts
packages/uni-mp-compiler/__tests__/test.ts
+1
-1
packages/uni-mp-compiler/__tests__/testUtils.ts
packages/uni-mp-compiler/__tests__/testUtils.ts
+2
-2
packages/uni-mp-compiler/__tests__/transformElement.spec.ts
packages/uni-mp-compiler/__tests__/transformElement.spec.ts
+8
-4
packages/uni-mp-compiler/__tests__/vBind.spec.ts
packages/uni-mp-compiler/__tests__/vBind.spec.ts
+2
-2
packages/uni-mp-compiler/__tests__/vFor.spec.ts
packages/uni-mp-compiler/__tests__/vFor.spec.ts
+5
-5
packages/uni-mp-compiler/__tests__/vIf.spec.ts
packages/uni-mp-compiler/__tests__/vIf.spec.ts
+2
-2
packages/uni-mp-compiler/__tests__/vOn.mp.spec.ts
packages/uni-mp-compiler/__tests__/vOn.mp.spec.ts
+2
-2
packages/uni-mp-compiler/__tests__/vOn.spec.ts
packages/uni-mp-compiler/__tests__/vOn.spec.ts
+2
-2
packages/uni-mp-core/__tests__/hooks.spec.ts
packages/uni-mp-core/__tests__/hooks.spec.ts
+1
-1
packages/uni-mp-jd/__tests__/testUtils.ts
packages/uni-mp-jd/__tests__/testUtils.ts
+1
-1
packages/uni-mp-kuaishou/__tests__/testUtils.ts
packages/uni-mp-kuaishou/__tests__/testUtils.ts
+1
-1
packages/uni-mp-qq/__tests__/testUtils.ts
packages/uni-mp-qq/__tests__/testUtils.ts
+1
-1
packages/uni-mp-toutiao/__tests__/testUtils.ts
packages/uni-mp-toutiao/__tests__/testUtils.ts
+2
-2
packages/uni-mp-weixin/__tests__/testUtils.ts
packages/uni-mp-weixin/__tests__/testUtils.ts
+2
-2
packages/uni-mp-xhs/__tests__/testUtils.ts
packages/uni-mp-xhs/__tests__/testUtils.ts
+1
-1
packages/uni-preprocess/__tests__/preprocess.spec.ts
packages/uni-preprocess/__tests__/preprocess.spec.ts
+1
-1
packages/uni-shared/__tests__/vdom/style.spec.ts
packages/uni-shared/__tests__/vdom/style.spec.ts
+1
-1
packages/uni-uts-v1/__tests__/code.spec.ts
packages/uni-uts-v1/__tests__/code.spec.ts
+1
-1
packages/uni-uts-v1/__tests__/sourceMap.spec.ts
packages/uni-uts-v1/__tests__/sourceMap.spec.ts
+1
-1
未找到文件。
package.json
浏览文件 @
02b0c20e
...
...
@@ -12,7 +12,7 @@
"build:app"
:
"node scripts/build.js uni-app-plus uni-app-vite uni-app-vue uni-app-uvue"
,
"build:mp"
:
"node scripts/build.js uni-mp-vue uni-mp-vite uni-mp-compiler uni-mp-alipay uni-mp-baidu uni-mp-kuaishou uni-mp-lark uni-mp-qq uni-mp-toutiao uni-mp-weixin uni-mp-xhs uni-quickapp-webview"
,
"size"
:
"npm run build size-check"
,
"lint"
:
"eslint packages/*/src/**/*.ts"
,
"lint"
:
"eslint packages/*/src/**/*.ts
packages/*/__tests__/**/*.ts
"
,
"format"
:
"prettier --write --parser typescript
\"
packages/**/*.ts?(x)
\"
"
,
"test"
:
"tsc -p ./test-dts/tsconfig.json && node scripts/test.js && jest"
,
"test-dts"
:
"tsc -p ./test-dts/tsconfig.json && tsc -p ./test-dts/tsconfig.build.json"
,
...
...
packages/uni-app-plus/__tests__/service/amd.spec
1.ts
→
packages/uni-app-plus/__tests__/service/amd.spec
.bak
浏览文件 @
02b0c20e
文件已移动
packages/uni-app-plus/__tests__/service/dom/dom.spec.ts
浏览文件 @
02b0c20e
...
...
@@ -7,14 +7,13 @@ import {
ACTION_TYPE_REMOVE_EVENT
,
ACTION_TYPE_SET_ATTRIBUTE
,
ACTION_TYPE_SET_TEXT
,
CreateAction
,
SetAttributeAction
,
UniEventListener
,
type
CreateAction
,
EventModifierFlags
,
type
SetAttributeAction
,
type
UniEventListener
,
}
from
'
@dcloudio/uni-shared
'
import
UniPageNode
,
{
createPageNode
,
}
from
'
../../../src/service/framework/dom/Page
'
import
type
UniPageNode
from
'
../../../src/service/framework/dom/Page
'
import
{
createPageNode
}
from
'
../../../src/service/framework/dom/Page
'
import
{
createElement
,
createTextNode
,
...
...
@@ -22,7 +21,7 @@ import {
}
from
'
../../../../uni-app-vue/lib/service.runtime.esm
'
import
{
ACTION_TYPE_DICT
,
DictAction
,
type
DictAction
,
setActionMinify
,
}
from
'
../../../src/constants
'
import
{
decodeActions
}
from
'
../../../src/view/framework/dom/decodeActions
'
...
...
packages/uni-app-plus/__tests__/service/index.spec.ts
浏览文件 @
02b0c20e
...
...
@@ -2,14 +2,14 @@ import { compileTemplate } from '@vue/compiler-sfc'
import
{
uniAppPlugin
}
from
'
../../../uni-app-vite/src/plugin
'
import
{
ref
,
nextTick
,
createApp
,
createVNode
as
_createVNode
,
openBlock
as
_openBlock
,
createBlock
as
_createBlock
,
createCommentVNode
as
_createCommentVNode
,
createVNode
as
_createVNode
,
openBlock
as
_openBlock
,
withModifiers
as
_withModifiers
,
createApp
,
nextTick
,
ref
,
}
from
'
../../../uni-app-vue/lib/service.runtime.esm
'
import
{
createPageNode
}
from
'
../../src/service/framework/dom/Page
'
...
...
packages/uni-app-plus/__tests__/uts.spec.ts
浏览文件 @
02b0c20e
import
{
normalizeArg
,
initUTSProxyFunction
,
initUTSProxyClass
,
initUTSProxyFunction
,
normalizeArg
,
}
from
'
../src/service/api/plugin/uts
'
describe
(
'
uts-module
'
,
()
=>
{
...
...
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineEmits.spec.ts
浏览文件 @
02b0c20e
import
{
BindingTypes
}
from
'
@vue/compiler-core
'
import
{
compileSFCScript
as
compile
,
assertCod
e
}
from
'
../utils
'
import
{
assertCode
,
compileSFCScript
as
compil
e
}
from
'
../utils
'
describe
(
'
defineEmits
'
,
()
=>
{
test
(
'
basic usage
'
,
()
=>
{
...
...
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineExpose.spec.ts
浏览文件 @
02b0c20e
import
{
compileSFCScript
as
compile
,
assertCod
e
}
from
'
../utils
'
import
{
assertCode
,
compileSFCScript
as
compil
e
}
from
'
../utils
'
test
(
'
defineExpose()
'
,
()
=>
{
const
{
content
}
=
compile
(
`
...
...
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineModel.spec.ts
浏览文件 @
02b0c20e
import
{
BindingTypes
}
from
'
@vue/compiler-core
'
import
{
compileSFCScript
as
compile
,
assertCod
e
}
from
'
../utils
'
import
{
assertCode
,
compileSFCScript
as
compil
e
}
from
'
../utils
'
describe
(
'
defineModel()
'
,
()
=>
{
test
(
'
basic usage
'
,
()
=>
{
...
...
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineOptions.spec.ts
浏览文件 @
02b0c20e
import
{
compileSFCScript
as
compile
,
assertCod
e
}
from
'
../utils
'
import
{
assertCode
,
compileSFCScript
as
compil
e
}
from
'
../utils
'
describe
(
'
defineOptions()
'
,
()
=>
{
test
(
'
basic usage
'
,
()
=>
{
...
...
packages/uni-app-uts/__tests__/android/sfc/compileScript/defineProps.spec.ts
浏览文件 @
02b0c20e
import
{
BindingTypes
}
from
'
@vue/compiler-core
'
import
{
compileSFCScript
as
compile
,
assertCod
e
}
from
'
../utils
'
import
{
assertCode
,
compileSFCScript
as
compil
e
}
from
'
../utils
'
describe
(
'
defineProps
'
,
()
=>
{
test
(
'
basic usage
'
,
()
=>
{
...
...
packages/uni-app-uts/__tests__/android/sfc/compileTemplate.spec.ts
浏览文件 @
02b0c20e
import
{
compileSFCScript
as
compile
,
assertCod
e
}
from
'
./utils
'
import
{
assertCode
,
compileSFCScript
as
compil
e
}
from
'
./utils
'
describe
(
'
SFC compile template
'
,
()
=>
{
test
(
'
template with html
'
,
()
=>
{
...
...
packages/uni-app-uts/__tests__/android/sfc/utils.ts
浏览文件 @
02b0c20e
...
...
@@ -2,8 +2,8 @@ import type { SFCParseOptions } from '@vue/compiler-sfc'
import
{
parse
as
babelParse
}
from
'
@babel/parser
'
import
{
type
SFCScriptCompileOptions
,
compileScript
,
SFCScriptCompileOptions
,
}
from
'
../../../src/plugins/android/uvue/sfc/compiler/compileScript
'
import
{
genTemplateCode
}
from
'
../../../src/plugins/android/uvue/code/template
'
import
{
resolveGenTemplateCodeOptions
}
from
'
../../../src/plugins/android/uvue/sfc/template
'
...
...
packages/uni-app-uts/__tests__/android/testUtils.ts
浏览文件 @
02b0c20e
import
{
isAppUVueNativeTag
}
from
'
@dcloudio/uni-shared
'
import
{
compile
}
from
'
../../src/plugins/android/uvue/compiler/index
'
import
{
TemplateCompilerOptions
}
from
'
../../src/plugins/android/uvue/compiler/options
'
import
type
{
TemplateCompilerOptions
}
from
'
../../src/plugins/android/uvue/compiler/options
'
import
{
NodeTypes
}
from
'
@vue/compiler-core
'
import
{
isString
,
PatchFlags
,
ShapeFlags
,
PatchFlagNames
,
type
PatchFlags
,
type
ShapeFlags
,
isArray
,
isString
,
}
from
'
@vue/shared
'
export
function
assert
(
...
...
packages/uni-app-uts/__tests__/android/transforms/transformElement.spec.ts
浏览文件 @
02b0c20e
import
{
PatchFlags
}
from
'
@vue/shared
'
import
{
RESOLVE_COMPONENT
,
BASE_TRANSITION
,
BindingTypes
,
CREATE_VNODE
,
GUARD_REACTIVE_PROPS
,
KEEP_ALIVE
,
MERGE_PROPS
,
NORMALIZE_CLASS
,
NORMALIZE_PROPS
,
NORMALIZE_STYLE
,
RESOLVE_COMPONENT
,
RESOLVE_DIRECTIVE
,
TO_HANDLERS
,
helperNameMap
,
TELEPORT
,
RESOLVE_DYNAMIC_COMPONENT
,
SUSPENSE
,
KEEP_ALIVE
,
BASE_TRANSITION
,
NORMALIZE_CLASS
,
NORMALIZE_STYLE
,
NORMALIZE_PROPS
,
GUARD_REACTIVE_PROPS
,
TELEPORT
,
TO_HANDLERS
,
helperNameMap
,
baseParse
as
parse
,
BindingTypes
,
}
from
'
@vue/compiler-core
'
import
{
type
DirectiveNode
,
NodeTypes
,
type
RootNode
,
type
VNodeCall
,
createObjectProperty
,
DirectiveNode
,
RootNode
,
VNodeCall
,
}
from
'
@vue/compiler-core
'
import
{
transformElement
as
baseTransformElement
}
from
'
@vue/compiler-core
'
import
{
compile
as
baseCompile
}
from
'
../../../src/plugins/android/uvue/compiler
'
...
...
@@ -33,9 +33,9 @@ import { transformBind } from '../../../src/plugins/android/uvue/compiler/transf
import
{
createObjectMatcher
,
genFlagText
}
from
'
../testUtils
'
import
{
transformText
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/transformText
'
import
{
TemplateCompilerOptions
}
from
'
../../../src/plugins/android/uvue/compiler/options
'
import
type
{
TemplateCompilerOptions
}
from
'
../../../src/plugins/android/uvue/compiler/options
'
import
{
NodeTransform
,
type
NodeTransform
,
transform
,
}
from
'
../../../src/plugins/android/uvue/compiler/transform
'
import
{
transformExpression
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/transformExpression
'
...
...
packages/uni-app-uts/__tests__/android/transforms/transformExpressions.spec.ts
浏览文件 @
02b0c20e
...
...
@@ -2,9 +2,9 @@
import
{
BindingTypes
,
ConstantTypes
,
DirectiveNode
,
ElementNode
,
InterpolationNode
,
type
DirectiveNode
,
type
ElementNode
,
type
InterpolationNode
,
NodeTypes
,
baseParse
as
parse
,
}
from
'
@vue/compiler-core
'
...
...
@@ -13,7 +13,7 @@ import { transformIf } from '../../../src/plugins/android/uvue/compiler/transfor
import
{
transformExpression
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/transformExpression
'
import
{
compile
as
baseCompile
}
from
'
../../../src/plugins/android/uvue/compiler
'
import
{
TemplateCompilerOptions
}
from
'
../../../src/plugins/android/uvue/compiler/options
'
import
type
{
TemplateCompilerOptions
}
from
'
../../../src/plugins/android/uvue/compiler/options
'
function
parseWithExpressionTransform
(
template
:
string
,
...
...
packages/uni-app-uts/__tests__/android/transforms/vBind.spec.ts
浏览文件 @
02b0c20e
import
{
extend
}
from
'
@vue/shared
'
import
{
baseParse
as
parse
,
transform
,
ElementNode
,
ObjectExpression
,
CompilerOptions
,
CAMELIZE
,
type
CallExpression
,
type
CompilerOptions
,
type
ElementNode
,
ErrorCodes
,
VNodeCall
,
CallExpression
,
NORMALIZE_PROPS
,
NodeTypes
,
CAMELIZE
,
type
ObjectExpression
,
type
VNodeCall
,
helperNameMap
,
NORMALIZE_PROPS
,
baseParse
as
parse
,
transform
,
transformElement
,
}
from
'
@vue/compiler-core
'
import
{
transformBind
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/vBind
'
...
...
packages/uni-app-uts/__tests__/android/transforms/vFor.spec.ts
浏览文件 @
02b0c20e
import
{
extend
,
PatchFlags
}
from
'
@vue/shared
'
import
{
PatchFlags
,
extend
}
from
'
@vue/shared
'
import
{
type
CompilerOptions
,
ConstantTypes
,
type
ElementNode
,
ErrorCodes
,
type
ForCodegenNode
,
type
ForNode
,
type
InterpolationNode
,
NodeTypes
,
type
SimpleExpressionNode
,
baseParse
as
parse
,
transform
,
ForNode
,
ForCodegenNode
,
CompilerOptions
,
NodeTypes
,
SimpleExpressionNode
,
ErrorCodes
,
ElementNode
,
InterpolationNode
,
ConstantTypes
,
transformElement
,
}
from
'
@vue/compiler-core
'
import
{
transformIf
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/vIf
'
...
...
packages/uni-app-uts/__tests__/android/transforms/vHtml.spec.ts
浏览文件 @
02b0c20e
import
{
extend
}
from
'
@vue/shared
'
import
{
type
CompilerOptions
,
baseParse
as
parse
,
transform
,
CompilerOptions
,
transformElement
,
}
from
'
@vue/compiler-core
'
import
{
ErrorCodes
}
from
'
../../../src/plugins/android/uvue/compiler/errors
'
...
...
packages/uni-app-uts/__tests__/android/transforms/vIf.spec.ts
浏览文件 @
02b0c20e
import
{
extend
}
from
'
@vue/shared
'
import
{
baseParse
as
parse
,
transform
,
ElementNode
,
CompilerOptions
,
ErrorCodes
,
VNodeCall
,
NodeTypes
,
NORMALIZE_PROPS
,
IfNode
,
IfConditionalExpression
,
SimpleExpressionNode
,
CommentNode
,
ConditionalExpression
,
ElementTypes
,
IfBranchNode
,
TextNode
,
CREATE_COMMENT
,
MERGE_PROPS
,
type
CommentNode
,
type
CompilerOptions
,
type
ConditionalExpression
,
type
ElementNode
,
ElementTypes
,
ErrorCodes
,
FRAGMENT
,
type
IfBranchNode
,
type
IfConditionalExpression
,
type
IfNode
,
MERGE_PROPS
,
NORMALIZE_PROPS
,
NodeTypes
,
type
SimpleExpressionNode
,
TO_HANDLERS
,
type
TextNode
,
type
VNodeCall
,
baseParse
as
parse
,
transform
,
transformElement
,
}
from
'
@vue/compiler-core
'
import
{
transformIf
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/vIf
'
...
...
packages/uni-app-uts/__tests__/android/transforms/vModel.spec.ts
浏览文件 @
02b0c20e
import
{
extend
}
from
'
@vue/shared
'
import
{
baseParse
as
parse
,
transform
,
ElementNode
,
CompilerOptions
,
ObjectExpression
,
PlainElementNode
,
ComponentNode
,
NodeTypes
,
VNodeCall
,
NORMALIZE_PROPS
,
BindingTypes
,
ForNode
,
type
CompilerOptions
,
type
ComponentNode
,
type
ElementNode
,
ErrorCodes
,
transformElement
,
type
ForNode
,
NORMALIZE_PROPS
,
NodeTypes
,
type
ObjectExpression
,
type
PlainElementNode
,
type
VNodeCall
,
baseParse
as
parse
,
trackSlotScopes
,
transform
,
transformElement
,
}
from
'
@vue/compiler-core
'
import
{
transformFor
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/vFor
'
import
{
transformExpression
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/transformExpression
'
import
{
transformModel
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/vModel
'
import
{
generate
}
from
'
../../../src/plugins/android/uvue/compiler/codegen
'
import
{
CallExpression
}
from
'
@babel/types
'
import
type
{
CallExpression
}
from
'
@babel/types
'
import
{
assert
}
from
'
../testUtils
'
function
parseWithVModel
(
template
:
string
,
options
:
CompilerOptions
=
{})
{
...
...
packages/uni-app-uts/__tests__/android/transforms/vOn.spec.ts
浏览文件 @
02b0c20e
import
{
extend
}
from
'
@vue/shared
'
import
{
baseParse
as
parse
,
CompilerOptions
,
transform
,
ElementNode
,
transformElement
,
type
CompilerOptions
,
type
ElementNode
,
ErrorCodes
,
NodeTypes
,
type
ObjectExpression
,
TO_HANDLER_KEY
,
type
VNodeCall
,
helperNameMap
,
NodeTypes
,
ObjectExpression
,
VNodeCall
,
baseParse
as
parse
,
transform
,
transformElement
,
}
from
'
@vue/compiler-core
'
import
{
transformOn
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/vOn
'
import
{
transformExpression
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/transformExpression
'
...
...
packages/uni-app-uts/__tests__/android/transforms/vOnWithModifier.spec.ts
浏览文件 @
02b0c20e
import
{
baseParse
as
parse
,
CompilerOptions
,
ElementNode
,
type
CompilerOptions
,
type
ElementNode
,
NodeTypes
,
ObjectExpression
,
type
ObjectExpression
,
type
VNodeCall
,
baseParse
as
parse
,
transform
,
VNodeCall
,
transformElement
,
}
from
'
@vue/compiler-core
'
import
{
transformOn
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/vOnWithModifier
'
...
...
packages/uni-app-uts/__tests__/android/transforms/vOnce.spec.ts
浏览文件 @
02b0c20e
import
{
NodeTypes
,
SET_BLOCK_TRACKING
,
baseParse
}
from
'
@vue/compiler-core
'
import
{
getBaseTransformPreset
}
from
'
../../../src/plugins/android/uvue/compiler/index
'
import
{
transform
}
from
'
../../../src/plugins/android/uvue/compiler/transform
'
import
{
TemplateCompilerOptions
}
from
'
../../../src/plugins/android/uvue/compiler/options
'
import
type
{
TemplateCompilerOptions
}
from
'
../../../src/plugins/android/uvue/compiler/options
'
import
{
generate
}
from
'
../../../src/plugins/android/uvue/compiler/codegen
'
import
{
RENDER_SLOT
}
from
'
../../../src/plugins/android/uvue/compiler/runtimeHelpers
'
...
...
packages/uni-app-uts/__tests__/android/transforms/vSlot.spec.ts
浏览文件 @
02b0c20e
import
{
extend
,
PatchFlags
}
from
'
@vue/shared
'
import
{
PatchFlags
,
extend
}
from
'
@vue/shared
'
import
{
CompilerOptions
,
baseParse
as
parse
,
transform
,
generate
,
ElementNode
,
NodeTypes
,
CREATE_SLOTS
,
type
CompilerOptions
,
type
ComponentNode
,
type
ElementNode
,
ErrorCodes
,
ForNode
,
ComponentNode
,
VNodeCall
,
SlotsExpression
,
ObjectExpression
,
SimpleExpressionNode
,
RenderSlotCall
,
transformElement
,
type
ForNode
,
NodeTypes
,
type
ObjectExpression
,
RENDER_LIST
,
type
RenderSlotCall
,
type
SimpleExpressionNode
,
type
SlotsExpression
,
type
VNodeCall
,
generate
,
baseParse
as
parse
,
trackSlotScopes
,
trackVForSlotScopes
,
CREATE_SLOTS
,
RENDER_LIST
,
transform
,
transformElement
,
}
from
'
@vue/compiler-core
'
import
{
transformOn
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/vOn
'
import
{
transformBind
}
from
'
../../../src/plugins/android/uvue/compiler/transforms/vBind
'
...
...
packages/uni-app-vite/__tests__/nvue/compiler.spec.ts
浏览文件 @
02b0c20e
import
{
NVUE_U_BUILT_IN_TAGS
}
from
'
@dcloudio/uni-shared
'
import
{
ElementNode
,
type
ElementNode
,
ElementTypes
,
type
SimpleExpressionNode
,
findDir
,
SimpleExpressionNode
,
}
from
'
@vue/compiler-core
'
import
{
compileTemplate
}
from
'
@vue/compiler-sfc
'
import
{
uniOptions
}
from
'
../../src/plugin/uni/index
'
...
...
packages/uni-cli-shared/__tests__/inject.spec.ts
浏览文件 @
02b0c20e
import
{
parse
}
from
'
@babel/parser
'
import
{
SourceDescription
,
TransformPluginContext
}
from
'
rollup
'
import
type
{
SourceDescription
,
TransformPluginContext
}
from
'
rollup
'
import
{
uniViteInjectPlugin
}
from
'
../src/vite/plugins/inject
'
const
injectOptions
=
{
sourceMap
:
false
,
...
...
packages/uni-cli-shared/__tests__/stylePluginScoped.spec.ts
浏览文件 @
02b0c20e
import
postcss
,
{
ProcessOptions
}
from
'
postcss
'
import
postcss
,
{
type
ProcessOptions
}
from
'
postcss
'
import
scopedPlugin
from
'
../src/postcss/plugins/stylePluginScoped
'
...
...
packages/uni-cli-shared/__tests__/usingComponents.spec.ts
浏览文件 @
02b0c20e
import
path
from
'
path
'
import
{
ResolvedId
}
from
'
rollup
'
import
type
{
ResolvedId
}
from
'
rollup
'
import
{
normalizePath
}
from
'
../src/utils
'
import
{
findUsingComponents
}
from
'
../src/json/mp/jsonFile
'
import
{
parseProgram
}
from
'
../src/mp/ast
'
...
...
packages/uni-i18n/__tests__/i18n.spec.ts
浏览文件 @
02b0c20e
import
{
BuiltInLocale
}
from
'
../src/index
'
import
type
{
BuiltInLocale
}
from
'
../src/index
'
import
{
I18n
}
from
'
../src/index
'
const
messages
=
{
...
...
packages/uni-i18n/__tests__/json.spec.ts
浏览文件 @
02b0c20e
import
{
I18N_JSON_DELIMITERS
}
from
'
@dcloudio/uni-shared
'
import
{
parseI18nJson
,
compileI18nJsonStr
}
from
'
../src/json
'
import
{
compileI18nJsonStr
,
parseI18nJson
}
from
'
../src/json
'
const
delimiters
:
[
string
,
string
]
=
I18N_JSON_DELIMITERS
describe
(
'
parseI18nJson
'
,
()
=>
{
test
(
'
pages.json->style
'
,
()
=>
{
...
...
packages/uni-i18n/__tests__/locale.spec.ts
浏览文件 @
02b0c20e
import
{
LOCALE_ZH_HANS
,
LOCALE_ZH_HANT
,
LOCALE_EN
,
LOCALE_ES
,
LOCALE_FR
,
LOCALE_ZH_HANS
,
LOCALE_ZH_HANT
,
}
from
'
../src/I18n
'
import
{
resolveLocale
}
from
'
../src/locale
'
...
...
packages/uni-mp-alipay/__tests__/testUtils.ts
浏览文件 @
02b0c20e
...
...
@@ -2,11 +2,11 @@ import {
createIsCustomElement
,
isMiniProgramNativeTag
as
isNativeTag
,
}
from
'
@dcloudio/uni-shared
'
import
{
compile
,
CompilerOptions
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
type
CompilerOptions
,
compile
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
customElements
,
compilerOptions
,
customElements
,
miniProgram
,
}
from
'
../src/compiler/options
'
...
...
packages/uni-mp-baidu/__tests__/testUtils.ts
浏览文件 @
02b0c20e
...
...
@@ -2,11 +2,11 @@ import {
createIsCustomElement
,
isMiniProgramNativeTag
as
isNativeTag
,
}
from
'
@dcloudio/uni-shared
'
import
{
compile
,
CompilerOptions
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
type
CompilerOptions
,
compile
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
compilerOptions
,
customElements
,
miniProgram
,
compilerOptions
,
}
from
'
../src/compiler/options
'
export
function
assert
(
...
...
packages/uni-mp-compiler/__tests__/component.spec.ts
浏览文件 @
02b0c20e
import
{
addMiniProgramPageJson
,
COMPONENT_BIND_LINK
,
addMiniProgramPageJson
,
createTransformComponentLink
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
MPErrorCodes
}
from
'
../src/errors
'
...
...
packages/uni-mp-compiler/__tests__/test.ts
浏览文件 @
02b0c20e
...
...
@@ -5,7 +5,7 @@ import {
transformComponentLink
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
compile
}
from
'
../src/index
'
import
{
CompilerOptions
}
from
'
../src/options
'
import
type
{
CompilerOptions
}
from
'
../src/options
'
import
{
miniProgram
}
from
'
./testUtils
'
function
assert
(
...
...
packages/uni-mp-compiler/__tests__/testUtils.ts
浏览文件 @
02b0c20e
import
{
MiniProgramCompilerOptions
}
from
'
@dcloudio/uni-cli-shared
'
import
type
{
MiniProgramCompilerOptions
}
from
'
@dcloudio/uni-cli-shared
'
import
{
createIsCustomElement
,
isMiniProgramNativeTag
as
isNativeTag
,
}
from
'
@dcloudio/uni-shared
'
import
{
compile
}
from
'
../src/index
'
import
{
CompilerOptions
}
from
'
../src/options
'
import
type
{
CompilerOptions
}
from
'
../src/options
'
export
const
miniProgram
:
MiniProgramCompilerOptions
=
{
class
:
{
...
...
packages/uni-mp-compiler/__tests__/transformElement.spec.ts
浏览文件 @
02b0c20e
import
{
BindingTypes
,
ElementNode
,
RootNode
}
from
'
@vue/compiler-core
'
import
{
BindingTypes
,
type
ElementNode
,
type
RootNode
,
}
from
'
@vue/compiler-core
'
import
{
type
SFCTemplateCompileOptions
,
type
TemplateCompiler
,
compileTemplate
,
SFCTemplateCompileOptions
,
TemplateCompiler
,
}
from
'
@vue/compiler-sfc
'
import
{
compile
}
from
'
../src
'
import
*
as
MPCompiler
from
'
../src
'
import
{
MPErrorCodes
}
from
'
../src/errors
'
import
{
CodegenRootNode
,
CompilerOptions
}
from
'
../src/options
'
import
type
{
CodegenRootNode
,
CompilerOptions
}
from
'
../src/options
'
import
{
BindingComponentTypes
}
from
'
../src/transform
'
import
{
getBaseNodeTransforms
}
from
'
@dcloudio/uni-cli-shared
'
...
...
packages/uni-mp-compiler/__tests__/vBind.spec.ts
浏览文件 @
02b0c20e
import
{
ElementNode
,
ErrorCodes
}
from
'
@vue/compiler-core
'
import
{
type
ElementNode
,
ErrorCodes
}
from
'
@vue/compiler-core
'
import
{
compile
}
from
'
../src
'
import
{
MPErrorCodes
}
from
'
../src/errors
'
import
{
CompilerOptions
}
from
'
../src/options
'
import
type
{
CompilerOptions
}
from
'
../src/options
'
import
{
assert
,
miniProgram
}
from
'
./testUtils
'
function
parseWithVBind
(
template
:
string
,
options
:
CompilerOptions
=
{})
{
...
...
packages/uni-mp-compiler/__tests__/vFor.spec.ts
浏览文件 @
02b0c20e
import
{
ElementNode
,
type
ElementNode
,
ErrorCodes
,
InterpolationNode
,
type
InterpolationNode
,
NodeTypes
,
SimpleExpressionNode
,
type
SimpleExpressionNode
,
}
from
'
@vue/compiler-core
'
import
{
compile
}
from
'
../src
'
import
{
CompilerOptions
}
from
'
../src/options
'
import
{
ForElementNode
}
from
'
../src/transforms/vFor
'
import
type
{
CompilerOptions
}
from
'
../src/options
'
import
type
{
ForElementNode
}
from
'
../src/transforms/vFor
'
import
{
assert
}
from
'
./testUtils
'
function
parseWithForTransform
(
...
...
packages/uni-mp-compiler/__tests__/vIf.spec.ts
浏览文件 @
02b0c20e
import
{
ErrorCodes
,
IfNode
,
NodeTypes
}
from
'
@vue/compiler-core
'
import
{
ErrorCodes
,
type
IfNode
,
NodeTypes
}
from
'
@vue/compiler-core
'
import
{
compile
}
from
'
../src
'
import
{
CompilerOptions
}
from
'
../src/options
'
import
type
{
CompilerOptions
}
from
'
../src/options
'
import
{
assert
}
from
'
./testUtils
'
function
compileWithIfTransform
(
...
...
packages/uni-mp-compiler/__tests__/vOn.mp.spec.ts
浏览文件 @
02b0c20e
import
{
ElementNode
}
from
'
@vue/compiler-core
'
import
type
{
ElementNode
}
from
'
@vue/compiler-core
'
import
{
compile
}
from
'
../src
'
import
{
MPErrorCodes
}
from
'
../src/errors
'
import
{
CompilerOptions
}
from
'
../src/options
'
import
type
{
CompilerOptions
}
from
'
../src/options
'
function
parseWithVOn
(
template
:
string
,
options
:
CompilerOptions
=
{})
{
const
{
ast
}
=
compile
(
template
,
{
...
...
packages/uni-mp-compiler/__tests__/vOn.spec.ts
浏览文件 @
02b0c20e
import
{
ElementNode
,
ErrorCodes
}
from
'
@vue/compiler-core
'
import
{
type
ElementNode
,
ErrorCodes
}
from
'
@vue/compiler-core
'
import
{
compile
}
from
'
../src
'
import
{
CompilerOptions
}
from
'
../src/options
'
import
type
{
CompilerOptions
}
from
'
../src/options
'
import
{
assert
}
from
'
./testUtils
'
function
parseWithVOn
(
template
:
string
,
options
:
CompilerOptions
=
{})
{
...
...
packages/uni-mp-core/__tests__/hooks.spec.ts
浏览文件 @
02b0c20e
import
{
ComponentOptions
,
defineComponent
}
from
'
vue
'
import
{
type
ComponentOptions
,
defineComponent
}
from
'
vue
'
import
{
initHooks
,
initUnknownHooks
}
from
'
../src/runtime/componentHooks
'
const
vueBasicOptions
=
defineComponent
({
...
...
packages/uni-mp-jd/__tests__/testUtils.ts
浏览文件 @
02b0c20e
import
{
isMiniProgramNativeTag
as
isNativeTag
}
from
'
@dcloudio/uni-shared
'
import
{
compile
,
CompilerOptions
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
type
CompilerOptions
,
compile
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
compilerOptions
,
miniProgram
}
from
'
../src/compiler/options
'
...
...
packages/uni-mp-kuaishou/__tests__/testUtils.ts
浏览文件 @
02b0c20e
import
{
isMiniProgramNativeTag
as
isNativeTag
}
from
'
@dcloudio/uni-shared
'
import
{
compile
,
CompilerOptions
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
type
CompilerOptions
,
compile
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
compilerOptions
,
miniProgram
}
from
'
../src/compiler/options
'
...
...
packages/uni-mp-qq/__tests__/testUtils.ts
浏览文件 @
02b0c20e
import
{
isMiniProgramNativeTag
as
isNativeTag
}
from
'
@dcloudio/uni-shared
'
import
{
compile
,
CompilerOptions
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
type
CompilerOptions
,
compile
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
compilerOptions
,
miniProgram
}
from
'
../src/compiler/options
'
...
...
packages/uni-mp-toutiao/__tests__/testUtils.ts
浏览文件 @
02b0c20e
import
{
isMiniProgramNativeTag
as
isNativeTag
}
from
'
@dcloudio/uni-shared
'
import
{
compile
,
CompilerOptions
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
type
CompilerOptions
,
compile
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
miniProgram
,
compilerOptions
}
from
'
../src/compiler/options
'
import
{
compilerOptions
,
miniProgram
}
from
'
../src/compiler/options
'
export
function
assert
(
template
:
string
,
...
...
packages/uni-mp-weixin/__tests__/testUtils.ts
浏览文件 @
02b0c20e
...
...
@@ -2,11 +2,11 @@ import {
createIsCustomElement
,
isMiniProgramNativeTag
as
isNativeTag
,
}
from
'
@dcloudio/uni-shared
'
import
{
compile
,
CompilerOptions
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
type
CompilerOptions
,
compile
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
customElements
,
compilerOptions
,
customElements
,
miniProgram
,
}
from
'
../src/compiler/options
'
...
...
packages/uni-mp-xhs/__tests__/testUtils.ts
浏览文件 @
02b0c20e
import
{
isMiniProgramNativeTag
as
isNativeTag
}
from
'
@dcloudio/uni-shared
'
import
{
compile
,
CompilerOptions
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
type
CompilerOptions
,
compile
}
from
'
@dcloudio/uni-mp-compiler
'
import
{
compilerOptions
,
miniProgram
}
from
'
../src/compiler/options
'
...
...
packages/uni-preprocess/__tests__/preprocess.spec.ts
浏览文件 @
02b0c20e
// import { writeFileSync } from 'node:fs'
// import { resolve } from 'node:path'
import
{
preprocess
,
SourceMapOption
s
}
from
'
../src/index
'
import
{
type
SourceMapOptions
,
preproces
s
}
from
'
../src/index
'
describe
(
'
preprocess
'
,
()
=>
{
const
sourceMap
:
SourceMapOptions
=
{
...
...
packages/uni-shared/__tests__/vdom/style.spec.ts
浏览文件 @
02b0c20e
import
{
proxyStyle
,
UniCSSStyleDeclaration
}
from
'
../../src/vdom/Style
'
import
{
UniCSSStyleDeclaration
,
proxyStyle
}
from
'
../../src/vdom/Style
'
describe
(
'
vdom
'
,
()
=>
{
test
(
'
style
'
,
()
=>
{
...
...
packages/uni-uts-v1/__tests__/code.spec.ts
浏览文件 @
02b0c20e
import
{
resolve
}
from
'
path
'
import
{
FORMATS
,
GenProxyCodeOptions
,
genProxyCode
}
from
'
../src/code
'
import
{
FORMATS
,
type
GenProxyCodeOptions
,
genProxyCode
}
from
'
../src/code
'
import
{
ERR_MSG_PLACEHOLDER
}
from
'
../src/utils
'
const
inputDir
=
resolve
(
__dirname
,
'
examples/uts
'
)
...
...
packages/uni-uts-v1/__tests__/sourceMap.spec.ts
浏览文件 @
02b0c20e
import
{
resolve
}
from
'
path
'
import
{
resolveUTSPluginSourceMapFile
,
generatedPositionFor
,
originalPositionFor
,
resolveUTSPluginSourceMapFile
,
}
from
'
../src
'
const
inputDir
=
resolve
(
__dirname
,
'
../../playground/uts
'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录