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

Releases: YahooArchive/mojito

0.5.3

06 Aug 23:04
Compare
Choose a tag to compare

Features

  • new mojito and mojito-app instrumentation hooks
  • performance improvements
  • simplification of the frame mojit to facilitate inheritance and brand new frames per app.

Fixes

  • #919 Added examples of YAML configuration and linked…
  • #928 Remove Y! copyright from generated code
  • #954 fix for app failures when deploying to nodejitsu.

Notes

Please see DEPRECATIONS.md.

Acknowledgements

Special thanks to @bthaeler, @jlecomte, and @kinlum for their contributions to this release.

0.5.2

06 Aug 23:09
Compare
Choose a tag to compare

Performance Improvements

From 0.5.1 to 0.5.2 we have implemented a series of micro-optimizations. As a result, Mojito is twice as fast, uses half the memory footprint, and takes half the time to boot the application based on our internal metrics. More information can be found on our Trello board. This improves the response time to ~40ms response time for an application with 52 mojits, which represents less than 1ms per mojit.

Comments in JSON files and YAML Support

Configuration files, including application.json, defaults.json, definition.json, etc., can become pretty big for complex applications, and not having comments can drastically impact productivity and on-boarding for new developers. As of this version, we support comments in those files. The comments are YAML comments, they start with #.

As well, we just brought back support for .yml and .yaml that was previously introduced in Mojito 0.4.x.

Logs Formatter

In 0.5.0, we removed the mojito logger and started using YUI Log in its pure form. As a result of the formatting process implemented by the yui-log-nodejs module, the logs were formatted even when the application was running in a runtime without tty. This was partially fixed in this new version (for runtime execution where performance is critical), and we plan to finish the migration for the Resource Store's logs in 0.5.3.

Fixes

  • #238 [bz5667423] Add support for including files in a configuration bundle
  • #804 Added support for JavaScript-style comments in JSON files
  • #809 [bz5964521] test output is always colorized -- includes escape codes when saved to file
  • #863 micro-optimization: replacing runInNewContext with runInContext
  • #866 fix two newsboxes unit tests, misc
  • #867 update copyright to 2013
  • #868 [doc] Added FAQ about setting expiration of a cookie.
  • #870 update package.json in archetypes for mojito 0.5.x & node >0.6
  • #872 do not colorize test.js output if there is no tty [gh809,bz5964521]
  • #873 Functional test changes to support SD
  • #876 jslint tests along with template for general cli testing
  • #878 [bz6023234] prefix for hybridapp/crt "//yahoo.com"
  • #880 Update docs/dev_guide/getting_started/mojito_getting_started_tutorial.rst
  • #881 removed shelljs
  • #882 honor --descriptor for --cli and --unit as well
  • #884 Travis cleanup
  • #885 [doc] Updated documentation for running Mojito's built-in unit/functional tests.
  • #887 more unit tests for ActionContext
  • #888 Update docs/dev_guide/intro/mojito_apps.rst
  • #889 Add more unit tests for params.common and view engine handlebar
  • #890 a little more careful about transforming ac.done() into a no-op
  • #891 Update docs/dev_guide/intro/mojito_mvc.rst
  • #892 [doc] Documentation for how to configure YUI for Mojito applications.
  • #893 Update docs/dev_guide/intro/mojito_mvc.rst
  • #894 unit tests for build/*.js
  • #895 supporting yui.config.groups.app.comboSep=& without mangling
  • #896 dispatcher coverage
  • #897 .travis.yml debug, misc
  • #899 Update docs/dev_guide/topics/mojito_testing.rst
  • #901 Update docs/dev_guide/intro/mojito_binders.rst
  • #902 Add more unit tests for util.
  • #903 fixed client-side unit tests
  • #904 Modify files to workaround a jslint error
  • #905 [gh238] [bz5667423] support for multiple application configuration files
  • #906 fix missing snapshot.packages in build hybridapp
  • #909 [doc] Added links to archived docs.
  • #910 unformatted logs when running in production systems
  • #911 Update docs/dev_guide/code_exs/calling_yql.rst
  • #913 add unit test for version
  • #914 [doc] Docs add links to presentation given by Caridy at YUIConf 2012.
  • #915 Update docs/dev_guide/reference/mojito_troubleshooting.rst
  • #916 re-enable yaml support
  • #921 [doc] Added FAQ discussing how to re-use and extend mojits.
  • #923 workaround how arrow is tweaking with console.debug()

Acknowledgements

Special thanks to @jianlin for his contributions to this release!

0.5.1

06 Aug 23:10
Compare
Choose a tag to compare

Notes

  • mojito compile rollups command is no longer needed and has been removed -- comboing is now done at request time.
  • mojito compile commands are deprecated in favor of Shaker, see DEPRECATIONS.md.
  • for hybridapp builds, the application.json config builds.hybridapp.forceRelativePaths: true is broken for the time being. This makes testing with a browser in a non-chrooted more difficult.
  • NOTICE: 0.5.x has various configuration and API changes from 0.4.x, please also review 0.5.0 release notes if you are upgrading your application from pre-0.5.x versions.

Features

  • comboing of mojito and application javascript files are at request time
  • improved performance/latency
  • improved internal test and testability
  • improved 0.5.x documentation

Fixes

  • 54dcebe2 fix issue #835 more careful about caching results of expandInstanceForEnv()
  • 5c056797 adjusting ac.url.make routine to avoid accepting strings for querystring. avoiding any parsing or stringifing routine at…
  • da795572 fix mojito create -p option - add {{port}} to application.json
  • 21075b3c fix resolve loader config for hybridapp/IDE/CRT in 0.5.x
  • bfc26171 fix input handling and error message for jslint mojit command
  • 673f1941 better support of older browsers
  • 39cb005e HTMLFrameMojit title now says 'Powered by Mojito', not 'Powered by Mojito 0.2'

Acknowledgements

Special thanks to Dmitry Savintsev for his contributions to this release!

0.5.0

06 Aug 23:11
Compare
Choose a tag to compare

IMPORTANT This release contains notable backward-incompatible changes, all for the sake of significantly increased performance.

Features

  • Speed: TODO more details.
  • Logging now uses Y.log() directly, instead of our own wrapper. This simplifies usage and enables subscribing to the YUI log events.
  • Upgraded yui dependency to 3.7.3 (or greater).
  • Combo handling is now built in to Mojito server.
  • New hybrid app archetype to help create apps for use in technologies such as phonegap.

Backward Compatibility Changes

Mojito No Longer Adds Common ActionContext Addons

In the past, a subset of the addons provided by Mojito framework were attached on every ActionContext object (which are created per request, per mojit instance in the page).
The specific list was mojito-config-addon, mojito-url-addon, mojito-assets-addon, mojito-cookie-addon, mojito-params-addon, mojito-composite-addon.
This resulted in overhead for every mojit in the page.
As part of 0.5.0, all requirements have to be specified in the controller definition. e.g:

YUI.add('Foo', function(Y, NAME) {

    Y.namespace('mojito.controllers')[NAME] = {

        index: function(ac) {
            // ac.params.* is now available
        }

    };

}, '0.0.1', {requires: ['mojito', 'mojito-params-addon']});

As of 0.5.0, no addon is attached unless it is required. The only public members of ActionContent object are ac.done, ac.error, and ac.flush.

Recommendations to upgrade:

  • check every controller in your app, and check if it is using ac.*, and add the corresponding requirements.
  • the most common addons are: config, params, url, assets.

Access to Models via a Property

Models are no longer computed and attached to ActionContext by default.
In other words, ac.models.foo is no longer a valid way to access a model.
Computing and attaching models automatically, even when they were not really needed, added overhead during the page rendering process.
Instead, we want Mojito to be more strict in defining and exposing structures automatically.

In 0.5.0, if you need to use a model in a controller (defined at the mojit level, or at the application level), you need to:

  • require a new addon called mojito-models-addon in your controller.
  • require the module in your controller.
  • use ac.models.get('foo') to get a reference of the model.

Here is an example:

YUI.add('DemoModelFoo', function(Y, NAME) {
    Y.namespace('mojito.models')[NAME] = {
        init: function(config) {
            this.config = config;
        },
        getData: function(callback) {}
    };
}, '0.0.1', {requires: []});

YUI.add('Foo', function(Y, NAME) {
    Y.namespace('mojito.controllers')[NAME] = {
        index: function(ac) {
            ac.models.get('DemoModelFoo').getData(function (data) {
                // data from model available here
            });
        }
    };

}, '0.0.1', {requires: ['mojito', 'mojito-models-addon', 'DemoModelFoo']});

Note: the model name doesn't have to match the yui module name for the model anymore.

init Method in Controllers is Gone

The init method on the controller is now deprecated and should be removed.
In many cases, the init method was just storing a reference of the config parameter to use it later on.
This is no longer available, and the init method will not be executed.

If you need to access the mojit config in an actions, you should:

  • require mojito-config-addon in the controller.
  • use ac.config.get() to get the config

Note: do not try to store a reference of that config, as it is not safe, More details below.

ac.app.* is Gone

For performance reasons, to avoid computing app config per mojit instance, per request, when the majority of the time it is not needed, we completed the transition to mojito-config-addon add-on.
This change affects ac.app.*, specifically ac.app.config which was commonly used to access the computed application.json configuration per context.
If you need to access the application config in an action or another add-on, you should:

  • require mojito-config-addon in the controller.
  • use ac.config.getAppConfig() to get the former ac.app.config

Controllers Can No Longer Run Forever

Mojito now imposes a timeout on the dispatch of the action in the controllers.
Starting with 0.5.0 there is a "reaper" which imposes a timeout.
Actions must call ac.done() or ac.error() before the timer expires or the system will log a warning and invoke ac.error() with a timeout error.

This can be configured by the actionTimeout setting in application.json.
It contains the maximum number of milliseconds that a controller action is allowed to run before the action is timed out.
The default value is 60000 (60 seconds).

Mojit and AC Addon Naming Conventions Changes

Mojito is more restrictive in how you names mojits and add-ons. There are 4 new rules:

  • addon namespace should match the filename. E.g. ac.foo corresponds to addons/ac/foo.common.js.
  • The name of the mojit, which is the name of the folder, should match the language bundle, including the filename of the bundle and its definition. E.g. Foo mojit can have lang/Foo_da-DK.js, and the content should be YUI.add('lang/Foo_da-DK', function (Y) { Y.Intl.add('Foo', 'da-DK', {}); });
  • Controller YUI module name should be same as directory.
  • YUI modules need to have unique names, regardless of selector.

log Config in application.json is Gone

In previous versions, the console log was separated for client and server, and between Mojito and YUI.
We decided to leverage the YUI Logger, and unify this setting under a single configuration, actually the YUI configuration in application.json:

"log": {
    "client": {
        "level": "error",
        "yui": false
    },
    "server": {
        "level": "error",
        "yui": false
    }
}

is now:

"yui": {
    "config": {
        "debug": true,
        "logLevel": "error"
    }
}

and we recommend this setting for production:

"yui": {
    "config": {
        "debug": false,
        "logLevel": "none"
    }
}

To customize this for client or server, you can use the runtime context.
Also, you can now use logExclude and logInclude.
More information at http://yuilibrary.com/yui/docs/api/classes/config.html.

Other Settings Changes in application.json

The following are gone:

  • embedJsFilesInHtmlFrame
  • shareYUIInstance
  • in the yui section:
    • base
    • dependencyCalculations
    • extraModules
    • loader
    • url
    • urlContains

mojito test No Longer Tests the Framework

In the past, mojito test without any other parameter was running all unit tests for mojito framework, and this is no longer the case.
We moved all the tests to arrow, more details here: https://github.com/yahoo/mojito/tree/develop/tests

You can continue using mojito test app path/to/app and mojito test mojit path/to/mojit, and the behavior is still the same.

Note: this change is only relevant for contributors.

.guid is Gone

The .guid member of Mojito metadata (such as binder metadata) is now gone.
Often there's an associated member which more specifically expresses the intent of the unique ID (for example .viewId or .instanceId).

Fixes

  • #70 Simplify logging
  • #525 example unit tests crash or fail
  • #651 Expanded instances are bleeding
  • #736 Content Error in documentation
  • bz5472979 server resources in build
  • bz5886351 cli bin/mojito uses wrong copy
  • bz5892364 (archetype) mojito-client not loaded for hybrid app
  • bz5904449 garbled console output on node 0.8+
  • bz5914052 do real buffer calculus for better UTF8 and binary support

Acknowledgements

Special thanks to the Yahoo! Search team for inspiring the work and contributing a great deal to Mojito.
Also thanks to @lazybean for his contributions to the documentation!

0.5.0pr6

06 Aug 23:23
Compare
Choose a tag to compare
0.5.0pr6 Pre-release
Pre-release
release 0.5.0pr6 (based on 0.5.0pr5-277-g385c1df)

0.5.0pr5

06 Aug 23:25
Compare
Choose a tag to compare
0.5.0pr5 Pre-release
Pre-release

This is a special preview release of Mojito 0.5.0. It incorporates some significant re-architecting for performance. There are a few significant changes that break backwards compatibility, see below.

Compatibility Changes

There are no backwards compatibility changes from 0.5.0pr4.

Fixes

  • #739 Max url length (de-ja-vu)
  • #741 fixed default langs functional tests
  • #742 Composite dispatch on the client
  • #743 moved special handling of favicon,etc to addons/rs/url
  • #744 fixed call to getClosestLang()
  • #746 fix bz 5914052: do real buffer calculus
  • #747 Fix html5apptests
  • #748 get back joe's docs changes for 0.5.0
  • #749 updated archetypes for 0.5
  • #752 [docs] Removed 'init' from controllers and added documentation for getting app/routing configuration.
  • #753 guard against empty module info return value
  • #754 [docs] Updated docs for logging and logging configuration.
  • #755 Removed section on running Mojito module tests with 'mojito test '
  • #756 [docs] Removed config flags that are obsolete for 0.5.
  • #757 [doc] Cleaned up doc and made sure all controllers in doc have required addons
  • #758 [docs] Added new syntax for calling models from controllers and changed 'framework mojits' to 'frame mojits'
  • #759 [docs] Documented the naming conventions for addons, mojits, language bundles, and the YUI module names registered in them.
  • #760 [docs] Removed references to 'ac.app.*' and replaced them with either 'ac.config.getAppConfig()' or 'ac.config.getRoutes()'.
  • #761 fixed a few html5app functional tests
  • #762 [code_exs] Updated developer-guide code exs for 0.5
  • #763 resolving yui module name collision
  • #764 splitting dispatch logic
  • #765 fix mojito test mojit and newsboxes tests
  • #766 start all apps at the same time, truly wait until they're ready
  • #767 Files cleanup
  • #769 removing hack to use a custom yui-test script
  • #770 fixed client-side RPC, renamed "tunnel" to "tunnel-client"
  • #771 0.5-inspired cleanups
  • #772 using latest yahoo-arrow to meet ynodejs08 requirement
  • #773 [docs] Reviewed doc output for malformed HTML from bad reST, updated the logging config
  • #774 add descriptor option to arrow command as a workaround of ynodejs08 bug
  • #775 rm & from test case name as it causes parsing error on CI
  • #776 update app starting command so that args are dynamically added
  • #777 rm sections supporting run app parallelly as it causes hanging on CI
  • #781 contextualizing seed and groups->app settings
  • #782 [docs] Copy edited the entire developer guide documentation.
  • #786 fix for developerguide func tests
  • #787 add an arrow workaround to fix failures in old version firefox
  • #788 adjusting requirements to fix usecase-preattachbinder and usecase-preinit func tests
  • #789 small syntax changes to attempt to fix the jenkins jobs
  • #790 fix tests as some german chars are not supported

0.4.9-2

06 Aug 23:51
Compare
Choose a tag to compare

Notes

  • Command line warning and error output used to go to stdout, they now go to stderr.
  • Version 0.4.9-2 fixes the output of the test coverage report for mojito test -c app ., which was incorrect for 0.4.9.

Features

  • e7cd3576 New mojito build hybridapp, requires snapshot name and tag options.

Fixes

  • 38666f41 Add yuitest-coverage dependency.
  • 6ddbcf33 Add yaml suport, including work from pr580 and pr670.
  • df6149b2 Fix bz4404935, including work from pr580 and pr670
  • 2bcece17 Non-functional changes to cli fixes issue #715 typo in info error msg.
  • b7d2f401 Fix bz5895425 resources for hybridapp/crt were 500/not found as web app.
  • 3fd55c9f Fix bz5904449 garbled console output on node 0.8+ if process.stdout is not a tty (i.e. a pipe) the console.log interpreted…
  • c00e29de Fix bz5898249 merge source application.json's build.hybridapp.packages object into the build's ./appname/package.json dependencies…
  • b2c6599f Fix bz5472979 server resources in build server affinity resources do not need to be uri addressable. with this change store.getAllUrls()…
  • 16a6a174 Fix bz5886351 cli bin/mojito uses wrong copy.
  • 41ed40b3 Fix bz5892364 (archetype) mojito-client not loaded for hybdridapp.
  • 4def6d6f Fix bz5886351 cli: bin/mojito launches wrong copy the cli entry point bin/mojito should always load and run the code.

0.4.9

06 Aug 23:50
Compare
Choose a tag to compare

Notes

  • Command line warning and error output used to go to stdout, they now go to stderr.
  • Version 0.4.9-2 fixes the output of the test coverage report for mojito test -c app ., which was incorrect for 0.4.9.

Features

  • e7cd3576 New mojito build hybridapp, requires snapshot name and tag options.

Fixes

  • 38666f41 Add yuitest-coverage dependency.
  • 6ddbcf33 Add yaml suport, including work from pr580 and pr670.
  • df6149b2 Fix bz4404935, including work from pr580 and pr670
  • 2bcece17 Non-functional changes to cli fixes issue #715 typo in info error msg.
  • b7d2f401 Fix bz5895425 resources for hybridapp/crt were 500/not found as web app.
  • 3fd55c9f Fix bz5904449 garbled console output on node 0.8+ if process.stdout is not a tty (i.e. a pipe) the console.log interpreted…
  • c00e29de Fix bz5898249 merge source application.json's build.hybridapp.packages object into the build's ./appname/package.json dependencies…
  • b2c6599f Fix bz5472979 server resources in build server affinity resources do not need to be uri addressable. with this change store.getAllUrls()…
  • 16a6a174 Fix bz5886351 cli bin/mojito uses wrong copy.
  • 41ed40b3 Fix bz5892364 (archetype) mojito-client not loaded for hybdridapp.
  • 4def6d6f Fix bz5886351 cli: bin/mojito launches wrong copy the cli entry point bin/mojito should always load and run the code.

0.5.0pr4

06 Aug 23:26
Compare
Choose a tag to compare
0.5.0pr4 Pre-release
Pre-release

This is a special preview release of Mojito 0.5.0. It incorporates some significant re-architecting for performance. There are a few significant changes that break backwards compatibility, see below.

!!! NOTE !!! This release DOES NOT pass our functional tests. This started as a rough prototype, and we're still cleaning it up.

Compatibility Changes

  1. Action "reaper" now imposes a timeout on dispatched actions.

With this release there is a new timeout imposed on dispatched actions. Actions must call ac.done() or ac.error() before the timer expires or the system will log a warning and invoke ac.error() with a Timeout error.

You can change the default timeout value of 60000ms (60 seconds) by setting the actionTimeout parameter in your application configuration.

  • shareYUIInstance in application.json flag is gone
  • dependencyCalculations in yui in application.json flag is gone

Fixes

  • #692 fix bz 5904449 garbled console output on node 0.8+
  • #697 Static handler and combo consolidation
  • #702 app group consolidation
  • #711 Fix missing var from commit b2436bbd
  • #713 [SHAKER] added the ability to attach assets to a view
  • #716 fixed a couple of functional tests
  • #720 optimizing the cache key for instances by relying on type and base only
  • #723 include the necessary jar files, and fix test for "-tests" modules
  • #725 fixing unit tests
  • #726 fixed unit tests (again)

Acknowledgements

Special thanks to @dferreiroval for his contributions to this release!

0.5.0pr3

06 Aug 23:30
Compare
Choose a tag to compare
0.5.0pr3 Pre-release
Pre-release

This is a special preview release of Mojito 0.5.0. It incorporates some significant re-architecting for performance. There are a few significant changes that break backwards compatibility, see below.

!!! NOTE !!! This release DOES NOT pass our functional tests. This started as a rough prototype, and we're still cleaning it up.

Compatibility Changes

1. Controller from singleton back to instantiable

In PR1 we made a drastic change that was meant to be re-evaluated, and we just did. As a result, Controllers are back to their 0.4.x form. Essentially, controllers will be instantiated per request, per Mojito instance, which means you can use them to store request-specific information without that information bleeding between mojit instances and requests. The init method is not available anymore though. Here is an example:

    YUI.add('Foo', function(Y, NAME) {

        Y.namespace('mojito.controllers')[NAME] = {

            index: function(ac) {
                // this.foo = "provides a nice mechanism to store instance data."
            }

        };

    }, '0.0.1', {requires: ['mojito']});

2. mojito test no longer tests the framework

In the past, mojito test without any other parameter was running all unit tests for mojito framework, and this is no longer the case. We moved all the tests to arrow, more details here: https://github.com/yahoo/mojito/tree/develop/tests

You can continue using mojito test app path/to/app and mojito test mojit path/to/mojit, and the behavior is still the same.

Note: this change is only relevant for contributors.

Fixes

  • #636 store sandbox using yui-sandbox
  • #638 FIX static-handler middleware for well known files
  • #646 Clean up of expanded instance
  • #651 Expand instances are bleeding
  • #654 upgrading to YUI 3.7.3 to support Win8 runtimes
  • #655 merge develop into develop-perf
  • #663 [fix gh 651] prevent expansion of config + unit tests
  • #664 instance cleanup
  • #673 Relocate store.server.js and related files/tests.
  • #674 fixed unit tests
  • #675 More functests fixes
  • #676 restoring controller as instance rather than singleton
  • #677 optionally log some memory usage info
  • #678 Clean lib/tests
  • #682 More unit test fixes
  • #685 moved YUI loader config from combo-handler to addons/rs/yui
  • #688 fixed instances of yui.config.config
  • #689 yui sandbox fixes
  • #690 when deploying the seed, using the closest language
  • #691 fixed bleed between loader and our use of its results
  • #706 fix for mojito test app with coverage (updates pr703)