提交 2578630e 编写于 作者: fxy060608's avatar fxy060608

chore: bump vite from 2.9.9 to 2.9.12

上级 a28e4205
......@@ -87,7 +87,7 @@
"semver": "^7.3.5",
"ts-jest": "^27.0.3",
"typescript": "4.6.4",
"vite": "2.9.9",
"vite": "2.9.12",
"vue": "3.2.37",
"vue-router": "^4.0.16",
"yorkie": "^2.0.0"
......
......@@ -21,6 +21,6 @@
"compression": "^1.7.4",
"cypress": "^7.3.0",
"serve-static": "^1.14.1",
"vite": "2.9.9"
"vite": "2.9.12"
}
}
......@@ -122,7 +122,7 @@ export default defineConfig({
build: {
target: 'es2015',
cssTarget,
minify: true,
minify: 'terser',
cssCodeSplit: false,
lib: {
name: 'uni-app-view',
......
......@@ -40,7 +40,7 @@
"@vue/compiler-core": "3.2.37",
"esbuild": "^0.14.27",
"postcss": "^8.4.13",
"vite": "2.9.9",
"vite": "2.9.12",
"vue": "3.2.37"
}
}
import { isString, isFunction, isPromise, getGlobalThis, extend, EMPTY_OBJ, isArray, NOOP, remove, isObject, toHandlerKey, camelize, capitalize, EMPTY_ARR, normalizeClass, normalizeStyle, isOn, NO, hasChanged, hasOwn, hyphenate, toNumber, isSet, isMap, isPlainObject, invokeArrayFns, isBuiltInDirective, isReservedProp, makeMap, isModelListener, def, toRawType, parseStringStyle, isGloballyWhitelisted } from '@vue/shared';
import { isString, isFunction, isPromise, getGlobalThis, extend, isArray, NOOP, remove, EMPTY_OBJ, isObject, toHandlerKey, camelize, capitalize, EMPTY_ARR, normalizeClass, normalizeStyle, isOn, NO, hasChanged, hasOwn, hyphenate, toNumber, isSet, isMap, isPlainObject, invokeArrayFns, isBuiltInDirective, isReservedProp, makeMap, isModelListener, def, toRawType, parseStringStyle, isGloballyWhitelisted } from '@vue/shared';
export { camelize, capitalize, hyphenate, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, isProxy, proxyRefs, markRaw, computed as computed$1, shallowReadonly, EffectScope, track, isReadonly, reactive, shallowReactive, trigger } from '@vue/reactivity';
export { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';
......
import { isString, isFunction, isPromise, EMPTY_OBJ, isArray, NOOP, remove, camelize, capitalize, isObject, toHandlerKey, getGlobalThis, EMPTY_ARR, normalizeClass, extend, normalizeStyle, isOn, hasChanged, hasOwn, hyphenate, toNumber, isSet, isMap, isPlainObject, invokeArrayFns, NO, isReservedProp, isModelListener, def, parseStringStyle, isGloballyWhitelisted } from '@vue/shared';
import { isString, isFunction, isPromise, isArray, NOOP, remove, EMPTY_OBJ, camelize, capitalize, isObject, toHandlerKey, getGlobalThis, EMPTY_ARR, normalizeClass, extend, normalizeStyle, isOn, hasChanged, hasOwn, hyphenate, toNumber, isSet, isMap, isPlainObject, invokeArrayFns, NO, isReservedProp, isModelListener, def, parseStringStyle, isGloballyWhitelisted } from '@vue/shared';
export { camelize, capitalize, hyphenate, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
import { pauseTracking, resetTracking, isRef, toRaw, isShallow, isReactive, ReactiveEffect, ref, isProxy, proxyRefs, markRaw, computed as computed$1, EffectScope, track, reactive, shallowReactive, trigger } from '@vue/reactivity';
export { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';
......
import { extend, isObject, toRawType, def, hasChanged, isArray, isString, isFunction, isPromise, getGlobalThis, EMPTY_OBJ, NOOP, remove, toHandlerKey, camelize, capitalize, EMPTY_ARR, normalizeClass, normalizeStyle, isOn, NO, toNumber, hyphenate, invokeArrayFns, looseIndexOf, isSet, looseEqual, isHTMLTag, isSVGTag, isMap, isPlainObject, isBuiltInDirective, isReservedProp, makeMap, hasOwn, isModelListener, isIntegerKey, isSymbol, isGloballyWhitelisted, isSpecialBooleanAttr, includeBooleanAttr } from '@vue/shared';
import { extend, isObject, toRawType, def, hasChanged, isArray, isString, isFunction, isPromise, getGlobalThis, NOOP, remove, EMPTY_OBJ, toHandlerKey, camelize, capitalize, EMPTY_ARR, normalizeClass, normalizeStyle, isOn, NO, toNumber, hyphenate, invokeArrayFns, looseIndexOf, isSet, looseEqual, isHTMLTag, isSVGTag, isMap, isPlainObject, isBuiltInDirective, isReservedProp, makeMap, hasOwn, isModelListener, isIntegerKey, isSymbol, isGloballyWhitelisted, isSpecialBooleanAttr, includeBooleanAttr } from '@vue/shared';
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
function warn(msg, ...args) {
......
import { isRootHook, isRootImmediateHook, ON_LOAD, UniInputElement, UniTextAreaElement, UniElement, UniTextNode, UniCommentNode, forcePatchProp, resolveOwnerEl, ATTR_V_OWNER_ID, ATTR_V_RENDERJS, JSON_PROTOCOL } from '@dcloudio/uni-shared';
import { isString, isFunction, isPromise, getGlobalThis, extend, EMPTY_OBJ, isArray, NOOP, remove, isObject, toHandlerKey, camelize, capitalize, EMPTY_ARR, normalizeClass, normalizeStyle, isOn, NO, hasChanged, toNumber, invokeArrayFns, hyphenate, isHTMLTag, isSVGTag, isSet, isMap, isPlainObject, isBuiltInDirective, isReservedProp, makeMap, isModelListener, hasOwn, def, toRawType, isGloballyWhitelisted } from '@vue/shared';
import { isString, isFunction, isPromise, getGlobalThis, extend, isArray, NOOP, remove, EMPTY_OBJ, isObject, toHandlerKey, camelize, capitalize, EMPTY_ARR, normalizeClass, normalizeStyle, isOn, NO, hasChanged, toNumber, invokeArrayFns, hyphenate, isHTMLTag, isSVGTag, isSet, isMap, isPlainObject, isBuiltInDirective, isReservedProp, makeMap, isModelListener, hasOwn, def, toRawType, isGloballyWhitelisted } from '@vue/shared';
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, isProxy, proxyRefs, markRaw, computed as computed$1, shallowReadonly, EffectScope, track, isReadonly, reactive, shallowReactive, trigger } from '@vue/reactivity';
export { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';
......
import { isRootHook, isRootImmediateHook, ON_LOAD, UniInputElement, UniTextAreaElement, UniElement, UniTextNode, UniCommentNode, forcePatchProp, resolveOwnerEl, ATTR_V_OWNER_ID, ATTR_V_RENDERJS, JSON_PROTOCOL } from '@dcloudio/uni-shared';
import { isString, isFunction, isPromise, EMPTY_OBJ, isArray, NOOP, remove, camelize, capitalize, isObject, toHandlerKey, getGlobalThis, EMPTY_ARR, normalizeClass, extend, normalizeStyle, isOn, hasChanged, toNumber, invokeArrayFns, hyphenate, isSet, isMap, isPlainObject, NO, isReservedProp, isModelListener, hasOwn, def, isGloballyWhitelisted } from '@vue/shared';
import { isString, isFunction, isPromise, isArray, NOOP, remove, EMPTY_OBJ, camelize, capitalize, isObject, toHandlerKey, getGlobalThis, EMPTY_ARR, normalizeClass, extend, normalizeStyle, isOn, hasChanged, toNumber, invokeArrayFns, hyphenate, isSet, isMap, isPlainObject, NO, isReservedProp, isModelListener, hasOwn, def, isGloballyWhitelisted } from '@vue/shared';
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
import { pauseTracking, resetTracking, isRef, toRaw, isShallow, isReactive, ReactiveEffect, ref, isProxy, proxyRefs, markRaw, computed as computed$1, EffectScope, track, reactive, shallowReactive, trigger } from '@vue/reactivity';
export { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';
......
......@@ -20,6 +20,7 @@ import {
StringLiteral,
parenthesizedExpression,
binaryExpression,
isPrivateName,
} from '@babel/types'
import {
DirectiveNode,
......@@ -230,7 +231,7 @@ function createClassBindingByObjectExpression(expr: ObjectExpression) {
expr.properties.forEach((prop) => {
if (isObjectProperty(prop)) {
const { value } = prop
if (isUndefined(value as Expression)) {
if (isUndefined(value as Expression) || isPrivateName(prop.key)) {
// remove {a:undefined}
return
}
......
......@@ -12,6 +12,7 @@ import {
isObjectProperty,
binaryExpression,
isIdentifier,
isPrivateName,
} from '@babel/types'
import {
DirectiveNode,
......@@ -147,29 +148,31 @@ function rewriteStyleObjectExpression(
}
} else if (isObjectProperty(prop)) {
const { key, value, computed } = prop
if (computed) {
// {[handle(computedKey)]:1} => {[a]:1}
const newExpr = rewirteWithHelper(HYPHENATE, key, loc, context)
if (newExpr) {
prop.key = newExpr
if (!isPrivateName(key)) {
if (computed) {
// {[handle(computedKey)]:1} => {[a]:1}
const newExpr = rewirteWithHelper(HYPHENATE, key, loc, context)
if (newExpr) {
prop.key = newExpr
}
} else {
// {fontSize:'15px'} => {'font-size':'15px'}
prop.key = parseStringLiteral(key)
prop.key.value = hyphenate(prop.key.value) + ':'
}
} else {
// {fontSize:'15px'} => {'font-size':'15px'}
prop.key = parseStringLiteral(prop.key)
prop.key.value = hyphenate(prop.key.value) + ':'
}
// {fontSize:`${fontSize}px`} => {'font-size':a}
if (isStaticLiteral(value)) {
return
} else {
const newExpr = parseExprWithRewrite(
genBabelExpr(value as Expression),
loc,
context,
value as Expression
)
if (newExpr) {
prop.value = newExpr
// {fontSize:`${fontSize}px`} => {'font-size':a}
if (isStaticLiteral(value)) {
return
} else {
const newExpr = parseExprWithRewrite(
genBabelExpr(value as Expression),
loc,
context,
value as Expression
)
if (newExpr) {
prop.value = newExpr
}
}
}
}
......@@ -216,13 +219,15 @@ function createStyleBindingByObjectExpression(expr: ObjectExpression) {
concat(prop.argument)
} else if (isObjectProperty(prop)) {
const { key, value } = prop
const expr = createBinaryExpression(
isStringLiteral(key)
? key // 之前已经补充了:
: createBinaryExpression(key, stringLiteral(':')),
value as Expression
)
concat(expr)
if (!isPrivateName(key)) {
const expr = createBinaryExpression(
isStringLiteral(key)
? key // 之前已经补充了:
: createBinaryExpression(key, stringLiteral(':')),
value as Expression
)
concat(expr)
}
}
})
return result
......
......@@ -53,11 +53,11 @@
"@types/sass": "^1.16.0",
"@vue/babel-plugin-jsx": "^1.1.1",
"chokidar": "^3.5.3",
"vite": "2.9.9",
"vite": "2.9.12",
"vue": "3.2.37"
},
"peerDependencies": {
"vite": "2.9.9"
"vite": "2.9.12"
},
"uni-app": {
"compilerVersion": "3.4.17"
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册