diff --git a/AndroidManifest.xml b/AndroidManifest.xml index eae83d6fd83c391515a4f90751cf239d5ac55ebc..2111f4cb9c0f0edf1df87f3fa64f5b24823e26f1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -6,14 +6,15 @@ > - - - - - - - + + + + + + + + diff --git a/changelog.md b/changelog.md index da0263415a66dad31cf2ee55baa73f41315b7b85..40fa70a61b4330b0fcef060c0363c60d5fdbac8d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,2 +1,23 @@ +## 1.0.8 +* update 4.06.2024032403-alpha + +## 1.0.7 +* update 4.05.2024032021-alpha + +## 1.0.6 +* update 4.04.2024031519-alpha + +## 1.0.5 +* update 4.03.2024031101-alpha + +## 1.0.4 +* update 4.02.2024030621-alpha + +## 1.0.3 +* update 4.01.2024020211-alpha + +## 1.0.2 +* update 4.0.2024012711-alpha + ## 1.0.1(2023-12-19) 更多详情查看:[https://gitcode.net/dcloud/hello-uts/-/commits/alpha](https://gitcode.net/dcloud/hello-uts/-/commits/alpha) diff --git a/jest.config.js b/jest.config.js index 4c02a56c2f0a0edcc39ef2ca8a77527d11580e91..63dd1fe331a4ffa8bae597d3fd83e402a965030a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -43,6 +43,7 @@ module.exports = { reporters: [ 'default' ], + setupFiles: ['./jest.global.js'], globals: { describes: parseDescribes() }, @@ -51,4 +52,4 @@ module.exports = { rootDir: __dirname, testMatch: ["/pages/**/*test.[jt]s?(x)"], testPathIgnorePatterns: ['/node_modules/'] -} +} diff --git a/jest.global.js b/jest.global.js new file mode 100644 index 0000000000000000000000000000000000000000..72c2ea90ea6cf64e432a080f8f6ec3882fa5c120 --- /dev/null +++ b/jest.global.js @@ -0,0 +1,44 @@ +const { + readFileSync, + readdirSync +} = require('fs') +const { + extname, + resolve +} = require('path') + +module.exports = async function (globalConfig, projectConfig) { + + const describeRE = /describe\(["|'](.*)["|']/ + const testsRE = /test\(["|'](.*)["|']/g + + function parse(content) { + const describes = content.match(describeRE) + if (!describes) { + return + } + const describe = describes[1] + const tests = [] + let test + while (test = testsRE.exec(content)) { + tests.push(test[1]) + } + return { + describe, + tests + } + } + + function parseDescribes() { + const dir = resolve(__dirname, 'uni_modules/uts-tests/utssdk') + const describes = [] + readdirSync(dir).forEach(file => { + if (extname(file) === '.uts') { + describes.push(parse(readFileSync(resolve(dir, file), 'utf8'))) + } + }) + return describes + }; + + global.describes = parseDescribes(); +}; \ No newline at end of file diff --git a/main.js b/main.js index f0074dad9eea4b5c5c77983f2edc82d904b21eb7..b85fc2413b39fbb1c7ac0362c65613a38f9376bf 100644 --- a/main.js +++ b/main.js @@ -1,10 +1,21 @@ import App from './App' +// #ifndef VUE3 +import Vue from 'vue' +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 import { createSSRApp } from 'vue' export function createApp() { const app = createSSRApp(App) - return { app } -} \ No newline at end of file +} +// #endif diff --git a/package.json b/package.json index 327c5919c762e96e75b46efd699efd74eb11e963..5881557599168a5c8182276afe71aac9fc2606ee 100644 --- a/package.json +++ b/package.json @@ -1,87 +1,87 @@ -{ - "id": "hello-uts", - "name": "Hello uts", - "displayName": "Hello uts", - "version": "1.1.1", - "description": "UTS插件示例项目", - "repository": "https://gitcode.net/dcloud/hello-uts", - "keywords": [ - "uts", - "示例工程" -], - "author": "", - "license": "MIT", - "dependencies": {}, - "engines": { - "HBuilderX": "^3.99" - }, -"dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "不采集任何数据", - "permissions": "- android.permission.INTERNET \n- android.permission.READ_EXTERNAL_STORAGE \n- android.permission.WRITE_EXTERNAL_STORAGE \n- android.permission.ACCESS_FINE_LOCATION \n- android.permission.ACCESS_COARSE_LOCATION \n- android.permission.ACCESS_NETWORK_STATE \n- android.permission.READ_MEDIA_IMAGES \n- android.permission.READ_MEDIA_VIDEO" - }, - "npmurl": "", - "type": "uniapp-template-project" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y" - }, - "client": { - "App": { - "app-vue": "y", - "app-nvue": "n", - "app-uvue": "n" - }, - "H5-mobile": { - "Safari": "n", - "Android Browser": "n", - "微信浏览器(Android)": "n", - "QQ浏览器(Android)": "n" - }, - "H5-pc": { - "Chrome": "n", - "IE": "n", - "Edge": "n", - "Firefox": "n", - "Safari": "n" - }, - "小程序": { - "微信": "n", - "阿里": "n", - "百度": "n", - "字节跳动": "n", - "QQ": "n", - "京东": "n", - "钉钉": "n", - "快手": "n", - "飞书": "n" - }, - "快应用": { - "华为": "n", - "联盟": "n" - }, - "Vue": { - "vue2": "y", - "vue3": "y" - } - } - } - } +{ + "id": "hello-uts-alpha", + "name": "hello-uts-alpha", + "displayName": "hello-uts-alpha", + "version": "1.0.8", + "description": "UTS插件示例项目", + "repository": "https://gitcode.net/dcloud/hello-uts", + "keywords": [ + "uts", + "示例工程" + ], + "author": "", + "license": "MIT", + "dependencies": {}, + "engines": { + "HBuilderX": "^3.99" + }, + "dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "不采集任何数据", + "permissions": "- android.permission.INTERNET \n- android.permission.READ_EXTERNAL_STORAGE \n- android.permission.WRITE_EXTERNAL_STORAGE \n- android.permission.ACCESS_FINE_LOCATION \n- android.permission.ACCESS_COARSE_LOCATION \n- android.permission.ACCESS_NETWORK_STATE \n- android.permission.READ_MEDIA_IMAGES \n- android.permission.READ_MEDIA_VIDEO" + }, + "npmurl": "", + "type": "uniapp-template-project" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "n", + "app-uvue": "n" + }, + "H5-mobile": { + "Safari": "n", + "Android Browser": "n", + "微信浏览器(Android)": "n", + "QQ浏览器(Android)": "n" + }, + "H5-pc": { + "Chrome": "n", + "IE": "n", + "Edge": "n", + "Firefox": "n", + "Safari": "n" + }, + "小程序": { + "微信": "n", + "阿里": "n", + "百度": "n", + "字节跳动": "n", + "QQ": "n", + "京东": "n", + "钉钉": "n", + "快手": "n", + "飞书": "n" + }, + "快应用": { + "华为": "n", + "联盟": "n" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } } \ No newline at end of file diff --git a/pages.json b/pages.json index 2b4ec8dc2e4927812b7df07a9c8b5737475c92f6..28ccadf7f2122c752cf3366baafa266708eb3f6d 100644 --- a/pages.json +++ b/pages.json @@ -14,7 +14,9 @@ "navigationBarTitleText": "", "enablePullDownRefresh": false } - }, + } + // #ifndef WEB + , { "path": "pages/advance/advance", "style": { @@ -171,6 +173,7 @@ } } + // #endif ], "tabBar": { diff --git a/pages/SDKIntegration/SDKIntegration.vue b/pages/SDKIntegration/SDKIntegration.vue index 4b55e1cf7b38fa873c2f85421ec2c98631808fc4..ecc5fd00bc4f3bc2670a8f977512dec3e8ec6408 100644 --- a/pages/SDKIntegration/SDKIntegration.vue +++ b/pages/SDKIntegration/SDKIntegration.vue @@ -11,13 +11,13 @@