summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md60
1 files changed, 60 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..c98705d
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,60 @@
+# Changelog
+
+## 2.0.0
+
+- **Best-match routing**: Routes are now matched by specificity instead of first-match-wins. Literal segments beat parameters, parameters beat optionals, optionals beat wildcards. Route order in the vector no longer matters.
+- **Segment trie**: Routes are compiled into a trie (prefix tree) data structure for O(path-depth) matching instead of O(N) linear scan. This yields 4-380x performance improvements depending on route count and match type.
+- **`compile-routes` function**: New public function for explicit route compilation. Routes are also compiled implicitly and cached via memoization when using `route` directly.
+- **Single wildcard constraint**: Wildcard parameters (`:name*`) must now be the last segment in a path. Multiple wildcards per path are no longer supported.
+- **No regex**: Route matching no longer uses regular expressions. Matching is done via direct string comparison of path segments against a trie.
+- **deps.edn only**: Leiningen (`project.clj`) has been retired. All build, test, and benchmark tasks use `deps.edn` and `bb.edn`.
+
+## 1.3.5
+
+- Fixes an issue where the usage of wildcard parameters [did not work quite right](https://github.com/askonomm/ruuter/issues/7).
+- Added test cases to cover the fix
+
+## 1.3.4
+
+- Fixes an issue where if used with middlewares (like Ring), or really anything that passes a `:params` key from outside of Ruuter in the request, Ruuter overwrites the `:params` key with its own parametarization. It now does a deep merge instead, with the outside parameters having priority. This means that Ruuter parameters will remain unless overwritten, and should co-exist with outside parameters nicely. [Issue #6](https://github.com/askonomm/ruuter/issues/6).
+
+- Added and fixed some tests
+
+## 1.3.3
+
+- Removed ClojureScript from dependencies to make the bundle size smaller in case you want to use Ruuter with nbb.
+
+## 1.3.2
+
+- When using wildcard parameters, the keyword returned in ´:params´ of a request was ´:name*´, but aiming for consistency with an optional parameter where we remove the question mark ´?´, the asterisk has been removed.
+
+## 1.3.1
+
+- A small bugfix related to wildcard parameters losing the first character in the result.
+
+## 1.3.0
+
+- Fixed an issue with optional parameters not matching correctly when there were multiple optional paremeters in use.
+- Implemented wildcard parameters in the form of `:name*`, which will match everything including forward slashes.
+
+## 1.2.2
+
+- Fixed an issue where CLJS compilation would fail because of the `(:gen-class)` that is JVM-only.
+
+- Tests are now runnable for CLJS as well.
+
+## 1.2.1
+
+- Fixed an issue with regex parsing. Sorry about that.
+
+## 1.2.0
+
+- Implemented optional route parameters, so now you can do paths like `/hi/:name?` in your routes, and it would match the route even if the `:name` is not present. All you have to do is add a question mark to the parameter, and that's it.
+
+- Changed Ruuter from a .clj file to a .cljc file, so it would also work with ClojureScript. Although it would probably require a more hands-on set-up than just a drop-in to an HTTP server like http-kit or ring + jetty, there is no reason that the router itself wouldn't work as it does not rely on any platform-specific code.
+
+- Ruuter also works with [Babashka](https://github.com/babashka/babashka), and I've created a "Setting up with Babashka" section in this README to show that.
+
+## 1.1.0
+
+- Made Ruuter server-agnostic, which means now it really is just a router and nothing else, and can thus be used with just about any HTTP server you can throw at it. It also means there are now zero dependencies! ZERO!