Skip to content

Commit ac9fcf8

Browse files
fix issues spotted by Vlad (#950)
1 parent 3a95283 commit ac9fcf8

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.github/workflows/schedule-cli-tests-latest-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Run CLI tests
1111
uses: ./.github/workflows/applications.yml
1212
with:
13-
external-tools-version-tag: latest
13+
deps-version-tag: latest
1414

1515
teams_notification_on_failure:
1616
name: Send Teams notification

.github/workflows/schedule-cli-tests-next-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Run CLI tests
1111
uses: ./.github/workflows/applications.yml
1212
with:
13-
external-tools-version-tag: next
13+
deps-version-tag: next
1414

1515
teams_notification_on_failure:
1616
name: Send Teams notification

packages/devextreme-cli/src/applications/application.react.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,19 @@ const updateJsonPropName = (path, name) => {
5252
});
5353
};
5454

55-
const bumpReact = (appPath, versionTag) => {
55+
const bumpReact = (appPath, versionTag, isTypeScript) => {
5656
const dependencies = [
5757
{ name: 'react', version: versionTag },
5858
{ name: 'react-dom', version: versionTag },
59-
{ name: '@types/react', version: versionTag, dev: true },
60-
{ name: '@types/react-dom', version: versionTag, dev: true },
6159
];
6260

61+
if(isTypeScript) {
62+
dependencies.push(
63+
{ name: '@types/react', version: versionTag, dev: true },
64+
{ name: '@types/react-dom', version: versionTag, dev: true },
65+
);
66+
}
67+
6368
packageJsonUtils.addDependencies(appPath, dependencies);
6469
};
6570

@@ -86,7 +91,7 @@ const create = async(appName, options) => {
8691
modifyIndexHtml(appPath, templateOptions.project);
8792

8893
if(depsVersionTag) {
89-
bumpReact(appPath, depsVersionTag);
94+
bumpReact(appPath, depsVersionTag, templateOptions.isTypeScript);
9095
}
9196

9297
addTemplate(appPath, appName, templateOptions);

0 commit comments

Comments
 (0)