提交 1e9b3d2b 编写于 作者: fxy060608's avatar fxy060608

chore: bump vite from 3.2.5 to 4.0.3

上级 27f637dd
......@@ -46,7 +46,7 @@ module.exports = {
files: [
'.eslintrc.js',
'jest.config.js',
'rollup.config.js',
'rollup.config.mjs',
'scripts/**',
'packages/{uni-cli-shared,uni-app-vite,uni-h5-vite,uni-mp-vite,uni-mp-compiler,vite-plugin-uni,uts,uni-uts-v1}/**',
'packages/*/vite.config.ts',
......
......@@ -42,23 +42,24 @@
"devDependencies": {
"@babel/core": "^7.17.10",
"@babel/preset-env": "^7.16.11",
"@dcloudio/types": "3.2.5",
"@dcloudio/types": "3.2.7",
"@dcloudio/uni-api": "3.0.0-alpha-3061520221220001",
"@dcloudio/uni-app": "3.0.0-alpha-3061520221220001",
"@jest/types": "^29.0.3",
"@microsoft/api-extractor": "^7.33.6",
"@rollup/plugin-alias": "^3.1.1",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-replace": "^2.3.4",
"@rollup/plugin-strip": "^2.0.0",
"@rollup/plugin-alias": "^4.0.2",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-strip": "^3.0.2",
"@rollup/plugin-terser": "^0.2.1",
"@types/jest": "^29.2.3",
"@types/node": "^18.11.9",
"@types/node": "^18.11.18",
"@typescript-eslint/parser": "^5.44.0",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.1",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vue/compiler-sfc": "3.2.45",
"@vue/reactivity": "3.2.45",
"@vue/runtime-core": "3.2.45",
......@@ -76,19 +77,17 @@
"miniprogram-api-typings": "^3.4.4",
"picocolors": "^1.0.0",
"prettier": "^2.7.1",
"rollup": "^2.57.0",
"rollup": "^3.7.0",
"rollup-plugin-jscc": "^2.0.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.29.0",
"rollup-plugin-vue": "^6.0.0",
"semver": "^7.3.5",
"simple-git-hooks": "^2.8.0",
"terser": "^5.4.0",
"ts-jest": "^29.0.3",
"typescript": "^4.9.4",
"vite": "3.2.5",
"vite": "4.0.3",
"vue": "3.2.45",
"vue-router": "^4.1.6",
"yorkie": "^2.0.0"
......
......@@ -21,6 +21,6 @@
"compression": "^1.7.4",
"cypress": "^10.7.0",
"serve-static": "^1.15.0",
"vite": "3.2.5"
"vite": "4.0.3"
}
}
......@@ -5,7 +5,7 @@
"dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3061520221220001",
"@dcloudio/uni-h5": "3.0.0-alpha-3061520221220001",
"vue": "^3.2.31",
"vue": "3.2.45",
"vue-i18n": "9.1.9",
"vuex": "^4.1.0"
},
......
import path from 'path'
import { terser } from 'rollup-plugin-terser'
import terser from '@rollup/plugin-terser'
import uni from '@dcloudio/vite-plugin-uni'
import { UserConfig } from 'vite'
export default {
......
......@@ -179,6 +179,4 @@
exports.decodeActions = decodeActions;
exports.decodeNodeJson = decodeNodeJson;
Object.defineProperty(exports, '__esModule', { value: true });
}));
......@@ -2,10 +2,10 @@
var appVite = require('@dcloudio/uni-app-vite');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var appVite__default = /*#__PURE__*/_interopDefaultLegacy(appVite);
var appVite__default = /*#__PURE__*/_interopDefault(appVite);
var index = [appVite__default["default"]];
var index = [appVite__default.default];
module.exports = index;
......@@ -25,21 +25,21 @@
"@dcloudio/uni-i18n": "3.0.0-alpha-3061520221220001",
"@dcloudio/uni-shared": "3.0.0-alpha-3061520221220001",
"@rollup/pluginutils": "^4.2.0",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue": "^4.0.0",
"@vue/compiler-dom": "3.2.45",
"@vue/compiler-sfc": "3.2.45",
"debug": "^4.3.3",
"fs-extra": "^10.0.0",
"picocolors": "^1.0.0",
"rollup": "^2.79.1"
"picocolors": "^1.0.0"
},
"devDependencies": {
"@types/debug": "^4.1.7",
"@types/fs-extra": "^9.0.13",
"@vue/compiler-core": "3.2.45",
"esbuild": "^0.15.9",
"esbuild": "^0.16.3",
"postcss": "^8.4.16",
"vite": "3.2.5",
"rollup": "^3.7.0",
"vite": "4.0.3",
"vue": "3.2.45"
}
}
......@@ -14,7 +14,7 @@ import {
polyfillCode,
resolveBuiltIn,
} from '@dcloudio/uni-cli-shared'
import { OutputBundle } from 'rollup'
import type { OutputBundle } from 'rollup'
import { APP_RENDERJS_JS, APP_WXS_JS } from '../plugins/renderjs'
import { createConfigResolved } from '../../plugin/configResolved'
......
......@@ -7,7 +7,7 @@ import {
isConfusionFile,
removeExt,
} from '@dcloudio/uni-cli-shared'
import { OutputChunk } from 'rollup'
import type { OutputChunk } from 'rollup'
export function uniConfusionPlugin(): Plugin {
const inputDir = process.env.UNI_INPUT_DIR
......
......@@ -11,7 +11,7 @@ import {
MANIFEST_JSON_JS,
APP_CONFIG_SERVICE,
} from '@dcloudio/uni-cli-shared'
import { OutputAsset } from 'rollup'
import type { OutputAsset } from 'rollup'
import { wrapperNVueAppStyles } from '../../nvue/plugins/esbuild'
export function uniPagesJsonPlugin(): Plugin {
......
......@@ -2911,7 +2911,7 @@ function renderList(source, renderItem, cache, index) {
* @private
*/
function createSlots(slots, dynamicSlots) {
var _loop = function (i) {
var _loop = function () {
var slot = dynamicSlots[i];
// array of dynamic slot generated by <template v-for="..." #[...]>
if (isArray(slot)) {
......@@ -2930,7 +2930,7 @@ function createSlots(slots, dynamicSlots) {
}
};
for (var i = 0; i < dynamicSlots.length; i++) {
_loop(i);
_loop();
}
return slots;
}
......@@ -3374,62 +3374,60 @@ function applyOptions(instance) {
}
}
if (dataOptions) {
(function () {
if (!isFunction(dataOptions)) {
warn("The data option must be a function. " + "Plain object usage is no longer supported.");
}
var data = dataOptions.call(publicThis, publicThis);
if (isPromise(data)) {
warn("data() returned a Promise - note data() cannot be async; If you " + "intend to perform data fetching before component renders, use " + "async setup() + <Suspense>.");
}
if (!isObject(data)) {
warn("data() should return an object.");
} else {
instance.data = reactive(data);
{
var _loop2 = function (_key6) {
checkDuplicateProperties("Data" /* OptionTypes.DATA */, _key6);
// expose data on ctx during dev
if (!isReservedPrefix(_key6[0])) {
Object.defineProperty(ctx, _key6, {
configurable: true,
enumerable: true,
get: () => data[_key6],
set: NOOP
});
}
};
for (var _key6 in data) {
_loop2(_key6);
if (!isFunction(dataOptions)) {
warn("The data option must be a function. " + "Plain object usage is no longer supported.");
}
var data = dataOptions.call(publicThis, publicThis);
if (isPromise(data)) {
warn("data() returned a Promise - note data() cannot be async; If you " + "intend to perform data fetching before component renders, use " + "async setup() + <Suspense>.");
}
if (!isObject(data)) {
warn("data() should return an object.");
} else {
instance.data = reactive(data);
{
var _loop2 = function (key) {
checkDuplicateProperties("Data" /* OptionTypes.DATA */, key);
// expose data on ctx during dev
if (!isReservedPrefix(key[0])) {
Object.defineProperty(ctx, key, {
configurable: true,
enumerable: true,
get: () => data[key],
set: NOOP
});
}
};
for (var _key6 in data) {
_loop2(_key6);
}
}
})();
}
}
// state initialization complete at this point - start caching access
shouldCacheAccess = true;
if (computedOptions) {
var _loop3 = function (_key7) {
var opt = computedOptions[_key7];
var _loop3 = function (key) {
var opt = computedOptions[key];
var get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
if (get === NOOP) {
warn("Computed property \"".concat(_key7, "\" has no getter."));
warn("Computed property \"".concat(key, "\" has no getter."));
}
var set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
warn("Write operation failed: computed property \"".concat(_key7, "\" is readonly."));
warn("Write operation failed: computed property \"".concat(key, "\" is readonly."));
};
var c = computed({
get,
set
});
Object.defineProperty(ctx, _key7, {
Object.defineProperty(ctx, key, {
enumerable: true,
configurable: true,
get: () => c.value,
set: v => c.value = v
});
{
checkDuplicateProperties("Computed" /* OptionTypes.COMPUTED */, _key7);
checkDuplicateProperties("Computed" /* OptionTypes.COMPUTED */, key);
}
};
for (var _key7 in computedOptions) {
......@@ -3506,9 +3504,9 @@ function resolveInjections(injectOptions, ctx) {
if (isArray(injectOptions)) {
injectOptions = normalizeInject(injectOptions);
}
var _loop4 = function (key) {
var _loop4 = function () {
var opt = injectOptions[key];
var injected = void 0;
var injected;
if (isObject(opt)) {
if ('default' in opt) {
injected = inject(opt.from || key, opt.default, true /* treat default function as factory */);
......@@ -3541,7 +3539,7 @@ function resolveInjections(injectOptions, ctx) {
}
};
for (var key in injectOptions) {
_loop4(key);
_loop4();
}
}
function callHook(hook, instance, type) {
......@@ -4154,20 +4152,22 @@ var normalizeSlot = (key, rawSlot, ctx) => {
};
var normalizeObjectSlots = (rawSlots, slots, instance) => {
var ctx = rawSlots._ctx;
for (var key in rawSlots) {
if (isInternalKey(key)) continue;
var _loop5 = function () {
if (isInternalKey(key)) return "continue";
var value = rawSlots[key];
if (isFunction(value)) {
slots[key] = normalizeSlot(key, value, ctx);
} else if (value != null) {
(function () {
{
warn("Non-function value encountered for slot \"".concat(key, "\". ") + "Prefer function slots for better performance.");
}
var normalized = normalizeSlotValue(value);
slots[key] = () => normalized;
})();
{
warn("Non-function value encountered for slot \"".concat(key, "\". ") + "Prefer function slots for better performance.");
}
var normalized = normalizeSlotValue(value);
slots[key] = () => normalized;
}
};
for (var key in rawSlots) {
var _ret = _loop5();
if (_ret === "continue") continue;
}
};
var normalizeVNodeSlots = (instance, children) => {
......@@ -5827,9 +5827,7 @@ function baseCreateRenderer(options, createHydrationFns) {
// no corresponding old node.
// used for determining longest stable subsequence
var newIndexToOldIndexMap = new Array(toBePatched);
for (i = 0; i < toBePatched; i++) {
newIndexToOldIndexMap[i] = 0;
}
for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
for (i = s1; i <= e1; i++) {
var prevChild = c1[i];
if (patched >= toBePatched) {
......@@ -7464,7 +7462,7 @@ function mergeDefaults(raw, defaults) {
*/
function createPropsRestProxy(props, excludedKeys) {
var ret = {};
var _loop5 = function (key) {
var _loop6 = function (key) {
if (!excludedKeys.includes(key)) {
Object.defineProperty(ret, key, {
enumerable: true,
......@@ -7473,7 +7471,7 @@ function createPropsRestProxy(props, excludedKeys) {
}
};
for (var key in props) {
_loop5(key);
_loop6(key);
}
return ret;
}
......
......@@ -2314,7 +2314,7 @@ function renderList(source, renderItem, cache, index) {
* @private
*/
function createSlots(slots, dynamicSlots) {
var _loop = function (i) {
var _loop = function () {
var slot = dynamicSlots[i];
// array of dynamic slot generated by <template v-for="..." #[...]>
if (isArray(slot)) {
......@@ -2333,7 +2333,7 @@ function createSlots(slots, dynamicSlots) {
}
};
for (var i = 0; i < dynamicSlots.length; i++) {
_loop(i);
_loop();
}
return slots;
}
......@@ -2651,15 +2651,15 @@ function applyOptions(instance) {
// state initialization complete at this point - start caching access
shouldCacheAccess = true;
if (computedOptions) {
var _loop2 = function (_key3) {
var opt = computedOptions[_key3];
var _loop2 = function () {
var opt = computedOptions[key];
var get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
var set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP;
var c = computed({
get,
set
});
Object.defineProperty(ctx, _key3, {
Object.defineProperty(ctx, key, {
enumerable: true,
configurable: true,
get: () => c.value,
......@@ -2667,7 +2667,7 @@ function applyOptions(instance) {
});
};
for (var _key3 in computedOptions) {
_loop2(_key3);
_loop2();
}
}
if (watchOptions) {
......@@ -2740,9 +2740,9 @@ function resolveInjections(injectOptions, ctx) {
if (isArray(injectOptions)) {
injectOptions = normalizeInject(injectOptions);
}
var _loop3 = function (key) {
var _loop3 = function () {
var opt = injectOptions[key];
var injected = void 0;
var injected;
if (isObject(opt)) {
if ('default' in opt) {
injected = inject(opt.from || key, opt.default, true /* treat default function as factory */);
......@@ -2769,7 +2769,7 @@ function resolveInjections(injectOptions, ctx) {
}
};
for (var key in injectOptions) {
_loop3(key);
_loop3();
}
}
function callHook(hook, instance, type) {
......@@ -3221,17 +3221,19 @@ var normalizeSlot = (key, rawSlot, ctx) => {
};
var normalizeObjectSlots = (rawSlots, slots, instance) => {
var ctx = rawSlots._ctx;
for (var key in rawSlots) {
if (isInternalKey(key)) continue;
var _loop4 = function () {
if (isInternalKey(key)) return "continue";
var value = rawSlots[key];
if (isFunction(value)) {
slots[key] = normalizeSlot(key, value, ctx);
} else if (value != null) {
(function () {
var normalized = normalizeSlotValue(value);
slots[key] = () => normalized;
})();
var normalized = normalizeSlotValue(value);
slots[key] = () => normalized;
}
};
for (var key in rawSlots) {
var _ret = _loop4();
if (_ret === "continue") continue;
}
};
var normalizeVNodeSlots = (instance, children) => {
......@@ -4621,9 +4623,7 @@ function baseCreateRenderer(options, createHydrationFns) {
// no corresponding old node.
// used for determining longest stable subsequence
var newIndexToOldIndexMap = new Array(toBePatched);
for (i = 0; i < toBePatched; i++) {
newIndexToOldIndexMap[i] = 0;
}
for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
for (i = s1; i <= e1; i++) {
var prevChild = c1[i];
if (patched >= toBePatched) {
......@@ -6052,7 +6052,7 @@ function mergeDefaults(raw, defaults) {
*/
function createPropsRestProxy(props, excludedKeys) {
var ret = {};
var _loop4 = function (key) {
var _loop5 = function (key) {
if (!excludedKeys.includes(key)) {
Object.defineProperty(ret, key, {
enumerable: true,
......@@ -6061,7 +6061,7 @@ function createPropsRestProxy(props, excludedKeys) {
}
};
for (var key in props) {
_loop4(key);
_loop5(key);
}
return ret;
}
......
......@@ -2927,7 +2927,7 @@ function renderList(source, renderItem, cache, index) {
* @private
*/
function createSlots(slots, dynamicSlots) {
var _loop = function (i) {
var _loop = function () {
var slot = dynamicSlots[i];
// array of dynamic slot generated by <template v-for="..." #[...]>
if (isArray(slot)) {
......@@ -2946,7 +2946,7 @@ function createSlots(slots, dynamicSlots) {
}
};
for (var i = 0; i < dynamicSlots.length; i++) {
_loop(i);
_loop();
}
return slots;
}
......@@ -3390,62 +3390,60 @@ function applyOptions(instance) {
}
}
if (dataOptions) {
(function () {
if (!isFunction(dataOptions)) {
warn("The data option must be a function. " + "Plain object usage is no longer supported.");
}
var data = dataOptions.call(publicThis, publicThis);
if (isPromise(data)) {
warn("data() returned a Promise - note data() cannot be async; If you " + "intend to perform data fetching before component renders, use " + "async setup() + <Suspense>.");
}
if (!isObject(data)) {
warn("data() should return an object.");
} else {
instance.data = reactive(data);
{
var _loop2 = function (_key6) {
checkDuplicateProperties("Data" /* OptionTypes.DATA */, _key6);
// expose data on ctx during dev
if (!isReservedPrefix(_key6[0])) {
Object.defineProperty(ctx, _key6, {
configurable: true,
enumerable: true,
get: () => data[_key6],
set: NOOP
});
}
};
for (var _key6 in data) {
_loop2(_key6);
if (!isFunction(dataOptions)) {
warn("The data option must be a function. " + "Plain object usage is no longer supported.");
}
var data = dataOptions.call(publicThis, publicThis);
if (isPromise(data)) {
warn("data() returned a Promise - note data() cannot be async; If you " + "intend to perform data fetching before component renders, use " + "async setup() + <Suspense>.");
}
if (!isObject(data)) {
warn("data() should return an object.");
} else {
instance.data = reactive(data);
{
var _loop2 = function (key) {
checkDuplicateProperties("Data" /* OptionTypes.DATA */, key);
// expose data on ctx during dev
if (!isReservedPrefix(key[0])) {
Object.defineProperty(ctx, key, {
configurable: true,
enumerable: true,
get: () => data[key],
set: NOOP
});
}
};
for (var _key6 in data) {
_loop2(_key6);
}
}
})();
}
}
// state initialization complete at this point - start caching access
shouldCacheAccess = true;
if (computedOptions) {
var _loop3 = function (_key7) {
var opt = computedOptions[_key7];
var _loop3 = function (key) {
var opt = computedOptions[key];
var get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
if (get === NOOP) {
warn("Computed property \"".concat(_key7, "\" has no getter."));
warn("Computed property \"".concat(key, "\" has no getter."));
}
var set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
warn("Write operation failed: computed property \"".concat(_key7, "\" is readonly."));
warn("Write operation failed: computed property \"".concat(key, "\" is readonly."));
};
var c = computed({
get,
set
});
Object.defineProperty(ctx, _key7, {
Object.defineProperty(ctx, key, {
enumerable: true,
configurable: true,
get: () => c.value,
set: v => c.value = v
});
{
checkDuplicateProperties("Computed" /* OptionTypes.COMPUTED */, _key7);
checkDuplicateProperties("Computed" /* OptionTypes.COMPUTED */, key);
}
};
for (var _key7 in computedOptions) {
......@@ -3522,9 +3520,9 @@ function resolveInjections(injectOptions, ctx) {
if (isArray(injectOptions)) {
injectOptions = normalizeInject(injectOptions);
}
var _loop4 = function (key) {
var _loop4 = function () {
var opt = injectOptions[key];
var injected = void 0;
var injected;
if (isObject(opt)) {
if ('default' in opt) {
injected = inject(opt.from || key, opt.default, true /* treat default function as factory */);
......@@ -3557,7 +3555,7 @@ function resolveInjections(injectOptions, ctx) {
}
};
for (var key in injectOptions) {
_loop4(key);
_loop4();
}
}
function callHook(hook, instance, type) {
......@@ -4170,20 +4168,22 @@ var normalizeSlot = (key, rawSlot, ctx) => {
};
var normalizeObjectSlots = (rawSlots, slots, instance) => {
var ctx = rawSlots._ctx;
for (var key in rawSlots) {
if (isInternalKey(key)) continue;
var _loop5 = function () {
if (isInternalKey(key)) return "continue";
var value = rawSlots[key];
if (isFunction(value)) {
slots[key] = normalizeSlot(key, value, ctx);
} else if (value != null) {
(function () {
{
warn("Non-function value encountered for slot \"".concat(key, "\". ") + "Prefer function slots for better performance.");
}
var normalized = normalizeSlotValue(value);
slots[key] = () => normalized;
})();
{
warn("Non-function value encountered for slot \"".concat(key, "\". ") + "Prefer function slots for better performance.");
}
var normalized = normalizeSlotValue(value);
slots[key] = () => normalized;
}
};
for (var key in rawSlots) {
var _ret = _loop5();
if (_ret === "continue") continue;
}
};
var normalizeVNodeSlots = (instance, children) => {
......@@ -5843,9 +5843,7 @@ function baseCreateRenderer(options, createHydrationFns) {
// no corresponding old node.
// used for determining longest stable subsequence
var newIndexToOldIndexMap = new Array(toBePatched);
for (i = 0; i < toBePatched; i++) {
newIndexToOldIndexMap[i] = 0;
}
for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
for (i = s1; i <= e1; i++) {
var prevChild = c1[i];
if (patched >= toBePatched) {
......@@ -7478,7 +7476,7 @@ function mergeDefaults(raw, defaults) {
*/
function createPropsRestProxy(props, excludedKeys) {
var ret = {};
var _loop5 = function (key) {
var _loop6 = function (key) {
if (!excludedKeys.includes(key)) {
Object.defineProperty(ret, key, {
enumerable: true,
......@@ -7487,7 +7485,7 @@ function createPropsRestProxy(props, excludedKeys) {
}
};
for (var key in props) {
_loop5(key);
_loop6(key);
}
return ret;
}
......
......@@ -2330,7 +2330,7 @@ function renderList(source, renderItem, cache, index) {
* @private
*/
function createSlots(slots, dynamicSlots) {
var _loop = function (i) {
var _loop = function () {
var slot = dynamicSlots[i];
// array of dynamic slot generated by <template v-for="..." #[...]>
if (isArray(slot)) {
......@@ -2349,7 +2349,7 @@ function createSlots(slots, dynamicSlots) {
}
};
for (var i = 0; i < dynamicSlots.length; i++) {
_loop(i);
_loop();
}
return slots;
}
......@@ -2667,15 +2667,15 @@ function applyOptions(instance) {
// state initialization complete at this point - start caching access
shouldCacheAccess = true;
if (computedOptions) {
var _loop2 = function (_key3) {
var opt = computedOptions[_key3];
var _loop2 = function () {
var opt = computedOptions[key];
var get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
var set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP;
var c = computed({
get,
set
});
Object.defineProperty(ctx, _key3, {
Object.defineProperty(ctx, key, {
enumerable: true,
configurable: true,
get: () => c.value,
......@@ -2683,7 +2683,7 @@ function applyOptions(instance) {
});
};
for (var _key3 in computedOptions) {
_loop2(_key3);
_loop2();
}
}
if (watchOptions) {
......@@ -2756,9 +2756,9 @@ function resolveInjections(injectOptions, ctx) {
if (isArray(injectOptions)) {
injectOptions = normalizeInject(injectOptions);
}
var _loop3 = function (key) {
var _loop3 = function () {
var opt = injectOptions[key];
var injected = void 0;
var injected;
if (isObject(opt)) {
if ('default' in opt) {
injected = inject(opt.from || key, opt.default, true /* treat default function as factory */);
......@@ -2785,7 +2785,7 @@ function resolveInjections(injectOptions, ctx) {
}
};
for (var key in injectOptions) {
_loop3(key);
_loop3();
}
}
function callHook(hook, instance, type) {
......@@ -3237,17 +3237,19 @@ var normalizeSlot = (key, rawSlot, ctx) => {
};
var normalizeObjectSlots = (rawSlots, slots, instance) => {
var ctx = rawSlots._ctx;
for (var key in rawSlots) {
if (isInternalKey(key)) continue;
var _loop4 = function () {
if (isInternalKey(key)) return "continue";
var value = rawSlots[key];
if (isFunction(value)) {
slots[key] = normalizeSlot(key, value, ctx);
} else if (value != null) {
(function () {
var normalized = normalizeSlotValue(value);
slots[key] = () => normalized;
})();
var normalized = normalizeSlotValue(value);
slots[key] = () => normalized;
}
};
for (var key in rawSlots) {
var _ret = _loop4();
if (_ret === "continue") continue;
}
};
var normalizeVNodeSlots = (instance, children) => {
......@@ -4641,9 +4643,7 @@ function baseCreateRenderer(options, createHydrationFns) {
// no corresponding old node.
// used for determining longest stable subsequence
var newIndexToOldIndexMap = new Array(toBePatched);
for (i = 0; i < toBePatched; i++) {
newIndexToOldIndexMap[i] = 0;
}
for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
for (i = s1; i <= e1; i++) {
var prevChild = c1[i];
if (patched >= toBePatched) {
......@@ -6068,7 +6068,7 @@ function mergeDefaults(raw, defaults) {
*/
function createPropsRestProxy(props, excludedKeys) {
var ret = {};
var _loop4 = function (key) {
var _loop5 = function (key) {
if (!excludedKeys.includes(key)) {
Object.defineProperty(ret, key, {
enumerable: true,
......@@ -6077,7 +6077,7 @@ function createPropsRestProxy(props, excludedKeys) {
}
};
for (var key in props) {
_loop4(key);
_loop5(key);
}
return ret;
}
......
......@@ -6,14 +6,21 @@
"output": {
"format": "cjs"
},
"external": ["@dcloudio/uni-cloud", "@dcloudio/uni-stat"]
"external": [
"@dcloudio/uni-cloud",
"@dcloudio/uni-push",
"@dcloudio/uni-stat"
]
},
{
"input": {
"src/index.ts": ["dist/uni-app.es.js", "dist/uni-app.cjs.js"]
"src/index.ts": [
"dist/uni-app.es.js",
"dist/uni-app.cjs.js"
]
},
"compilerOptions": {
"declaration": true
}
}
]
]
\ No newline at end of file
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var shared = require('@vue/shared');
var uniShared = require('@dcloudio/uni-shared');
......
......@@ -33,9 +33,9 @@
"@vue/shared": "3.2.45"
},
"peerDependencies": {
"@dcloudio/types": "3.2.5"
"@dcloudio/types": "3.2.7"
},
"devDependencies": {
"@dcloudio/types": "3.2.5"
"@dcloudio/types": "3.2.7"
}
}
......@@ -22,9 +22,9 @@
},
"dependencies": {
"@ampproject/remapping": "^2.1.2",
"@babel/core": "^7.19.6",
"@babel/parser": "^7.19.6",
"@babel/types": "^7.20.0",
"@babel/core": "^7.20.5",
"@babel/parser": "^7.20.5",
"@babel/types": "^7.20.7",
"@dcloudio/uni-i18n": "3.0.0-alpha-3061520221220001",
"@dcloudio/uni-shared": "3.0.0-alpha-3061520221220001",
"@intlify/core-base": "9.1.9",
......@@ -42,13 +42,13 @@
"compare-versions": "^3.6.0",
"debug": "^4.3.3",
"es-module-lexer": "^0.9.3",
"esbuild": "^0.15.9",
"esbuild": "^0.16.3",
"estree-walker": "^2.0.2",
"fast-glob": "^3.2.11",
"fs-extra": "^10.0.0",
"hash-sum": "^2.0.0",
"jsonc-parser": "^3.0.0",
"magic-string": "^0.26.7",
"magic-string": "^0.27.0",
"merge": "^2.1.1",
"mime": "^3.0.0",
"module-alias": "^2.2.2",
......
import type { Program } from '@babel/types'
import { parse, ParserPlugin } from '@babel/parser'
import { normalizeParsePlugins } from '../utils'
......@@ -5,7 +6,7 @@ export function parseProgram(
code: string,
importer: string,
{ babelParserPlugins }: { babelParserPlugins?: ParserPlugin[] }
) {
): Program {
return parse(code, {
plugins: normalizeParsePlugins(importer, babelParserPlugins),
sourceType: 'module',
......
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
import { createElementVNode, defineComponent, createVNode, mergeProps, getCurrentInstance, provide, watch, onUnmounted, shallowRef, reactive, watchEffect, ref, inject, onBeforeUnmount, computed, Text as Text$1, isVNode, Fragment, onMounted, nextTick, Comment, resolveComponent, parseClassList } from "vue";
import { hasOwn, extend, isFunction, isPlainObject, isArray, isString } from "@vue/shared";
import { cacheStringFunction, PRIMARY_COLOR } from "@dcloudio/uni-shared";
......@@ -158,7 +152,7 @@ const navigatorStyles = [{
}
}
}];
const Navigator = defineComponent({
const Navigator = /* @__PURE__ */ defineComponent({
name: "Navigator",
props: navigatorProps,
styles: navigatorStyles,
......@@ -220,7 +214,6 @@ function addEventListener(pageId, callback) {
}
class Page {
constructor(webview) {
__publicField(this, "webview");
this.webview = webview;
}
sendMessage(data) {
......@@ -746,7 +739,7 @@ const TYPES = {
primary: "p",
warn: "w"
};
const Button = defineComponent({
const Button = /* @__PURE__ */ defineComponent({
inheritAttrs: false,
name: "Button",
props: extend(buttonProps, {
......@@ -907,7 +900,7 @@ const getComponentSize = (el) => {
});
});
};
const MovableArea = defineComponent({
const MovableArea = /* @__PURE__ */ defineComponent({
name: "MovableArea",
props: movableAreaProps,
styles: [{
......@@ -1526,7 +1519,7 @@ function cancelAnimationFrame(id) {
clearTimeout(id);
}
const animation = weex.requireModule("animation");
const MovableView = defineComponent({
const MovableView = /* @__PURE__ */ defineComponent({
name: "MovableView",
props: movableViewProps,
emits: ["change", "scale"],
......@@ -2140,7 +2133,7 @@ const progressStyles = [{
}
}
}];
const Progress = defineComponent({
const Progress = /* @__PURE__ */ defineComponent({
name: "Progress",
props: progressProps,
styles: progressStyles,
......@@ -2287,7 +2280,7 @@ const nvuePickerViewProps = extend({}, pickerViewProps, {
default: ""
}
});
const PickerView = defineComponent({
const PickerView = /* @__PURE__ */ defineComponent({
name: "PickerView",
props: nvuePickerViewProps,
emits: ["change", "update:value"],
......@@ -2394,7 +2387,7 @@ const props$2 = {
default: 0
}
};
const PickerViewColumn = defineComponent({
const PickerViewColumn = /* @__PURE__ */ defineComponent({
name: "PickerViewColumn",
props: props$2,
data: () => ({
......@@ -3000,7 +2993,7 @@ const slierStyles = [{
}
}
}];
const USlider = defineComponent({
const USlider = /* @__PURE__ */ defineComponent({
name: "USlider",
props: sliderProps,
styles: slierStyles,
......@@ -3219,7 +3212,7 @@ const DCSwitchSize = {
width: 52,
height: 32
};
const Switch = defineComponent({
const Switch = /* @__PURE__ */ defineComponent({
name: "Switch",
props: switchProps,
emits: ["change"],
......@@ -3385,7 +3378,7 @@ const checkboxStyles = [{
}
}
}];
const Checkbox = defineComponent({
const Checkbox = /* @__PURE__ */ defineComponent({
name: "Checkbox",
props: checkboxProps,
styles: checkboxStyles,
......@@ -3446,7 +3439,7 @@ const Checkbox = defineComponent({
"class": ["uni-checkbox-input", {
"uni-checkbox-input-disabled": props2.disabled
}]
}, [checkboxChecked.value ? createNVueTextVNode("\uEA08", {
}, [checkboxChecked.value ? createNVueTextVNode("", {
class: "uni-icon",
style: {
color: checkboxColor.value
......@@ -3482,7 +3475,7 @@ function useCheckboxInject(checkboxChecked, checkboxValue, reset) {
uniLabel
};
}
const CheckboxGroup = defineComponent({
const CheckboxGroup = /* @__PURE__ */ defineComponent({
name: "CheckboxGroup",
props: checkboxGroupProps,
emits: ["change"],
......@@ -3609,7 +3602,7 @@ const radioStyles = [{
}
}
}];
const Radio = defineComponent({
const Radio = /* @__PURE__ */ defineComponent({
name: "Radio",
props: radioProps,
styles: radioStyles,
......@@ -3687,7 +3680,7 @@ const Radio = defineComponent({
"class": ["uni-radio-input", {
"uni-radio-input-disabled": disabled
}]
}, [radioChecked.value ? createNVueTextVNode("\uEA08", {
}, [radioChecked.value ? createNVueTextVNode("", {
class: "uni-radio-input-icon"
}) : null]), ...wrapSlots()]);
};
......@@ -3728,7 +3721,7 @@ function useRadioInject(radioChecked, radioValue, reset) {
field
};
}
const RadioGroup = defineComponent({
const RadioGroup = /* @__PURE__ */ defineComponent({
name: "RadioGroup",
props: radioGroupProps,
emits: ["change"],
......@@ -3806,7 +3799,7 @@ function useProvideRadioGroup(props2, trigger) {
return fields2;
}
const NATIVE_COMPONENTS = ["u-input", "u-textarea"];
const Form = defineComponent({
const Form = /* @__PURE__ */ defineComponent({
name: "Form",
emits: ["submit", "reset"],
setup({}, {
......@@ -3904,21 +3897,21 @@ const iconColors = {
clear: "#b2b2b2"
};
const iconChars = {
success: "\uEA06",
info: "\uEA03",
warn: "\uEA0B",
waiting: "\uEA09",
safe_success: "\uEA04",
safe_warn: "\uEA05",
success_circle: "\uEA07",
success_no_circle: "\uEA08",
waiting_circle: "\uEA0A",
circle: "\uEA01",
download: "\uEA02",
info_circle: "\uEA0C",
cancel: "\uEA0D",
search: "\uEA0E",
clear: "\uEA0F"
success: "",
info: "",
warn: "",
waiting: "",
safe_success: "",
safe_warn: "",
success_circle: "",
success_no_circle: "",
waiting_circle: "",
circle: "",
download: "",
info_circle: "",
cancel: "",
search: "",
clear: ""
};
const iconStyles = [{
"uni-icon": {
......@@ -3927,7 +3920,7 @@ const iconStyles = [{
}
}
}];
const Icon = defineComponent({
const Icon = /* @__PURE__ */ defineComponent({
name: "Icon",
props: iconProps,
styles: iconStyles,
......@@ -4032,7 +4025,7 @@ const swiperStyles = [{
}
}
}];
const Swiper = defineComponent({
const Swiper = /* @__PURE__ */ defineComponent({
name: "Swiper",
props: swiperProps,
styles: swiperStyles,
......@@ -4195,7 +4188,7 @@ const swiperItemProps = {
default: ""
}
};
const SwiperItem = defineComponent({
const SwiperItem = /* @__PURE__ */ defineComponent({
name: "SwiperItem",
props: swiperItemProps,
setup(props2, {
......@@ -4457,7 +4450,7 @@ const props = {
}
};
const defaultFontSize = 16;
const RichText = defineComponent({
const RichText = /* @__PURE__ */ defineComponent({
name: "RichText",
props,
setup(props2) {
......@@ -4670,7 +4663,7 @@ const AdEventType$1 = {
error: "error",
downloadchange: "downloadchange"
};
const Ad = defineComponent({
const Ad = /* @__PURE__ */ defineComponent({
name: "Ad",
props: adProps,
emits: [AdEventType$1.load, AdEventType$1.close, AdEventType$1.error, AdEventType$1.downloadchange],
......@@ -4779,7 +4772,7 @@ const AdEventType = {
close: "close",
error: "error"
};
const AdDraw = defineComponent({
const AdDraw = /* @__PURE__ */ defineComponent({
name: "AdDraw",
props: adDrawProps,
emits: [AdEventType.load, AdEventType.close, AdEventType.error],
......
module.exports = {}
\ No newline at end of file
......@@ -38,7 +38,7 @@
"@types/module-alias": "^2.0.1",
"@types/resolve": "^1.20.2",
"@vue/compiler-core": "3.2.45",
"esbuild": "^0.15.9",
"esbuild": "^0.16.3",
"vue": "3.2.45"
}
}
import fs from 'fs'
import path from 'path'
import { normalizePath, Plugin, ResolvedConfig } from 'vite'
import {
......@@ -38,6 +37,7 @@ export function uniCssPlugin(): Plugin {
generateBuiltInCssCode([...buildInCssSet].sort()),
resolvedConfig
)
// @ts-ignore 'Buffer' only refers to a type, but is being used as a value here
const contentHash = getAssetHash(Buffer.from(content, 'utf-8'))
const assetFileNames = path.posix.join(
resolvedConfig.build.assetsDir,
......
"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const vue = require("vue");
const shared = require("@vue/shared");
const uniShared = require("@dcloudio/uni-shared");
......@@ -96,7 +96,7 @@ const initI18nAsyncMsgsOnce = /* @__PURE__ */ uniShared.once(() => {
useI18n().add(
uniI18n.LOCALE_ES,
normalizeMessages(name, keys, [
"Se agot\xF3 el tiempo de conexi\xF3n, haga clic en la pantalla para volver a intentarlo."
"Se agotó el tiempo de conexión, haga clic en la pantalla para volver a intentarlo."
]),
false
);
......@@ -105,7 +105,7 @@ const initI18nAsyncMsgsOnce = /* @__PURE__ */ uniShared.once(() => {
useI18n().add(
uniI18n.LOCALE_FR,
normalizeMessages(name, keys, [
"La connexion a expir\xE9, cliquez sur l'\xE9cran pour r\xE9essayer."
"La connexion a expiré, cliquez sur l'écran pour réessayer."
]),
false
);
......@@ -113,14 +113,14 @@ const initI18nAsyncMsgsOnce = /* @__PURE__ */ uniShared.once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
uniI18n.LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u8FDE\u63A5\u670D\u52A1\u5668\u8D85\u65F6\uFF0C\u70B9\u51FB\u5C4F\u5E55\u91CD\u8BD5"]),
normalizeMessages(name, keys, ["连接服务器超时,点击屏幕重试"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
uniI18n.LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u9023\u63A5\u670D\u52D9\u5668\u8D85\u6642\uFF0C\u9EDE\u64CA\u5C4F\u5E55\u91CD\u8A66"]),
normalizeMessages(name, keys, ["連接服務器超時,點擊屏幕重試"]),
false
);
}
......@@ -152,14 +152,14 @@ const initI18nPickerMsgsOnce = /* @__PURE__ */ uniShared.once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
uniI18n.LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u5B8C\u6210", "\u53D6\u6D88"]),
normalizeMessages(name, keys, ["完成", "取消"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
uniI18n.LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u5B8C\u6210", "\u53D6\u6D88"]),
normalizeMessages(name, keys, ["完成", "取消"]),
false
);
}
......@@ -191,14 +191,14 @@ const initI18nVideoMsgsOnce = /* @__PURE__ */ uniShared.once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
uniI18n.LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u5F39\u5E55", "\u97F3\u91CF"]),
normalizeMessages(name, keys, ["弹幕", "音量"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
uniI18n.LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u5F48\u5E55", "\u97F3\u91CF"]),
normalizeMessages(name, keys, ["彈幕", "音量"]),
false
);
}
......@@ -5488,15 +5488,15 @@ const CHARS = {
nbsp: " ",
quot: '"',
apos: "'",
ldquo: "\u201C",
rdquo: "\u201D",
yen: "\uFFE5",
radic: "\u221A",
lceil: "\u2308",
rceil: "\u2309",
lfloor: "\u230A",
rfloor: "\u230B",
hellip: "\u2026"
ldquo: "",
rdquo: "",
yen: "",
radic: "",
lceil: "",
rceil: "",
lfloor: "",
rfloor: "",
hellip: ""
};
function decodeEntities(htmlString) {
return htmlString.replace(
......@@ -6987,9 +6987,9 @@ function useSwitchInject(props2, switchChecked) {
return uniLabel;
}
const SPACE_UNICODE = {
ensp: "\u2002",
emsp: "\u2003",
nbsp: "\xA0"
ensp: "",
emsp: "",
nbsp: " "
};
function parseText(text, options) {
return text.replace(/\\n/g, uniShared.LINEFEED).split(uniShared.LINEFEED).map((text2) => {
......@@ -7351,7 +7351,7 @@ function getCurrentUserInfo() {
try {
userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
} catch (error) {
throw new Error("\u83B7\u53D6\u5F53\u524D\u7528\u6237\u4FE1\u606F\u51FA\u9519\uFF0C\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F\u4E3A\uFF1A" + error.message);
throw new Error("获取当前用户信息出错,详细错误信息为:" + error.message);
}
userInfo.tokenExpired = userInfo.exp * 1e3;
delete userInfo.exp;
......@@ -10523,16 +10523,16 @@ function usePickerMethods(props2, state, trigger, rootRef, pickerRef, selectRef,
if (props2.mode === mode.DATE) {
const locale = getLocale2();
if (locale.startsWith("zh")) {
const array = ["\u5E74", "\u6708", "\u65E5"];
const array = ["", "", ""];
return item + array[index2];
} else if (props2.fields !== fields.YEAR && index2 === (props2.fields !== fields.MONTH && (locale === "es" || locale === "fr") ? 1 : 0)) {
let array;
switch (locale) {
case "es":
array = ["enero", "febrero", "marzo", "abril", "mayo", "junio", "\u200B\u200Bjulio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"];
array = ["enero", "febrero", "marzo", "abril", "mayo", "junio", "​​julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"];
break;
case "fr":
array = ["janvier", "f\xE9vrier", "mars", "avril", "mai", "juin", "juillet", "ao\xFBt", "septembre", "octobre", "novembre", "d\xE9cembre"];
array = ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "cembre"];
break;
default:
array = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
......
......@@ -95,7 +95,7 @@ const initI18nAsyncMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_ES,
normalizeMessages(name, keys, [
"Se agot\xF3 el tiempo de conexi\xF3n, haga clic en la pantalla para volver a intentarlo."
"Se agotó el tiempo de conexión, haga clic en la pantalla para volver a intentarlo."
]),
false
);
......@@ -104,7 +104,7 @@ const initI18nAsyncMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_FR,
normalizeMessages(name, keys, [
"La connexion a expir\xE9, cliquez sur l'\xE9cran pour r\xE9essayer."
"La connexion a expiré, cliquez sur l'écran pour réessayer."
]),
false
);
......@@ -112,14 +112,14 @@ const initI18nAsyncMsgsOnce = /* @__PURE__ */ once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u8FDE\u63A5\u670D\u52A1\u5668\u8D85\u65F6\uFF0C\u70B9\u51FB\u5C4F\u5E55\u91CD\u8BD5"]),
normalizeMessages(name, keys, ["连接服务器超时,点击屏幕重试"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u9023\u63A5\u670D\u52D9\u5668\u8D85\u6642\uFF0C\u9EDE\u64CA\u5C4F\u5E55\u91CD\u8A66"]),
normalizeMessages(name, keys, ["連接服務器超時,點擊屏幕重試"]),
false
);
}
......@@ -139,14 +139,14 @@ const initI18nShowActionSheetMsgsOnce = /* @__PURE__ */ once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u53D6\u6D88"]),
normalizeMessages(name, keys, ["取消"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u53D6\u6D88"]),
normalizeMessages(name, keys, ["取消"]),
false
);
}
......@@ -176,7 +176,7 @@ const initI18nShowToastMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_FR,
normalizeMessages(name, keys, [
"Veuillez noter que showToast doit \xEAtre associ\xE9 \xE0 hideToast"
"Veuillez noter que showToast doit être associé à hideToast"
]),
false
);
......@@ -185,7 +185,7 @@ const initI18nShowToastMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, [
"\u8BF7\u6CE8\u610F showToast \u4E0E hideToast \u5FC5\u987B\u914D\u5BF9\u4F7F\u7528"
"请注意 showToast 与 hideToast 必须配对使用"
]),
false
);
......@@ -194,7 +194,7 @@ const initI18nShowToastMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, [
"\u8ACB\u6CE8\u610F showToast \u8207 hideToast \u5FC5\u9808\u914D\u5C0D\u4F7F\u7528"
"請注意 showToast 與 hideToast 必須配對使用"
]),
false
);
......@@ -225,7 +225,7 @@ const initI18nShowLoadingMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_FR,
normalizeMessages(name, keys, [
"Veuillez noter que showLoading doit \xEAtre associ\xE9 \xE0 hideLoading"
"Veuillez noter que showLoading doit être associé à hideLoading"
]),
false
);
......@@ -234,7 +234,7 @@ const initI18nShowLoadingMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, [
"\u8BF7\u6CE8\u610F showLoading \u4E0E hideLoading \u5FC5\u987B\u914D\u5BF9\u4F7F\u7528"
"请注意 showLoading 与 hideLoading 必须配对使用"
]),
false
);
......@@ -243,7 +243,7 @@ const initI18nShowLoadingMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, [
"\u8ACB\u6CE8\u610F showLoading \u8207 hideLoading \u5FC5\u9808\u914D\u5C0D\u4F7F\u7528"
"請注意 showLoading 與 hideLoading 必須配對使用"
]),
false
);
......@@ -276,14 +276,14 @@ const initI18nShowModalMsgsOnce = /* @__PURE__ */ once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u53D6\u6D88", "\u786E\u5B9A"]),
normalizeMessages(name, keys, ["取消", "确定"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u53D6\u6D88", "\u78BA\u5B9A"]),
normalizeMessages(name, keys, ["取消", "確定"]),
false
);
}
......@@ -304,7 +304,7 @@ const initI18nChooseFileMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_ES,
normalizeMessages(name, keys, [
"El cuadro de di\xE1logo del selector de archivos solo se puede mostrar con la activaci\xF3n del usuario"
"El cuadro de diálogo del selector de archivos solo se puede mostrar con la activación del usuario"
]),
false
);
......@@ -313,7 +313,7 @@ const initI18nChooseFileMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_FR,
normalizeMessages(name, keys, [
"La bo\xEEte de dialogue du s\xE9lecteur de fichier ne peut \xEAtre affich\xE9e qu'avec une activation par l'utilisateur"
"La boîte de dialogue du sélecteur de fichier ne peut être affichée qu'avec une activation par l'utilisateur"
]),
false
);
......@@ -321,14 +321,14 @@ const initI18nChooseFileMsgsOnce = /* @__PURE__ */ once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u6587\u4EF6\u9009\u62E9\u5668\u5BF9\u8BDD\u6846\u53EA\u80FD\u5728\u7528\u6237\u6FC0\u6D3B\u65F6\u663E\u793A"]),
normalizeMessages(name, keys, ["文件选择器对话框只能在用户激活时显示"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u6587\u4EF6\u9078\u64C7\u5668\u5C0D\u8A71\u6846\u53EA\u80FD\u5728\u7528\u6236\u6FC0\u6D3B\u6642\u986F\u793A"]),
normalizeMessages(name, keys, ["文件選擇器對話框只能在用戶激活時顯示"]),
false
);
}
......@@ -360,8 +360,8 @@ const initI18nSetClipboardDataMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_FR,
normalizeMessages(name, keys, [
"Contenu copi\xE9",
"\xC9chec de la copie, copiez manuellement"
"Contenu copié",
"Échec de la copie, copiez manuellement"
]),
false
);
......@@ -369,14 +369,14 @@ const initI18nSetClipboardDataMsgsOnce = /* @__PURE__ */ once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u5185\u5BB9\u5DF2\u590D\u5236", "\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u590D\u5236"]),
normalizeMessages(name, keys, ["内容已复制", "复制失败,请手动复制"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u5167\u5BB9\u5DF2\u5FA9\u5236", "\u5FA9\u5236\u5931\u6557\uFF0C\u8ACB\u624B\u52D5\u5FA9\u88FD"]),
normalizeMessages(name, keys, ["內容已復制", "復制失敗,請手動復製"]),
false
);
}
......@@ -402,7 +402,7 @@ const initI18nGetClipboardDataMsgsOnce = /* @__PURE__ */ once(() => {
useI18n().add(
LOCALE_FR,
normalizeMessages(name, keys, [
"\xC9chec de la lecture, veuillez coller manuellement"
"Échec de la lecture, veuillez coller manuellement"
]),
false
);
......@@ -410,14 +410,14 @@ const initI18nGetClipboardDataMsgsOnce = /* @__PURE__ */ once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u8BFB\u53D6\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u7C98\u8D34"]),
normalizeMessages(name, keys, ["读取失败,请手动粘贴"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u8B80\u53D6\u5931\u6557\uFF0C\u8ACB\u624B\u52D5\u7C98\u8CBC"]),
normalizeMessages(name, keys, ["讀取失敗,請手動粘貼"]),
false
);
}
......@@ -449,14 +449,14 @@ const initI18nPickerMsgsOnce = /* @__PURE__ */ once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u5B8C\u6210", "\u53D6\u6D88"]),
normalizeMessages(name, keys, ["完成", "取消"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u5B8C\u6210", "\u53D6\u6D88"]),
normalizeMessages(name, keys, ["完成", "取消"]),
false
);
}
......@@ -488,14 +488,14 @@ const initI18nVideoMsgsOnce = /* @__PURE__ */ once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u5F39\u5E55", "\u97F3\u91CF"]),
normalizeMessages(name, keys, ["弹幕", "音量"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u5F48\u5E55", "\u97F3\u91CF"]),
normalizeMessages(name, keys, ["彈幕", "音量"]),
false
);
}
......@@ -527,14 +527,14 @@ const initI18nChooseLocationMsgsOnce = /* @__PURE__ */ once(() => {
if (__UNI_FEATURE_I18N_ZH_HANS__) {
useI18n().add(
LOCALE_ZH_HANS,
normalizeMessages(name, keys, ["\u641C\u7D22\u5730\u70B9", "\u53D6\u6D88"]),
normalizeMessages(name, keys, ["搜索地点", "取消"]),
false
);
}
if (__UNI_FEATURE_I18N_ZH_HANT__) {
useI18n().add(
LOCALE_ZH_HANT,
normalizeMessages(name, keys, ["\u641C\u7D22\u5730\u9EDE", "\u53D6\u6D88"]),
normalizeMessages(name, keys, ["搜索地點", "取消"]),
false
);
}
......@@ -12684,15 +12684,15 @@ const CHARS = {
nbsp: " ",
quot: '"',
apos: "'",
ldquo: "\u201C",
rdquo: "\u201D",
yen: "\uFFE5",
radic: "\u221A",
lceil: "\u2308",
rceil: "\u2309",
lfloor: "\u230A",
rfloor: "\u230B",
hellip: "\u2026"
ldquo: "",
rdquo: "",
yen: "",
radic: "",
lceil: "",
rceil: "",
lfloor: "",
rfloor: "",
hellip: ""
};
function decodeEntities(htmlString) {
return htmlString.replace(
......@@ -14489,9 +14489,9 @@ function useSwitchInject(props2, switchChecked) {
return uniLabel;
}
const SPACE_UNICODE = {
ensp: "\u2002",
emsp: "\u2003",
nbsp: "\xA0"
ensp: "",
emsp: "",
nbsp: " "
};
function parseText(text2, options) {
return text2.replace(/\\n/g, LINEFEED).split(LINEFEED).map((text22) => {
......@@ -14917,7 +14917,7 @@ function getCurrentUserInfo() {
try {
userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
} catch (error) {
throw new Error("\u83B7\u53D6\u5F53\u524D\u7528\u6237\u4FE1\u606F\u51FA\u9519\uFF0C\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F\u4E3A\uFF1A" + error.message);
throw new Error("获取当前用户信息出错,详细错误信息为:" + error.message);
}
userInfo.tokenExpired = userInfo.exp * 1e3;
delete userInfo.exp;
......@@ -20006,11 +20006,11 @@ const LocationView = /* @__PURE__ */ defineSystemComponent({
const origin = state2.location.latitude ? `&origin=${state2.location.latitude}%2C${state2.location.longitude}` : "";
url = `https://www.google.com/maps/dir/?api=1${origin}&destination=${props2.latitude}%2C${props2.longitude}`;
} else if (mapInfo.type === MapType.QQ) {
const fromcoord = state2.location.latitude ? `&fromcoord=${state2.location.latitude}%2C${state2.location.longitude}&from=${encodeURIComponent("\u6211\u7684\u4F4D\u7F6E")}` : "";
url = `https://apis.map.qq.com/uri/v1/routeplan?type=drive${fromcoord}&tocoord=${props2.latitude}%2C${props2.longitude}&to=${encodeURIComponent(props2.name || "\u76EE\u7684\u5730")}&ref=${mapInfo.key}`;
const fromcoord = state2.location.latitude ? `&fromcoord=${state2.location.latitude}%2C${state2.location.longitude}&from=${encodeURIComponent("我的位置")}` : "";
url = `https://apis.map.qq.com/uri/v1/routeplan?type=drive${fromcoord}&tocoord=${props2.latitude}%2C${props2.longitude}&to=${encodeURIComponent(props2.name || "目的地")}&ref=${mapInfo.key}`;
} else if (mapInfo.type === MapType.AMAP) {
const from = state2.location.latitude ? `from=${state2.location.longitude},${state2.location.latitude},${encodeURIComponent("\u6211\u7684\u4F4D\u7F6E")}&` : "";
url = `https://uri.amap.com/navigation?${from}to=${props2.longitude},${props2.latitude},${encodeURIComponent(props2.name || "\u76EE\u7684\u5730")}`;
const from = state2.location.latitude ? `from=${state2.location.longitude},${state2.location.latitude},${encodeURIComponent("我的位置")}&` : "";
url = `https://uri.amap.com/navigation?${from}to=${props2.longitude},${props2.latitude},${encodeURIComponent(props2.name || "目的地")}`;
}
window.open(url);
}
......@@ -20206,7 +20206,7 @@ function useList(state2) {
} else if (mapInfo.type === MapType.AMAP) {
window.AMap.plugin("AMap.PlaceSearch", function() {
const placeSearch = new window.AMap.PlaceSearch({
city: "\u5168\u56FD",
city: "全国",
pageSize: 10,
pageIndex: listState.pageIndex
});
......@@ -24057,16 +24057,16 @@ function usePickerMethods(props2, state2, trigger, rootRef, pickerRef, selectRef
if (props2.mode === mode.DATE) {
const locale = getLocale2();
if (locale.startsWith("zh")) {
const array = ["\u5E74", "\u6708", "\u65E5"];
const array = ["年", "月", "日"];
return item + array[index2];
} else if (props2.fields !== fields.YEAR && index2 === (props2.fields !== fields.MONTH && (locale === "es" || locale === "fr") ? 1 : 0)) {
let array;
switch (locale) {
case "es":
array = ["enero", "febrero", "marzo", "abril", "mayo", "junio", "\u200B\u200Bjulio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"];
array = ["enero", "febrero", "marzo", "abril", "mayo", "junio", "​​julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"];
break;
case "fr":
array = ["janvier", "f\xE9vrier", "mars", "avril", "mai", "juin", "juillet", "ao\xFBt", "septembre", "octobre", "novembre", "d\xE9cembre"];
array = ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"];
break;
default:
array = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
......
......@@ -2,10 +2,10 @@
var uniH5Vite = require('@dcloudio/uni-h5-vite');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var uniH5Vite__default = /*#__PURE__*/_interopDefaultLegacy(uniH5Vite);
var uniH5Vite__default = /*#__PURE__*/_interopDefault(uniH5Vite);
module.exports = uniH5Vite__default["default"];
module.exports = uniH5Vite__default.default;
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const isObject = (val) => val !== null && typeof val === 'object';
const defaultDelimiters = ['{', '}'];
class BaseFormatter {
......
......@@ -6,10 +6,10 @@ var path = require('path');
var uniCliShared = require('@dcloudio/uni-cli-shared');
var compilerCore = require('@vue/compiler-core');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefaultLegacy(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefault(path);
var component2 = true;
var enableAppxNg = true;
......@@ -180,10 +180,10 @@ const options = {
cdn: 2,
vite: {
inject: {
uni: [path__default["default"].resolve(__dirname, 'uni.api.esm.js'), 'default'],
uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
},
alias: {
'uni-mp-runtime': path__default["default"].resolve(__dirname, 'uni.mp.esm.js'),
'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
},
copyOptions: {
assets: [COMPONENTS_DIR],
......@@ -286,6 +286,6 @@ const uniMiniProgramAlipayPlugin = {
}
},
};
var index = [uniMiniProgramAlipayPlugin, ...initMiniProgramPlugin__default["default"](options)];
var index = [uniMiniProgramAlipayPlugin, ...initMiniProgramPlugin__default.default(options)];
module.exports = index;
......@@ -5,10 +5,10 @@ var path = require('path');
var uniCliShared = require('@dcloudio/uni-cli-shared');
var uniMpCompiler = require('@dcloudio/uni-mp-compiler');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefaultLegacy(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefault(path);
var appid = "";
var host = "baiduboxapp";
......@@ -120,10 +120,10 @@ const options = {
cdn: 3,
vite: {
inject: {
uni: [path__default["default"].resolve(__dirname, 'uni.api.esm.js'), 'default'],
uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
},
alias: {
'uni-mp-runtime': path__default["default"].resolve(__dirname, 'uni.mp.esm.js'),
'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
},
copyOptions: {
assets: [COMPONENTS_DIR],
......@@ -175,6 +175,6 @@ const uniMiniProgramBaiduPlugin = {
};
},
};
var index = [uniMiniProgramBaiduPlugin, ...initMiniProgramPlugin__default["default"](options)];
var index = [uniMiniProgramBaiduPlugin, ...initMiniProgramPlugin__default.default(options)];
module.exports = index;
......@@ -19,9 +19,9 @@
"license": "Apache-2.0",
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
"dependencies": {
"@babel/generator": "^7.19.6",
"@babel/parser": "^7.19.6",
"@babel/types": "^7.20.0",
"@babel/generator": "^7.20.5",
"@babel/parser": "^7.20.5",
"@babel/types": "^7.20.7",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3061520221220001",
"@dcloudio/uni-shared": "3.0.0-alpha-3061520221220001",
"@vue/compiler-core": "3.2.45",
......
......@@ -5,10 +5,10 @@ var initMiniProgramPlugin = require('@dcloudio/uni-mp-vite');
var path = require('path');
var uniMpCompiler = require('@dcloudio/uni-mp-compiler');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefaultLegacy(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefault(path);
var description = "项目配置文件";
var packOptions = {
......@@ -161,10 +161,10 @@ const options = {
cdn: 9,
vite: {
inject: {
uni: [path__default["default"].resolve(__dirname, 'uni.api.esm.js'), 'default'],
uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
},
alias: {
'uni-mp-runtime': path__default["default"].resolve(__dirname, 'uni.mp.esm.js'),
'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
},
copyOptions: {
assets: [COMPONENTS_DIR],
......@@ -209,6 +209,6 @@ const uniMiniProgramKuaishouPlugin = {
};
},
};
var index = [uniMiniProgramKuaishouPlugin, ...initMiniProgramPlugin__default["default"](options)];
var index = [uniMiniProgramKuaishouPlugin, ...initMiniProgramPlugin__default.default(options)];
module.exports = index;
......@@ -6,10 +6,10 @@ var path = require('path');
var uniMpCompiler = require('@dcloudio/uni-mp-compiler');
var compilerCore = require('@vue/compiler-core');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefaultLegacy(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefault(path);
var setting = {
urlCheck: false,
......@@ -91,10 +91,10 @@ const options = {
cdn: 4,
vite: {
inject: {
uni: [path__default["default"].resolve(__dirname, 'uni.api.esm.js'), 'default'],
uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
},
alias: {
'uni-mp-runtime': path__default["default"].resolve(__dirname, 'uni.mp.esm.js'),
'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
},
copyOptions: {
assets: [COMPONENTS_DIR],
......@@ -161,6 +161,6 @@ options.template.slot.fallbackContent = false;
// <view tt:for="{{items}}" tt:for-item="item" tt:key="id" slot="{{item.slot}}">{{item.text}}</view>
options.template.slot.dynamicSlotNames = false;
options.project.config = ['project.lark.json'];
var index = [uniMiniProgramToutiaoPlugin, ...initMiniProgramPlugin__default["default"](options)];
var index = [uniMiniProgramToutiaoPlugin, ...initMiniProgramPlugin__default.default(options)];
module.exports = index;
......@@ -5,11 +5,11 @@ var initMiniProgramPlugin = require('@dcloudio/uni-mp-vite');
var path = require('path');
var fs = require('fs-extra');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefaultLegacy(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefault(path);
var fs__default = /*#__PURE__*/_interopDefault(fs);
let isFixed = false;
function fix2648(bundle) {
......@@ -23,9 +23,9 @@ function fix2648(bundle) {
try {
const { usingComponents } = JSON.parse(appJsonAsset.source.toString());
if (usingComponents && usingComponents['fix-2648']) {
fs__default["default"].outputFileSync(path__default["default"].resolve(process.env.UNI_OUTPUT_DIR, 'fix-2648.json'), `{"component":true}`);
fs__default["default"].outputFileSync(path__default["default"].resolve(process.env.UNI_OUTPUT_DIR, 'fix-2648.qml'), `<!-- https://github.com/dcloudio/uni-app/issues/2648 -->`);
fs__default["default"].outputFileSync(path__default["default"].resolve(process.env.UNI_OUTPUT_DIR, 'fix-2648.js'), `Component({})`);
fs__default.default.outputFileSync(path__default.default.resolve(process.env.UNI_OUTPUT_DIR, 'fix-2648.json'), `{"component":true}`);
fs__default.default.outputFileSync(path__default.default.resolve(process.env.UNI_OUTPUT_DIR, 'fix-2648.qml'), `<!-- https://github.com/dcloudio/uni-app/issues/2648 -->`);
fs__default.default.outputFileSync(path__default.default.resolve(process.env.UNI_OUTPUT_DIR, 'fix-2648.js'), `Component({})`);
}
isFixed = true;
}
......@@ -110,6 +110,21 @@ const miniProgram = {
arg: ['ready'],
},
],
video: [
{
name: 'on',
arg: [
'play',
'pause',
'ended',
'timeupdate',
'fullscreenchange',
'waiting',
'error',
'progress',
],
},
],
},
component: {
dir: COMPONENTS_DIR,
......@@ -121,10 +136,10 @@ const options = {
cdn: 5,
vite: {
inject: {
uni: [path__default["default"].resolve(__dirname, 'uni.api.esm.js'), 'default'],
uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
},
alias: {
'uni-mp-runtime': path__default["default"].resolve(__dirname, 'uni.mp.esm.js'),
'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
},
copyOptions: {
assets: [COMPONENTS_DIR],
......@@ -200,6 +215,6 @@ const uniMiniProgramQQPlugin = {
fix2648(bundle);
},
};
var index = [uniMiniProgramQQPlugin, ...initMiniProgramPlugin__default["default"](options)];
var index = [uniMiniProgramQQPlugin, ...initMiniProgramPlugin__default.default(options)];
module.exports = index;
......@@ -6,10 +6,10 @@ var path = require('path');
var uniMpCompiler = require('@dcloudio/uni-mp-compiler');
var compilerCore = require('@vue/compiler-core');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefaultLegacy(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefault(path);
var setting = {
urlCheck: false,
......@@ -91,10 +91,10 @@ const options = {
cdn: 4,
vite: {
inject: {
uni: [path__default["default"].resolve(__dirname, 'uni.api.esm.js'), 'default'],
uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
},
alias: {
'uni-mp-runtime': path__default["default"].resolve(__dirname, 'uni.mp.esm.js'),
'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
},
copyOptions: {
assets: [COMPONENTS_DIR],
......@@ -149,6 +149,6 @@ const uniMiniProgramToutiaoPlugin = {
};
},
};
var index = [uniMiniProgramToutiaoPlugin, ...initMiniProgramPlugin__default["default"](options)];
var index = [uniMiniProgramToutiaoPlugin, ...initMiniProgramPlugin__default.default(options)];
module.exports = index;
......@@ -10,8 +10,11 @@
}
]
},
"external": ["@vue/shared", "@dcloudio/uni-shared"],
"external": [
"@vue/shared",
"@dcloudio/uni-shared"
],
"replacements": {
"__PLATFORM__": "\"mp-weixin\""
}
}
}
\ No newline at end of file
......@@ -36,6 +36,11 @@
"__PLATFORM__": "\"mp-weixin\"",
"__PLATFORM_TITLE__": "微信小程序"
},
"external": ["@dcloudio/uni-i18n", "@dcloudio/uni-shared", "@vue/shared", "vue"]
"external": [
"@dcloudio/uni-i18n",
"@dcloudio/uni-shared",
"@vue/shared",
"vue"
]
}
]
]
\ No newline at end of file
......@@ -5,10 +5,10 @@ var initMiniProgramPlugin = require('@dcloudio/uni-mp-vite');
var path = require('path');
var compilerCore = require('@vue/compiler-core');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefaultLegacy(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefault(path);
var uniad_app_json = function (appJson) {
if (!appJson.plugins) {
......@@ -171,10 +171,10 @@ const options = {
cdn: 1,
vite: {
inject: {
uni: [path__default["default"].resolve(__dirname, 'uni.api.esm.js'), 'default'],
uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
},
alias: {
'uni-mp-runtime': path__default["default"].resolve(__dirname, 'uni.mp.esm.js'),
'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
},
copyOptions: {
assets: [COMPONENTS_DIR],
......@@ -240,6 +240,6 @@ const uniMiniProgramWeixinPlugin = {
};
},
};
var index = [uniMiniProgramWeixinPlugin, ...initMiniProgramPlugin__default["default"](options)];
var index = [uniMiniProgramWeixinPlugin, ...initMiniProgramPlugin__default.default(options)];
module.exports = index;
......@@ -19,6 +19,6 @@
"dependencies": {
"@vue/shared": "3.2.45",
"parse-css-font": "^4.0.0",
"postcss": "^8.4.18"
"postcss": "^8.4.20"
}
}
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -3,9 +3,9 @@
var path = require('path');
var uniCliShared = require('@dcloudio/uni-cli-shared');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var path__default = /*#__PURE__*/_interopDefault(path);
var index = () => [
uniCliShared.defineUniMainJsPlugin((opts) => {
......@@ -43,7 +43,7 @@ var index = () => [
},
resolveId(id) {
if (id === '@dcloudio/uni-push') {
return uniCliShared.resolveBuiltIn(path__default["default"].join('@dcloudio/uni-push', isOffline || isEnableV1
return uniCliShared.resolveBuiltIn(path__default.default.join('@dcloudio/uni-push', isOffline || isEnableV1
? 'dist/uni-push.plus.es.js'
: 'dist/uni-push.es.js'));
}
......
......@@ -5,10 +5,10 @@ var initMiniProgramPlugin = require('@dcloudio/uni-mp-vite');
var path = require('path');
var shared = require('@vue/shared');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefaultLegacy(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
var path__default = /*#__PURE__*/_interopDefault(path);
var compilerOptions$1 = {
target: "es6",
......@@ -31,9 +31,9 @@ function formatAppJson(_appJson, manifestJson, _pagesJson) {
});
if (!appJson.name) {
const inputDir = process.env.UNI_INPUT_DIR;
let projectname = path__default["default"].basename(inputDir);
let projectname = path__default.default.basename(inputDir);
if (projectname === 'src') {
projectname = path__default["default"].basename(path__default["default"].dirname(inputDir));
projectname = path__default.default.basename(path__default.default.dirname(inputDir));
}
appJson.name = projectname;
}
......@@ -73,10 +73,10 @@ const options = {
cdn: process.env.UNI_SUB_PLATFORM === 'quickapp-webview-huawei' ? 200 : 201,
vite: {
inject: {
uni: [path__default["default"].resolve(__dirname, 'uni.api.esm.js'), 'default'],
uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
},
alias: {
'uni-mp-runtime': path__default["default"].resolve(__dirname, 'uni.mp.esm.js'),
'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
},
copyOptions: {},
},
......@@ -125,6 +125,6 @@ const uniQuickappWebviewPlugin = {
};
},
};
var index = [uniQuickappWebviewPlugin, ...initMiniProgramPlugin__default["default"](options)];
var index = [uniQuickappWebviewPlugin, ...initMiniProgramPlugin__default.default(options)];
module.exports = index;
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var shared = require('@vue/shared');
const BUILT_IN_TAG_NAMES = [
......
......@@ -3,9 +3,9 @@
var debug = require('debug');
var uniCliShared = require('@dcloudio/uni-cli-shared');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var debug__default = /*#__PURE__*/_interopDefaultLegacy(debug);
var debug__default = /*#__PURE__*/_interopDefault(debug);
function once(fn, ctx = null) {
let res;
......@@ -98,7 +98,7 @@ var index = () => [
}
}
}
debug__default["default"]('uni:stat')('isEnable', isEnable);
debug__default.default('uni:stat')('isEnable', isEnable);
}
process.env.UNI_STAT_TITLE_JSON = JSON.stringify(titlesJson);
return {
......
......@@ -4,10 +4,10 @@ var fs = require('fs');
var path = require('path');
var uniCliShared = require('@dcloudio/uni-cli-shared');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var fs__default = /*#__PURE__*/_interopDefault(fs);
var path__default = /*#__PURE__*/_interopDefault(path);
// eslint-disable-next-line no-restricted-globals
const { initDevtoolsServer } = require('../lib/front/server.js');
......@@ -40,12 +40,12 @@ const uniVueDevtoolsPlugin = () => {
return;
}
copied = true;
const vueDevtoolsDir = path__default["default"].resolve(process.env.UNI_OUTPUT_DIR, 'vue-devtools');
if (!fs__default["default"].existsSync(vueDevtoolsDir)) {
fs__default["default"].mkdirSync(vueDevtoolsDir, { recursive: true });
const vueDevtoolsDir = path__default.default.resolve(process.env.UNI_OUTPUT_DIR, 'vue-devtools');
if (!fs__default.default.existsSync(vueDevtoolsDir)) {
fs__default.default.mkdirSync(vueDevtoolsDir, { recursive: true });
}
fs__default["default"].copyFileSync(path__default["default"].resolve(__dirname, '../lib/mp/backend.js'), path__default["default"].resolve(vueDevtoolsDir, 'backend.js'));
fs__default["default"].copyFileSync(path__default["default"].resolve(__dirname, '../lib/mp/hook.js'), path__default["default"].resolve(vueDevtoolsDir, 'hook.js'));
fs__default.default.copyFileSync(path__default.default.resolve(__dirname, '../lib/mp/backend.js'), path__default.default.resolve(vueDevtoolsDir, 'backend.js'));
fs__default.default.copyFileSync(path__default.default.resolve(__dirname, '../lib/mp/hook.js'), path__default.default.resolve(vueDevtoolsDir, 'hook.js'));
},
};
};
......@@ -53,7 +53,7 @@ var index = () => {
return [
uniVueDevtoolsPlugin(),
uniCliShared.defineUniMainJsPlugin((opts) => {
const devtoolsPath = uniCliShared.normalizePath(path__default["default"].resolve(__dirname, '..'));
const devtoolsPath = uniCliShared.normalizePath(path__default.default.resolve(__dirname, '..'));
let devtoolsCode = `;import '${devtoolsPath}';`;
if (uniCliShared.isMiniProgramPlatform()) {
devtoolsCode += `require('./vue-devtools/hook.js');require('./vue-devtools/backend.js');`;
......
......@@ -94,5 +94,6 @@ export function bundleSwift(options: UtsBundleOptions): Promise<UtsResult> {
}
function toBuffer(t: any): Buffer {
// @ts-ignore 'Buffer' only refers to a type, but is being used as a value here
return Buffer.from(JSON.stringify(t))
}
......@@ -25,15 +25,15 @@
},
"license": "Apache-2.0",
"dependencies": {
"@babel/core": "^7.19.6",
"@babel/core": "^7.20.5",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-transform-typescript": "^7.20.0",
"@babel/plugin-transform-typescript": "^7.20.2",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3061520221220001",
"@dcloudio/uni-shared": "3.0.0-alpha-3061520221220001",
"@rollup/pluginutils": "^4.2.0",
"@vitejs/plugin-legacy": "^2.3.1",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.1",
"@vitejs/plugin-legacy": "^3.0.1",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vue/compiler-core": "3.2.45",
"@vue/compiler-dom": "3.2.45",
"@vue/compiler-sfc": "3.2.45",
......@@ -57,11 +57,11 @@
"@types/sass": "^1.16.0",
"@vue/babel-plugin-jsx": "^1.1.1",
"chokidar": "^3.5.3",
"vite": "3.2.5",
"vite": "4.0.3",
"vue": "3.2.45"
},
"peerDependencies": {
"vite": "3.2.5"
"vite": "4.0.3"
},
"uni-app": {
"compilerVersion": "3.6.15"
......
......@@ -38,7 +38,8 @@ export async function runDev(options: CliOptions & ServerOptions) {
watcher.on('event', (event) => {
if (event.code === 'BUNDLE_START') {
if (isFirstStart) {
return (isFirstStart = false)
isFirstStart = false
return
}
output('log', M['dev.watching.start'])
} else if (event.code === 'BUNDLE_END') {
......
此差异已折叠。
import { createRequire } from 'module'
import { fileURLToPath } from 'url'
import fs from 'fs'
import path from 'path'
import ts from 'rollup-plugin-typescript2'
......@@ -12,6 +14,9 @@ if (!process.env.TARGET) {
throw new Error('TARGET package must be specified via --environment flag.')
}
const require = createRequire(import.meta.url)
const __dirname = fileURLToPath(new URL('.', import.meta.url))
const packagesDir = path.resolve(__dirname, 'packages')
const packageDir = path.resolve(packagesDir, process.env.TARGET)
const resolve = (p) => path.resolve(packageDir, p)
......@@ -30,6 +35,7 @@ function normalizeOutput(file, output = {}) {
file,
format: file.includes('.cjs.') ? 'cjs' : 'es',
exports: 'auto',
interop: 'auto'
},
output
)
......@@ -79,7 +85,7 @@ function resolveTsconfigJson() {
function createConfig(entryFile, output, buildOption) {
const shouldEmitDeclarations = process.env.TYPES != null && !hasTSChecked
const tsPlugin = ts({
const tsOptions = {
check:
!process.env.CI && process.env.NODE_ENV === 'production' && !hasTSChecked,
tsconfig: resolveTsconfigJson(),
......@@ -95,7 +101,8 @@ function createConfig(entryFile, output, buildOption) {
exclude: ['**/__tests__', 'test-dts'],
},
useTsconfigDeclarationDir: true,
})
}
const tsPlugin = ts(tsOptions)
// we only need to check TS and generate declarations once for each build.
// it also seems to run into weird issues when checking multiple times
......@@ -106,8 +113,8 @@ function createConfig(entryFile, output, buildOption) {
buildOption.external === false
? []
: Array.isArray(buildOption.external)
? buildOption.external
: [
? buildOption.external
: [
'vue',
'@vue/shared',
...Object.keys(pkg.dependencies || {}),
......@@ -169,14 +176,14 @@ function createConfig(entryFile, output, buildOption) {
buildOption.treeshake === false
? false
: {
moduleSideEffects(id) {
if (id.endsWith('polyfill.ts')) {
console.log('[WARN]:sideEffects[' + id + ']')
return true
}
return false
},
moduleSideEffects(id) {
if (id.endsWith('polyfill.ts')) {
console.log('[WARN]:sideEffects[' + id + ']')
return true
}
return false
},
},
}
}
......@@ -202,5 +209,5 @@ function createReplacePlugin(buildOption, format) {
replacements[key] = process.env[key]
}
})
return replace({ values: replacements, preventAssignment: true })
return replace({ delimiters: ['', ''], values: replacements, preventAssignment: true })
}
......@@ -25,19 +25,19 @@ const pkgs = {
next: '9.1.9',
},
vite: {
latest: '3.2.5',
latest: '4.0.3',
},
'@vitejs/plugin-vue': {
latest: '3.2.0',
latest: '4.0.0',
},
'@vitejs/plugin-vue-jsx': {
latest: '2.1.1',
latest: '3.0.0',
},
'@vitejs/plugin-legacy': {
latest: '2.3.1',
latest: '3.0.1',
},
'@dcloudio/types': {
latest: '3.2.5',
latest: '3.2.7',
},
autoprefixer: {
latest: '10.4.13',
......
{
"compilerOptions": {
"target": "es2018",
"target": "ES2020",
"moduleResolution": "node",
"strict": true,
"declaration": false,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册