Skip to content

Commit

Permalink
Release 1.4.2 (#956)
Browse files Browse the repository at this point in the history
* feat: update (#953)

* feat: update (#954)

* Feat: support select different material (#955)

* feat: support select different materials

* feat: support select different base component

* feat: support install material deps

* feat: support componentCreator and pageGenerator

* Fix: doctor ts error (#957)

* chore: version and changelog (#959)

* feat: update (#958)

Co-authored-by: Hengchang Lu <[email protected]>
  • Loading branch information
fyangstudio and luhc228 authored Sep 29, 2021
1 parent 916b51e commit b23bcd7
Show file tree
Hide file tree
Showing 37 changed files with 358 additions and 75 deletions.
4 changes: 4 additions & 0 deletions extensions/application-manager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 1.0.8

- feat: quick entries add 'doctor'

## 1.0.7

- fix: actions view error
Expand Down
2 changes: 1 addition & 1 deletion extensions/application-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Application Manager",
"description": "Quick view your Universal Application(React/Rax/Vue, etc).",
"publisher": "iceworks-team",
"version": "1.0.7",
"version": "1.0.8",
"engines": {
"vscode": "^1.41.0"
},
Expand Down
4 changes: 1 addition & 3 deletions extensions/application-manager/src/quickPicks/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ export default [
detail: i18n.format('extension.applicationManager.showEntriesQuickPick.doctor.detail'),
command: 'doctor.dashboard',
async condition() {
const isInstalledDoctor = checkIsInstalledDoctor();
const isTargetProjectType = await checkIsTargetProjectType();
return isInstalledDoctor && isTargetProjectType;
return checkIsInstalledDoctor();
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const entryOptions = options.filter(({ command }) => {
return [
'project-creator.create-project.start',
'applicationManager.dashboard.start',
'applicationManager.welcome.start',
'doctor.dashboard',
'applicationManager.configHelper.start',
].includes(command);
}).concat([
Expand Down
7 changes: 7 additions & 0 deletions extensions/appworks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [1.4.2](https://github.com/appworks-lab/appworks/releases/tag/v1.4.2)

- feat: add quick entries for 'doctor' [#953](https://github.com/appworks-lab/appworks/pull/953)
- feat: add showInformationMessage for CodeMod result [#954](https://github.com/appworks-lab/appworks/pull/954)
- feat: support antd and fusion material select [#955](https://github.com/appworks-lab/appworks/pull/955)
- feat: add 'tao.def-basic-kit' for O2 [#951](https://github.com/appworks-lab/appworks/pull/951)

## [1.4.1](https://github.com/appworks-lab/appworks/releases/tag/v1.4.1)

- feat: update feedback link [#940](https://github.com/appworks-lab/appworks/pull/940)
Expand Down
2 changes: 1 addition & 1 deletion extensions/appworks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.1",
"version": "1.4.2",
"engines": {
"vscode": "^1.41.0"
},
Expand Down
4 changes: 4 additions & 0 deletions extensions/doctor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Change Log

# 1.1.6

- feat: add showInformationMessage for codemod result

# 1.1.5

- fix: windows get empty files

# 1.1.4

- fix: codemod 100 score show result
Expand Down
2 changes: 1 addition & 1 deletion extensions/doctor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Doctor",
"description": "A free security and quality audit tool for modern DevOps teams",
"publisher": "iceworks-team",
"version": "1.1.5",
"version": "1.1.6",
"engines": {
"vscode": "^1.41.0"
},
Expand Down
9 changes: 6 additions & 3 deletions extensions/doctor/src/codemod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const SCAN_OPTIONS = {

export async function runCodemod(transform: string) {
const result = await doctor.scan(projectPath, Object.assign({ transforms: [transform] }, SCAN_OPTIONS));
const { env, window } = vscode;
const isEn = env.language === 'en';
window.showInformationMessage(`${isEn ? 'Codemod run success, logs shows in the OUTPUT.' : 'Codemod 运行成功,运行日志将在 “输出” 中展示。'}`);
setOutput(result.codemod?.reports[0].output || '');
return result;
}
Expand All @@ -40,9 +43,9 @@ export async function activateCodemod(context: vscode.ExtensionContext) {

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 || '*')) {
const dependencyVersion = (packageJSON.dependencies || {})[name] || (packageJSON.devDependencies || {})[name];
const dependencySemver = semver.coerce(dependencyVersion);
if (dependencySemver && semver.satisfies(dependencySemver, version || '*')) {
deprecatedPackageConfig[name] = {
...codemod,
name,
Expand Down
5 changes: 5 additions & 0 deletions extensions/material-helper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log

## 1.1.1

- feat: support select different component type

## 1.1.0

- chore: add iceworks-refactor to extensionDependencies
- fix: the babel plugin's flow will cause error, when babel parse typescript files.
- fix: import duplicate components when add routers
Expand Down
2 changes: 1 addition & 1 deletion extensions/material-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Component Helper",
"description": "Easily use Component in React/Vue/Rax.",
"publisher": "iceworks-team",
"version": "1.1.0",
"version": "1.1.1",
"main": "./build/extension.js",
"engines": {
"vscode": "^1.41.0"
Expand Down
6 changes: 6 additions & 0 deletions extensions/material-helper/web/mocks/material/getData.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"dependencies": {
"prop-types": "^15.5.8"
},
"componentType": "fusion",
"screenshots": ["https://unpkg.com/@alifd/fusion-advanced-detail/screenshot.png"],
"publishTime": "2019-11-28T11:30:32.213Z",
"updateTime": "2020-03-31T12:36:39.300Z"
Expand Down Expand Up @@ -66,6 +67,7 @@
"dependencies": {
"prop-types": "^15.5.8"
},
"componentType": "fusion",
"screenshots": ["https://unpkg.com/@alifd/fusion-basic-detail/screenshot.png"],
"publishTime": "2019-11-28T11:38:31.720Z",
"updateTime": "2020-03-31T12:52:50.478Z"
Expand Down Expand Up @@ -96,6 +98,7 @@
"dependencies": {
"prop-types": "^15.5.8"
},
"componentType": "fusion",
"screenshots": ["https://unpkg.com/@alifd/fusion-basic-detail/screenshot.png"],
"publishTime": "2019-11-28T11:38:31.720Z",
"updateTime": "2020-03-31T12:52:50.478Z"
Expand Down Expand Up @@ -126,6 +129,7 @@
"dependencies": {
"prop-types": "^15.5.8"
},
"componentType": "antd",
"screenshots": ["https://unpkg.com/@alifd/fusion-basic-detail/screenshot.png"],
"publishTime": "2019-11-28T11:38:31.720Z",
"updateTime": "2020-03-31T12:52:50.478Z"
Expand All @@ -150,6 +154,7 @@
"classnames": "^2.2.6",
"prop-types": "^15.5.8"
},
"componentType": "fusion",
"screenshot": "",
"screenshots": "",
"publishTime": "2019-07-02T13:50:26.135Z",
Expand All @@ -173,6 +178,7 @@
"@alifd/next": "^1.x",
"prop-types": "^15.5.8"
},
"componentType": "fusion",
"screenshot": "",
"screenshots": "",
"publishTime": "2018-01-17T12:37:35.249Z",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState, useEffect } from 'react';
import { Notification, Button, Input } from '@alifd/next';
import Material from '@appworks/material-ui';
import { LocaleProvider } from '@/i18n';
Expand All @@ -11,6 +11,7 @@ const Home = () => {
const [selectedBlock, setSelectedBlock] = useState({});
const [componentName, setComponentName] = useState('');
const [isCreating, setIsCreating] = useState(false);
const [projectComponentType, setProjectComponentType] = useState('');

async function onSettingsClick() {
try {
Expand All @@ -20,6 +21,15 @@ const Home = () => {
}
}

async function getComponentTypeOptions() {
try {
const componentTypeOptions = await callService('material', 'getComponentTypeOptionsByProjectType');
return componentTypeOptions;
} catch (e) {
Notification.error({ content: e.message });
}
}

async function getSources() {
let sources = [];
try {
Expand Down Expand Up @@ -115,6 +125,12 @@ const Home = () => {
await callService('common', 'showTextDocument', blockIndexPath);
}
}

useEffect(() => {
callService('material', 'getProjectComponentType').then((res: string) => {
setProjectComponentType(res);
});
}, []);
return (
<div className={styles.wrap}>
<div className={styles.list}>
Expand Down Expand Up @@ -146,8 +162,10 @@ const Home = () => {
onSettingsClick={onSettingsClick}
getData={getData}
onBlockClick={onSelect}
getComponentTypeOptions={getComponentTypeOptions}
selectedBlocks={selectedBlock ? [selectedBlock] : []}
dataWhiteList={['blocks']}
projectComponentType={projectComponentType}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useState, useEffect } from 'react';
import { Notification } from '@alifd/next';
import callService from '@/callService';
import Material from '@appworks/material-ui';
Expand All @@ -7,8 +7,10 @@ import { useIntl } from 'react-intl';
import styles from './index.module.scss';
import { LocaleProvider } from '../../i18n';

const Home: React.FC<any> = () => {
const Home = () => {
const [projectComponentType, setProjectComponentType] = useState('');
const intl = useIntl();

async function onSettingsClick() {
try {
await callService('common', 'openMaterialsSettings');
Expand All @@ -17,6 +19,15 @@ const Home: React.FC<any> = () => {
}
}

async function getComponentTypeOptions() {
try {
const componentTypeOptions = await callService('material', 'getComponentTypeOptionsByProjectType');
return componentTypeOptions;
} catch (e) {
Notification.error({ content: e.message });
}
}

async function getSources() {
let sources = [];
try {
Expand Down Expand Up @@ -70,14 +81,22 @@ const Home: React.FC<any> = () => {
Notification.error({ content: e.message });
}
};

useEffect(() => {
callService('material', 'getProjectComponentType').then((res: string) => {
setProjectComponentType(res);
});
}, []);
return (
<div className={styles.container}>
<Material
disableLazyLoad
onSettingsClick={onSettingsClick}
getSources={getSources}
getComponentTypeOptions={getComponentTypeOptions}
refreshSources={refreshSources}
getData={getData}
projectComponentType={projectComponentType}
onBlockClick={onBlockClick}
onBaseClick={onBaseClick}
onComponentClick={onComponentClick}
Expand Down
21 changes: 19 additions & 2 deletions extensions/material-helper/web/src/pages/PageGenerator/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState, useEffect } from 'react';
import { Grid, Notification, Button } from '@alifd/next';
import { arrayMove } from 'react-sortable-hoc';
import Material from '@appworks/material-ui';
Expand All @@ -21,6 +21,7 @@ const Home = () => {
const [visible, setVisible] = useState(false);
const [routerConfig, setRouterConfig] = useState<IRouter[]>([]);
const [isConfigurableRouter, setIsConfigurableRouter] = useState(true);
const [projectComponentType, setProjectComponentType] = useState('');

async function getSources() {
let sources = [];
Expand All @@ -34,6 +35,15 @@ const Home = () => {
return sources;
}

async function getComponentTypeOptions() {
try {
const componentTypeOptions = await callService('material', 'getComponentTypeOptionsByProjectType');
return componentTypeOptions;
} catch (e) {
Notification.error({ content: e.message });
}
}

async function refreshSources() {
await callService('material', 'cleanCache');
return await getSources();
Expand All @@ -55,7 +65,7 @@ const Home = () => {
return intl.formatMessage({ id: 'web.iceworksMaterialHelper.pageGenerater.selectBlocks' });
}
// validate if there is a block with the same name
const blockNames = blocks.map(block => block.name);
const blockNames = blocks.map((block) => block.name);
if (blockNames.length !== new Set(blockNames).size) {
return intl.formatMessage({ id: 'web.iceworksMaterialHelper.pageGenerater.blackName.cannotBeDuplicated' });
}
Expand Down Expand Up @@ -203,6 +213,11 @@ const Home = () => {
}
}

useEffect(() => {
callService('material', 'getProjectComponentType').then((res: string) => {
setProjectComponentType(res);
});
}, []);
return (
<div className={styles.wrap}>
<div className={styles.label}>
Expand All @@ -226,13 +241,15 @@ const Home = () => {
<Col span={8} className={styles.col}>
<div className={styles.material}>
<Material
getComponentTypeOptions={getComponentTypeOptions}
disableLazyLoad
getSources={getSources}
refreshSources={refreshSources}
onSettingsClick={onSettingsClick}
getData={getData}
onBlockClick={onAdd}
dataWhiteList={['blocks']}
projectComponentType={projectComponentType}
/>
</div>
</Col>
Expand Down
14 changes: 14 additions & 0 deletions extensions/material-helper/web/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
declare module '*.module.scss' {
const classes: { [key: string]: string };
export default classes;
}

declare module '*.module.less' {
const classes: { [key: string]: string };
export default classes;
}

declare module '*.module.css' {
const classes: { [key: string]: string };
export default classes;
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"env": "node ./scripts/env.js"
},
"resolutions": {
"eslint-plugin-import": "2.20.2"
"eslint-plugin-import": "2.20.2",
"@typescript-eslint/parser": "^4.31.2"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/common-service/src/material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const bulkDownloadMaterials = async function (
if (material.source.type === 'debug') {
try {
await fse.copy(material.source.path, downloadPath, {
filter: srcPath => {
filter: (srcPath) => {
return !srcPath.includes('node_modules');
},
});
Expand Down
4 changes: 4 additions & 0 deletions packages/material-engine/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.2.1

- feat: support get component type

## 0.2.0

- fix: import duplicate components when add routers
Expand Down
Loading

0 comments on commit b23bcd7

Please sign in to comment.