Liking cljdoc? Tell your friends :D

1.1.0

BREAKING REDESIGNED := / "=" with the new Driver system :=> / "=>". The old keys are removed. Migration:

:= :name              → :=> [:get :name],
:= [:a :b]            → :=> [:get-in [:a :b]],
:= (fn [result] ...)  → :=> [:fn (fn [result] ...)].
"=" "name"            → "=>" ["get" "name"],

Built-in drivers: :identity (default), :default, :get, :get-in, :select-keys, :projection, :fn. Supports pipelines ([[:get :city] :uppercase]) and custom drivers via commando.impl.executing/command-driver multimethod. See README for details.

ADDED command-context-spec in commando.commands.builtin. A new command type :commando/context (string form: "commando-context") that injects external reference data into instructions via closure. Call (command-context-spec ctx-map) to create a CommandMapSpec. Resolves with {:mode :none} — before all other commands, so :commando/from and :commando/fn can depend on context results.

ADDED option to modify already built registry with registry-add / registry-remove methods (identification by :type key).

RENAMED create-registryregistry-create. Old name removed.

REMOVED build-compiler. Compiler concept removed from the core functionality; optimizations for repeated execute calls will be introduced in a future version.

ADDED print-trace in commando.impl.utils — replaces print-deep-stats with an improved flamegraph that also shows per-node instruction keys and optional title. Add :__title or "__title" to any instruction's top level to annotate that node in the output. print-deep-stats is kept as a deprecated alias.

ADDED named anchor navigation for :commando/from paths. Declare an anchor with "__anchor" or :__anchor key in any instruction map, then reference it with "@name" as a path segment. The resolver walks up the tree and resolves to the nearest ancestor with that anchor name — independent of nesting depth. Anchors can be combined with existing "../" relative navigation in a single path.

UPDATED resolve-relative-path in commando.impl.dependency to accept an optional leading instruction argument and handle "@anchor" segments.

UPDATED point-target-path in commando.impl.dependency to pass the instruction into resolve-relative-path, enabling anchor resolution.

ADDED new keys to commando.impl.utils/*execute-config*. Added hooks keys

  • :hook-execute-start if not nil, call procedure at the start of commando.core/execute function.
  • :hook-execute-end if not nil, call procedure at the end of commando.core/execute function.

ADDED microsecs time measurement. All steps inside the commando.core/execute measure time. Every measurement adding to status-map structure under :stats key.

UPDATED status-map structure. Was added two keys

  • :uuid autogenerated unique invocation identifier gotted for each commando.core/execute call
  • :stats contains vector of tuples like ["execute", 1085471, "1.085471ms"] where [<step-id>, <microsecs>, <formatted time>]. Counts of steps depended from *execute-config* key :debug-mode.

UPDATED sort-commands-by-deps. Straightforward sets joining in base Kahn's algorithm was rewrited with in-degree counting optimization.

UPDATED build-deps-tree. Instead of searching dependency using the list of commandmaps by iterating across the list(O(n^2) in worst case), before starting to build a dependency graph, we quickly building a path-trie structure efficiently. This gave as fast way to resolve point/all-inside dependency only in O(n) time.

FIXED find-commands. StackOverflowException in case of long lists of dependencies in the one level.

REMOVED all *-json-spec builin commands were joined with it origin forms. Like commando-from-json-spec at now are handled by the original commando-from-spec, user just may use :commando/from either "commando-from" key to defining logic. Covering this special "string-based" instructions with tests.

UPDATED documentation about how to use commando DSL with an JSON structure.

ADDED to commando.impl.utils two helper functions: print-stats - to print status-map :stats key into output; print-deep-stats - printing the flamegraph basing on :stats of every internal commando/execution(very helpfull for debugging macroses or query_dsl)

1.0.4

ADDED commando.commands.builtin/commando-macro-spec. The new type of command that allow to group instructions by its functionality and use it as a single command. Added Readme information about the macro.

ADDED documentation for commando.commands.builtin commands. Now each built-in command have explanation of its behavior and examples of usage.

UPDATED upgrade commando.commands.query-dsl. Function resolve-query was removed and replaced by resolve-fn, resolve-instruction, resolve-instruction-qe function called a resolvers. Explanations about the resolvers added to docs/query-dsl.md file.

UPDATED error serialization. commando.impl.utils contains new way to serialize errors for CLJ/CLJS. Now all errors are serialized to map with keys: :type, :class, :message, :data (if exists) and :stacktrace (if exists), :cause (if exists). See commando.impl.utils/serialize-exception for more information. You can expand the error handlers using serialize-exception-fn multimethod (but for CLJ only).

ADDED tests for macro-spec, errors and query-dsl changes.

UPDATED README.md 'Debugging section' was replaced on 'Configuring Execution Behavior' which contains more detailed information how to modify execution behavior.

UPDATED dynamic variable debug-mode replaced by the *execute-config* which is a map that can contain multiple configuration options.

FIXED Removed detach-instruction-commands call from commando.core/build-compiler. In commando.core/build-compiler, the line that detached instruction commands from the registry was removed. This means the compiled registry now includes internal commands (_map, _value, _vector).

1.0.3

UPDATED behavior :validate-params-fn. If the function return anything except true it ment validation failure. If the function return data, they will be attached to returned error inside status map. Added tests.

FIXED align serialization of exeption for CLJ/CLJS

ADDED function normalization for :commando/fn, :commando/apply, :commando/from commands. In CLJ it will acept the symbols,vars,functions,keywords. In CLJS acceptable is only function and keywords.

FIXED QueryDSL. QueryExpression passing by :keys and :strs(for string Instruction keys)

1.0.2

FIXED bug issue with silent status-map after error execution.

1.0.1

Update for cljdocs

1.0.0

First version of commando released publicly

Can you improve this documentation? These fine people already did:
SerhiiRI, kaspazza & Serhii Riznychuk
Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close