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

refactor: bump packages versions #784

Merged
merged 13 commits into from
Mar 6, 2019
Merged

refactor: bump packages versions #784

merged 13 commits into from
Mar 6, 2019

Conversation

rafaelss95
Copy link
Collaborator

Currently we maintain 2 lock files, but once you try to execute yarn with yarn.lock and package-lock.json, you get the following message:

warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

To fix this, I've decided to remove the package-lock.json. If you prefer to use npm, we can remove yarn.lock instead.


Summary:

  • Removed unused packages:

    • @types/less;
    • minimalist;
  • Packages that can't be updated because break the rules/tests:

    • chai-spies;
    • source-map;
  • Move git hooks from package.json to .huskyrc.json file.

  • Since TSLint is also being upgraded, some rules, which extends RuleWalker directly, were reworked to use WalkContext instead (About RuleWalker #777).

  • NgWalker and SourceMappingVisitor extends the RuleWalker and for now the deprecation rule for the extends line was just disabled.

  • Some Typescript errors are caught by the newer version and fixed properly.

  • The tests are green ✅

@rafaelss95 rafaelss95 requested review from mgechev and wKoza March 4, 2019 18:34
@mgechev
Copy link
Owner

mgechev commented Mar 4, 2019

This will take a while to review. It'll be very helpful if you can separate it into multiple PRs or at least multiple commits so I can review them in a sequence?

@rafaelss95
Copy link
Collaborator Author

Done, @mgechev.

@mgechev
Copy link
Owner

mgechev commented Mar 4, 2019

Wow, that was fast! :)

@@ -90,17 +92,15 @@ export class InputMetadataWalker extends NgWalker {
(propertyAlias !== propertyName &&
this.directiveSelectors &&
this.directiveSelectors.some(x => new RegExp(`^${x}((${toTitleCase(propertyName)}$)|(?=$))`).test(propertyAlias))) ||
(whiteListAliases.has(propertyAlias) && propertyName === kebabToCamelCase(propertyAlias))
(whiteListAliases.has(propertyAlias) && propertyName === camelize(propertyAlias))
Copy link
Owner

@mgechev mgechev Mar 4, 2019

Choose a reason for hiding this comment

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

kebabToCamelCase is more semantically correct. We will not be able to camelize an arbitrary string. Would you mind reverting this name change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No problem. I did it because I saw that TSLint has already a function to camelize strings.

@mgechev
Copy link
Owner

mgechev commented Mar 4, 2019

@rafaelss95 thanks for updating the AST traversal from visitors to functions!

@mgechev mgechev merged commit 43e2d09 into mgechev:master Mar 6, 2019
@rafaelss95 rafaelss95 deleted the refactor/update-packages branch March 8, 2019 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants