An ember-cli addon to test against multiple bower dependencies, such as ember and ember-data.
Last updated a month ago by rwjblue .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ember-try 
SYNC missed versions from official npm registry.


npm version Build Status Ember Observer Score Build status Code Climate Test Coverage

An ember-cli addon to test against multiple bower and npm dependencies, such as ember and ember-data.


ember install ember-try


This addon provides a few commands:

ember try:each

This command will run ember test or the configured command with each scenario's specified in the config and exit appropriately.

This command is especially useful to use on CI to test against multiple ember versions.

In order to use an alternate config path or to group various scenarios together in a single try:each run, you can use the --config-path option.

  ember try:each --config-path="config/legacy-scenarios.js"

If you need to know the scenario that is being run (i.e. to customize a test output file name) you can use the EMBER_TRY_CURRENT_SCENARIO environment variable.

ember try:one <scenario> (...options) --- <command (Default: ember test)>

This command will run any ember-cli command with the specified scenario. The command will default to ember test, if no command is specified on the command-line or in configuration.

For example:

  ember try:one ember-1.11-with-ember-data-beta-16 --- ember test --reporter xunit


  ember try:one ember-1.11-with-ember-data-beta-16 --- ember serve

When running in a CI environment where changes are discarded you can skip resetting your environment back to its original state by specifying --skip-cleanup=true as an option to ember try. Warning: If you use this option and, without cleaning up, build and deploy as the result of a passing test suite, it will build with the last set of dependencies ember try was run with.

  ember try:one ember-1.11 --skip-cleanup=true --- ember test

In order to use an alternate config path or to group various scenarios, you can use the --config-path option.

  ember try:one ember-1.13 --config-path="config/legacy-scenarios.js"

ember try:reset

This command restores the original bower.json from bower.json.ember-try, package.json from package.json.ember-try, rm -rfs bower_components and node_components and runs bower install and npm install. For use if any of the other commands fail to clean up after (they run this by default on completion).

ember try:ember <semver-string>

Runs ember test or the command in config for each version of Ember that is possible under the semver string given. Configuration follows the rules given under the versionCompatibility heading below.

ember try:config

Displays the configuration that will be used. Also takes an optional --config-path.



If you're using ember-try with an Ember addon, there is a short cut to test many Ember versions. In your package.json under the ember-addon key, add the following:

  "ember-addon": {
    "versionCompatibility": {
       "ember": ">1.11.0 <=2.0.0"

The value for "ember" can be any valid semver statement. This will autogenerate scenarios for each version of Ember that matches the statement. It will also include scenarios for beta and canary channels of Ember that will be allowed to fail. These scenarios will ONLY be used if scenarios is NOT a key in the configuration file being used. If useVersionCompatibility is set to true in the config file, the autogenerated scenarios will deep merge with any scenarios in the config file. For example, you could override just the allowedToFail property of the ember-beta scenario.

To keep this from getting out of hand, ember-try will limit the versions of Ember used to the lasted point release per minor version. For example, ">1.11.0 <=2.0.0", would (as of writing) run with versions ['1.11.4', '1.12.2', '1.13.13', '2.0.0'].

As of v1.0.0, This will only work for projects starting with ember provided by npm, not bower.

Configuration Files

Configuration will be read from a file in your ember app in config/ember-try.js. Here are the possible options:

/*jshint node:true*/

module.exports = function() {
  return {
      `command` - a single command that, if set, will be the default command used by `ember-try`.
      P.S. The command doesn't need to be an `ember <something>` command, they can be anything.
      Keep in mind that this config file is JavaScript, so you can code in here to determine the command.
    command: 'ember test --reporter xunit',
      `bowerOptions` - options to be passed to `bower`.
    bowerOptions: ['--allow-root=true'],
      `npmOptions` - options to be passed to `npm`.
    npmOptions: ['--loglevel=silent', '--no-shrinkwrap=true'],
      If set to true, the `versionCompatibility` key under `ember-addon` in `package.json` will be used to
      automatically generate scenarios that will deep merge with any in this configuration file.
    useVersionCompatibility: true,
      If set to true, all npm scenarios will use `yarn` for install with the `--no-lockfile` option. At cleanup, your
      dependencies will be restored to their prior state.
    useYarn: true,

      buildManagerOptions allows you to opt-out of the default options such as `--ignore-engines --no-lockfile`.
      The buildManagerOptions function is aware of each scenario so you can customize your options.
    buildManagerOptions(scenario) {
      return ['--ignore-engines'];

    scenarios: [
        name: 'Ember 1.10 with ember-data',

          `command` can also be overridden at the scenario level.
        command: 'ember test --filter ember-1-10',
        bower: {
          dependencies: {
            'ember': '1.10.0',
            'ember-data': '1.0.0-beta.15'
          When writing scenarios that depend upon ember versions supplied by bower, you must explictly remove the
          npm ember-source dependency if your addon defines an ember-source in its own package.json devDependencies
        npm: {
          devDependencies: {
            'ember-source': null
        name: 'Ember 2.11.0',
          `env` can be set per scenario, with environment variables to set for the command being run.
          This will be merged with process.env
        env: {
          ENABLE_NEW_DASHBOARD: true
        npm: {
          devDependencies: {
            'ember-source': '2.11.0'
            When `useYarn` is true, you can optionally define yarn resolutions to enforce a
            specific dependency version to be installed. This is useful if other libraries
            you depend on include different versions of a package.
          resolutions: {
            'lodash': '5.0.0'
            In order to easily test multiple editions ember-try merges any `ember` property specified
            into the applications `package.json`. Values specified in the ember-try configuration will
            override values that pre-existed in the original `package.json`.
          ember: {
            'edition': 'octane'
        name: 'Ember canary with Ember-Data 2.3.0',
          `allowedToFail` - If true, if this scenario fails it will not fail the entire try command.
        allowedToFail: true,
        npm: {
          devDependencies: {
            'ember-data': '2.3.0',

            // you can remove any package by marking `null`
            'some-optional-package': null
        bower: {
          dependencies: {
            'ember': 'components/ember#canary'
          resolutions: {
            'ember': 'canary'
        name: 'Ember beta',
        bower: {
          dependencies: {
            'ember': 'components/ember#beta'
          resolutions: { // Resolutions are only necessary when they do not match the version specified in `dependencies`
            'ember': 'beta'

Scenarios are sets of dependencies (bower and npm only). They can be specified exactly as in the bower.json or package.json The name can be used to try just one scenario using the ember try:one command.


If you include useYarn: true in your ember-try config, all npm scenarios will use yarn for install with the --no-lockfile option. At cleanup, your dependencies will be restored to their prior state.

A note on npm scenarios with lockfiles

Lockfiles are ignored by ember-try. (yarn will run with --no-lockfile and npm will be run with --no-shrinkwrap). When testing various scenarios, it's important to "float" dependencies so that the scenarios are run with the latest satisfying versions of dependencies a user of the project would get.


If you include useWorkspaces: true in your ember-try config, ember-try will apply the diff to each individual workspace specified in package.json, allowing you to try scenarios in monorepo style repositories. See Yarn's documentation of workspaces for more details.


How to use EmberTry

See an example of using ember-try for CI here, and the resulting build output.

Special Thanks

  • Much credit is due to Edward Faulkner The scripts in liquid-fire that test against multiple ember versions were the inspiration for this project.


  • Be sure to run npm link and npm link ember-try, otherwise any ember try commands you run will use the version of ember-try included by ember-cli itself.

Current Tags

  • 1.0.0-beta.3                                ...           beta (2 years ago)
  • 1.4.0                                ...           latest (a month ago)

46 Versions

  • 1.4.0                                ...           a month ago
  • 1.3.0                                ...           2 months ago
  • 1.2.1                                ...           8 months ago
  • 1.2.0                                ...           8 months ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 1.0.0-beta.6                                ...           a year ago
  • 1.0.0-beta.3                                ...           2 years ago
  • 1.0.0-beta.1                                ...           2 years ago
  • 1.0.0-beta.0                                ...           2 years ago
  • 0.2.23                                ...           2 years ago
  • 0.2.22                                ...           2 years ago
  • 0.2.21                                ...           2 years ago
  • 0.2.20                                ...           2 years ago
  • 0.2.19                                ...           2 years ago
  • 0.2.18                                ...           2 years ago
  • 0.2.17                                ...           2 years ago
  • 0.2.16                                ...           3 years ago
  • 0.2.15                                ...           3 years ago
  • 0.2.14                                ...           3 years ago
  • 0.2.13                                ...           3 years ago
  • 0.2.12                                ...           3 years ago
  • 0.2.11                                ...           3 years ago
  • 0.2.10                                ...           3 years ago
  • 0.2.9                                ...           3 years ago
  • 0.2.8                                ...           3 years ago
  • 0.2.7                                ...           3 years ago
  • 0.2.6                                ...           3 years ago
  • 0.2.5                                ...           3 years ago
  • 0.2.4                                ...           4 years ago
  • 0.2.3                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Today 0
This Week 0
This Month 188
Last Day 0
Last Week 53
Last Month 442
Dependencies (13)

Copyright 2014 - 2016 © taobao.org |