Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/schedule-cli-tests-latest-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Run CLI tests
uses: ./.github/workflows/applications.yml
with:
external-tools-version-tag: latest
deps-version-tag: latest

teams_notification_on_failure:
name: Send Teams notification
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule-cli-tests-next-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Run CLI tests
uses: ./.github/workflows/applications.yml
with:
external-tools-version-tag: next
deps-version-tag: next

teams_notification_on_failure:
name: Send Teams notification
Expand Down
13 changes: 9 additions & 4 deletions packages/devextreme-cli/src/applications/application.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,19 @@ const updateJsonPropName = (path, name) => {
});
};

const bumpReact = (appPath, versionTag) => {
const bumpReact = (appPath, versionTag, isTypeScript) => {
const dependencies = [
{ name: 'react', version: versionTag },
{ name: 'react-dom', version: versionTag },
{ name: '@types/react', version: versionTag, dev: true },
{ name: '@types/react-dom', version: versionTag, dev: true },
];

if(isTypeScript) {
dependencies.push(
{ name: '@types/react', version: versionTag, dev: true },
{ name: '@types/react-dom', version: versionTag, dev: true },
);
}

packageJsonUtils.addDependencies(appPath, dependencies);
};

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

if(depsVersionTag) {
bumpReact(appPath, depsVersionTag);
bumpReact(appPath, depsVersionTag, templateOptions.isTypeScript);
}

addTemplate(appPath, appName, templateOptions);
Expand Down
Loading