ember-try 1.4.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 CHANGED
@@ -1,4 +1,34 @@
1
- # Change Log
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
+
2
32
 
3
33
  ## [v1.4.0](https://github.com/ember-cli/ember-try/tree/v1.4.0)
4
34
 
@@ -566,6 +596,3 @@ li/ember-try/pull/429) ([rwjblue](https://github.com/rwjblue))
566
596
  - Consistent quotes [\#1](https://github.com/ember-cli/ember-try/pull/1) ([jbrown](https://github.com/jbrown))
567
597
 
568
598
  ## [v0.0.1](https://github.com/ember-cli/ember-try/tree/v0.0.1) (2015-03-24)
569
-
570
-
571
- \* *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
- [![npm version](https://badge.fury.io/js/ember-try.svg)](https://badge.fury.io/js/ember-try) [![Build Status](https://travis-ci.org/ember-cli/ember-try.svg?branch=master)](https://travis-ci.org/ember-cli/ember-try) [![Ember Observer Score](http://emberobserver.com/badges/ember-try.svg)](http://emberobserver.com/addons/ember-try) [![Build status](https://ci.appveyor.com/api/projects/status/9sswkni8pfuvo4dv/branch/master?svg=true)](https://ci.appveyor.com/project/kategengler/ember-try/branch/master) [![Code Climate](https://codeclimate.com/github/ember-cli/ember-try/badges/gpa.svg)](https://codeclimate.com/github/ember-cli/ember-try) [![Test Coverage](https://codecov.io/gh/ember-cli/ember-try/branch/master/graph/badge.svg)](https://codecov.io/gh/ember-cli/ember-try)
3
+ [![npm version](https://badge.fury.io/js/ember-try.svg)](https://badge.fury.io/js/ember-try) [![GitHub Actions Build Status](https://github.com/ember-cli/ember-try/workflows/CI/badge.svg)](https://github.com/ember-cli/ember-try/actions/workflows/ci.yml?query=branch%3Amaster) [![Ember Observer Score](http://emberobserver.com/badges/ember-try.svg)](http://emberobserver.com/addons/ember-try) [![Build status](https://ci.appveyor.com/api/projects/status/9sswkni8pfuvo4dv/branch/master?svg=true)](https://ci.appveyor.com/project/kategengler/ember-try/branch/master) [![Code Climate](https://codeclimate.com/github/ember-cli/ember-try/badges/gpa.svg)](https://codeclimate.com/github/ember-cli/ember-try) [![Test Coverage](https://codecov.io/gh/ember-cli/ember-try/branch/master/graph/badge.svg)](https://codecov.io/gh/ember-cli/ember-try)
4
4
 
5
- An ember-cli addon to test against multiple bower and npm dependencies, such as `ember` and `ember-data`.
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 `bower.json` from `bower.json.ember-try`, `package.json` from `package.json.ember-try`, `rm -rf`s `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).
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": ">1.11.0 <=2.0.0"
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
- /*jshint node:true*/
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
  */
@@ -136,29 +130,6 @@ module.exports = function() {
136
130
  }
137
131
 
138
132
  scenarios: [
139
- {
140
- name: 'Ember 1.10 with ember-data',
141
-
142
- /*
143
- `command` can also be overridden at the scenario level.
144
- */
145
- command: 'ember test --filter ember-1-10',
146
- bower: {
147
- dependencies: {
148
- 'ember': '1.10.0',
149
- 'ember-data': '1.0.0-beta.15'
150
- }
151
- },
152
- /*
153
- When writing scenarios that depend upon ember versions supplied by bower, you must explictly remove the
154
- npm ember-source dependency if your addon defines an ember-source in its own package.json devDependencies
155
- */
156
- npm: {
157
- devDependencies: {
158
- 'ember-source': null
159
- }
160
- }
161
- },
162
133
  {
163
134
  name: 'Ember 2.11.0',
164
135
  /*
@@ -200,36 +171,27 @@ module.exports = function() {
200
171
  devDependencies: {
201
172
  'ember-data': '2.3.0',
202
173
 
174
+ 'ember-source': await getChannelURL('canary')
175
+
203
176
  // you can remove any package by marking `null`
204
177
  'some-optional-package': null
205
178
  }
206
179
  },
207
- bower: {
208
- dependencies: {
209
- 'ember': 'components/ember#canary'
210
- },
211
- resolutions: {
212
- 'ember': 'canary'
213
- }
214
- }
215
180
  },
216
181
  {
217
- name: 'Ember beta',
218
- bower: {
219
- dependencies: {
220
- 'ember': 'components/ember#beta'
221
- },
222
- resolutions: { // Resolutions are only necessary when they do not match the version specified in `dependencies`
223
- 'ember': 'beta'
182
+ name: 'ember-beta',
183
+ npm: {
184
+ devDependencies: {
185
+ 'ember-source': await getChannelURL('beta')
224
186
  }
225
187
  }
226
- }
188
+ },
227
189
  ]
228
190
  };
229
191
  };
230
192
  ```
231
193
 
232
- Scenarios are sets of dependencies (`bower` and `npm` only). They can be specified exactly as in the `bower.json` or `package.json`
194
+ Scenarios are sets of dependencies. They can be specified exactly as in the `package.json`
233
195
  The `name` can be used to try just one scenario using the `ember try:one` command.
234
196
 
235
197
  ##### Yarn
package/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  module.exports = {
4
4
  name: 'ember-try',
5
5
 
6
- includedCommands: function() {
6
+ includedCommands() {
7
7
  return require('./lib/commands');
8
- }
8
+ },
9
9
  };
@@ -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
- let getConfig = require('../utils/config')({ project: this.project, configPath: commandOptions.configPath });
17
- return getConfig.then((config) => {
18
- command.ui.writeLine(JSON.stringify(config, null, 2));
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
  };
@@ -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 command = this;
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
- return resetTask.run();
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
  };
@@ -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: 'Runs each of the dependency scenarios specified in config with the specified command. The command defaults to `ember test`',
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', type: Boolean, default: false },
11
- { name: 'config-path', type: String, default: 'config/ember-try.js' },
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
- run(commandOptions) {
17
- let command = this;
17
+
18
+ async run(commandOptions) {
18
19
  debug('Options:\n', commandOptions);
19
20
 
20
- let getConfig = command._getConfig({
21
- project: command.project,
21
+ let config = await this._getConfig({
22
+ project: this.project,
22
23
  configPath: commandOptions.configPath,
23
24
  });
24
25
 
25
- return getConfig.then((config) => {
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
- return tryEachTask.run(config.scenarios, { skipCleanup: commandOptions.skipCleanup });
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: 'Runs with each Ember version matching the semver statement given. The command defaults to `ember test`',
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', type: Boolean, default: false },
16
- { name: 'config-path', type: String, default: 'config/ember-try.js' },
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
- run(commandOptions, rawArgs) {
22
- let command = this;
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 getConfig = command._getConfig({
29
- project: command.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
- return getConfig.then((config) => {
37
- debug('Config: %s', JSON.stringify(config));
35
+ debug('Config: %s', JSON.stringify(config));
38
36
 
39
- let tryEachTask = new command._TryEachTask({
40
- ui: command.ui,
41
- project: command.project,
42
- config,
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
  };
@@ -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: 'Run any `ember` command with the specified dependency scenario. This optional command is preceded by " --- " and will default to `ember test`',
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, default: 'config/ember-try.js' },
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 = tryOne.getCommand();
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 getConfig = tryOne._getConfig({
50
- project: tryOne.project,
46
+ let config = await this._getConfig({
47
+ project: this.project,
51
48
  configPath: commandOptions.configPath,
52
49
  });
53
50
 
54
- return getConfig.then((config) => {
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
- let tryEachTask = new tryOne._TryEachTask({
65
- ui: tryOne.ui,
66
- project: tryOne.project,
67
- config,
68
- commandArgs,
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
- return tryEachTask.run([scenario], { skipCleanup: commandOptions.skipCleanup });
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() {