NOTE: Whenever upgrading versions of Pedestal, please be sure to clean your project's out
directory.
This release is just to provide dependency upgrades to address CVEs in Jetty and Clojure.
A change has been made to the path-params-decoder
to address the breaking change in 0.6.0; by
making the decoder idempotent, it is no longer a breaking change.
Upgrade dependencies to fix CVEs in Jetty.
Upgrade dependencies to fix CVEs:
BREAKING CHANGES:
io.pedestal.http.route/path-params-decoder
), when using io.pedestal.http/default-interceptors
; previously
this was the application's responsibility, usually in individual routes' interceptor lists.
The prior behavior can be restored by passing :io.pedestal.http/path-params-decoder
as nil in the service map
provided to io.pedestal.http/create-server
.Other changes:
deps.edn
) rather than Leiningen (project.clj
)fast-resource
interceptor now passes on context correctly. Resolves #658fast-resource
. Resolves #651.log
function. Resolves #638.Template resource 'leiningen/new/pedestal_service/.gitignore' not found.
error
encountered when running lein pedestal-service [app-name]
with the Pedestal 0.5.6
release.url-for
:strict-path-params?
option is now more strict. Nil values are not allowed. Addresses #602.log/log-span
.io.pedestal/pedestal.log
now provides a functional logging interfaceio.pedestal/pedestal.log
now ships with basic support for MDC::host
in service map defaults to localhost now (rather than being container specific) #557.response-for
now catches nil header values early, with a helpful exception #554.For a full list of changes, please see this comparison of 0.5.3...0.5.4.
For more detailed release notes, refer to the 0.5.4 release document.
body-params
when turned onurl-for
is now delayed, while upholding the existing APInot-found
and request-logging
default interceptors are now optional and can be toggled in the Service Mapurl-for
correctly handles trailing slashesFor a full list of changes, please see this comparison of 0.5.2...0.5.3.
response-for
now correctly handles Transit bodies (requests and replies)For a full list of changes, please see this comparison of 0.5.1...0.5.2.
For a full list of changes, please see this comparison of 0.5.0...0.5.1.
For a full list of changes, please see this comparison of 0.4.1...0.5.0.
response-for
split apart to allow for better instrumentation and test controlresponse-for
now handles async useFor a full list of changes, please see this comparison of 0.4.0...0.4.1.
For a full list of changes, please see this comparison of 0.3.1...0.4.0.
start-fn
For a full list of changes, please see this comparison of 0.3.0...0.3.1.
Details will emerge in an upcoming blog post and within the guides and docs here.
For a full list of changes, please see this comparison of 0.2.2...0.3.0.
Bug fix release preceding some exciting (and breaking) 0.3.0 changes. Unless any major bugs are discovered, no further work will continue on the 0.2.x stream.
For a full list of changes, please see this comparison of 0.2.1...0.2.2.
Small bug fix for app-template.
For a full list of changes, please see this comparison of 0.2.0...0.2.1.
This is a big one folks. Developer tooling has moved from generated projects into the app- and service-tools libraries.
If you want to take advantage of all the super-awesome new features then further action is required. See the respective changelogs in App and Service for more info.
Developer tooling has moved in its entirety to app-tools.
Notable improvements:
lein repl
.(reload-config)
Additionally, app configuration is specified by an EDN file (instead of an executable Clojure file.) New projects will make use of this feature, but pre-0.2.0 generated projects will not.
You do not have to make this upgrade, but we suggest you do.
The easiest way to upgrade is to re-generate your application with the 0.2.0 app-template and transfer your existing code into it. It is possible, however, to migrate your existing application.
How to migrate a 0.1.x project to 0.2.0:
1. Upgrade your project's pedestal-app dependencies to version "0.2.0"
2. Remove the dev/
folder.
3. $ touch config/user.clj
-- This is needed for :repl-options
with :init user
to work.
4. Update your project.clj
's :main
and :repl-options
keys like so.
5. Add the piggieback dependency to your project.clj
([com.cemerick/piggieback "0.1.0"]
).
6. Update your application's config.clj
file. There are two ways to do this...
1. *If you have not modified your config.clj
: Generate a new
application with the same name as your existing application, and
steal the config.edn
file from it.
2. If you have changed your config.clj
, or you're a glutten for
punishment perform these steps (looking like
this
is our goal):
1. mv config/config.clj config/config.edn
2. Remove the ns
declaration.
3. Unwrap the configs
def into a raw map.
4. Remove quotes from quoted namespaces. Look in :main and :renderer keys.
5. At path [:build :watch-files]
,
(compile/html-files-in "app/templates")
should become a map
of tags to regex pattern strings like
{:html ["^app/templates"]}
. Note these are string regex
patterns, not regexps--regexps aren't supported by EDN.
6. At path [:build :triggers]
, existing strings should be
converted to string regex patterns. For example, the original
{:html ["project-name/rendering.js"]}
would become
{:html ["project-name//rendering\\.js$"]}
.
Tooling's cljs-repl
is now provided by Chas Emerick's Piggieback.
Tooling's cljs-repl
is now more clear about usage. This fixes #93, #90.
App's ClojureScript dependency has been bumped to r1835. Namespaced keywords are now allowed (::msg/topic
)!
Logging in the browser is now grouped. #95
The template now includes a :ui
aspect for rendering the simulated
behavior. #184, #187
Added the :read-as
option for msg/param
. Setting to :data
causes collected values to be parsed by the Clojure reader. #166*
Service tooling has moved out of generated projects into a service-tools library.
Notable improvements:
lein repl
.There is a bit of migration necessary to move existing projects to 0.2.0 tooling. You don't have to make this change, but we suggest you do.
How to migrate a 0.1.x project to 0.2.0:
1. Update your project's dependencies to match the new ones:
1. Upgrade your project's pedestal-service dependencies to version "0.2.0"
.
2. Add [io.pedestal/pedestal.service-tools "0.2.0"]
as a dependency.
3. Remove logback and slf4j logging dependencies.
2. Remove the dev/
folder
3. $ touch config/user.clj
-- This is needed for :repl-options
with :init user
to work.
4. Update your project.clj
's :main
and :repl-options
keys to match
the new template project.clj.
5. Pare down your src/**/server.clj file to match
the new template server.clj.
Service now uses Cheshire
instead of clojure.data.json for constructing
json-response
s
and parsing json
bodies. #162
This change does eliminate some JSON parsing options that were previously possible in 0.1.10. Specifically the following options are no longer supported:
:eof-error?
- "If true (default) will throw exception if the stream is empty.":eof-value
- "Object to return if the stream is empty and eof-error? is false. Default is nil."If your application makes use of these options you will need to construct a
body-params
interceptor with a parser-map
where you have swapped in your
own #"^application/json"
key with a custom-json-parser
similar to the old
version.
That might look something like this:
;; In a utility namespace
(require '[io.pedestal.service.http.body-params :as bp])
(defn old-style-json-parser ...)
(def my-body-params (bp/body-params (-> (bp/default-parser-map)
(assoc #"^application/json" (old-style-json-parser)))))
The default behavior of the body-params
interceptor now keywordizes JSON
keys. To retain the old behavior, create a body-params
interceptor like so:
(require '[io.pedestal.service.http.body-params :as bp])
(def string-keys-body-params (bp/body-params (bp/default-parser-map :json-options {:key-fn nil})))
A bug with CORS headers has been fixed.
The default MIME type has been returned to text/plain (it was a bug that it changed to octet-stream.)
For a full list of changes, please see this comparison of 0.1.10...0.2.0.
msg/priority :high
in a message for that message to be processed before all other unadorned messages. 2495b9a5io.pedestal.service.http.route/url-for
now accepts a :fragment
option for specifying URL fragments (i.e `http://example.com/#foobars). #85io.pedestal.service.http.body-params
's edn and json parsers can now be configured (both alone and as part of default-parser-map
). #96, #97, #98For a full list of changes, please see this comparison of 0.1.9...0.1.10.
io.pedestal.app.render.push.templates/insert-t
. #81dev/dev.clj
now uses (start)
instead of (run)
, bringing it in line with pedestal-service. #84For a full list of changes, please see this comparison of 0.1.8...0.1.9.
App and service templates now allow creating projects with namespaces #68.
$ lein new pedestal-app com.example/foo
... creates foo/ with src/com/example/foo/*.clj
For a full list of changes, please see this comparison of 0.1.7...0.1.8.
io.pedestal.app.templates/dtfn
now allows for more than one data field #60.resources/
#51.Content-Type
header was not being set properly #58, #65.For a full list of changes, please see this comparison of 0.1.6...0.1.7.
Context paths now work with JBoss
It is now possible to specify TCP port in routes (default: 8080). Specified ports will also be reflected in generated URL.
(defroutes routes
[[:app1 8080
["/" {:get app1-root}]]
[:app2 8181
["/" {:get app2-root}]]]
For a full list of changes, please see a comparison of 0.1.5...0.1.6.
We encountered a bug deploying version 0.1.4 so that release was re-done as version 0.1.5
lein clean
now correctly deletes out
directory.text-as-html
and data-as-json
interceptors.text/html
if not specified otherwise.Special thanks to @ddeaguiar for grammar and spelling corrections, as well as his help in removing lein-marginalia as a dependency. We've updated the documentation with instructions on how to continue to generate marginalia documentation.
For a full list of changes, please see a comparison of 0.1.3...0.1.5.
For a full list of changes, please see a comparison of 0.1.2...0.1.3.
Can you improve this documentation? These fine people already did:
Ryan Neufeld, Paul deGrandis, Howard M. Lewis Ship, Daniel De Aguiar, Daemian Mack, Gabriel Horner, Brian Jenkins & Kyle ObaEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close