Skip to content
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

chore: Adding a check for old version of the CLI #2116

Merged
merged 4 commits into from
Sep 14, 2016
Merged

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Sep 14, 2016

No description provided.

Copy link
Contributor

@Brocco Brocco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of questions about code placement/structure

import * as path from 'path';


function _findUp(name: string, from: string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this not a private static method inside the Version class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below.

}


function _hasOldCliBuildFile() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this not a private static method inside the Version class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't access any class property/method, so it doesn't need to be a version.

@hansl hansl changed the title Adding a check for old version of the CLI chore: Adding a check for old version of the CLI Sep 14, 2016
@@ -42,6 +43,8 @@ const BuildCommand = Command.extend({
}
}

Version.assertPostWebpackVersion();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be only on builds, but on calls to ng. Testing and generators also have changed and assume post-webpack.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry I forgot that. Let me fix.

@@ -39,15 +39,15 @@ export class CliConfig extends CliConfigBase<ConfigInterface> {


static fromProject(): CliConfig {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gives you the version the project was generated with, not the version it is currently using. You can only know that from the installed package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I'll fix.

@hansl hansl merged commit 21003b1 into angular:master Sep 14, 2016
@hansl hansl deleted the version branch September 14, 2016 23:34
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants