Releases: YahooArchive/mojito
0.7.0
Notes
- YUI dependency was upgraded to yui@3.10.3
Deprecations, Removals
- The mojito command line tools included in the mojito repository were deprecated in May. Mojito Developers were asked to install and use the
mojito-cli
npm package. With this release, the command line tools have been removed from Mojito. Use of the commands with the latestmojito-cli
works as before. Also, deprecated commands "profiler" and "gv" cli commands were moved to separate packages.
Note that if an application's continuous integration environment (i.e. Jenkins, Screwdriver) depends on the code for these commands to be included as part of the mojito package, the application package.json will need to be updated.
CLI change summary:
- Developers should continue to install
mojito-cli
globally in their development environments to use "mojito" commands from the console. This remains the case for any recent version of Mojito. - Mojito applications depending on
mojito@0.7.0
and doing CI with Screwdriver need to addmojito-cli
as a devDependency. mojito profiler
was re-packaged and can be installed separately.mojito gv
was re-packaged and can be installed separately.
More info at the mojito-cli wiki.
- mojito-carrier-addon and mojito-device-addon are moved to y_mojito package for Yahoo internal developer use only.
Features
- PR #1163: Rehydration of data from server to client and from client to server. Any data set thru
mojitProxy.data.set()
orac.data.set()
will travel back and forward between the client and server runtime to preserve the state of the mojit instance when using the rpc tunnel.
Bug Fixes
- Issue #1159: tunnel request fails if mojito-data-addon is required on the server side controller.
0.6.1
Notes
- Mojito contributors can now use the following
npm run-script
shortcuts when working inside the mojito repo:npm test
npm run unit
npm run func
- YUI dependency was upgraded to yui@3.10.1
- Arrow devDependency was upgraded to yahoo-arrow@~0.0.77
- YCB dependency was upgraded to ycb@~1.0.5
Bug Fixes
- fix #1151 client-side route-maker error IE6-8
- fix #1146 use perf.logFile from app.json:perf.logFile if applicable
- fix callback handling in mojito start sequence
Acknowledgements
Thanks to @chetanankola and @aljimenez for discovering and helping with issue #1151.
0.6.0
Notes
- Mojito contributors can now use the following
npm run-script
shortcuts when working inside the mojito repo:npm test
npm run unit
npm run func
- YUI dependency was upgraded to yui@3.10.1
- Arrow devDependency was upgraded to yahoo-arrow@~0.0.77
- YCB dependency was upgraded to ycb@~1.0.5
Bug Fixes
- fix #1151 client-side route-maker error IE6-8
- fix #1146 use perf.logFile from app.json:perf.logFile if applicable
- fix callback handling in mojito start sequence
Acknowledgements
Thanks to @chetanankola and @aljimenez for discovering and helping with issue #1151.
0.5.9pr1
Notes
- !IMPORTANT! This release contains a notable backward-incompatible change. See "Deprecations, Removals" below.
- The PR #1059 adds the Mojito Quickstart Guide application
to theexamples
directory. The application allows you to view documentation on
different devices and serves as a reference application. You can view the live application
at http://y.ahoo.it/mqsg. Also, see the wiki page
Mojito Quickstart Guide: Intro
for more information about the application.
Deprecations, Removals
- !Backwards-Incompatible Change! Using
ac.instance.config
to send data from a controller to a binder has been removed.
This was never the official approach but was a work-around mentioned in our FAQ until we could support something better.
We now have an official data channel from controller to binder -- see "Features" below.
This was removed because sendinginstance.config
from the server to the client could possibly leak secure information. - The command line tools bundled with mojito have been deprecated. Rather than installing
mojito
globally, please installmojito-cli
globally instead. Functionality should remain the same. See http://git.io/jJazAw mojito compile
command was removed. It has been deprecated since 0.5.1.mojito profiler
has been deprecated. It will be removed in a future release.
Features
Data Channel from Server to Client
Introducing mojito-data-addon
for use in controllers. This AC addon is used to pass
information from the controller to the binder. After requiring this addon in your
controller you can use ac.data.set(name, value)
to expose data to the binder.
The binder accesses this data with mojitProxy.data.get(name)
.
The data set via ac.data.set()
is also available in all templates. Any data given
to ac.done()
will be merged over the data given by ac.data.set()
.
(This is a shallow merge.)
Page-Level Data Store
mojito-data-addon
also introduces the page data, which is accessible thru ac.pageData
.
This has a YUI Model API, i.e. ac.pageData.set(name, value)
and ac.pageData.get(name)
.
pageData
is unique to each request, but is a single store for all mojits of the request,
and you can use it to share data between mojits in a page. The binder accesses this data
with mojitProxy.pageData.get(name)
.
The data set via ac.pageData.set()
is also available in all templates thru this.page
(for example {{page}}
in handlebars templates). Keep in mind that if
ac.done({page: 'something'})
is specified in your controller, the page
key will override
all data set via ac.pageData
.
This data will be sent to the client side, and rehydrated since the page built at the server
side will expand its scope to the client. In other words, pageData
serve as a mechanism
to share data between mojits and runtimes. ac.pageData
and mojitProxy.pageData
provides
access to the same page model.
Bug Fixes
- #1086 -- correction: html5app is only supported build type
- #1090 -- deprecate
mojito profiler
, color general cli deprecation msg - #1092 -- routes sent to the client should honor the client context
Acknowledgements
Special thanks to Steven Lu for contributing the Mojito Quickstart Guide app for this release.
0.5.8
Notes
- #1062 fixes the detection problems in YUI that
where causing multiple issues withY.JSON.parse and
other components. In the current
implementation, the app itself usesrequire('yui')
in a traditional way to avoid any
potential issues in the future with the detection system in YUI. It also re-enabled
the ability to run YUI in debug mode in the server side if you happen to usefilter="debug"
inapplication.json
which had been broken for a long time.
Deprecations
- The
hybridapp
build mode (code and resources) has been removed.
Bug Fixes
- #1062: fixes the issue with Y.config.global after the upgrade to yui@3.9.1
- removed a few unnecessary datastructure copies
Acknowledgements
Special thanks to @lexander and @dmorilha for their contributions to this release.
0.5.7
Important Updates about this release
- An issue with the way
yui@3.9.x
does some feature detections was identified in this release and will be fixed in0.5.8
. This affects users usingY.JSON.parse
on the server side, and potentially other areas of YUI that relies onY.config.global
. For more information, check #1062
Notes
- A middleware called
mojito-handler-error
has been added to the default middleware stack to handle middleware errors.
If you have redefined the middleware stack and do not have your own error
handler, then it is your responsibility to add it so that errors can be
handled appropriately. - An early preview of
mojito-cli
has been published. Users can choose to try it withnpm install --global mojito-cli
. There should be no significant changes in functionality. It is intended to replace the functionality provided by installing the mojito npm package globally (which has been deprecated). Notes:- users install mojito-cli package globally (if they choose to in this preview release period).
- users should install the mojito package locally, as an npm dependency of their application.
- all existing mojito command line commands should continue to operate in much the same way.
mojito create app Foo
, when mojito-cli has been installed, will usenpm
to installmojito
locally automatically after generating the app files and directories.
Features
- Upgraded to YUI 3.9.1
- #979:
- The
mojito-handler-tunnel
middleware was refactored into a middleware
substack that loosens the coupling between the parsing and handling
phases of a tunnel request. This means that applications will have an
easier time overriding and customizing tunnel behavior. - The URL is now customizable per request using the
tunnelUrl
option for
mojitProxy.invoke()
, but is still subject to thetunnelPrefix
restriction.
- The
Bug Fixes
- #1040: port argument must be an integer
0.5.6
Notes
- A compiled history of changes is available
here. - Mojito cli commands will be moving to a separate package
mojito-cli
in
upcoming releases, which will be for global installation. The core mojito
package will be for bundling with your application.
Deprecations
- Mojits shipped with Mojito (like HTMLFrame, tunnel, etc) will play by the same
rules, no more conditions when we walk them. Before, those mojits were forced
to not haveres.url
because they should not be used from the client side, that's not
longer the case.
Bug Fixes
0.5.5
Compatibility
Performance optimizations introduced in this release have resulted in internal API changes. This impacts 3rd party components that are using protected or internal store APIs, e.g. Shaker. A new Shaker version will be released very soon to address these changes. In the meantime, you can follow mojito-shaker#43.
Here are details of the API changes.
- We removed store event
getMojitTypeDetails
. The replacement isresolveMojitDetails
, though the datastructure is different. - We removed store event
mojitResourcesResolved
. - We removed
store.getResources()
. - We added
store.optimizeForEnvironment()
. - We added
store.makeStaticHandlerDetails()
. store.yui.getAllURLResources()
is now calledstore.yui.getAllURLDetails()
and returns a different datastructure.- For both
store.getResourceContent()
andstore.procesResourceContent()
, the datastructure representing the resource has changed. store.getResourceVerions()
should not be called during runtime. It can still be called during the events that happen during preload.store.yui.getConfigShared()
now just takes theenv
argument.- We removed
store.yui.getConfigAllMojits()
. Some users were callinggetConfigAllMojits
and using the results withgetConfigShared
to configure a YUI instance. Now instead we suggest usinggetModulesConfig()
to replace this pair of calls. - We added
store.yui.getModulesConfig()
. - We added
store.yui.getYUIConfig()
. store.yui.getAppSeedFiles()
now takes a yui configuration as the second argument.store.yui.getYUIURLResources()
is now calledstore.yui.getYUIURLDetails()
and returns a different datastructure.
Please see the API docs for details of each.
Features
- Global models thru
ac.models.expose()
upgraded from experimental to beta. - #1011 Support for Handlebars helpers through
mojito-helpers-addon
and support for global Handlebars helpers usingac.helpers.expose()
. This is an experimental feature! - #978 Introducing error propagation in
mojito-composite-addon
by using the flagpropagateFailure
in a child. - #997 Introduced a clear separation between YUI core modules and app-specific YUI modules. YUI core modules are now served from CDN by default; they are only served by the app origin server if
staticHandling.serveYUIFromAppOrigin
is set inapplication.json
. This change optimizes the initial load time of the app as well as its offline capabilities when using mojito build html5app. - Improved Resource Store: minimized memory footprint.
- Upgraded to YUI 3.8.1
Fixes
- #25, #865 mojito-composite-addon error propagation
- #293 HTMLFrameMojit should honor child metas
- #1001 Fixes the
Cache-Control
header for static assets. - #1006 Fixed hybrid build issue
- Fixed lingering occurrences of
store.yui.getConfigAllMojits()
- Fix for
forceRelativePaths
for YUI loader when usingmojito build
, making root and base to be relative when needed. - (sweetandsour2) Fix for client side hooks, bug fix in template hooks.
0.5.4
Compatibility
We dropped the Mu library in favor of Handlebars -- Handlebars is used everywhere, including for parsing Mu templates. Even though Mustache is a subset of Handlebars, this might introduce some encoding issues, especially because Handlebars does automatic encoding of {{}}
sections to provide some basic security against script injections. If you are encoding data in your controller for your Mustache views, you no longer need to do so, and by using {{}}
you will be covered. On the other hand, if you don't want Handlebars to apply the default encoding, just use {{{}}}
to print the original value.
New Features
- Support for Handlebars partials
- Dropped Mu library: any
*.mu.html
view/template will be processed using HB engine - Global models thru
ad.models.registerGlobal
- Templates warm-up thru
preloadTemplates
configuration for small apps. - Support for external URLs in
yui.config.seed
for custom YUI versions on the client side.
Fixes
- 6b33872 Solving conflits generated by the hook system.
- 474544f lock yahoo-arrow version to 0.0.73
- 6a9d3f8 Revert "Reduced memory consumption at server start by removing an apparently unnecessary meta-data copy operation..."
- 9fca50b adding support for a more flexible seed structure to support external urls. this helps to control the yui version on the client.
- 20a1405 removing mustache engine in favor of handlebars based on #367 by @mridgway
- f5251aa supporting registration of global models
- 9a40739 consolidating application.json->viewEngine->cacheTemplates as a static config across the board.
- 374826d adding support for partials in the store. Views within partials/* folder are now considered partials.
Notes
Please see DEPRECATIONS.md.
Acknowledgments
Thanks to mridgway!