-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plamen5kov/remove obsolete code #2461
Conversation
refactored create project functionality removed --copy-from option, removed --tns-modules-version removed --copy-from and --link-to options prepare template now expects template name will never be undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After handling comments.
Really nice work!
lib/npm-installation-manager.ts
Outdated
@@ -27,7 +27,7 @@ export class NpmInstallationManager implements INpmInstallationManager { | |||
let cliVersionRange = `~${this.$staticConfig.version}`; | |||
let latestVersion = await this.getLatestVersion(packageName); | |||
if (semver.satisfies(latestVersion, cliVersionRange)) { | |||
return latestVersion; | |||
return Promise.resolve(latestVersion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this changed? When you mark method with async
keyword, the returned value is always wrapped in Promise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't know that, will revert it to previous state
lib/services/project-service.ts
Outdated
} | ||
let templatePath = await this.$projectTemplatesService.prepareTemplate(selectedTemplate, projectDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe all of these operations should be in the try-catch block below.
👍 We will fix the test when the PR is merged in master |
ping: @rosen-vladimirov
_EDIT: Related to: #2362 #2357