Volt v0.9.3 Release Notes

  • ⚡️ 0.9.3 Update Blog Post ⬆️ Upgrade Guide

    ➕ Added

    • ➕ Added validations block for conditional validation runs
    • you can now set the NO_FORKING=true ENV to prevent using the forking server in development.
    • models without an assigned persistor now use the page persistor (which now can provide basic querying)
    • ⚡️ Volt now pushes updates between mulitple app instances. Updates are pushed between any servers, clients, runners, etc.. that are connected to the same database via the MessageBus (see next)
    • 0️⃣ Volt now comes with a "MessageBus" built in. The message bus provides a pub/sub interface for the app "cluster". Volt provides a default message bus implementation using peer to peer sockets that are automatically managed via the database.
    • You can now nest models on store. Previously store was limited to only storing either values or ArrayModels (associations). You can now store directly, in mongo this will be stored as a nested value.
    • Promises got more awesome. Promises in volt can now proxy methods to their future resolved value. Something like: promise.then {|v| v.name } can now be written simply as: promise.name It will still return a promise, but to make life easier:
    • 👍 All bindings now support promises directly.
    • All code in config/initializers is now run on app startup.
    • All code in any components config/initializers (app/main/config/initializers/*.rb) is now run on the server during app startup. On the client, only the included components initializers will be run.
    • 👍 all initializers folders now support a client and server folder.
    • 👍 has_one is now supported.
    • You can now use .create to make a new item on a collection.
    • .inspect for models is now cleaner
    • Volt.current_user now works in HttpController's
    • HttpControllers now can take promises in render.
    • 👀 You can now add your own middleware to the middleware stack. (see docs)
    • ➕ Added a threadpool for Tasks, and options to customize pool size in config/app.rb
    • 👍 Volt now handles Syntax errors much better, it will display an error message when your app does not compile, and can reload from that page when things change. (in development)
    • Time objects can now be saved in models.

    🔄 Changed

    • All methods on ArrayModel's under the store collection now return a Promise.
    • A #create method was added to ArrayModel.
    • 🚚 All logic associated with mongo has been moved into the volt-mongo gem. If you are migrating from a previous version, be sure to add gem 'volt-mongo' to the Gemfile.
    • models using the page or store persistor now auto-generate an id when created. This simplifies things since models always have an id. It makes association easier as well. (internally that is)
    • models now use .id instead of ._id Queries and saves are mapped to _id in the volt-mongo gem
    • 🛠 fixed issue where volt precompile would compile in extra assets from non-component gems.
    • Lots of internal changes:
      • bindings were refactored to pass around a Volt::App instead of a Volt::Page.
      • controllers now take a Volt::App when created directly.
    • You can now use .each in attribute bindings.
    • 🚚 We moved to csso as the css compressor because it does not require libv8, only an execjs runtime.
    • 👍 Each bindings now support promises.
    • Volt.fetch_current_user has been deprecated and Volt.current_user now returns a promise.
    • Volt.current_user? now returns a promise that yields a boolean
    • 👀 Lots of bug fixes. (see github)