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

fix: handle more complex expressions in sort-objects #57

Merged
merged 4 commits into from
Aug 15, 2023

Conversation

stovmascript
Copy link
Contributor

Description

3e987ae fixes references to dependencies/earlier params (#9), but not in some more complex cases. Examples are provided in tests.

Additional context

Do you think this is a good approach? I think we should try to search all of the nested nodes for Identifiers, which would be pushed to the dependencies array. I'm not sure I covered all the possible cases with this approach.

The tests also probably need some more work on the semantics :)


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.
  • Read contribution guidelines.

@azat-io
Copy link
Owner

azat-io commented Aug 15, 2023

Looks good. Thanks!

@azat-io azat-io merged commit a7d966c into azat-io:main Aug 15, 2023
1 check passed
@stovmascript
Copy link
Contributor Author

@azat-io Wow, that was fast :) I'll try to follow up with a PR adding the missing test cases and possibly doing something about making this auto fixable.

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