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

Simplification of codebase, added some extra features #194

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

davidhorak
Copy link
Contributor

@davidhorak davidhorak commented Jun 17, 2021

Description

Simplification of codebase, added some extra features (a weekend project, to do some coding, intention is to just share this with team, proceed with the PR only if found valuable)

Notes:

  • The base functionality is preserved
  • Better to review locally (due to large volume of file changes)

Changes

  • Removed classes, migrated to pure functions
    • The output library size is reduced from 42kb to 24kb
  • Unlimited expression nesting, i.e. comparison expression operands now could be arbitrary expressions
    • e.g.: [==, $RefA, [==, 1, 1]]
  • Any primitive values could be now evaluated, i.e. the parser does not restrict the expression input to be a logical expression
    • e.g.: illogical.evaluate(1) evaluated as 1
  • Collections starting with logical or comparison expression operator symbol could be now escaped to be processed as regular collections
    • e.g.: [IN, $RefA, [\==, 1, 1]] ... \ used as escape character (configurable)
  • Small refactoring of options
  • Simplification of references now allows to use regular expressions in ignoredPaths
  • Complete test coverage

Test Coverage

  • unit

Screenshot 2021-06-17 112139

Potential TODO

  • Update documentation
  • Regenerate the types

- Removed classes, migrated to pure functions
- Unlimited expression nesting, i.e. comparison expression operands now could be arbitrary expressions
- Any primitive values could be now evaluated, i.e. the parser does not restrict the expression input to be a logical expression
- Collections starting with logical or comparison expression operator symbol could be now escaped to be processed as regular collections
- Small refactoring of options
- Simplification of references now allows to use regular expressions in ignoredPaths
- Complete test coverage
@davidhorak davidhorak added the c-maintenance A maintenance task or todo that preserves value. label Jun 17, 2021
@davidhorak davidhorak self-assigned this Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-maintenance A maintenance task or todo that preserves value.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant