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

Next major version #17

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Next major version #17

wants to merge 38 commits into from

Commits on Jul 18, 2023

  1. next version

    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    4beb7b7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    178c283 View commit details
    Browse the repository at this point in the history
  3. several optimizations

    BREAKING CHANGES
    
    $templates:lookup-param-from-restserver is now a sequence of functions of arity 1
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    1175384 View commit details
    Browse the repository at this point in the history
  4. errors, ensure configuration is preserved

    Error reporting:
    When a template function is not defined the error message will include
    the serialized node to help users figure out where the problem occurs.
    
    Ensure configuration is present in $model:
    Before, each time the configuration was retrieved it was first checked
    if it was present.
    This check is now moved to the places where users are able to modify
    the model and thus may remove it from the map.
    
    - add a new private function templates:process-children
    - templates:process will now check for the configuration to be present
    - now that the presence of configuration is ensured
      `templates:get-configuration` is no longer necessary as this can be
      expressed with a simple map lookup
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    0c9747a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    10e27d2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5939c6d View commit details
    Browse the repository at this point in the history
  7. chore: remove unused namespace

    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    3b60ad4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ebc9c02 View commit details
    Browse the repository at this point in the history
  9. refactor: templates:form-control for readability

    Each case is now a private function of its own (form, input, select).
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    42023cf View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    81361df View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    442dcac View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c6d83b2 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    137bb9e View commit details
    Browse the repository at this point in the history
  14. feat: allow lookup function again

    - refactor initial functions
      - templates:apply#3 and eXist-db#4
      - templates:render#3
    - add function templates:configure called in all initial functions
    - attribute filtering function is now selected by configuration instead
      main benefit is the if condition does not need to be called each time
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    29e5304 View commit details
    Browse the repository at this point in the history
  15. feat: templates includes all common functions

    - lib:include moved to templates:include
    - lib:parse-params is now moved to templates:parse-params
    - remove lib
    - last remaining lib function lib:resolve-apps is now
      apps:by-abbrev
      links are now added to the model under key 'app'
      declare default value for links of apps that were not found
    - delimiters are now part of the configuration and cannot be
      changed inside of templates
    - add example (and test) for reading template-path from model
    - refactor for speed and readability
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    21f4298 View commit details
    Browse the repository at this point in the history
  16. chore: ensure compatibility with exist7

    - the default handling of duplicates when merging maps will change to
      use-first. Therefore set duplicate
      handling explicitly to use-last where it is crucial
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    33fb0a5 View commit details
    Browse the repository at this point in the history
  17. raise minimum processor version to 5.4.0

    This is the first version that implements map:merge#2
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    a05aaef View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    82d806b View commit details
    Browse the repository at this point in the history
  19. [ignore] fix comment blocks

    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    582c740 View commit details
    Browse the repository at this point in the history
  20. [refactor] consolidate variable names

    BREAKING CHANGES:
    - $templates:START_DELIMITER => $templates:CONFIG_START_DELIMITER
    - $templates:END_DELIMITER => $templates:CONFIG_END_DELIMITER
    
    - All errors are prefixed with E_
    - All settings are prefixed with CONFIG_
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    fe34ee1 View commit details
    Browse the repository at this point in the history
  21. chore: add array import

    In an effort to declare all dependencies explicitly.
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    0a48ec1 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    acf8940 View commit details
    Browse the repository at this point in the history
  23. refactor: templates:get-root

    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    e0f6f2e View commit details
    Browse the repository at this point in the history
  24. refactor: templates:surround

    - add comment if surround template was not found
    - avoid *-selector in XPath expression
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    9438b78 View commit details
    Browse the repository at this point in the history
  25. refactor: templates:parse-options

    Simplify check for problematic options.
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    5012b3f View commit details
    Browse the repository at this point in the history
  26. refactor: templates:select

    The $selected variable either contains the attribute setting an
    option as selected or an empty sequence.
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    74237de View commit details
    Browse the repository at this point in the history
  27. refactor: make param resolvers public

    This is in order to drop them from being the default in the next step.
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    69b00c0 View commit details
    Browse the repository at this point in the history
  28. refactor: extract and rename modules

    - apps is now tmpl-apps to make it obvious it is not an application module
    - tmpl-util contains utility functions that clobber up the core library
      (unused for the moment)
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    ea9f23f View commit details
    Browse the repository at this point in the history
  29. refactor: use utility module, build regexes

    - build regular expressions for parse-params at configuration and re-use
      those throughout the code base
    - remove functions from template that are now in tmpl-util
    - use tmpl-util:* replacements in templates functions
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    10c1777 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    483b2f6 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    6faeef0 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    0017895 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    68631ca View commit details
    Browse the repository at this point in the history
  34. feat: transparently replace placeholders

    This deprecates templates:parse-params as placeholders in
    text and attribute nodes will always be replaced.
    
    Before:  `<span data-template="templates:parse-params">[[item]]</span>`
    
    Now : `<span>[[item]]</span>`
    
    Any data-template attribute with the value "templates:parse-params" is
    ignored.
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    f082729 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    6474763 View commit details
    Browse the repository at this point in the history
  36. fix: do not ignore legacy template declarations

    Always throw an error if a declared template function cannot be found.
    The attempt to ignore certain function names
    creates more problems than it solves as it does not
    incentivise to clean up templates when switching to
    the newer templating library.
    The test for templates with a legcacy declaration was apapted.
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    57eeb86 View commit details
    Browse the repository at this point in the history
  37. test: adapt tests to exist 7.0.0-SNAPSHOT

    eXist-db will now return status code 500 server error when an exeption
    is thrown during query execution (see
    eXist-db/exist#4639).
    
    Since the templating library is not concerned with routing
    we simply add this other accepted status code to the list.
    Tests expecting errors will pass with both satus code 400 and 500.
    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    7c57e0b View commit details
    Browse the repository at this point in the history
  38. ci: improve exist workflow

    line-o committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    4616250 View commit details
    Browse the repository at this point in the history