Skip to content

Commit

Permalink
Merge pull request #892 from appworks-lab/release/1.2.1
Browse files Browse the repository at this point in the history
Release 1.2.1
  • Loading branch information
luhc228 authored Jul 8, 2021
2 parents ba3d23b + 48bce34 commit 2c3e7e4
Show file tree
Hide file tree
Showing 23 changed files with 168 additions and 95 deletions.
1 change: 1 addition & 0 deletions .github/O2_SPECIFIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
6 changes: 6 additions & 0 deletions extensions/application-manager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 4 additions & 3 deletions 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.1",
"version": "1.0.2",
"engines": {
"vscode": "^1.41.0"
},
Expand Down Expand Up @@ -346,15 +346,16 @@
"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",
"@appworks/constant": "^0.1.0",
"@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",
Expand Down
3 changes: 2 additions & 1 deletion extensions/application-manager/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>"
}
3 changes: 2 additions & 1 deletion extensions/application-manager/src/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>"
}
21 changes: 16 additions & 5 deletions extensions/application-manager/src/views/nodeDependenciesView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DepNodeProvider implements vscode.TreeDataProvider<ItemData> {

readonly onDidChangeTreeData: vscode.Event<ItemData | undefined> = this.onDidChange.event;

public packageJsonPath: string;
packageJsonPath: string;

constructor(context: vscode.ExtensionContext, workspaceRoot: string) {
this.extensionContext = context;
Expand Down Expand Up @@ -106,7 +106,7 @@ class DepNodeProvider implements vscode.TreeDataProvider<ItemData> {
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);
Expand Down Expand Up @@ -180,7 +180,7 @@ class DepNodeProvider implements vscode.TreeDataProvider<ItemData> {
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';
Expand Down Expand Up @@ -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';
Expand Down
7 changes: 7 additions & 0 deletions extensions/application-manager/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -30,6 +33,10 @@ const config = {
},
],
},
{
test: /\.node$/,
loader: 'node-loader',
},
],
},
};
Expand Down
16 changes: 15 additions & 1 deletion extensions/appworks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

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.2.0",
"version": "1.2.1",
"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,5 +1,9 @@
# Change Log

## 1.1.1

- fix: empty project show wrong CodeMod notice.

## 1.1.0

- feat: Add codemod check
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.0",
"version": "1.1.1",
"engines": {
"vscode": "^1.41.0"
},
Expand Down
54 changes: 28 additions & 26 deletions extensions/doctor/src/codemod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions extensions/project-creator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion extensions/project-creator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interface IMobileScaffoldCardProps {
style?: Record<string, unknown>;
onClick?: any;
media?: string;
onDoubleClick?: (event: React.MouseEvent<HTMLElement>) => void;
}

const MobileScaffoldCard: React.FC<IMobileScaffoldCardProps> = ({
Expand All @@ -20,9 +21,10 @@ const MobileScaffoldCard: React.FC<IMobileScaffoldCardProps> = ({
onClick,
media,
style,
onDoubleClick = () => {},
}) => {
return (
<div className={styles.container}>
<div className={styles.container} onDoubleClick={onDoubleClick}>
<Card
free
style={{ ...style }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ interface IScaffoldCardProps {
selected: boolean;
onClick?: any;
media?: string;
onDoubleClick?: (event: React.MouseEvent<HTMLElement>) => void;
}

const ScaffoldCard: React.FC<IScaffoldCardProps> = ({ title, content, selected, onClick, media }) => {
const ScaffoldCard: React.FC<IScaffoldCardProps> = ({ title, content, selected, onClick, media, onDoubleClick = () => {} }) => {
return (
<div className={styles.container}>
<div className={styles.container} onDoubleClick={onDoubleClick}>
<Card
free
className={classnames(styles.card, { [styles.active]: selected })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const ScaffoldMarket = ({
children,
onOpenConfigPanel,
materialSources,
onScaffoldSubmit,
}) => {
const intl = useIntl();
const [selectedSource, setSelectedSource] = useState<any>({});
Expand Down Expand Up @@ -207,6 +208,7 @@ const ScaffoldMarket = ({
media={item.screenshot}
selected={curProjectField.scaffold && curProjectField.scaffold.name === item.name}
onClick={() => onScaffoldClick(item)}
onDoubleClick={onScaffoldSubmit}
/>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const CreateProject: React.FC = () => {
curProjectField={curProjectField}
onOpenConfigPanel={onOpenConfigPanel}
materialSources={materialSources}
onScaffoldSubmit={onScaffoldSubmit}
>
<Button type="primary" onClick={onScaffoldSubmit}>
<FormattedMessage id="web.iceworksProjectCreator.CreateProject.nextStep" />
Expand Down Expand Up @@ -186,7 +187,7 @@ const CreateProject: React.FC = () => {
...curProjectField,
clientToken: CLIENT_TOKEN,
});
await callService('common', 'saveUserInfo', { empId, account, gitlabToken });
await callService('user', 'saveUserInfo', { empId, account, gitlabToken });
await callService('common', 'saveDataToSettingJson', 'workspace', projectPath);
await callService('project', 'openLocalProjectFolder', projectDir);
} catch (e) {
Expand Down
5 changes: 5 additions & 0 deletions packages/recorder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CHANGELOG

## 1.0.0

- refactor: recordUV and recordPV function
2 changes: 1 addition & 1 deletion packages/recorder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@appworks/recorder",
"version": "0.1.0",
"version": "1.0.0",
"description": "Recorder for AppWorks",
"main": "lib/index.js",
"files": [
Expand Down
Loading

0 comments on commit 2c3e7e4

Please sign in to comment.