ember-try 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -4
- package/README.md +31 -52
- package/index.js +2 -2
- package/lib/commands/config.js +8 -8
- package/lib/commands/reset.js +8 -10
- package/lib/commands/try-each.js +14 -16
- package/lib/commands/try-ember.js +16 -19
- package/lib/commands/try-one.js +23 -28
- package/lib/dependency-manager-adapters/npm.js +169 -70
- package/lib/dependency-manager-adapters/pnpm.js +170 -0
- package/lib/dependency-manager-adapters/workspace.js +60 -42
- package/lib/tasks/reset.js +9 -2
- package/lib/tasks/try-each.js +78 -67
- package/lib/utils/config.js +54 -64
- package/lib/utils/dependency-manager-adapter-factory.js +28 -9
- package/lib/utils/find-ember-path.js +7 -8
- package/lib/utils/result-summary.js +15 -3
- package/lib/utils/run-command.js +15 -20
- package/lib/utils/run.js +11 -11
- package/lib/utils/scenario-manager.js +18 -29
- package/package.json +70 -63
- package/.codeclimate.yml +0 -17
- package/config/environment.js +0 -5
- package/lib/dependency-manager-adapters/bower.js +0 -198
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v2.0.0 (2021-11-04)
|
|
4
|
+
|
|
5
|
+
#### :boom: Breaking Change
|
|
6
|
+
* [#586](https://github.com/ember-cli/ember-try/pull/586) Drop support for scenarios with bower. ([@rwjblue](https://github.com/rwjblue))
|
|
7
|
+
|
|
8
|
+
#### :rocket: Enhancement
|
|
9
|
+
* [#787](https://github.com/ember-cli/ember-try/pull/787) Implement `pnpm` adapter ([@Turbo87](https://github.com/Turbo87))
|
|
10
|
+
* [#143](https://github.com/ember-cli/ember-try/pull/143) Remove requirement to have dependency managers. ([@rwjblue](https://github.com/rwjblue))
|
|
11
|
+
* [#585](https://github.com/ember-cli/ember-try/pull/585) Use `ember-addon.configPath` from `package.json` if defined. ([@rwjblue](https://github.com/rwjblue))
|
|
12
|
+
|
|
13
|
+
#### :bug: Bug Fix
|
|
14
|
+
* [#467](https://github.com/ember-cli/ember-try/pull/467) Ensure Yarn Workspace adapter supports `ember try:reset`. ([@rwjblue](https://github.com/rwjblue))
|
|
15
|
+
* [#463](https://github.com/ember-cli/ember-try/pull/463) Handle additional `yarn` workspace definition formats ([@BarryThePenguin](https://github.com/BarryThePenguin))
|
|
16
|
+
|
|
17
|
+
#### :house: Internal
|
|
18
|
+
* [#745](https://github.com/ember-cli/ember-try/pull/745) CI: Remove job schedule ([@Turbo87](https://github.com/Turbo87))
|
|
19
|
+
* [#596](https://github.com/ember-cli/ember-try/pull/596) Remove unused devDeps and addon blueprint files. ([@rwjblue](https://github.com/rwjblue))
|
|
20
|
+
* [#595](https://github.com/ember-cli/ember-try/pull/595) Add Prettier to linting configuration. ([@rwjblue](https://github.com/rwjblue))
|
|
21
|
+
* [#593](https://github.com/ember-cli/ember-try/pull/593) Migrate Windows smoke test to GitHub Actions. ([@rwjblue](https://github.com/rwjblue))
|
|
22
|
+
* [#587](https://github.com/ember-cli/ember-try/pull/587) Add release automation setup. ([@rwjblue](https://github.com/rwjblue))
|
|
23
|
+
* [#594](https://github.com/ember-cli/ember-try/pull/594) Limit SemVer range smoke test to > 2.16 < 3.0.0. ([@rwjblue](https://github.com/rwjblue))
|
|
24
|
+
* [#584](https://github.com/ember-cli/ember-try/pull/584) Use matrix builds to speed up all commands smoke tests ([@rwjblue](https://github.com/rwjblue))
|
|
25
|
+
|
|
26
|
+
#### Committers: 4
|
|
27
|
+
- Jonathan Haines ([@BarryThePenguin](https://github.com/BarryThePenguin))
|
|
28
|
+
- Robert Jackson ([@rwjblue](https://github.com/rwjblue))
|
|
29
|
+
- Sergey Astapov ([@SergeAstapov](https://github.com/SergeAstapov))
|
|
30
|
+
- Tobias Bieniek ([@Turbo87](https://github.com/Turbo87))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [v1.4.0](https://github.com/ember-cli/ember-try/tree/v1.4.0)
|
|
34
|
+
|
|
35
|
+
[Full Changelog](https://github.com/ember-cli/ember-try/compare/v1.3.0...v1.4.0)
|
|
36
|
+
|
|
37
|
+
**Implemented enhancements:**
|
|
38
|
+
|
|
39
|
+
- Add support for merging/clobbering `ember` in `package.json`. [\#429](https://github.com/ember-c
|
|
40
|
+
li/ember-try/pull/429) ([rwjblue](https://github.com/rwjblue))
|
|
41
|
+
|
|
42
|
+
## [v1.3.0](https://github.com/ember-cli/ember-try/tree/v1.3.0)
|
|
43
|
+
|
|
44
|
+
[Full Changelog](https://github.com/ember-cli/ember-try/compare/v1.2.1...v1.3.0)
|
|
45
|
+
|
|
46
|
+
**Merged pull requests:**
|
|
47
|
+
|
|
48
|
+
- Add support for opting out of `--ignore-lockfile` file [\#409](https://github.com/ember-cli/ember-try/pull/409) ([huyphamily](https://github.com/huyphamily))
|
|
49
|
+
- Deprecate `bower` support [\#402](https://github.com/ember-cli/ember-try/pull/402) ([kategengler](https://github.com/kategengler))
|
|
50
|
+
|
|
51
|
+
## [v1.2.1](https://github.com/ember-cli/ember-try/tree/v1.2.1)
|
|
52
|
+
|
|
53
|
+
[Full Changelog](https://github.com/ember-cli/ember-try/compare/v1.2.0...v1.2.1)
|
|
54
|
+
|
|
55
|
+
**Merged pull requests:**
|
|
56
|
+
|
|
57
|
+
- Fix support for `npm` >= 5 [\#281](https://github.com/ember-cli/ember-try/pull/281) ([mansona](https://github.com/mansona))
|
|
2
58
|
|
|
3
59
|
## [v1.2.0](https://github.com/ember-cli/ember-try/tree/v1.2.0)
|
|
4
60
|
|
|
@@ -540,6 +596,3 @@
|
|
|
540
596
|
- Consistent quotes [\#1](https://github.com/ember-cli/ember-try/pull/1) ([jbrown](https://github.com/jbrown))
|
|
541
597
|
|
|
542
598
|
## [v0.0.1](https://github.com/ember-cli/ember-try/tree/v0.0.1) (2015-03-24)
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# ember-try
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/js/ember-try) [](https://badge.fury.io/js/ember-try) [](https://github.com/ember-cli/ember-try/actions/workflows/ci.yml?query=branch%3Amaster) [](http://emberobserver.com/addons/ember-try) [](https://ci.appveyor.com/project/kategengler/ember-try/branch/master) [](https://codeclimate.com/github/ember-cli/ember-try) [](https://codecov.io/gh/ember-cli/ember-try)
|
|
4
4
|
|
|
5
|
-
An ember-cli addon to test against multiple
|
|
5
|
+
An ember-cli addon to test against multiple dependencies, such as `ember` and `ember-data`.
|
|
6
6
|
|
|
7
7
|
### Installation
|
|
8
8
|
|
|
@@ -61,7 +61,7 @@ In order to use an alternate config path or to group various scenarios, you can
|
|
|
61
61
|
|
|
62
62
|
#### `ember try:reset`
|
|
63
63
|
|
|
64
|
-
This command restores the original `
|
|
64
|
+
This command restores the original `package.json` from `package.json.ember-try`, `rm -rf`s `node_modules` and runs `npm install`. For use if any of the other commands fail to clean up after (they run this by default on completion).
|
|
65
65
|
|
|
66
66
|
#### `ember try:ember <semver-string>`
|
|
67
67
|
|
|
@@ -79,7 +79,7 @@ If you're using `ember-try` with an Ember addon, there is a short cut to test ma
|
|
|
79
79
|
```json
|
|
80
80
|
"ember-addon": {
|
|
81
81
|
"versionCompatibility": {
|
|
82
|
-
"ember": ">
|
|
82
|
+
"ember": ">2.18.0 < 4.0.0"
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
```
|
|
@@ -91,16 +91,14 @@ If `useVersionCompatibility` is set to `true` in the config file, the autogenera
|
|
|
91
91
|
|
|
92
92
|
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'].
|
|
93
93
|
|
|
94
|
-
As of v1.0.0, This will only work for projects starting with ember provided by npm, not bower.
|
|
95
|
-
|
|
96
94
|
##### Configuration Files
|
|
97
95
|
|
|
98
96
|
Configuration will be read from a file in your ember app in `config/ember-try.js`. Here are the possible options:
|
|
99
97
|
|
|
100
98
|
```js
|
|
101
|
-
|
|
99
|
+
const getChannelURL = require('ember-source-channel-url');
|
|
102
100
|
|
|
103
|
-
module.exports = function() {
|
|
101
|
+
module.exports = async function() {
|
|
104
102
|
return {
|
|
105
103
|
/*
|
|
106
104
|
`command` - a single command that, if set, will be the default command used by `ember-try`.
|
|
@@ -108,10 +106,6 @@ module.exports = function() {
|
|
|
108
106
|
Keep in mind that this config file is JavaScript, so you can code in here to determine the command.
|
|
109
107
|
*/
|
|
110
108
|
command: 'ember test --reporter xunit',
|
|
111
|
-
/*
|
|
112
|
-
`bowerOptions` - options to be passed to `bower`.
|
|
113
|
-
*/
|
|
114
|
-
bowerOptions: ['--allow-root=true'],
|
|
115
109
|
/*
|
|
116
110
|
`npmOptions` - options to be passed to `npm`.
|
|
117
111
|
*/
|
|
@@ -126,30 +120,16 @@ module.exports = function() {
|
|
|
126
120
|
dependencies will be restored to their prior state.
|
|
127
121
|
*/
|
|
128
122
|
useYarn: true,
|
|
129
|
-
scenarios: [
|
|
130
|
-
{
|
|
131
|
-
name: 'Ember 1.10 with ember-data',
|
|
132
123
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
/*
|
|
144
|
-
When writing scenarios that depend upon ember versions supplied by bower, you must explictly remove the
|
|
145
|
-
npm ember-source dependency if your addon defines an ember-source in its own package.json devDependencies
|
|
146
|
-
*/
|
|
147
|
-
npm: {
|
|
148
|
-
devDependencies: {
|
|
149
|
-
'ember-source': null
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
},
|
|
124
|
+
/*
|
|
125
|
+
buildManagerOptions allows you to opt-out of the default options such as `--ignore-engines --no-lockfile`.
|
|
126
|
+
The buildManagerOptions function is aware of each scenario so you can customize your options.
|
|
127
|
+
*/
|
|
128
|
+
buildManagerOptions(scenario) {
|
|
129
|
+
return ['--ignore-engines'];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
scenarios: [
|
|
153
133
|
{
|
|
154
134
|
name: 'Ember 2.11.0',
|
|
155
135
|
/*
|
|
@@ -171,6 +151,14 @@ module.exports = function() {
|
|
|
171
151
|
resolutions: {
|
|
172
152
|
'lodash': '5.0.0'
|
|
173
153
|
}
|
|
154
|
+
/*
|
|
155
|
+
In order to easily test multiple editions ember-try merges any `ember` property specified
|
|
156
|
+
into the applications `package.json`. Values specified in the ember-try configuration will
|
|
157
|
+
override values that pre-existed in the original `package.json`.
|
|
158
|
+
*/
|
|
159
|
+
ember: {
|
|
160
|
+
'edition': 'octane'
|
|
161
|
+
}
|
|
174
162
|
}
|
|
175
163
|
},
|
|
176
164
|
{
|
|
@@ -183,36 +171,27 @@ module.exports = function() {
|
|
|
183
171
|
devDependencies: {
|
|
184
172
|
'ember-data': '2.3.0',
|
|
185
173
|
|
|
174
|
+
'ember-source': await getChannelURL('canary')
|
|
175
|
+
|
|
186
176
|
// you can remove any package by marking `null`
|
|
187
177
|
'some-optional-package': null
|
|
188
178
|
}
|
|
189
179
|
},
|
|
190
|
-
bower: {
|
|
191
|
-
dependencies: {
|
|
192
|
-
'ember': 'components/ember#canary'
|
|
193
|
-
},
|
|
194
|
-
resolutions: {
|
|
195
|
-
'ember': 'canary'
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
180
|
},
|
|
199
181
|
{
|
|
200
|
-
name: '
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
'ember': '
|
|
204
|
-
},
|
|
205
|
-
resolutions: { // Resolutions are only necessary when they do not match the version specified in `dependencies`
|
|
206
|
-
'ember': 'beta'
|
|
182
|
+
name: 'ember-beta',
|
|
183
|
+
npm: {
|
|
184
|
+
devDependencies: {
|
|
185
|
+
'ember-source': await getChannelURL('beta')
|
|
207
186
|
}
|
|
208
187
|
}
|
|
209
|
-
}
|
|
188
|
+
},
|
|
210
189
|
]
|
|
211
190
|
};
|
|
212
191
|
};
|
|
213
192
|
```
|
|
214
193
|
|
|
215
|
-
Scenarios are sets of dependencies
|
|
194
|
+
Scenarios are sets of dependencies. They can be specified exactly as in the `package.json`
|
|
216
195
|
The `name` can be used to try just one scenario using the `ember try:one` command.
|
|
217
196
|
|
|
218
197
|
##### Yarn
|
package/index.js
CHANGED
package/lib/commands/config.js
CHANGED
|
@@ -6,16 +6,16 @@ module.exports = {
|
|
|
6
6
|
name: 'try:config',
|
|
7
7
|
description: 'Displays the config that will be used',
|
|
8
8
|
works: 'insideProject',
|
|
9
|
-
availableOptions: [
|
|
10
|
-
{ name: 'config-path', type: String, default: 'config/ember-try.js' },
|
|
11
|
-
],
|
|
9
|
+
availableOptions: [{ name: 'config-path', type: String }],
|
|
12
10
|
|
|
13
|
-
run(commandOptions) {
|
|
14
|
-
let command = this;
|
|
11
|
+
async run(commandOptions) {
|
|
15
12
|
debug('Options:\n', commandOptions);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
|
|
14
|
+
let config = await require('../utils/config')({
|
|
15
|
+
project: this.project,
|
|
16
|
+
configPath: commandOptions.configPath,
|
|
19
17
|
});
|
|
18
|
+
|
|
19
|
+
this.ui.writeLine(JSON.stringify(config, null, 2));
|
|
20
20
|
},
|
|
21
21
|
};
|
package/lib/commands/reset.js
CHANGED
|
@@ -5,18 +5,16 @@ module.exports = {
|
|
|
5
5
|
description: 'Resets dependencies to their committed state. For when things get messy.',
|
|
6
6
|
works: 'insideProject',
|
|
7
7
|
|
|
8
|
-
run() {
|
|
9
|
-
let
|
|
10
|
-
let getConfig = require('../utils/config')({ project: this.project });
|
|
8
|
+
async run() {
|
|
9
|
+
let config = await require('../utils/config')({ project: this.project });
|
|
11
10
|
let ResetTask = require('../tasks/reset');
|
|
12
|
-
return getConfig.then((config) => {
|
|
13
|
-
let resetTask = new ResetTask({
|
|
14
|
-
ui: command.ui,
|
|
15
|
-
project: command.project,
|
|
16
|
-
config,
|
|
17
|
-
});
|
|
18
11
|
|
|
19
|
-
|
|
12
|
+
let resetTask = new ResetTask({
|
|
13
|
+
ui: this.ui,
|
|
14
|
+
project: this.project,
|
|
15
|
+
config,
|
|
20
16
|
});
|
|
17
|
+
|
|
18
|
+
return await resetTask.run();
|
|
21
19
|
},
|
|
22
20
|
};
|
package/lib/commands/try-each.js
CHANGED
|
@@ -3,36 +3,34 @@ const debug = require('debug')('ember-try:commands:try-each');
|
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
name: 'try:each',
|
|
6
|
-
description:
|
|
6
|
+
description:
|
|
7
|
+
'Runs each of the dependency scenarios specified in config with the specified command. The command defaults to `ember test`',
|
|
7
8
|
works: 'insideProject',
|
|
8
9
|
|
|
9
10
|
availableOptions: [
|
|
10
|
-
{ name: 'skip-cleanup',
|
|
11
|
-
{ name: 'config-path', type: String
|
|
11
|
+
{ name: 'skip-cleanup', type: Boolean, default: false },
|
|
12
|
+
{ name: 'config-path', type: String },
|
|
12
13
|
],
|
|
13
14
|
|
|
14
15
|
_getConfig: require('../utils/config'),
|
|
15
16
|
_TryEachTask: require('../tasks/try-each'),
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
async run(commandOptions) {
|
|
18
19
|
debug('Options:\n', commandOptions);
|
|
19
20
|
|
|
20
|
-
let
|
|
21
|
-
project:
|
|
21
|
+
let config = await this._getConfig({
|
|
22
|
+
project: this.project,
|
|
22
23
|
configPath: commandOptions.configPath,
|
|
23
24
|
});
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
debug('Config: %s', JSON.stringify(config));
|
|
27
|
-
|
|
28
|
-
let tryEachTask = new command._TryEachTask({
|
|
29
|
-
ui: command.ui,
|
|
30
|
-
project: command.project,
|
|
31
|
-
config,
|
|
32
|
-
});
|
|
26
|
+
debug('Config: %s', JSON.stringify(config));
|
|
33
27
|
|
|
34
|
-
|
|
28
|
+
let tryEachTask = new this._TryEachTask({
|
|
29
|
+
ui: this.ui,
|
|
30
|
+
project: this.project,
|
|
31
|
+
config,
|
|
35
32
|
});
|
|
36
33
|
|
|
34
|
+
return await tryEachTask.run(config.scenarios, { skipCleanup: commandOptions.skipCleanup });
|
|
37
35
|
},
|
|
38
36
|
};
|
|
@@ -4,45 +4,42 @@ const debug = require('debug')('ember-try:commands:try-ember');
|
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
6
|
name: 'try:ember',
|
|
7
|
-
description:
|
|
7
|
+
description:
|
|
8
|
+
'Runs with each Ember version matching the semver statement given. The command defaults to `ember test`',
|
|
8
9
|
works: 'insideProject',
|
|
9
10
|
|
|
10
|
-
anonymousOptions: [
|
|
11
|
-
'<ember-semver-statement>',
|
|
12
|
-
],
|
|
11
|
+
anonymousOptions: ['<ember-semver-statement>'],
|
|
13
12
|
|
|
14
13
|
availableOptions: [
|
|
15
|
-
{ name: 'skip-cleanup',
|
|
16
|
-
{ name: 'config-path', type: String
|
|
14
|
+
{ name: 'skip-cleanup', type: Boolean, default: false },
|
|
15
|
+
{ name: 'config-path', type: String },
|
|
17
16
|
],
|
|
18
17
|
|
|
19
18
|
_getConfig: require('../utils/config'),
|
|
20
19
|
_TryEachTask: require('../tasks/try-each'),
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
|
|
21
|
+
async run(commandOptions, rawArgs) {
|
|
23
22
|
let emberVersion = rawArgs[0];
|
|
24
23
|
|
|
25
24
|
debug('Options:\n', commandOptions);
|
|
26
25
|
debug('Ember semver statement', emberVersion);
|
|
27
26
|
|
|
28
|
-
let
|
|
29
|
-
project:
|
|
27
|
+
let config = await this._getConfig({
|
|
28
|
+
project: this.project,
|
|
30
29
|
configPath: commandOptions.configPath,
|
|
31
30
|
versionCompatibility: {
|
|
32
31
|
ember: emberVersion,
|
|
33
32
|
},
|
|
34
33
|
});
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
debug('Config: %s', JSON.stringify(config));
|
|
35
|
+
debug('Config: %s', JSON.stringify(config));
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
return tryEachTask.run(config.scenarios, { skipCleanup: commandOptions.skipCleanup });
|
|
37
|
+
let tryEachTask = new this._TryEachTask({
|
|
38
|
+
ui: this.ui,
|
|
39
|
+
project: this.project,
|
|
40
|
+
config,
|
|
46
41
|
});
|
|
42
|
+
|
|
43
|
+
return await tryEachTask.run(config.scenarios, { skipCleanup: commandOptions.skipCleanup });
|
|
47
44
|
},
|
|
48
45
|
};
|
package/lib/commands/try-one.js
CHANGED
|
@@ -5,16 +5,15 @@ const debug = require('debug')('ember-try:commands:try-one');
|
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
7
|
name: 'try:one',
|
|
8
|
-
description:
|
|
8
|
+
description:
|
|
9
|
+
'Run any `ember` command with the specified dependency scenario. This optional command is preceded by " --- " and will default to `ember test`',
|
|
9
10
|
works: 'insideProject',
|
|
10
11
|
|
|
11
|
-
anonymousOptions: [
|
|
12
|
-
'<scenario>',
|
|
13
|
-
],
|
|
12
|
+
anonymousOptions: ['<scenario>'],
|
|
14
13
|
|
|
15
14
|
availableOptions: [
|
|
16
15
|
{ name: 'skip-cleanup', type: Boolean, default: false },
|
|
17
|
-
{ name: 'config-path', type: String
|
|
16
|
+
{ name: 'config-path', type: String },
|
|
18
17
|
],
|
|
19
18
|
|
|
20
19
|
_getConfig: require('../utils/config'),
|
|
@@ -30,46 +29,42 @@ module.exports = {
|
|
|
30
29
|
return args.slice(separatorIndex + 1);
|
|
31
30
|
},
|
|
32
31
|
|
|
33
|
-
run(commandOptions, rawArgs) {
|
|
34
|
-
let tryOne = this;
|
|
32
|
+
async run(commandOptions, rawArgs) {
|
|
35
33
|
let scenarioName = rawArgs[0];
|
|
36
34
|
|
|
37
35
|
debug('Scenario argument: %s', scenarioName);
|
|
38
36
|
debug('Command options:\n', commandOptions);
|
|
39
37
|
|
|
40
|
-
let commandArgs =
|
|
38
|
+
let commandArgs = this.getCommand();
|
|
41
39
|
|
|
42
40
|
debug('Command specified on command line: %s', commandArgs.join(' '));
|
|
43
41
|
|
|
44
42
|
if (!scenarioName) {
|
|
45
|
-
throw new Error('The `ember try:one` command requires a ' +
|
|
46
|
-
'scenario name to be specified.');
|
|
43
|
+
throw new Error('The `ember try:one` command requires a ' + 'scenario name to be specified.');
|
|
47
44
|
}
|
|
48
45
|
|
|
49
|
-
let
|
|
50
|
-
project:
|
|
46
|
+
let config = await this._getConfig({
|
|
47
|
+
project: this.project,
|
|
51
48
|
configPath: commandOptions.configPath,
|
|
52
49
|
});
|
|
53
50
|
|
|
54
|
-
|
|
55
|
-
debug('Config: %s', JSON.stringify(config));
|
|
56
|
-
|
|
57
|
-
let scenario = findByName(config.scenarios, scenarioName);
|
|
58
|
-
|
|
59
|
-
if (!scenario) {
|
|
60
|
-
throw new Error('The `ember try:one` command requires a scenario ' +
|
|
61
|
-
'specified in the config.');
|
|
62
|
-
}
|
|
51
|
+
debug('Config: %s', JSON.stringify(config));
|
|
63
52
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
config
|
|
68
|
-
|
|
69
|
-
|
|
53
|
+
let scenario = findByName(config.scenarios, scenarioName);
|
|
54
|
+
if (!scenario) {
|
|
55
|
+
throw new Error(
|
|
56
|
+
'The `ember try:one` command requires a scenario ' + 'specified in the config.'
|
|
57
|
+
);
|
|
58
|
+
}
|
|
70
59
|
|
|
71
|
-
|
|
60
|
+
let tryEachTask = new this._TryEachTask({
|
|
61
|
+
ui: this.ui,
|
|
62
|
+
project: this.project,
|
|
63
|
+
config,
|
|
64
|
+
commandArgs,
|
|
72
65
|
});
|
|
66
|
+
|
|
67
|
+
return await tryEachTask.run([scenario], { skipCleanup: commandOptions.skipCleanup });
|
|
73
68
|
},
|
|
74
69
|
|
|
75
70
|
_commandLineArguments() {
|