Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Releases: YahooArchive/mojito

0.7.0

06 Aug 22:49
Compare
Choose a tag to compare

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 latest mojito-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 add mojito-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() or ac.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

06 Aug 22:50
Compare
Choose a tag to compare

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

06 Aug 22:51
Compare
Choose a tag to compare

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

06 Aug 22:52
Compare
Choose a tag to compare
0.5.9pr1 Pre-release
Pre-release

Notes

  • !IMPORTANT! This release contains a notable backward-incompatible change. See "Deprecations, Removals" below.
  • The PR #1059 adds the Mojito Quickstart Guide application
    to the examples 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 sending instance.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 install mojito-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

06 Aug 22:56
Compare
Choose a tag to compare

Notes

  • #1062 fixes the detection problems in YUI that
    where causing multiple issues with Y.JSON.parse and other components. In the current
    implementation, the app itself uses require('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 use filter="debug"
    in application.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

06 Aug 22:57
Compare
Choose a tag to compare

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 in 0.5.8. This affects users using Y.JSON.parse on the server side, and potentially other areas of YUI that relies on Y.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 with npm 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 use npm to install mojito 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 the tunnelPrefix
      restriction.

Bug Fixes

  • #1040: port argument must be an integer

0.5.6

06 Aug 22:58
Compare
Choose a tag to compare

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 have res.url because they should not be used from the client side, that's not
    longer the case.

Bug Fixes

  • #812 only walk the first/shallowest version of each package
  • #1016 regression that prevented shaker for controllering CDN urls
  • #1026 compatibility with Node.js 0.10 by making all mojits to play by the same rules

0.5.5

06 Aug 23:00
Compare
Choose a tag to compare

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 is resolveMojitDetails, 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 called store.yui.getAllURLDetails() and returns a different datastructure.
  • For both store.getResourceContent() and store.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 the env argument.
  • We removed store.yui.getConfigAllMojits(). Some users were calling getConfigAllMojits and using the results with getConfigShared to configure a YUI instance. Now instead we suggest using getModulesConfig() 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 called store.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 using ac.helpers.expose(). This is an experimental feature!
  • #978 Introducing error propagation in mojito-composite-addon by using the flag propagateFailure 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 in application.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 using mojito build, making root and base to be relative when needed.
  • (sweetandsour2) Fix for client side hooks, bug fix in template hooks.

0.5.4

06 Aug 23:01
Compare
Choose a tag to compare

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!

0.5.3-1

06 Aug 23:03
Compare
Choose a tag to compare

This is a hotfix release to roll back an optimization that doesn't work well with mojito-shaker.

Fixes

  • Revert 3a5822a "Reduced memory consumption at server start by removing an apparently unnecessary meta-data copy operation"