diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ee819b596..998a87e85 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -21,7 +21,7 @@ Hi! I’m really excited that you are interested in contributing to AppWorks. Be Clone repo and initialize the setup environment: ```bash -$ git clone git@github.com:appworks-lab/pack.git +$ git clone git@github.com:appworks-lab/appworks.git $ cd appworks && npm run setup # This will take about 20 minutes # add dep to some package @@ -114,7 +114,7 @@ Get a Personal Access Token: Set Personal Access Token for Github Actions: -1. Visit [Actions secrets](https://github.com/appworks-lab/pack/settings/secrets/actions) +1. Visit [Actions secrets](https://github.com/appworks-lab/appworks/settings/secrets/actions) 2. Update `VSCE_TOKEN`: ![](https://img.alicdn.com/imgextra/i2/O1CN01NpeNCf2558rTm9812_!!6000000007474-2-tps-2880-1754.png_790x10000.jpg) diff --git a/.github/DOCUMENT_SPECIFIC.md b/.github/DOCUMENT_SPECIFIC.md index a1b37fba7..62771f408 100644 --- a/.github/DOCUMENT_SPECIFIC.md +++ b/.github/DOCUMENT_SPECIFIC.md @@ -46,7 +46,7 @@ ## License -[MIT](https://github.com/appworks-lab/pack/blob/master/LICENSE) +[MIT](https://github.com/appworks-lab/appworks/blob/master/LICENSE) ``` - When there is only one function, there is no need for a three-level title diff --git a/.github/O2_SPECIFIC.md b/.github/O2_SPECIFIC.md index ab85e53c6..1ddcca15d 100644 --- a/.github/O2_SPECIFIC.md +++ b/.github/O2_SPECIFIC.md @@ -9,7 +9,7 @@ AppWorks converts VS Code Pack to O2 Pack, this document describes the develop, General O2 pack by following commands: ```bash -$ git clone git@github.com:appworks-lab/pack.git +$ git clone git@github.com:appworks-lab/appworks.git $ cd appworks/ $ npm install # before run this script, modify `pushExtension2Npm` param which is in `./config.ts` to true when publish to tnpm diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27bd1d840..0d12d6b8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: - run: | npm run setup:packages npm run dependency:check + npm run lint npm run test npm run coverage env: @@ -28,3 +29,4 @@ jobs: uses: codecov/codecov-action@v1 with: fail_ci_if_error: true + \ No newline at end of file diff --git a/.stylelintrc.js b/.stylelintrc.js index df89a3f06..2805e3924 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -1,4 +1,3 @@ -const { getESLintConfig } = require('@iceworks/spec'); +const { getStylelintConfig } = require('@iceworks/spec'); -// getESLintConfig(rule: 'rax'|'react'|'vue', customConfig?); -module.exports = getESLintConfig('react'); \ No newline at end of file +module.exports = getStylelintConfig('rax'); diff --git a/README.md b/README.md index ec2106fa8..80a3b4216 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,8 @@ English | [简体中文](./README.zh-CN.md) - - - + +
@@ -36,7 +35,7 @@ Use AppWorks to develop Universal Application quickly: ## Contributors -Feel free to report any questions as an [issue](https://github.com/appworks-lab/pack/issues/new), we'd love to have your helping hand on AppWorks. +Feel free to report any questions as an [issue](https://github.com/appworks-lab/appworks/issues/new), we'd love to have your helping hand on AppWorks. If you're interested in AppWorks, see [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for more information to learn how to get started. diff --git a/README.zh-CN.md b/README.zh-CN.md index 7c76d5f1a..b1d485dca 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -15,9 +15,9 @@ - + - + @@ -34,7 +34,7 @@ ## 参与贡献 -欢迎通过 [issue](https://github.com/appworks-lab/pack/issues/new) 反馈问题。 +欢迎通过 [issue](https://github.com/appworks-lab/appworks/issues/new) 反馈问题。 如果对 `AppWorks` 感兴趣,请参考 [CONTRIBUTING.md](./.github/CONTRIBUTING.md) 学习如何贡献代码。 diff --git a/extensions/application-manager/CHANGELOG.md b/extensions/application-manager/CHANGELOG.md index 20dde7ba0..568b05e88 100644 --- a/extensions/application-manager/CHANGELOG.md +++ b/extensions/application-manager/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.0.4 + +- fix: fail to update the material source + ## 1.0.3 - fix: can not get project info in dashboard when in external diff --git a/extensions/application-manager/README.md b/extensions/application-manager/README.md index 2654b48a7..bea8c8114 100644 --- a/extensions/application-manager/README.md +++ b/extensions/application-manager/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/README.zh-CN.md) # Application Manager @@ -77,7 +77,7 @@ The dashboard shows some status of the current application. If your application 2. Add a customize device or delete devices 3. Select the custom device for debugging -For more information, please see [Reference Document](https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/docs/debug.en.md) +For more information, please see [Reference Document](https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/docs/debug.en.md) ### Node Dependencies diff --git a/extensions/application-manager/README.zh-CN.md b/extensions/application-manager/README.zh-CN.md index 289574e08..149560f6a 100644 --- a/extensions/application-manager/README.zh-CN.md +++ b/extensions/application-manager/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/README.md) # 应用管理器 @@ -79,7 +79,7 @@ 2. 添加或删除设备信息 3. 选择自定义的设备进行调试 -更多请看[参考文档](https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/docs/debug.md) +更多请看[参考文档](https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/docs/debug.md) ### 依赖信息视图 diff --git a/extensions/application-manager/assets/sidebar-logo.png b/extensions/application-manager/assets/sidebar-logo.png index 6b7e2ab64..4411e8d0e 100644 Binary files a/extensions/application-manager/assets/sidebar-logo.png and b/extensions/application-manager/assets/sidebar-logo.png differ diff --git a/extensions/application-manager/package.json b/extensions/application-manager/package.json index 66d338338..93c0811dd 100644 --- a/extensions/application-manager/package.json +++ b/extensions/application-manager/package.json @@ -3,7 +3,7 @@ "displayName": "Application Manager", "description": "Quick view your Universal Application(React/Rax/Vue, etc).", "publisher": "iceworks-team", - "version": "1.0.3", + "version": "1.0.4", "engines": { "vscode": "^1.41.0" }, @@ -329,7 +329,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "scripts": { "vscode:prepublish": "rm -rf build && npm run build:web && npm run build:extension", @@ -368,9 +368,9 @@ "extensionDependencies": [ "iceworks-team.iceworks-project-creator" ], - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/extensions/application-manager/src/debugConfig/index.ts b/extensions/application-manager/src/debugConfig/index.ts index 6b1bbab5f..aa2ee9cf9 100644 --- a/extensions/application-manager/src/debugConfig/index.ts +++ b/extensions/application-manager/src/debugConfig/index.ts @@ -19,7 +19,7 @@ export interface IDebugConfig { function writeConfigFile(filePath: string, config: IDebugConfig) { fs.writeFileSync( filePath, - '// See https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/docs/debug.md \n' + + '// See https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/docs/debug.md \n' + '// for the documentation about the AppWorks debug \n' + `${JSON.stringify(config, null, ' ')}`, ); diff --git a/extensions/application-manager/web/mocks/project/getProjectGitInfo.json b/extensions/application-manager/web/mocks/project/getProjectGitInfo.json index 5202e2a05..0f6ac8d66 100644 --- a/extensions/application-manager/web/mocks/project/getProjectGitInfo.json +++ b/extensions/application-manager/web/mocks/project/getProjectGitInfo.json @@ -1,5 +1,5 @@ { - "repository": "https://github.com/appworks-lab/pack", + "repository": "https://github.com/appworks-lab/appworks", "branch": "feat/test", "isGit": true } diff --git a/extensions/application-manager/web/package.json b/extensions/application-manager/web/package.json index 6024723a6..7a3e351d8 100644 --- a/extensions/application-manager/web/package.json +++ b/extensions/application-manager/web/package.json @@ -41,6 +41,6 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" } } diff --git a/extensions/application-manager/web/src/pages/Welcome/components/Information/index.tsx b/extensions/application-manager/web/src/pages/Welcome/components/Information/index.tsx index 35ee47e52..9542a1b22 100644 --- a/extensions/application-manager/web/src/pages/Welcome/components/Information/index.tsx +++ b/extensions/application-manager/web/src/pages/Welcome/components/Information/index.tsx @@ -29,7 +29,7 @@ const Information = () => { title: intl.formatMessage({ id: 'web.applicationManager.Welcome.Information.updates.title' }), description: intl.formatMessage({ id: 'web.applicationManager.Welcome.Information.updates.desc' }), linkName: intl.formatMessage({ id: 'web.applicationManager.Welcome.Information.updates.link' }), - link: 'https://github.com/appworks-lab/pack/releases', + link: 'https://github.com/appworks-lab/appworks/releases', }, ]; diff --git a/extensions/application-manager/web/tsconfig.json b/extensions/application-manager/web/tsconfig.json index a83b4ad1a..ff499eeae 100644 --- a/extensions/application-manager/web/tsconfig.json +++ b/extensions/application-manager/web/tsconfig.json @@ -11,6 +11,6 @@ }, "resolveJsonModule": true }, - "include": ["src/*", ".ice"], + "include": ["src", ".ice"], "exclude": ["node_modules", "public"] } diff --git a/extensions/appworks/CHANGELOG.md b/extensions/appworks/CHANGELOG.md index c9ed9fd5e..8014a83dc 100644 --- a/extensions/appworks/CHANGELOG.md +++ b/extensions/appworks/CHANGELOG.md @@ -1,44 +1,48 @@ # Change Log -## [1.3.1] +## [1.3.1](https://github.com/appworks-lab/appworks/releases/tag/v1.3.1) +- feat: update doctor codemod report [#920](https://github.com/appworks-lab/appworks/pull/920) +- feat: update official materials [#922](https://github.com/appworks-lab/appworks/pull/922) +- fix: fail to update material source [#921](https://github.com/appworks-lab/appworks/pull/921) - fix: remove stylelint extension that causes some bugs in vscode -## [1.3.0](https://github.com/appworks-lab/pack/releases/tag/v1.3.0) -- feat: add jsx files propTypes auto complete [#902](https://github.com/appworks-lab/pack/pull/902) -- feat: add code snippets [#903](https://github.com/appworks-lab/pack/pull/903) -- feat: auto fill content in store's files when create [#908](https://github.com/appworks-lab/pack/pull/908) -- feat: add auto complete when import modules [#905](https://github.com/appworks-lab/pack/pull/905) -- fix: dashboard show 404 and 500 error [#911](https://github.com/appworks-lab/pack/pull/911) -- fix: eslint config `overrides` not work [#901](https://github.com/appworks-lab/pack/pull/901) +## [1.3.0](https://github.com/appworks-lab/appworks/releases/tag/v1.3.0) -## [1.2.1](https://github.com/appworks-lab/pack/releases/tag/v1.2.1) +- feat: add jsx files propTypes auto complete [#902](https://github.com/appworks-lab/appworks/pull/902) +- feat: add code snippets [#903](https://github.com/appworks-lab/appworks/pull/903) +- feat: auto fill content in store's files when create [#908](https://github.com/appworks-lab/appworks/pull/908) +- feat: add auto complete when import modules [#905](https://github.com/appworks-lab/appworks/pull/905) +- fix: dashboard show 404 and 500 error [#911](https://github.com/appworks-lab/appworks/pull/911) +- fix: eslint config `overrides` not work [#901](https://github.com/appworks-lab/appworks/pull/901) -- feat: support double click to select scaffold [#895](https://github.com/appworks-lab/pack/pull/895) -- feat: loading status when reinstalling deps [#896](https://github.com/appworks-lab/pack/pull/896) -- fix: build error in macos platform [#891](https://github.com/appworks-lab/pack/pull/891) -- fix: empty project wrong CodeMod notice [#894](https://github.com/appworks-lab/pack/pull/894) +## [1.2.1](https://github.com/appworks-lab/appworks/releases/tag/v1.2.1) -## [1.2.0](https://github.com/appworks-lab/pack/releases/tag/v1.2.0) +- feat: support double click to select scaffold [#895](https://github.com/appworks-lab/appworks/pull/895) +- feat: loading status when reinstalling deps [#896](https://github.com/appworks-lab/appworks/pull/896) +- fix: build error in macos platform [#891](https://github.com/appworks-lab/appworks/pull/891) +- fix: empty project wrong CodeMod notice [#894](https://github.com/appworks-lab/appworks/pull/894) -- feat: remove Auto Complete Tag Feat remove Auto Complete Tag [#878](https://github.com/appworks-lab/pack/pull/878) -- feat: add time master configuration enableDataAnalysisServices Feat add time master configuration [#871](https://github.com/appworks-lab/pack/pull/871) -- feat: update vscodeignore Feat update vscodeignore [#883](https://github.com/appworks-lab/pack/pull/883) -- feat: add codemod check to doctor package Feat add codemod check to doctor package [#870](https://github.com/appworks-lab/pack/pull/870) -- feat: doctor extension add codemod Feat doctor extension add codemod [#873](https://github.com/appworks-lab/pack/pull/873) -- fix: auto-complete-tag confused typescript coding [#877](https://github.com/appworks-lab/pack/issues/877) -- fix: command Find Components In Current File not working Fix command Find Components In Current File not working [#876](https://github.com/appworks-lab/pack/pull/876) -- fix: component docs link fix: component link [#884](https://github.com/appworks-lab/pack/pull/884) +## [1.2.0](https://github.com/appworks-lab/appworks/releases/tag/v1.2.0) + +- feat: remove Auto Complete Tag Feat remove Auto Complete Tag [#878](https://github.com/appworks-lab/appworks/pull/878) +- feat: add time master configuration enableDataAnalysisServices Feat add time master configuration [#871](https://github.com/appworks-lab/appworks/pull/871) +- feat: update vscodeignore Feat update vscodeignore [#883](https://github.com/appworks-lab/appworks/pull/883) +- feat: add codemod check to doctor package Feat add codemod check to doctor package [#870](https://github.com/appworks-lab/appworks/pull/870) +- feat: doctor extension add codemod Feat doctor extension add codemod [#873](https://github.com/appworks-lab/appworks/pull/873) +- fix: auto-complete-tag confused typescript coding [#877](https://github.com/appworks-lab/appworks/issues/877) +- fix: command Find Components In Current File not working Fix command Find Components In Current File not working [#876](https://github.com/appworks-lab/appworks/pull/876) +- fix: component docs link fix: component link [#884](https://github.com/appworks-lab/appworks/pull/884) ## 1.1.0 -- feat: hint user install types/rax [#854](https://github.com/appworks-lab/pack/pull/854) -- fix: rax-spa project targets null [#862](https://github.com/appworks-lab/pack/pull/862) -- Chore: update webview icon [#856](https://github.com/appworks-lab/pack/pull/856) [#846](https://github.com/appworks-lab/pack/pull/846) -- feat: add recommend extensions [#837](https://github.com/appworks-lab/pack/pull/837) -- fix: only exit process when prepublishOnly [#836](https://github.com/appworks-lab/pack/pull/836) -- fix: make sure that the start & end fields exist [#838](https://github.com/appworks-lab/pack/pull/838) +- feat: hint user install types/rax [#854](https://github.com/appworks-lab/appworks/pull/854) +- fix: rax-spa project targets null [#862](https://github.com/appworks-lab/appworks/pull/862) +- Chore: update webview icon [#856](https://github.com/appworks-lab/appworks/pull/856) [#846](https://github.com/appworks-lab/appworks/pull/846) +- feat: add recommend extensions [#837](https://github.com/appworks-lab/appworks/pull/837) +- fix: only exit process when prepublishOnly [#836](https://github.com/appworks-lab/appworks/pull/836) +- fix: make sure that the start & end fields exist [#838](https://github.com/appworks-lab/appworks/pull/838) - fix: vsce [#576](https://github.com/microsoft/vscode-vsce/issues/576) .vscodeignore configuration ## 1.0.3 @@ -47,7 +51,7 @@ ## 1.0.2 -- Fix [#848](https://github.com/appworks-lab/pack/issues/848), remove [Chinese (Simplified) Language Pack for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=MS-CEINTL.vscode-language-pack-zh-hans). +- Fix [#848](https://github.com/appworks-lab/appworks/issues/848), remove [Chinese (Simplified) Language Pack for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=MS-CEINTL.vscode-language-pack-zh-hans). ## 1.0.1 diff --git a/extensions/appworks/README.md b/extensions/appworks/README.md index 1d903a8f0..551a4f016 100644 --- a/extensions/appworks/README.md +++ b/extensions/appworks/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/iceworks/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/iceworks/README.zh-CN.md) # AppWorks @@ -6,7 +6,7 @@ English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extens [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) [![Downloads](https://vsmarketplacebadge.apphb.com/downloads-short/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) [![Rating](https://vsmarketplacebadge.apphb.com/rating-star/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks&ssr=false#review-details) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/appworks-lab/pack/pulls) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/appworks-lab/appworks/pulls) [![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT) AppWorks is a Application Development Pack, provide visualization and intelligent technology to build Universal Application faster and better, support Web / H5 / MiniProgram Application. @@ -82,4 +82,4 @@ AppWorks Pack extension installs these recommend extensions: ## Help -Open an [issue](https://github.com/appworks-lab/pack/issues/new), We will respond quickly to the submitted issues. +Open an [issue](https://github.com/appworks-lab/appworks/issues/new), We will respond quickly to the submitted issues. diff --git a/extensions/appworks/README.zh-CN.md b/extensions/appworks/README.zh-CN.md index c03a162c2..3243adda0 100644 --- a/extensions/appworks/README.zh-CN.md +++ b/extensions/appworks/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/iceworks/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/iceworks/README.md) # AppWorks @@ -6,7 +6,7 @@ [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) [![Downloads](https://vsmarketplacebadge.apphb.com/downloads-short/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) [![Rating](https://vsmarketplacebadge.apphb.com/rating-star/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks&ssr=false#review-details) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/appworks-lab/pack/pulls) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/appworks-lab/appworks/pulls) [![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT) 前端研发套件,通过可视化编程和编码辅助手段,更快更好地构建多端应用,支持 Web 、HTML 5 和小程序应用。 @@ -82,4 +82,4 @@ AppWorks 套件内包含以下推荐的三方插件: ## 获取帮助 -向 AppWorks 的 Github 仓库提交 [issue](https://github.com/appworks-lab/pack/issues/new) ,我们会快速响应所提交的问题。 +向 AppWorks 的 Github 仓库提交 [issue](https://github.com/appworks-lab/appworks/issues/new) ,我们会快速响应所提交的问题。 diff --git a/extensions/appworks/package.json b/extensions/appworks/package.json index 7febc6322..a239577fd 100644 --- a/extensions/appworks/package.json +++ b/extensions/appworks/package.json @@ -29,7 +29,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "icon": "public/logo.png", "extensionPack": [ @@ -51,9 +51,9 @@ "msjsdiag.debugger-for-chrome", "alefragnani.Bookmarks" ], - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/appworks/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/appworks/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/extensions/codemod/README.md b/extensions/codemod/README.md index fbaf09038..232f77911 100644 --- a/extensions/codemod/README.md +++ b/extensions/codemod/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/codemod/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/codemod/README.zh-CN.md) # CodeMod diff --git a/extensions/codemod/README.zh-CN.md b/extensions/codemod/README.zh-CN.md index 35c45c0f5..d964b5ece 100644 --- a/extensions/codemod/README.zh-CN.md +++ b/extensions/codemod/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/codemod/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/codemod/README.md) # 代码更新插件 diff --git a/extensions/codemod/package.json b/extensions/codemod/package.json index 92f71c2e0..fc0b6e7d4 100644 --- a/extensions/codemod/package.json +++ b/extensions/codemod/package.json @@ -29,7 +29,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "main": "./build/extension.js", "scripts": { @@ -63,9 +63,9 @@ "lodash.clonedeep": "^4.5.0", "lodash.flatten": "^4.4.0" }, - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/codemod/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/codemod/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/extensions/codemod/web/tsconfig.json b/extensions/codemod/web/tsconfig.json index a83b4ad1a..ff499eeae 100644 --- a/extensions/codemod/web/tsconfig.json +++ b/extensions/codemod/web/tsconfig.json @@ -11,6 +11,6 @@ }, "resolveJsonModule": true }, - "include": ["src/*", ".ice"], + "include": ["src", ".ice"], "exclude": ["node_modules", "public"] } diff --git a/extensions/doctor/CHANGELOG.md b/extensions/doctor/CHANGELOG.md index f8c55ef6f..44dcabe17 100644 --- a/extensions/doctor/CHANGELOG.md +++ b/extensions/doctor/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log +# 1.1.3 +- feat: update @appworks/codemod +- feat: update codemod check result list ## 1.1.2 - feat: update @appworks/doctor to support custom config set extends and plugins. @@ -65,7 +68,7 @@ Release 1.0.0 ## 0.1.6 -- fix: [#604](https://github.com/appworks-lab/pack/issues/604) +- fix: [#604](https://github.com/appworks-lab/appworks/issues/604) ## 0.1.5 diff --git a/extensions/doctor/README.md b/extensions/doctor/README.md index dd6ecf690..52afb228e 100644 --- a/extensions/doctor/README.md +++ b/extensions/doctor/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/doctor/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/doctor/README.zh-CN.md) # Doctor diff --git a/extensions/doctor/README.zh-CN.md b/extensions/doctor/README.zh-CN.md index 09cf8021c..7b5a54d67 100644 --- a/extensions/doctor/README.zh-CN.md +++ b/extensions/doctor/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/doctor/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/doctor/README.md) # Doctor diff --git a/extensions/doctor/package.json b/extensions/doctor/package.json index 541df17f7..64f6ed496 100644 --- a/extensions/doctor/package.json +++ b/extensions/doctor/package.json @@ -3,7 +3,7 @@ "displayName": "Doctor", "description": "A free security and quality audit tool for modern DevOps teams", "publisher": "iceworks-team", - "version": "1.1.2", + "version": "1.1.3", "engines": { "vscode": "^1.41.0" }, @@ -30,11 +30,11 @@ "main": "./build/extension.js", "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/doctor/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/doctor/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" }, "scripts": { diff --git a/extensions/doctor/src/codemod.ts b/extensions/doctor/src/codemod.ts index 8b97572d3..a09e54e18 100644 --- a/extensions/doctor/src/codemod.ts +++ b/extensions/doctor/src/codemod.ts @@ -17,10 +17,7 @@ const SCAN_OPTIONS = { }; export async function runCodemod(transform: string) { - const result = await doctor.scan( - projectPath, - Object.assign({ transforms: [transform] }, SCAN_OPTIONS), - ); + const result = await doctor.scan(projectPath, Object.assign({ transforms: [transform] }, SCAN_OPTIONS)); setOutput(result.codemod?.reports[0].output || ''); return result; } @@ -31,53 +28,63 @@ export async function activateCodemod(context: vscode.ExtensionContext) { const deprecatedPackageConfig = {}; - const reports = await doctor.scan(projectPath, SCAN_OPTIONS); const packageFile = path.join(projectPath, 'package.json'); const packageJSON = fs.existsSync(packageFile) ? JSON.parse(fs.readFileSync(packageFile, 'utf-8')) : {}; // Show notifaction - if (projectPath) { + if (fs.existsSync(packageFile) && projectPath) { + const reports = await doctor.scan(projectPath, SCAN_OPTIONS); (reports.codemod?.reports || []).forEach((codemod) => { - const action = 'Run a Codemod'; + if (codemod.severity > 0) { + const action = 'Run a Codemod'; - if (codemod.npm_deprecate) { - const { name, version } = parse(codemod.npm_deprecate); - const dependence = (packageJSON.dependencies || {})[name] || (packageJSON.devDependencies || {})[name]; + if (codemod.npm_deprecate) { + const { name, version } = parse(codemod.npm_deprecate); + const dependence = (packageJSON.dependencies || {})[name] || (packageJSON.devDependencies || {})[name]; - if (dependence && semver.satisfies(semver.coerce(dependence), version || '*')) { - deprecatedPackageConfig[name] = { - ...codemod, - name, - version, - }; + if (dependence && semver.satisfies(semver.coerce(dependence), version || '*')) { + deprecatedPackageConfig[name] = { + ...codemod, + name, + version, + }; + } } - } - const message = - `${isEn ? codemod.title_en : codemod.title}: ` + - `${isEn ? codemod.message_en : codemod.message} ` + - `( [${isEn ? 'docs' : '文档'}](${codemod.docs}) )`; - const showMessage = codemod.severity === 2 ? window.showErrorMessage : window.showWarningMessage; + const message = + `${isEn ? codemod.title_en : codemod.title}: ` + + `${isEn ? codemod.message_en : codemod.message} ` + + `( [${isEn ? 'docs' : '文档'}](${codemod.docs}) )`; + const showMessage = codemod.severity === 2 ? window.showErrorMessage : window.showWarningMessage; - showMessage(message, action).then(async (item) => { - // Run codemod - if (item === action) { - const result = await runCodemod(codemod.transform); + showMessage(message, action).then(async (item) => { + // Run codemod + if (item === action) { + const result = await runCodemod(codemod.transform); - // Remove fixed deprecated package - if (result.codemod?.reports[0].npm_deprecate) { - delete deprecatedPackageConfig[result.codemod?.reports[0].npm_deprecate]; + // Remove fixed deprecated package + if (result.codemod?.reports[0].npm_deprecate) { + delete deprecatedPackageConfig[result.codemod?.reports[0].npm_deprecate]; + } } - } - }); + }); + } }); } // Show deprecate package setDeprecatedPackage(deprecatedPackageConfig); - vscode.window.onDidChangeActiveTextEditor(() => { - setDeprecatedPackage(deprecatedPackageConfig); - }, null, context.subscriptions); - vscode.workspace.onDidChangeTextDocument(() => { - setDeprecatedPackage(deprecatedPackageConfig); - }, null, context.subscriptions); + vscode.window.onDidChangeActiveTextEditor( + () => { + setDeprecatedPackage(deprecatedPackageConfig); + }, + null, + context.subscriptions, + ); + vscode.workspace.onDidChangeTextDocument( + () => { + setDeprecatedPackage(deprecatedPackageConfig); + }, + null, + context.subscriptions, + ); } diff --git a/extensions/doctor/web/mocks/action/getScanReport.ts b/extensions/doctor/web/mocks/action/getScanReport.ts index 6060c1cbd..ed2430f87 100644 --- a/extensions/doctor/web/mocks/action/getScanReport.ts +++ b/extensions/doctor/web/mocks/action/getScanReport.ts @@ -451,6 +451,34 @@ export default { codemod: { score: 98, reports: [ + { + title: '遵循阿里巴巴前端规范,并接入 @iceworks/spec 的最佳实践', + title_en: 'Follow Alibaba FED lint rules, and use @iceworks/spec best practices', + message: '遵循阿里巴巴前端规范,并更新 rax, ice 和 react 项目中的 eslint / stylelint / prettier 配置。', + message_en: 'Follow Alibaba FED lint rules, and update eslint / stylelint / prettier in rax, ice and react project.', + severity: 0, + npm_deprecate: '@ice/spec', + transform: 'lint-config-to-spec', + docs: 'https://github.com/appworks-lab/codemod/tree/master/transforms/docs/lint-config-to-spec.md', + mode: 'check', + output: 'Processing 211 files... \n' + + 'Spawning 7 workers...\n' + + 'Running in dry mode, no files will be written! \n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 25 files to free worker...\n' + + 'All done. \n' + + 'Results: \n' + + '0 errors\n' + + '0 unmodified\n' + + '194 skipped\n' + + '17 ok\n' + + 'Time elapsed: 3.707seconds \n' + }, { title: 'Rax 组件工程升级', title_en: 'Rax component project upgrade', diff --git a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.module.scss b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.module.scss index b55e9d08d..ff52c28a3 100644 --- a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.module.scss +++ b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.module.scss @@ -15,6 +15,10 @@ } .title { + .icon { + margin-right: 6px; + } + font-size: 16px; font-weight: bold; } diff --git a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.tsx b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.tsx index 6946a19d6..c4620c2d9 100644 --- a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.tsx +++ b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.tsx @@ -1,5 +1,6 @@ import React, { useState } from 'react'; import { Element } from 'react-scroll'; +import { Icon } from '@alifd/next'; import { getReportKey } from '@/config'; import callService from '@/callService'; import Appreciate from '../Appreciate'; @@ -54,7 +55,17 @@ const CodemodReport = (props) => { {(data.reports || []).map((codemod, index) => { return ({window.USE_EN ? codemod.title_en : codemod.title}
+
+ {codemod.severity > 0 ? (
+
{window.USE_EN ? codemod.message_en : codemod.message} {window.USE_EN ? ' [docs] ' : '【文档】'} @@ -78,7 +89,8 @@ const CodemodReport = (props) => { ); })}
{locale.haveProblem} - - https://github.com/appworks-lab/pack/issues + + https://github.com/appworks-lab/appworks/issues {locale.reportProblem}
diff --git a/packages/doctor/CHANGELOG.md b/packages/doctor/CHANGELOG.md index 9400029ef..8add7e0bb 100644 --- a/packages/doctor/CHANGELOG.md +++ b/packages/doctor/CHANGELOG.md @@ -1,5 +1,9 @@ # changelog +## 0.2.2 + +- Feat update @appworks/codemod. + ## 0.2.1 - Support custom config set extends and plugins. diff --git a/packages/doctor/bin/appworks-doctor b/packages/doctor/bin/appworks-doctor index db85e0b3a..8320b4c66 100755 --- a/packages/doctor/bin/appworks-doctor +++ b/packages/doctor/bin/appworks-doctor @@ -45,7 +45,7 @@ if (args.scan) { }, score: result.score || 0, }; - ['ESLint', 'maintainability', 'repeatability'].forEach((key) => { + ['ESLint', 'maintainability', 'repeatability', 'codemod'].forEach((key) => { if (result[key]) { report[key] = result[key].score; } diff --git a/packages/doctor/package.json b/packages/doctor/package.json index 668310611..1809e603b 100644 --- a/packages/doctor/package.json +++ b/packages/doctor/package.json @@ -1,7 +1,7 @@ { "name": "@appworks/doctor", "description": "Analyse and running codemods over react/rax projects, troubleshooting and automatically fixing errors", - "version": "0.2.1", + "version": "0.2.2", "keywords": [ "doctor", "analysis", @@ -25,7 +25,7 @@ "prepublishOnly": "npm run compile" }, "dependencies": { - "@appworks/codemod": "^0.1.0", + "@appworks/codemod": "^0.2.0", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", "@iceworks/spec": "^1.0.2", diff --git a/packages/material-engine/CHANGELOG.md b/packages/material-engine/CHANGELOG.md index 21d630cdf..d1c08871d 100644 --- a/packages/material-engine/CHANGELOG.md +++ b/packages/material-engine/CHANGELOG.md @@ -1,6 +1,12 @@ # CHANGELOG -## 0.1.0 +## 0.1.2 + +- feat: update official materials +- chore: remove antd material source +- fix: fail to update material source + +## 0.1.1 - feat: support generate antd and fusion mobile base material info diff --git a/packages/material-engine/package.json b/packages/material-engine/package.json index 953b613ee..865a04917 100644 --- a/packages/material-engine/package.json +++ b/packages/material-engine/package.json @@ -1,6 +1,6 @@ { "name": "@appworks/material-engine", - "version": "0.1.1", + "version": "0.1.2", "description": "AppWorks Material Engine for VSCode extension.", "files": [ "lib" diff --git a/packages/material-engine/src/material/index.ts b/packages/material-engine/src/material/index.ts index b277e4c48..3bdaa8f3e 100644 --- a/packages/material-engine/src/material/index.ts +++ b/packages/material-engine/src/material/index.ts @@ -18,7 +18,6 @@ export { generateDebugMaterialData }; // material source const ICE_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/react-materials.json'; -const ANTD_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/antd-materials.json'; const VUE_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/vue-materials.json'; // const MINI_PROGRAM_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/miniprogram-materials.json'; const RAX_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/rax-materials.json'; @@ -53,7 +52,7 @@ const componentSourceDetails = [ }, ]; -const OFFICAL_MATERIAL_SOURCES = [ +const OFFICIAL_MATERIAL_SOURCES = [ { name: i18n.format('package.materialService.index.webTitle'), type: 'react', @@ -61,13 +60,6 @@ const OFFICAL_MATERIAL_SOURCES = [ source: ICE_MATERIAL_SOURCE, description: i18n.format('package.materialService.index.webDescription'), }, - { - name: i18n.format('package.materialService.index.antdTitle'), - type: 'react', - client: 'pc', - source: ANTD_MATERIAL_SOURCE, - description: i18n.format('package.materialService.index.antdDescription'), - }, { name: i18n.format('package.materialService.index.raxTitle'), type: 'rax', @@ -77,7 +69,7 @@ const OFFICAL_MATERIAL_SOURCES = [ }, ]; -const OFFICAL_MATERIAL_SOURCES_FOR_EXTERNAL = [ +const OFFICIAL_MATERIAL_SOURCES_FOR_EXTERNAL = [ // { // name: i18n.format('package.materialService.index.miniProgramTitle'), // type: 'miniProgram', @@ -98,10 +90,6 @@ const isIceMaterial = (source: string) => { return source === ICE_MATERIAL_SOURCE; }; -const isAntdMaterial = (source: string) => { - return source === ANTD_MATERIAL_SOURCE; -}; - const isRaxMaterial = (source: string) => { return source === RAX_MATERIAL_SOURCE; }; @@ -112,7 +100,7 @@ export const getSourcesByProjectType = async function () { return getSources(type); }; -export const getOfficalMaterialSources = () => [].concat(OFFICAL_MATERIAL_SOURCES); +export const getOfficialMaterialSources = () => [].concat(OFFICIAL_MATERIAL_SOURCES); export const getUserSources = () => getDataFromSettingJson(CONFIGURATION_KEY_MATERIAL_SOURCES); @@ -126,10 +114,10 @@ export async function getSources(specifiedType?: string): Promise