github terramate-io/terramate v0.14.5

8 hours ago

Added

  • Add tm_unslug() function: New stdlib function that maps slugs back to their original human-readable strings using a provided dictionary. Supports both string and list(string) inputs, with the output shape mirroring the input. Features include:

    • Dictionary-based reverse mapping for reliable unslugging
    • Normalization of input slugs (lowercase, collapsed separators, trailing separator removal)
    • Collision detection with typed error (UnslugErrorIndeterministic)
    • Round-trip guarantee: tm_unslug(tm_slug(word), dictionary) == word for all words in dictionary
    • Extensive special character support (Unicode, emoji, punctuation, etc.)
  • Add tm_slug() function: New stdlib function that converts strings to URL-safe slugs. Accepts both string and list(string) inputs, returning the appropriately typed slugified result. Properly handles null values in list or tuple elements without panics.

    tm_slug("Hello World!")
    # Returns: "hello-world"
    
    tm_slug(["Feature/Branch", "Bug Fix", "Release 2.0"])
    # Returns: ["feature-branch", "bug-fix", "release-2-0"]
  • Add tm_joinlist() function for joining nested lists of strings with a separator.

    tm_joinlist("/", [["root"], ["root", "child"], ["root", "child", "leaf"]])
    # Returns: ["root", "root/child", "root/child/leaf"]
  • Add tm_tree() function for constructing hierarchical paths from parent-child relationships.

  tm_tree([[null, "root"], ["root", "child1"], ["root", "child2"], ["child1", "leaf"]])
  # Returns: [["root"], ["root", "child1"], ["root", "child1", "leaf"], ["root", "child2"]]
  • Add support for slashes (/) in tags.

Don't miss a new terramate release

NewReleases is sending notifications on new releases.