diff --git a/.github/O2_SPECIFIC.md b/.github/O2_SPECIFIC.md index 6b30f71f2..ab85e53c6 100644 --- a/.github/O2_SPECIFIC.md +++ b/.github/O2_SPECIFIC.md @@ -12,6 +12,7 @@ General O2 pack by following commands: $ git clone git@github.com:appworks-lab/pack.git $ cd appworks/ $ npm install +# before run this script, modify `pushExtension2Npm` param which is in `./config.ts` to true when publish to tnpm $ npm run o2:general ``` diff --git a/extensions/application-manager/CHANGELOG.md b/extensions/application-manager/CHANGELOG.md index a0b9100fb..f66bef5eb 100644 --- a/extensions/application-manager/CHANGELOG.md +++ b/extensions/application-manager/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 1.0.2 + +- feat: add loading status when reinstalling dependencies +- fix: build error when in macos platform +- chore: update @appworks/recorder version + ## 1.0.1 - chore: update webview icon diff --git a/extensions/application-manager/package.json b/extensions/application-manager/package.json index 3b94ac81b..dbe9c900e 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.1", + "version": "1.0.2", "engines": { "vscode": "^1.41.0" }, @@ -346,7 +346,8 @@ "ts-loader": "^7.0.5", "typescript": "^3.8.3", "webpack": "^4.43.0", - "webpack-cli": "^3.3.11" + "webpack-cli": "^3.3.11", + "node-loader": "^1.0.0" }, "dependencies": { "@appworks/common-service": "^0.1.0", @@ -354,7 +355,7 @@ "@appworks/i18n": "^0.1.0", "@appworks/material-engine": "^0.1.0", "@appworks/project-service": "^0.1.0", - "@appworks/recorder": "^0.1.0", + "@appworks/recorder": "^1.0.0", "@appworks/connector": "^0.1.0", "chokidar": "^3.5.1", "comment-json": "^3.0.2", diff --git a/extensions/application-manager/src/locales/en-US.json b/extensions/application-manager/src/locales/en-US.json index 106f8e2cf..3d411da6c 100644 --- a/extensions/application-manager/src/locales/en-US.json +++ b/extensions/application-manager/src/locales/en-US.json @@ -51,5 +51,6 @@ "extension.applicationManager.extension.emptyWorkplace": "Current workspace is empty, please open or create an application.", "extension.applicationManager.hintInstallTypesrax.message": "Detected that you did not have @types/rax installed. For better code tips, it is recommended that you install.", "extension.applicationManager.hintInstallTypesrax.message.install": "Install", - "extension.applicationManager.hintInstallTypesrax.message.ignore": "Ignore" + "extension.applicationManager.hintInstallTypesrax.message.ignore": "Ignore", + "extension.applicationManager.nodeDependencies.delete.title": "Deleting <%= nodeModulesPath %>" } diff --git a/extensions/application-manager/src/locales/zh-CN.json b/extensions/application-manager/src/locales/zh-CN.json index ba5540035..8540f3772 100644 --- a/extensions/application-manager/src/locales/zh-CN.json +++ b/extensions/application-manager/src/locales/zh-CN.json @@ -50,5 +50,6 @@ "extension.applicationManager.dashboard.extension.webviewTitle": "项目仪表盘 - AppWorks", "extension.applicationManager.hintInstallTypesrax.message": "检测到您未安装 @types/rax。为获得更好的代码提示,建议您安装。", "extension.applicationManager.hintInstallTypesrax.message.install": "安装", - "extension.applicationManager.hintInstallTypesrax.message.ignore": "忽略" + "extension.applicationManager.hintInstallTypesrax.message.ignore": "忽略", + "extension.applicationManager.nodeDependencies.delete.title": "正在删除 <%= nodeModulesPath %>" } diff --git a/extensions/application-manager/src/views/nodeDependenciesView.ts b/extensions/application-manager/src/views/nodeDependenciesView.ts index 5c9f861bd..a23f79792 100644 --- a/extensions/application-manager/src/views/nodeDependenciesView.ts +++ b/extensions/application-manager/src/views/nodeDependenciesView.ts @@ -34,7 +34,7 @@ class DepNodeProvider implements vscode.TreeDataProvider { readonly onDidChangeTreeData: vscode.Event = this.onDidChange.event; - public packageJsonPath: string; + packageJsonPath: string; constructor(context: vscode.ExtensionContext, workspaceRoot: string) { this.extensionContext = context; @@ -106,7 +106,7 @@ class DepNodeProvider implements vscode.TreeDataProvider { return item; } - public async buildDepsChildItems(nodeDepType: NodeDepTypes) { + async buildDepsChildItems(nodeDepType: NodeDepTypes) { let depItems: ItemData[] = []; if (this.workspaceRoot && await checkPathExists(this.packageJsonPath)) { const packageJson = await fse.readJSON(this.packageJsonPath); @@ -180,7 +180,7 @@ class DepNodeProvider implements vscode.TreeDataProvider { return items; } - public getAddDependencyScript(depType: NodeDepTypes, packageName: string) { + getAddDependencyScript(depType: NodeDepTypes, packageName: string) { const workspaceDir: string = path.dirname(this.packageJsonPath); const isYarn = isYarnPackageManager(); const isDevDep = depType === 'devDependencies'; @@ -227,8 +227,19 @@ export function createNodeDependenciesTreeView(context) { if (await checkPathExists(nodeDependenciesProvider.packageJsonPath)) { const workspaceDir: string = path.dirname(nodeDependenciesProvider.packageJsonPath); const nodeModulesPath = path.join(workspaceDir, 'node_modules'); - if (await checkPathExists(nodeModulesPath)) { - await rimrafAsync(nodeModulesPath); + const nodeModulesExists = await checkPathExists(nodeModulesPath); + if (nodeModulesExists) { + await vscode.window.withProgress({ + location: vscode.ProgressLocation.Notification, + title: i18n.format('extension.applicationManager.nodeDependencies.delete.title', { nodeModulesPath }), + }, async () => { + try { + await rimrafAsync(nodeModulesPath); + } catch (error) { + vscode.window.showErrorMessage(`Fail to delete ${nodeModulesPath}. Error: ${error.message}.`); + } + return Promise.resolve(); + }); } const command = createNpmCommand('install'); const title = 'Reinstall Dependencies'; diff --git a/extensions/application-manager/webpack.config.js b/extensions/application-manager/webpack.config.js index 4a17ef74f..783bf2657 100644 --- a/extensions/application-manager/webpack.config.js +++ b/extensions/application-manager/webpack.config.js @@ -4,6 +4,9 @@ const tsConfigPath = path.join(__dirname, 'tsconfig.json'); const config = { target: 'node', entry: './src/extension.ts', + node: { + __dirname: false, + }, output: { path: path.resolve(__dirname, 'build'), filename: 'extension.js', @@ -30,6 +33,10 @@ const config = { }, ], }, + { + test: /\.node$/, + loader: 'node-loader', + }, ], }, }; diff --git a/extensions/appworks/CHANGELOG.md b/extensions/appworks/CHANGELOG.md index 6265e43fc..4f4bf3ddd 100644 --- a/extensions/appworks/CHANGELOG.md +++ b/extensions/appworks/CHANGELOG.md @@ -1,8 +1,22 @@ # Change Log -## 1.2.0 +## [1.2.1](https://github.com/appworks-lab/pack/releases/tag/v1.2.1) +- 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.0](https://github.com/appworks-lab/pack/releases/tag/v1.2.0) + +- 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.1.0 diff --git a/extensions/appworks/package.json b/extensions/appworks/package.json index e0bf4cf02..ef9d73b64 100644 --- a/extensions/appworks/package.json +++ b/extensions/appworks/package.json @@ -3,7 +3,7 @@ "displayName": "AppWorks", "description": "Application Development Pack, provide visualization and intelligent technology to build Universal Application faster and better, support Web / H5 / MiniProgram(小程序) Application.", "publisher": "iceworks-team", - "version": "1.2.0", + "version": "1.2.1", "engines": { "vscode": "^1.41.0" }, diff --git a/extensions/doctor/CHANGELOG.md b/extensions/doctor/CHANGELOG.md index ff2fe7e6e..72c063c99 100644 --- a/extensions/doctor/CHANGELOG.md +++ b/extensions/doctor/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.1.1 + +- fix: empty project show wrong CodeMod notice. + ## 1.1.0 - feat: Add codemod check diff --git a/extensions/doctor/package.json b/extensions/doctor/package.json index cac6f1a48..8a5088f31 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.0", + "version": "1.1.1", "engines": { "vscode": "^1.41.0" }, diff --git a/extensions/doctor/src/codemod.ts b/extensions/doctor/src/codemod.ts index 16408af31..8b97572d3 100644 --- a/extensions/doctor/src/codemod.ts +++ b/extensions/doctor/src/codemod.ts @@ -36,39 +36,41 @@ export async function activateCodemod(context: vscode.ExtensionContext) { const packageJSON = fs.existsSync(packageFile) ? JSON.parse(fs.readFileSync(packageFile, 'utf-8')) : {}; // Show notifaction - (reports.codemod?.reports || []).forEach((codemod) => { - const action = 'Run a Codemod'; + if (projectPath) { + (reports.codemod?.reports || []).forEach((codemod) => { + 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); diff --git a/extensions/project-creator/CHANGELOG.md b/extensions/project-creator/CHANGELOG.md index ff1e498ce..f37294607 100644 --- a/extensions/project-creator/CHANGELOG.md +++ b/extensions/project-creator/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.0.3 + +- feat: support double click to select scaffold. [#872](https://github.com/appworks-lab/pack/issues/872) +- fix: service api(setUserInfo) not found + ## 1.0.2 - fix: rax-spa project targets null problem. [#861](https://github.com/appworks-lab/pack/issues/861) diff --git a/extensions/project-creator/package.json b/extensions/project-creator/package.json index 33c3ce7ff..8c10e0d44 100644 --- a/extensions/project-creator/package.json +++ b/extensions/project-creator/package.json @@ -3,7 +3,7 @@ "displayName": "Application Creator", "description": "Quick create a Universal Application(React/Rax/Vue, etc).", "publisher": "iceworks-team", - "version": "1.0.2", + "version": "1.0.3", "engines": { "vscode": "^1.41.0" }, diff --git a/extensions/project-creator/web/src/components/MobileScaffoldCard/index.tsx b/extensions/project-creator/web/src/components/MobileScaffoldCard/index.tsx index fe2545c3f..566097f84 100644 --- a/extensions/project-creator/web/src/components/MobileScaffoldCard/index.tsx +++ b/extensions/project-creator/web/src/components/MobileScaffoldCard/index.tsx @@ -11,6 +11,7 @@ interface IMobileScaffoldCardProps { style?: Record; onClick?: any; media?: string; + onDoubleClick?: (event: React.MouseEvent) => void; } const MobileScaffoldCard: React.FC = ({ @@ -20,9 +21,10 @@ const MobileScaffoldCard: React.FC = ({ onClick, media, style, + onDoubleClick = () => {}, }) => { return ( -
+
) => void; } -const ScaffoldCard: React.FC = ({ title, content, selected, onClick, media }) => { +const ScaffoldCard: React.FC = ({ title, content, selected, onClick, media, onDoubleClick = () => {} }) => { return ( -
+
{ const intl = useIntl(); const [selectedSource, setSelectedSource] = useState({}); @@ -207,6 +208,7 @@ const ScaffoldMarket = ({ media={item.screenshot} selected={curProjectField.scaffold && curProjectField.scaffold.name === item.name} onClick={() => onScaffoldClick(item)} + onDoubleClick={onScaffoldSubmit} /> ); })} diff --git a/extensions/project-creator/web/src/pages/CreateProject/index.tsx b/extensions/project-creator/web/src/pages/CreateProject/index.tsx index 727f7ef7e..3d8a7f546 100644 --- a/extensions/project-creator/web/src/pages/CreateProject/index.tsx +++ b/extensions/project-creator/web/src/pages/CreateProject/index.tsx @@ -33,6 +33,7 @@ const CreateProject: React.FC = () => { curProjectField={curProjectField} onOpenConfigPanel={onOpenConfigPanel} materialSources={materialSources} + onScaffoldSubmit={onScaffoldSubmit} >