Functions for reading, validating, and manipulating deps.edn files and data structures.
Functions for reading, validating, and manipulating deps.edn files and data structures.
(canonicalize deps-edn & opts)Canonicalize a deps.edn map (convert simple lib symbols to qualified lib symbols). Returns the deps-edn map.
Opts: :path String path to file being read
Canonicalize a deps.edn map (convert simple lib symbols to qualified lib symbols). Returns the deps-edn map. Opts: :path String path to file being read
(combine-aliases edn-map alias-kws)Find, read, and combine alias maps identified by alias keywords from a deps edn map into a single args map.
Find, read, and combine alias maps identified by alias keywords from a deps edn map into a single args map.
(create-edn-maps)(create-edn-maps {:keys [root user project extra]
:as params
:or {root :standard user :standard project :standard}})Takes optional map of location sources, keys = :root :user :project :extra where each key may be: :standard (default) - to get the default source string - for file path to source, relative to current dir context nil - to omit map - a literal map to use
Returns a set of deps edn maps with the same keys :root :user :project :extra. Keys may be missing if source was nil or file was missing.
Takes optional map of location sources, keys = :root :user :project :extra where each key may be: :standard (default) - to get the default source string - for file path to source, relative to current dir context nil - to omit map - a literal map to use Returns a set of deps edn maps with the same keys :root :user :project :extra. Keys may be missing if source was nil or file was missing.
(merge-alias-maps & ms)Like merge-with, but using custom per-alias-key merge function
Like merge-with, but using custom per-alias-key merge function
(merge-edns deps-edn-maps)Merge multiple deps edn maps from left to right into a single deps edn map.
Merge multiple deps edn maps from left to right into a single deps edn map.
(project-deps)Calculate the project deps.edn location, read and return the deps.edn data.
You may use clojure.tools.deps.util.dir/with-dir to read from a custom project dir, either absolute or relative to the current dir context.
Calculate the project deps.edn location, read and return the deps.edn data. You may use clojure.tools.deps.util.dir/with-dir to read from a custom project dir, either absolute or relative to the current dir context.
(project-deps-path)Calculate the project deps.edn location. This is the deps.edn in the current directory, as defined by clojure.tools.deps.util.dir/the-dir - use with-dir to push a new local directory context around a call to project-deps-path.
Calculate the project deps.edn location. This is the deps.edn in the current directory, as defined by clojure.tools.deps.util.dir/*the-dir* - use with-dir to push a new local directory context around a call to project-deps-path.
(read-deps f & opts)Corece f to a file with jio/file, then read, validate, and canonicalize the deps.edn. This is the primary entry point for reading. Use read-edn, validate, or canonicalize for individual steps.
Opts: none for now
Corece f to a file with jio/file, then read, validate, and canonicalize the deps.edn. This is the primary entry point for reading. Use read-edn, validate, or canonicalize for individual steps. Opts: none for now
(read-edn r & opts)Read edn from Reader r, which should contain exactly one edn value. If source exists but is blank, nil is returned. Throws if source is unreadable or contains multiple values.
Opts: :path String path to file being read, for error reporting
Read edn from Reader r, which should contain exactly one edn value. If source exists but is blank, nil is returned. Throws if source is unreadable or contains multiple values. Opts: :path String path to file being read, for error reporting
(root-deps)Read the root deps.edn resource from the classpath at the path clojure/tools/deps/deps.edn
Read the root deps.edn resource from the classpath at the path clojure/tools/deps/deps.edn
(user-deps)Calculate the user deps.edn per user-deps-path, read and return the deps.edn data
Calculate the user deps.edn per user-deps-path, read and return the deps.edn data
(user-deps-path)Use the same logic as clj to calculate the location of the user deps.edn. Note that it's possible no file may exist at this location.
Use the same logic as clj to calculate the location of the user deps.edn. Note that it's possible no file may exist at this location.
(validate deps-edn & opts)Validate a deps-edn map according to the specs, throw if invalid. Returns the deps-edn map.
Opts: :path String path to file being read
Validate a deps-edn map according to the specs, throw if invalid. Returns the deps-edn map. Opts: :path String path to file being read
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |